Microwin ISO downloader (#2581)

* try1

* little fix

* change back to using Fido

* little update

* fix some stuff

* fix (maybe?)

* remove architecture selection

* add somewhat of a lang support (needs improvement)

* WIP: refractor of existing logic & addition of language selection

* WIP: correct lang display (not working rn)

* improve, fix and more

- call ed with default windows edition (Home/Pro/Edu)
- fix language combobox logic
- add @CodingWonders 's "Get-FidoLangFromCulture"
- hide comboboxes if manual ISO selection is toggled

* little output fix

- added | Out-Null to combobox item additions to prevent unneeded console output

* improve coloring

- using ToggleButtonOnColor for Radiobuttons
- add theme color ToggleButtonOffColor and use where needed

* fix lang

* fix "en-" lang

remove (United States) bc it is wrong and not accepted by fido/ms

* always add "English"

* fix theming

- add ToggleButtonOffColor to all themes

* fix merge issue

* update instructions

* update ui

- manual download is primary option
- radiobuttons renamed to refrect what they are
- fix styling of instruction
- add margin to radiobuttons

* fix  by adding line break to instructions

* fix merge issues
This commit is contained in:
MyDrift
2024-09-21 16:30:10 +02:00
committed by GitHub
parent 1f683d3f78
commit ba45c3303e
5 changed files with 161 additions and 15 deletions

View File

@ -366,6 +366,47 @@
</Setter.Value>
</Setter>
</Style>
<Style TargetType="RadioButton">
<Setter Property="Foreground" Value="{DynamicResource MainForegroundColor}"/>
<Setter Property="Background" Value="{DynamicResource MainBackgroundColor}"/>
<Setter Property="FontSize" Value="{DynamicResource FontSize}" />
<Setter Property="FontFamily" Value="{DynamicResource FontFamily}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="RadioButton">
<StackPanel Orientation="Horizontal" Margin="{DynamicResource CheckBoxMargin}">
<Grid Width="14" Height="14">
<Ellipse x:Name="OuterCircle"
Stroke="{DynamicResource ToggleButtonOffColor}"
Fill="{DynamicResource ButtonBackgroundColor}"
StrokeThickness="1"
Width="14"
Height="14"
SnapsToDevicePixels="True"/>
<Ellipse x:Name="InnerCircle"
Fill="{DynamicResource ToggleButtonOnColor}"
Width="8"
Height="8"
Visibility="Collapsed"
HorizontalAlignment="Center"
VerticalAlignment="Center"/>
</Grid>
<ContentPresenter Margin="4,0,0,0"
VerticalAlignment="Center"
RecognizesAccessKey="True"/>
</StackPanel>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="InnerCircle" Property="Visibility" Value="Visible"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="OuterCircle" Property="Stroke" Value="{DynamicResource ToggleButtonOnColor}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="ToggleSwitchStyle" TargetType="CheckBox">
<Setter Property="Template">
<Setter.Value>
@ -495,8 +536,8 @@
</Trigger>
<Trigger Property="ToggleButton.IsChecked" Value="False">
<Setter TargetName="Border" Property="Background" Value="{DynamicResource MainBackgroundColor}" />
<Setter TargetName="Border" Property="BorderBrush" Value="#707070" />
<Setter TargetName="Ellipse" Property="Fill" Value="#707070" />
<Setter TargetName="Border" Property="BorderBrush" Value="{DynamicResource ToggleButtonOffColor}" />
<Setter TargetName="Ellipse" Property="Fill" Value="{DynamicResource ToggleButtonOffColor}" />
</Trigger>
<Trigger Property="ToggleButton.IsChecked" Value="True">
@ -1038,10 +1079,14 @@
TextWrapping="Wrap"
Foreground="{DynamicResource LabelboxForegroundColor}"
/>
<RadioButton x:Name="ISOmanual" Content="Select your own ISO" GroupName="Options" Margin="0,10,0,0" IsChecked="True"/>
<RadioButton x:Name="ISOdownloader" Content="Get newest ISO automatically" GroupName="Options" Margin="0,5,0,5"/>
<ComboBox x:Name="ISORelease" Visibility="Collapsed"/>
<ComboBox x:Name="ISOLanguage" Visibility="Collapsed"/>
<Button Name="WPFGetIso" Margin="2" Padding="15">
<Button.Content>
<TextBlock Background="Transparent" Foreground="{DynamicResource ButtonForegroundColor}">
Select Windows <Underline>I</Underline>SO
Get Windows <Underline>I</Underline>SO
</TextBlock>
</Button.Content>
</Button>
@ -1136,7 +1181,10 @@
<LineBreak/>
<Bold>INSTRUCTIONS</Bold> <LineBreak/>
- <TextBlock Name="Win11DownloadLink" Style="{StaticResource HoverTextBlockStyle}" ToolTip="https://www.microsoft.com/software-download/windows11">Download</TextBlock> the latest Windows 11 image from Microsoft <LineBreak/>
- Download a Windows 11 ISO through the following options: <LineBreak/>
<TextBlock Margin="15,0,0,0" Text="- Select your own ISO: Manually download the latest Windows 11 image from " Foreground="{DynamicResource ComboBoxForegroundColor}"/>
<TextBlock Name="Win11DownloadLink" Style="{StaticResource HoverTextBlockStyle}" ToolTip="https://www.microsoft.com/software-download/windows11">Microsoft</TextBlock>. <LineBreak/>
<TextBlock Margin="15,0,0,0" Text="- Get newest ISO automatically: Choose Windows 11 Edition and preferred language." Foreground="{DynamicResource ComboBoxForegroundColor}"/> <LineBreak/>
May take several minutes to process the ISO depending on your machine and connection <LineBreak/>
- Put it somewhere on the C:\ drive so it is easily accessible <LineBreak/>
- Launch WinUtil and MicroWin <LineBreak/>