mirror of
https://github.com/SabreTools/MPF.git
synced 2026-02-04 05:35:52 +00:00
* Test using resources * Include system namespace in resource xaml * system namespace name * rename strings * Default strings * Window resources * add keys * just one key * Combo box example * window resources * Dropdown in menu bar * nullable * non nullable * string list init * simple * English default * Add menu item for language * parent is menuitem * fix * no null lang * Only build win-x64, GHA storage limit * Korean * test * Set resource strings at app level * remove lost endif * Better UI * Move langs next to buttons * update * fix button * More translations * Better menu size * too many semicolons * top right menu bar * Tweaks * Top bar positioning * title bar width * try again * final * Back to original publish script * more windows * pre-merge test * Test non-latin underscore * More strings * fix * FindResource is a function * space * cast spells * Log about text * semicolon * Good * cast spells * using System.Windows in Frontend * Translate in MainViewModel * Dynamic GetFormattedVolumeLabel * Nullability * Fix * using for dict * Translate func in MVM * Don't translate in init * Update MVM translations * closing brace * Deprecate resource string * test * test2 * set current system * trial field * field is preview * default empty string * default null * fix build * empty string * GIve up on no system selected text * Fix context menu border * Revert half fix * Translate more IRD Window strings * Loose string * Detect current locale * fix * System.Globalization * Locale detection for default lang * break on zh case * default startup lang * default lang option * fix * fix2 * fix3 * nonnullable * final fix * final final fix * default language option * use default language on startup * empty entry * semicolon
218 lines
16 KiB
XML
218 lines
16 KiB
XML
<coreWindows:WindowBase x:Class="MPF.UI.Windows.CreateIRDWindow"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:core="clr-namespace:MPF.UI"
|
|
xmlns:coreWindows="clr-namespace:MPF.UI.Windows"
|
|
xmlns:viewModels="clr-namespace:MPF.Frontend.ViewModels;assembly=MPF.Frontend"
|
|
mc:Ignorable="d"
|
|
Title="{DynamicResource CreatePS3IRDDumpMenuItemString}" Width="600" WindowStyle="None"
|
|
WindowStartupLocation="CenterOwner" ResizeMode="CanMinimize" SizeToContent="Height"
|
|
AllowsTransparency="True" Background="Transparent">
|
|
|
|
<Window.DataContext>
|
|
<viewModels:CreateIRDViewModel/>
|
|
</Window.DataContext>
|
|
<Window.Resources>
|
|
<core:ElementConverter x:Key="ElementConverter" />
|
|
</Window.Resources>
|
|
|
|
<Border CornerRadius="8" Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}" BorderBrush="Gray" BorderThickness="2">
|
|
<StackPanel Orientation="Vertical">
|
|
<Grid Margin="0,2,0,0">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="25"/>
|
|
<ColumnDefinition/>
|
|
<ColumnDefinition/>
|
|
<ColumnDefinition/>
|
|
<ColumnDefinition/>
|
|
<ColumnDefinition Width="50"/>
|
|
<ColumnDefinition Width="5"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Image Grid.Column="0" Source="/Images/Icon.ico" Height="20" Width="20" Margin="1" MouseDown="TitleMouseDown" />
|
|
<Label Grid.Column="1" Grid.ColumnSpan="4" HorizontalAlignment="Stretch" HorizontalContentAlignment="Center" MouseDown="TitleMouseDown">
|
|
<Label.Content>
|
|
<Run FontWeight="Bold" Text="{DynamicResource CreatePS3IRDDumpMenuItemString}" />
|
|
</Label.Content>
|
|
<Label.ContextMenu>
|
|
<ContextMenu Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"
|
|
Foreground="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"
|
|
Style="{DynamicResource CustomContextMenuStyle}">
|
|
<MenuItem Header="{DynamicResource MinimizeMenuItemString}" Click="MinimizeButtonClick" Width="185"
|
|
Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"
|
|
Foreground="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"
|
|
Template="{DynamicResource CustomMenuItemTemplate}"/>
|
|
<MenuItem Header="{DynamicResource CloseMenuItemString}" Click="CloseButtonClick" Width="185"
|
|
Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"
|
|
Foreground="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"
|
|
Template="{DynamicResource CustomMenuItemTemplate}"/>
|
|
</ContextMenu>
|
|
</Label.ContextMenu>
|
|
</Label>
|
|
<Grid Grid.Column="5">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition/>
|
|
<ColumnDefinition/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Button x:Name="MinimizeButton" Grid.Column="0" BorderThickness="0" Background="Transparent" Style="{DynamicResource CustomButtonStyle}" Click="MinimizeButtonClick">
|
|
<Path Data="M 0,0 L 10,0" Stroke="{Binding Path=Foreground,RelativeSource={RelativeSource AncestorType={x:Type Button}}}" StrokeThickness="1"/>
|
|
</Button>
|
|
<Button x:Name="CloseButton" Grid.Column="1" BorderThickness="0" Background="Transparent" Style="{DynamicResource CustomButtonStyle}" Click="CloseButtonClick">
|
|
<Path Data="M 0,0 L 12,12 M 0,12 L 12,0" Stroke="{Binding Path=Foreground,RelativeSource={RelativeSource AncestorType={x:Type Button}}}" StrokeThickness="1"/>
|
|
</Button>
|
|
</Grid>
|
|
</Grid>
|
|
|
|
<GroupBox Margin="5,5,5,5" HorizontalAlignment="Stretch" Header="{DynamicResource InputGroupBoxString}">
|
|
<Grid Margin="5,5,5,5">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="1*"/>
|
|
<ColumnDefinition Width="2.5*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition/>
|
|
<RowDefinition/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<Label x:Name="InputPathLabel" Grid.Row="0" Grid.Column="0" VerticalAlignment="Center" Content="{DynamicResource PS3ISOPathLabelString}"/>
|
|
<TextBox x:Name="InputPathTextBox" Grid.Row="0" Grid.Column="1" Height="22" Width="345" HorizontalAlignment="Left" VerticalContentAlignment="Center"
|
|
Text="{Binding InputPath, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|
IsEnabled="{Binding InputPathTextBoxEnabled}" />
|
|
<Button x:Name="InputPathBrowseButton" Grid.Row="0" Grid.Column="1" Height="22" Width="53" HorizontalAlignment="Right" Content="{DynamicResource BrowseButtonString}"
|
|
IsEnabled="{Binding InputPathBrowseButtonEnabled}" Style="{DynamicResource CustomButtonStyle}"/>
|
|
|
|
<Label x:Name="LogPathLabel" Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" Content="{DynamicResource GetKeyPathLabelString}"/>
|
|
<TextBox x:Name="LogPathTextBox" Grid.Row="1" Grid.Column="1" Height="22" Width="345" HorizontalAlignment="Left" VerticalContentAlignment="Center"
|
|
Text="{Binding LogPath, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|
IsEnabled="{Binding LogPathTextBoxEnabled}" />
|
|
<Button x:Name="LogPathBrowseButton" Grid.Row="1" Grid.Column="1" Height="22" Width="53" HorizontalAlignment="Right" Content="{DynamicResource BrowseButtonString}"
|
|
IsEnabled="{Binding LogPathBrowseButtonEnabled}" Style="{DynamicResource CustomButtonStyle}"/>
|
|
</Grid>
|
|
</GroupBox>
|
|
|
|
<Expander Name="KeyExpander" BorderThickness="1" BorderBrush="#D5DFE5" Margin="5,5,5,5" HorizontalAlignment="Stretch"
|
|
IsEnabled="{Binding LogPathNotProvided}" IsExpanded="False" Header="{DynamicResource KeyExpanderString}">
|
|
<Grid Margin="5,5,5,5">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="1*"/>
|
|
<ColumnDefinition Width="2.5*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition/>
|
|
<RowDefinition/>
|
|
<RowDefinition/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<Label x:Name="KeyLabel" Grid.Row="0" Grid.Column="0" VerticalAlignment="Center" Content="{DynamicResource HexadecimalKeyLabelString}"/>
|
|
<TextBox x:Name="KeyTextBox" Grid.Row="0" Grid.Column="1" Height="22" Width="345" HorizontalAlignment="Left" VerticalContentAlignment="Center"
|
|
Text="{Binding HexKey, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|
IsEnabled="{Binding HexKeyTextBoxEnabled}" />
|
|
|
|
<Label x:Name="KeyPathLabel" Grid.Row="1" Grid.Column="0" VerticalAlignment="Center"
|
|
ToolTip="Typically a *.key file" Content="{DynamicResource KeyFilePathLabelString}"/>
|
|
<TextBox x:Name="KeyPathTextBox" Grid.Row="1" Grid.Column="1" Height="22" Width="345" HorizontalAlignment="Left" VerticalContentAlignment="Center"
|
|
Text="{Binding KeyPath, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|
IsEnabled="{Binding KeyPathTextBoxEnabled}" />
|
|
<Button x:Name="KeyPathBrowseButton" Grid.Row="1" Grid.Column="1" Height="22" Width="53" HorizontalAlignment="Right" Content="{DynamicResource BrowseButtonString}"
|
|
IsEnabled="{Binding KeyPathBrowseButtonEnabled}" Style="{DynamicResource CustomButtonStyle}"/>
|
|
|
|
<Label x:Name="KeyStatusLabel" Grid.Row="2" Grid.Column="0" VerticalAlignment="Center" Content="{DynamicResource KeyStatusLabelString}"/>
|
|
<Label x:Name="KeyStatusText" Grid.Row="2" Grid.Column="1" VerticalAlignment="Center" Content="{Binding KeyStatus}"/>
|
|
</Grid>
|
|
</Expander>
|
|
|
|
<Expander Name="DiscIDExpander" BorderThickness="1" BorderBrush="#D5DFE5" Margin="5,5,5,5" HorizontalAlignment="Stretch"
|
|
IsEnabled="{Binding LogPathNotProvided}" IsExpanded="False" Header="{DynamicResource DiscIDExpanderString}">
|
|
<Grid Margin="5,5,5,5">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="1*"/>
|
|
<ColumnDefinition Width="2.5*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition/>
|
|
<RowDefinition/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<Label x:Name="DiscIDLabel" Grid.Row="0" Grid.Column="0" VerticalAlignment="Center" Content="{DynamicResource DiscIDLabelString}"/>
|
|
<TextBox x:Name="DiscIDTextBox" Grid.Row="0" Grid.Column="1" Height="22" Width="345" HorizontalAlignment="Left" VerticalContentAlignment="Center"
|
|
Text="{Binding DiscIDString, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|
IsEnabled="{Binding DiscIDTextBoxEnabled}" />
|
|
|
|
<Label x:Name="DiscIDStatusLabel" Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" Content="{DynamicResource DiscIDStatusLabelString}"/>
|
|
<Label x:Name="DiscIDStatusText" Grid.Row="1" Grid.Column="1" VerticalAlignment="Center" Content="{Binding DiscIDStatus}"/>
|
|
</Grid>
|
|
</Expander>
|
|
|
|
<Expander Name="PICExpander" BorderThickness="1" BorderBrush="#D5DFE5" Margin="5,5,5,5" HorizontalAlignment="Stretch"
|
|
IsEnabled="{Binding LogPathNotProvided}" IsExpanded="False" Header="{DynamicResource PICExpanderString}">
|
|
<Grid Margin="5,5,5,5">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="1*"/>
|
|
<ColumnDefinition Width="2.5*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition/>
|
|
<RowDefinition/>
|
|
<RowDefinition/>
|
|
<RowDefinition/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<Label x:Name="LayerbreakLabel" Grid.Row="0" Grid.Column="0" VerticalAlignment="Center" Content="{DynamicResource LayerbreakLabelString}"/>
|
|
<TextBox x:Name="LayerbreakTextBox" Grid.Row="0" Grid.Column="1" Height="22" Width="345" HorizontalAlignment="Left" VerticalContentAlignment="Center"
|
|
Text="{Binding LayerbreakString, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|
IsEnabled="{Binding LayerbreakTextBoxEnabled}" />
|
|
|
|
<Label x:Name="PICLabel" Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" Content="{DynamicResource PICLabelString}"/>
|
|
<TextBox x:Name="PICTextBox" Grid.Row="1" Grid.Column="1" Width="345" HorizontalAlignment="Left" VerticalContentAlignment="Top"
|
|
ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Auto"
|
|
MinHeight="55" MaxHeight="146" AcceptsReturn="True"
|
|
Text="{Binding PICString, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|
IsEnabled="{Binding PICTextBoxEnabled}" />
|
|
|
|
<Label x:Name="PICPathLabel" Grid.Row="2" Grid.Column="0" VerticalAlignment="Center"
|
|
ToolTip="Typically a *.physical or *_PIC.bin file" Content="{DynamicResource PICFilePathLabelString}"/>
|
|
<TextBox x:Name="PICPathTextBox" Grid.Row="2" Grid.Column="1" Height="22" Width="345" HorizontalAlignment="Left" VerticalContentAlignment="Center"
|
|
Text="{Binding PICPath, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|
IsEnabled="{Binding PICPathTextBoxEnabled}" />
|
|
<Button x:Name="PICPathBrowseButton" Grid.Row="2" Grid.Column="1" Height="22" Width="53" HorizontalAlignment="Right" Content="{DynamicResource BrowseButtonString}"
|
|
IsEnabled="{Binding PICPathBrowseButtonEnabled}" Style="{DynamicResource CustomButtonStyle}"/>
|
|
|
|
<Label x:Name="PICStatusLabel" Grid.Row="3" Grid.Column="0" VerticalAlignment="Center" Content="{DynamicResource PICStatusLabelString}"/>
|
|
<Label x:Name="PICStatusText" Grid.Row="3" Grid.Column="1" VerticalAlignment="Center" Content="{Binding PICStatus}"/>
|
|
</Grid>
|
|
</Expander>
|
|
|
|
<GroupBox Margin="5,5,5,5" HorizontalAlignment="Stretch" Header="{DynamicResource StatusGroupBoxString}">
|
|
<UniformGrid Margin="5,5,5,5" Grid.ColumnSpan="2">
|
|
<TextBlock x:Name="StatusLabel" VerticalAlignment="Center" HorizontalAlignment="Center"
|
|
Text="{Binding CreateIRDStatus, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
|
</UniformGrid>
|
|
</GroupBox>
|
|
|
|
<!-- Create IRD / Cancel -->
|
|
<GroupBox Margin="5,5,5,5" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
|
<GroupBox.Template>
|
|
<ControlTemplate TargetType="GroupBox">
|
|
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="5">
|
|
<ContentPresenter Content="{TemplateBinding Content}" Margin="{TemplateBinding Padding}" />
|
|
</Border>
|
|
</ControlTemplate>
|
|
</GroupBox.Template>
|
|
<UniformGrid Columns="4" Margin="5,5,5,5" Height="27">
|
|
<Label/>
|
|
<!-- Empty label for padding -->
|
|
<Button Name="CreateIRDButton" Height="25" Width="80" IsDefault="True" Content="{DynamicResource CreateIRDButtonString}"
|
|
IsEnabled="{Binding CreateIRDButtonEnabled}" Style="{DynamicResource CustomButtonStyle}" />
|
|
<Button Name="CancelButton" Height="25" Width="80" IsCancel="True" Content="{DynamicResource CancelButtonString}"
|
|
IsEnabled="{Binding CancelButtonEnabled}" Style="{DynamicResource CustomButtonStyle}" />
|
|
<Label/>
|
|
<!-- Empty label for padding -->
|
|
</UniformGrid>
|
|
</GroupBox>
|
|
</StackPanel>
|
|
</Border>
|
|
</coreWindows:WindowBase>
|