Skip to content

Commit be96e0f

Browse files
Upload for Release 1.3.0.0
1 parent c3c6d19 commit be96e0f

39 files changed

+14202
-0
lines changed

Starter/App.config

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<configuration>
3+
<startup>
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
5+
</startup>
6+
</configuration>

Starter/Properties/AssemblyInfo.cs

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
using System.Runtime.InteropServices;
4+
5+
// Allgemeine Informationen über eine Assembly werden über die folgenden
6+
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
7+
// die einer Assembly zugeordnet sind.
8+
[assembly: AssemblyTitle("Starter")]
9+
[assembly: AssemblyDescription("")]
10+
[assembly: AssemblyConfiguration("")]
11+
[assembly: AssemblyCompany("")]
12+
[assembly: AssemblyProduct("Starter")]
13+
[assembly: AssemblyCopyright("Copyright © 2023")]
14+
[assembly: AssemblyTrademark("")]
15+
[assembly: AssemblyCulture("")]
16+
17+
// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly
18+
// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von
19+
// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen.
20+
[assembly: ComVisible(false)]
21+
22+
// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
23+
[assembly: Guid("71c7a472-ec71-4d66-97ee-9bcc099d88d5")]
24+
25+
// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
26+
//
27+
// Hauptversion
28+
// Nebenversion
29+
// Buildnummer
30+
// Revision
31+
//
32+
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
33+
// indem Sie "*" wie unten gezeigt eingeben:
34+
// [assembly: AssemblyVersion("1.0.*")]
35+
[assembly: AssemblyVersion("1.0.0.0")]
36+
[assembly: AssemblyFileVersion("1.0.0.0")]

Starter/Starter.cs

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
using System;
2+
using System.Diagnostics;
3+
using System.IO;
4+
using System.Windows.Forms;
5+
6+
namespace Starter
7+
{
8+
internal class Starter
9+
{
10+
public static Boolean CompareHash256(string file, String hash)
11+
{
12+
try
13+
{
14+
using var sha256 = System.Security.Cryptography.SHA256.Create();
15+
using var stream = File.OpenRead(file);
16+
if ((BitConverter.ToString(sha256.ComputeHash(stream)).Replace("-", string.Empty)).Equals(hash, StringComparison.OrdinalIgnoreCase))
17+
{
18+
return true;
19+
}
20+
else
21+
{
22+
return false;
23+
}
24+
}
25+
catch (Exception ex) when (ex is System.IO.FileNotFoundException || ex is System.IO.DirectoryNotFoundException)
26+
{
27+
return false;
28+
}
29+
}
30+
31+
static void Main()
32+
{
33+
Boolean valide = false;
34+
Boolean ignore = false;
35+
36+
if (CompareHash256("data\\WinUtil.exe", "168653fe935162387fc69f7434f8361725bd71004286765ec816322d18eefb81"))
37+
{
38+
valide = true;
39+
}
40+
do
41+
{
42+
if (valide || ignore)
43+
{
44+
Process proc = new();
45+
ProcessStartInfo info = new()
46+
{
47+
FileName = "WinUtil.exe",
48+
49+
Arguments = "e22afd680ce7b8f23fad799fa3beef2dbce66e42e8877a9f2f0e3fd0b55619c9",
50+
UseShellExecute = true,
51+
WorkingDirectory = "data",
52+
Verb = "runas"
53+
54+
};
55+
proc.StartInfo = info;
56+
proc.Start();
57+
break;
58+
}
59+
else
60+
{
61+
var result = System.Windows.Forms.MessageBox.Show("Hash of 'WinUtil.exe' invalid, continue?", "Verification Error", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
62+
63+
if (result == DialogResult.Yes)
64+
{
65+
ignore = true;
66+
}
67+
}
68+
} while (ignore);
69+
}
70+
}
71+
}

Starter/Starter.csproj

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{71C7A472-EC71-4D66-97EE-9BCC099D88D5}</ProjectGuid>
8+
<OutputType>Exe</OutputType>
9+
<RootNamespace>Starter</RootNamespace>
10+
<AssemblyName>Starter</AssemblyName>
11+
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
12+
<LangVersion>9.0</LangVersion>
13+
<FileAlignment>512</FileAlignment>
14+
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
15+
<Deterministic>true</Deterministic>
16+
</PropertyGroup>
17+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
18+
<PlatformTarget>AnyCPU</PlatformTarget>
19+
<DebugSymbols>true</DebugSymbols>
20+
<DebugType>full</DebugType>
21+
<Optimize>false</Optimize>
22+
<OutputPath>bin\Debug\</OutputPath>
23+
<DefineConstants>DEBUG;TRACE</DefineConstants>
24+
<ErrorReport>prompt</ErrorReport>
25+
<WarningLevel>4</WarningLevel>
26+
<Prefer32Bit>false</Prefer32Bit>
27+
</PropertyGroup>
28+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
29+
<PlatformTarget>AnyCPU</PlatformTarget>
30+
<DebugType>pdbonly</DebugType>
31+
<Optimize>true</Optimize>
32+
<OutputPath>bin\Release\</OutputPath>
33+
<DefineConstants>
34+
</DefineConstants>
35+
<ErrorReport>prompt</ErrorReport>
36+
<WarningLevel>4</WarningLevel>
37+
<Prefer32Bit>false</Prefer32Bit>
38+
</PropertyGroup>
39+
<PropertyGroup>
40+
<ApplicationIcon>imageres_1028.ico</ApplicationIcon>
41+
</PropertyGroup>
42+
<PropertyGroup>
43+
<ApplicationManifest>app.manifest</ApplicationManifest>
44+
</PropertyGroup>
45+
<ItemGroup>
46+
<Reference Include="PresentationFramework" />
47+
<Reference Include="System" />
48+
<Reference Include="System.Core" />
49+
<Reference Include="System.Windows.Forms" />
50+
<Reference Include="System.Xml.Linq" />
51+
<Reference Include="System.Data.DataSetExtensions" />
52+
<Reference Include="Microsoft.CSharp" />
53+
<Reference Include="System.Data" />
54+
<Reference Include="System.Net.Http" />
55+
<Reference Include="System.Xml" />
56+
</ItemGroup>
57+
<ItemGroup>
58+
<Compile Include="Starter.cs" />
59+
<Compile Include="Properties\AssemblyInfo.cs" />
60+
</ItemGroup>
61+
<ItemGroup>
62+
<None Include="App.config" />
63+
<None Include="app.manifest" />
64+
</ItemGroup>
65+
<ItemGroup>
66+
<Content Include="imageres_1028.ico" />
67+
</ItemGroup>
68+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
69+
</Project>

Starter/app.manifest

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
3+
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
4+
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
5+
<security>
6+
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
7+
<!-- UAC-Manifestoptionen
8+
Wenn Sie die Ebene der Benutzerkontensteuerung für Windows ändern möchten, ersetzen Sie den
9+
Knoten "requestedExecutionLevel" wie folgt.
10+
11+
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
12+
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
13+
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
14+
15+
Durch Angabe des Elements "requestedExecutionLevel" wird die Datei- und Registrierungsvirtualisierung deaktiviert.
16+
Entfernen Sie dieses Element, wenn diese Virtualisierung aus Gründen der Abwärtskompatibilität
17+
für die Anwendung erforderlich ist.
18+
-->
19+
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
20+
</requestedPrivileges>
21+
</security>
22+
</trustInfo>
23+
24+
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
25+
<application>
26+
<!-- Eine Liste der Windows-Versionen, unter denen diese Anwendung getestet
27+
und für die sie entwickelt wurde. Wenn Sie die Auskommentierung der entsprechenden Elemente aufheben,
28+
wird von Windows automatisch die kompatibelste Umgebung ausgewählt. -->
29+
30+
<!-- Windows Vista -->
31+
<!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />-->
32+
33+
<!-- Windows 7 -->
34+
<!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />-->
35+
36+
<!-- Windows 8 -->
37+
<!--<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />-->
38+
39+
<!-- Windows 8.1 -->
40+
<!--<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />-->
41+
42+
<!-- Windows 10 -->
43+
<!--<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />-->
44+
45+
</application>
46+
</compatibility>
47+
48+
<!-- Gibt an, dass die Anwendung mit DPI-Werten kompatibel ist und von Windows nicht automatisch auf höhere
49+
DPI-Werte skaliert wird. WPF-Anwendungen (Windows Presentation Foundation) sind automatisch mit DPI-Werten kompatibel, eine Aktivierung
50+
ist nicht erforderlich. Für Windows Forms-Anwendungen für .NET Framework 4.6, die diese Einstellung aktivieren, muss
51+
auch die Einstellung "'EnableWindowsFormsHighDpiAutoResizing" in der Datei "app.config" auf TRUE festgelegt werden.
52+
53+
Hierdurch können für die Anwendung lange Pfade verwendet werden. Weitere Informationen finden Sie unter https://docs.microsoft.com/windows/win32/fileio/maximum-file-path-limitation.-->
54+
<!--
55+
<application xmlns="urn:schemas-microsoft-com:asm.v3">
56+
<windowsSettings>
57+
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
58+
<longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware>
59+
</windowsSettings>
60+
</application>
61+
-->
62+
63+
<!-- Designs für allgemeine Windows-Steuerelemente und -Dialogfelder (Windows XP und höher) aktivieren -->
64+
<!--
65+
<dependency>
66+
<dependentAssembly>
67+
<assemblyIdentity
68+
type="win32"
69+
name="Microsoft.Windows.Common-Controls"
70+
version="6.0.0.0"
71+
processorArchitecture="*"
72+
publicKeyToken="6595b64144ccf1df"
73+
language="*"
74+
/>
75+
</dependentAssembly>
76+
</dependency>
77+
-->
78+
79+
</assembly>

Starter/imageres_1028.ico

51 KB
Binary file not shown.
Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
<Window x:Class="WinUtil_Main.FirefoxProfileSelector"
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
5+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
6+
xmlns:local="clr-namespace:WinUtil_Main"
7+
mc:Ignorable="d"
8+
ResizeMode="CanMinimize"
9+
Background="#272727"
10+
Title="Select Profile" Height="450" Width="800">
11+
12+
<Window.Resources>
13+
<Style x:Key="FocusVisual">
14+
<Setter Property="Control.Template">
15+
<Setter.Value>
16+
<ControlTemplate>
17+
<Rectangle Margin="2" StrokeDashArray="1 2" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" SnapsToDevicePixels="true" StrokeThickness="1"/>
18+
</ControlTemplate>
19+
</Setter.Value>
20+
</Setter>
21+
</Style>
22+
<Style x:Key="OptionMarkFocusVisual">
23+
<Setter Property="Control.Template">
24+
<Setter.Value>
25+
<ControlTemplate>
26+
<Rectangle Margin="14,0,0,0" StrokeDashArray="1 2" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" SnapsToDevicePixels="true" StrokeThickness="1"/>
27+
</ControlTemplate>
28+
</Setter.Value>
29+
</Setter>
30+
</Style>
31+
<SolidColorBrush x:Key="OptionMark.Static.Background" Color="#dddddd"/>
32+
<SolidColorBrush x:Key="OptionMark.Static.Border" Color="#FF707070"/>
33+
<SolidColorBrush x:Key="OptionMark.Static.Glyph" Color="#FF212121"/>
34+
<SolidColorBrush x:Key="OptionMark.MouseOver.Background" Color="#FFF3F9FF"/>
35+
<SolidColorBrush x:Key="OptionMark.MouseOver.Border" Color="#FF5593FF"/>
36+
<SolidColorBrush x:Key="OptionMark.MouseOver.Glyph" Color="#FF212121"/>
37+
<SolidColorBrush x:Key="OptionMark.Pressed.Background" Color="#dddddd"/>
38+
<SolidColorBrush x:Key="OptionMark.Pressed.Border" Color="#FF3C77DD"/>
39+
<SolidColorBrush x:Key="OptionMark.Pressed.Glyph" Color="#212121"/>
40+
<SolidColorBrush x:Key="OptionMark.Disabled.Background" Color="#555555"/>
41+
<SolidColorBrush x:Key="OptionMark.Disabled.Border" Color="#414141"/>
42+
<SolidColorBrush x:Key="OptionMark.Disabled.Glyph" Color="#FF707070"/>
43+
<Style x:Key="CheckBoxStyle1" TargetType="{x:Type CheckBox}">
44+
<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
45+
<Setter Property="Background" Value="{StaticResource OptionMark.Static.Background}"/>
46+
<Setter Property="BorderBrush" Value="{StaticResource OptionMark.Static.Border}"/>
47+
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
48+
<Setter Property="BorderThickness" Value="1"/>
49+
<Setter Property="Template">
50+
<Setter.Value>
51+
<ControlTemplate TargetType="{x:Type CheckBox}">
52+
<Grid x:Name="templateRoot" Background="Transparent" SnapsToDevicePixels="True">
53+
<Grid.ColumnDefinitions>
54+
<ColumnDefinition Width="Auto"/>
55+
<ColumnDefinition Width="*"/>
56+
</Grid.ColumnDefinitions>
57+
<Border x:Name="checkBoxBorder" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="1" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
58+
<Grid x:Name="markGrid">
59+
<Path x:Name="optionMark" Data="F1 M 9.97498,1.22334L 4.6983,9.09834L 4.52164,9.09834L 0,5.19331L 1.27664,3.52165L 4.255,6.08833L 8.33331,1.52588e-005L 9.97498,1.22334 Z " Fill="{StaticResource OptionMark.Static.Glyph}" Margin="1" Opacity="0" Stretch="None"/>
60+
<Rectangle x:Name="indeterminateMark" Fill="{StaticResource OptionMark.Static.Glyph}" Margin="2" Opacity="0"/>
61+
</Grid>
62+
</Border>
63+
<ContentPresenter x:Name="contentPresenter" Grid.Column="1" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
64+
</Grid>
65+
<ControlTemplate.Triggers>
66+
<Trigger Property="HasContent" Value="true">
67+
<Setter Property="FocusVisualStyle" Value="{StaticResource OptionMarkFocusVisual}"/>
68+
<Setter Property="Padding" Value="4,-1,0,0"/>
69+
</Trigger>
70+
<Trigger Property="IsMouseOver" Value="true">
71+
<Setter Property="Background" TargetName="checkBoxBorder" Value="{StaticResource OptionMark.MouseOver.Background}"/>
72+
<Setter Property="BorderBrush" TargetName="checkBoxBorder" Value="{StaticResource OptionMark.MouseOver.Border}"/>
73+
<Setter Property="Fill" TargetName="optionMark" Value="{StaticResource OptionMark.MouseOver.Glyph}"/>
74+
<Setter Property="Fill" TargetName="indeterminateMark" Value="{StaticResource OptionMark.MouseOver.Glyph}"/>
75+
</Trigger>
76+
<Trigger Property="IsEnabled" Value="false">
77+
<Setter Property="Background" TargetName="checkBoxBorder" Value="{StaticResource OptionMark.Disabled.Background}"/>
78+
<Setter Property="BorderBrush" TargetName="checkBoxBorder" Value="{StaticResource OptionMark.Disabled.Border}"/>
79+
<Setter Property="Fill" TargetName="optionMark" Value="{StaticResource OptionMark.Disabled.Glyph}"/>
80+
<Setter Property="Fill" TargetName="indeterminateMark" Value="{StaticResource OptionMark.Disabled.Glyph}"/>
81+
</Trigger>
82+
<Trigger Property="IsPressed" Value="true">
83+
<Setter Property="Background" TargetName="checkBoxBorder" Value="{StaticResource OptionMark.Pressed.Background}"/>
84+
<Setter Property="BorderBrush" TargetName="checkBoxBorder" Value="{StaticResource OptionMark.Pressed.Border}"/>
85+
<Setter Property="Fill" TargetName="optionMark" Value="{StaticResource OptionMark.Pressed.Glyph}"/>
86+
<Setter Property="Fill" TargetName="indeterminateMark" Value="{StaticResource OptionMark.Pressed.Glyph}"/>
87+
</Trigger>
88+
<Trigger Property="IsChecked" Value="true">
89+
<Setter Property="Opacity" TargetName="optionMark" Value="1"/>
90+
<Setter Property="Opacity" TargetName="indeterminateMark" Value="0"/>
91+
</Trigger>
92+
<Trigger Property="IsChecked" Value="{x:Null}">
93+
<Setter Property="Opacity" TargetName="optionMark" Value="0"/>
94+
<Setter Property="Opacity" TargetName="indeterminateMark" Value="1"/>
95+
</Trigger>
96+
</ControlTemplate.Triggers>
97+
</ControlTemplate>
98+
</Setter.Value>
99+
</Setter>
100+
</Style>
101+
</Window.Resources>
102+
103+
104+
105+
106+
107+
108+
109+
<Grid>
110+
111+
112+
113+
114+
115+
116+
117+
118+
119+
120+
121+
122+
123+
124+
125+
</Grid>
126+
</Window>

0 commit comments

Comments
 (0)