2024-05-23 21:35:02 -04:00
<coreWindows:WindowBase x:Class="MPF.UI.Windows.MainWindow"
2022-04-11 10:32:03 -07:00
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"
2024-05-23 21:35:02 -04:00
xmlns:controls="clr-namespace:MPF.UI.UserControls"
xmlns:core="clr-namespace:MPF.UI"
xmlns:coreWindows="clr-namespace:MPF.UI.Windows"
2024-05-23 15:40:12 -04:00
xmlns:viewModels="clr-namespace:MPF.Frontend.ViewModels;assembly=MPF.Frontend"
2022-04-11 10:32:03 -07:00
mc:Ignorable="d"
Title="Media Preservation Frontend" Width="600" WindowStyle="None"
WindowStartupLocation="CenterScreen" ResizeMode="CanMinimize" SizeToContent="Height"
BorderBrush="DarkGray" BorderThickness="2">
2018-05-18 22:32:30 -04:00
2021-08-04 14:17:53 -07:00
<Window.DataContext>
<viewModels:MainViewModel/>
</Window.DataContext>
2023-10-08 20:52:29 -04:00
<Window.Resources>
<core:ElementConverter x:Key="ElementConverter" />
</Window.Resources>
2021-08-04 14:17:53 -07:00
2018-05-12 19:48:18 -04:00
<Grid>
2021-02-28 02:28:53 -08:00
<StackPanel Orientation="Vertical">
2021-04-28 10:08:18 -07:00
<Grid Margin="0,2,0,0">
2021-04-26 22:32:05 -07:00
<Grid.ColumnDefinitions>
<ColumnDefinition Width="25"/>
2022-03-15 19:25:43 -04:00
<ColumnDefinition/>
2021-04-26 22:32:05 -07:00
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
2021-04-28 10:08:18 -07:00
<ColumnDefinition Width="50"/>
2021-04-26 22:32:05 -07:00
</Grid.ColumnDefinitions>
<Image Grid.Column="0" Source="/Images/Icon.ico" Height="20" Width="20" Margin="1" />
2021-04-28 10:08:18 -07:00
<StackPanel Panel.ZIndex="1" Grid.Column="1" VerticalAlignment="Center" Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}">
2021-04-26 22:32:05 -07:00
<Menu x:Name="TopMenuBar" Width="Auto" Height="20"
2021-04-26 12:07:21 -07:00
Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"
Foreground="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}">
2021-04-26 22:32:05 -07:00
<MenuItem x:Name="FileMenuItem" Header="_File"
2021-04-26 12:07:21 -07:00
Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"
Foreground="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"
Template="{DynamicResource CustomMenuItemTemplate}">
2021-08-04 14:17:53 -07:00
<MenuItem x:Name="AppExitMenuItem" Header="E_xit" HorizontalAlignment="Left" Width="185"
2021-04-26 12:07:21 -07:00
Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"
Foreground="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"
Template="{DynamicResource CustomMenuItemTemplate}" />
2021-04-26 22:32:05 -07:00
</MenuItem>
<MenuItem x:Name="ToolsMenuItem" Header="_Tools"
2021-04-26 12:07:21 -07:00
Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"
Foreground="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"
Template="{DynamicResource CustomMenuItemTemplate}">
2024-01-25 08:57:21 +13:00
<MenuItem x:Name="CheckDumpMenuItem" Header="_Check Dump" HorizontalAlignment="Left" Width="185"
Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"
Foreground="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"
Template="{DynamicResource CustomMenuItemTemplate}"
IsEnabled="{Binding CheckDumpMenuItemEnabled}"/>
2024-02-19 10:38:28 +09:00
<MenuItem x:Name="CreateIRDMenuItem" Header="_Create PS3 IRD" HorizontalAlignment="Left" Width="185"
Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"
Foreground="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"
Template="{DynamicResource CustomMenuItemTemplate}"
IsEnabled="{Binding CreateIRDMenuItemEnabled}"/>
2021-08-04 14:17:53 -07:00
<MenuItem x:Name="OptionsMenuItem" Header="_Options" HorizontalAlignment="Left" Width="185"
2021-04-26 12:07:21 -07:00
Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"
Foreground="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"
2023-10-08 22:49:46 -04:00
Template="{DynamicResource CustomMenuItemTemplate}"
IsEnabled="{Binding OptionsMenuItemEnabled}"/>
2022-01-07 13:25:46 -08:00
<MenuItem x:Name="DebugViewMenuItem" Header="_Debug Info Window" HorizontalAlignment="Left" Width="185"
Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"
Foreground="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"
Template="{DynamicResource CustomMenuItemTemplate}" Visibility="Collapsed" />
2021-04-26 22:32:05 -07:00
</MenuItem>
<MenuItem x:Name="HelpMenuItem" Header="_Help"
2021-04-26 12:07:21 -07:00
Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"
Foreground="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"
Template="{DynamicResource CustomMenuItemTemplate}">
2021-08-04 14:17:53 -07:00
<MenuItem x:Name="AboutMenuItem" Header="_About" HorizontalAlignment="Left" Width="185"
2021-04-26 12:07:21 -07:00
Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"
Foreground="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"
Template="{DynamicResource CustomMenuItemTemplate}" />
2021-08-04 14:17:53 -07:00
<MenuItem x:Name="CheckForUpdatesMenuItem" Header="_Check for Updates" HorizontalAlignment="Left" Width="185"
2021-04-26 12:07:21 -07:00
Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"
Foreground="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"
Template="{DynamicResource CustomMenuItemTemplate}" />
2021-04-26 22:32:05 -07:00
</MenuItem>
</Menu>
</StackPanel>
2021-04-28 10:08:18 -07:00
<Label Panel.ZIndex="0" Grid.Column="1" Grid.ColumnSpan="4" HorizontalAlignment="Stretch" HorizontalContentAlignment="Center" MouseDown="TitleMouseDown">
2021-04-26 22:32:05 -07:00
<Label.Content>
2023-11-30 23:34:44 -05:00
<TextBlock TextAlignment="Center"><Run FontWeight="Bold" Text="Media Preservation Frontend" /></TextBlock>
2021-04-26 22:32:05 -07:00
</Label.Content>
2021-04-28 11:07:54 -07:00
<Label.ContextMenu>
<ContextMenu Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"
Foreground="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"
Style="{DynamicResource CustomContextMenuStyle}">
<MenuItem Header="Minimize" Click="MinimizeButtonClick" Width="185"
Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"
Foreground="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"
Template="{DynamicResource CustomMenuItemTemplate}"/>
<MenuItem Header="Close" Click="CloseButtonClick" Width="185"
Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"
Foreground="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"
Template="{DynamicResource CustomMenuItemTemplate}"/>
</ContextMenu>
</Label.ContextMenu>
2021-04-26 22:32:05 -07:00
</Label>
<Grid Grid.Column="5">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
2021-04-28 10:08:18 -07:00
<Button x:Name="MinimizeButton" Grid.Column="0" BorderThickness="0" Background="Transparent" Style="{DynamicResource CustomButtonStyle}" Click="MinimizeButtonClick">
2021-04-26 22:32:05 -07:00
<Path Data="M 0,0 L 10,0" Stroke="{Binding Path=Foreground,RelativeSource={RelativeSource AncestorType={x:Type Button}}}" StrokeThickness="1"/>
</Button>
2021-04-28 10:08:18 -07:00
<Button x:Name="CloseButton" Grid.Column="1" BorderThickness="0" Background="Transparent" Style="{DynamicResource CustomButtonStyle}" Click="CloseButtonClick">
2021-04-26 22:32:05 -07:00
<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>
2018-05-12 19:48:18 -04:00
2021-02-28 02:28:53 -08:00
<GroupBox Margin="5,5,5,5" HorizontalAlignment="Stretch" Header="Settings">
<Grid Margin="5,5,5,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2.5*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
2023-04-11 11:15:53 -04:00
<RowDefinition/>
2021-02-28 02:28:53 -08:00
</Grid.RowDefinitions>
2018-05-12 19:48:18 -04:00
2021-04-26 12:07:21 -07:00
<Label x:Name="SystemMediaTypeLabel" Grid.Row="0" Grid.Column="0" VerticalAlignment="Center" Content="System/Media Type" />
2023-10-08 20:52:29 -04:00
<ComboBox x:Name="SystemTypeComboBox" Grid.Row="0" Grid.Column="1" Height="22" Width="250" HorizontalAlignment="Left"
ItemsSource="{Binding Systems}" SelectedItem="{Binding Path=CurrentSystem, Converter={StaticResource ElementConverter}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
2023-10-08 22:49:46 -04:00
IsEnabled="{Binding SystemTypeComboBoxEnabled}" Style="{DynamicResource CustomComboBoxStyle}">
2021-03-02 09:55:50 -08:00
<ComboBox.ItemContainerStyle>
<Style TargetType="{x:Type ComboBoxItem}">
<Style.Triggers>
2021-04-26 12:07:21 -07:00
<DataTrigger Binding="{Binding IsHeader}" Value="True">
2021-03-02 09:55:50 -08:00
<Setter Property="IsEnabled" Value="False"/>
</DataTrigger>
</Style.Triggers>
</Style>
</ComboBox.ItemContainerStyle>
2021-02-28 02:28:53 -08:00
</ComboBox>
2023-10-08 20:52:29 -04:00
<ComboBox x:Name="MediaTypeComboBox" Grid.Row="0" Grid.Column="1" Height="22" Width="140" HorizontalAlignment="Right"
ItemsSource="{Binding MediaTypes}" SelectedItem="{Binding Path=CurrentMediaType, Converter={StaticResource ElementConverter}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
2023-10-08 22:49:46 -04:00
IsEnabled="{Binding MediaTypeComboBoxEnabled}" Style="{DynamicResource CustomComboBoxStyle}" />
2018-05-12 19:48:18 -04:00
2022-12-13 11:48:26 -08:00
<Label x:Name="OutputPathLabel" Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" Content="Output Path"/>
2023-10-08 20:52:29 -04:00
<TextBox x:Name="OutputPathTextBox" Grid.Row="1" Grid.Column="1" Height="22" Width="345" HorizontalAlignment="Left" VerticalContentAlignment="Center"
2023-10-08 22:49:46 -04:00
Text="{Binding OutputPath, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
IsEnabled="{Binding OutputPathTextBoxEnabled}" />
2022-12-13 11:48:26 -08:00
<Button x:Name="OutputPathBrowseButton" Grid.Row="1" Grid.Column="1" Height="22" Width="50" HorizontalAlignment="Right" Content="Browse"
2023-10-08 22:49:46 -04:00
IsEnabled="{Binding OutputPathBrowseButtonEnabled}" Style="{DynamicResource CustomButtonStyle}"/>
2018-05-18 22:32:30 -04:00
2022-12-13 11:48:26 -08:00
<Label x:Name="DriveLetterLabel" Grid.Row="2" Grid.Column="0" VerticalAlignment="Center" Content="Drive Letter"/>
2023-10-08 20:52:29 -04:00
<ComboBox x:Name="DriveLetterComboBox" Grid.Row="2" Grid.Column="1" Height="22" Width="60" HorizontalAlignment="Left"
ItemsSource="{Binding Drives}" SelectedItem="{Binding Path=CurrentDrive, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
2023-10-08 22:49:46 -04:00
IsEnabled="{Binding DriveLetterComboBoxEnabled}" Style="{DynamicResource CustomComboBoxStyle}">
2021-02-28 02:28:53 -08:00
<ComboBox.ItemTemplate>
<DataTemplate>
2021-04-26 12:07:21 -07:00
<TextBlock Text="{Binding Letter}" />
2021-02-28 02:28:53 -08:00
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
2018-05-18 22:32:30 -04:00
2022-12-13 11:48:26 -08:00
<Label x:Name="DriveSpeedLabel" Grid.Row="3" Grid.Column="0" VerticalAlignment="Center" Content="Drive Speed"/>
2023-10-08 20:52:29 -04:00
<ComboBox x:Name="DriveSpeedComboBox" Grid.Row="3" Grid.Column="1" Height="22" Width="60" HorizontalAlignment="Left"
2023-10-08 22:49:46 -04:00
ItemsSource="{Binding DriveSpeeds}" SelectedItem="{Binding Path=DriveSpeed, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
IsEnabled="{Binding DriveSpeedComboBoxEnabled}" Style="{DynamicResource CustomComboBoxStyle}" />
2018-05-18 22:32:30 -04:00
2023-04-11 11:15:53 -04:00
<Label x:Name="DumpingProgramLabel" Grid.Row="4" Grid.Column="0" VerticalAlignment="Center" Content="Dumping Program"/>
2023-10-08 20:52:29 -04:00
<ComboBox x:Name="DumpingProgramComboBox" Grid.Row="4" Grid.Column="1" Height="22" Width="250" HorizontalAlignment="Left"
ItemsSource="{Binding InternalPrograms}" SelectedItem="{Binding Path=CurrentProgram, Converter={StaticResource ElementConverter}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
2023-10-08 22:49:46 -04:00
IsEnabled="{Binding DumpingProgramComboBoxEnabled}" Style="{DynamicResource CustomComboBoxStyle}" />
2023-10-08 20:52:29 -04:00
2023-04-11 11:15:53 -04:00
<Label x:Name="ParametersLabel" Grid.Row="5" Grid.Column="0" VerticalAlignment="Center" Content="Parameters"/>
2023-10-08 22:49:46 -04:00
<TextBox x:Name="ParametersTextBox" Grid.Row="5" Grid.Column="1" Height="22" Width="370" HorizontalAlignment="Left" VerticalContentAlignment="Center"
Text="{Binding Parameters, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
IsEnabled="{Binding ParametersCheckBoxEnabled}"/>
<CheckBox x:Name="EnableParametersCheckBox" Grid.Row="5" Grid.Column="1" Height="22" HorizontalAlignment="Right"
IsChecked="{Binding ParametersCheckBoxEnabled, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
IsEnabled="{Binding EnableParametersCheckBoxEnabled}"/>
2021-02-28 02:28:53 -08:00
</Grid>
</GroupBox>
2018-06-12 16:49:33 -07:00
2021-02-28 02:28:53 -08:00
<GroupBox Margin="5,5,5,5" HorizontalAlignment="Stretch" Header="Controls">
2022-03-02 00:43:05 -05:00
<UniformGrid Columns="4" Margin="5,5,5,5">
2023-10-08 22:49:46 -04:00
<Button x:Name="StartStopButton" Height="22" Width="125" VerticalAlignment="Center" HorizontalAlignment="Center" IsDefault="True"
Content="{Binding StartStopButtonText, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
IsEnabled="{Binding StartStopButtonEnabled}" Style="{DynamicResource CustomButtonStyle}" />
2021-10-22 19:51:40 -04:00
<Button x:Name="MediaScanButton" Height="22" Width="125" VerticalAlignment="Center" HorizontalAlignment="Center" Content="Scan for discs"
2023-10-08 22:49:46 -04:00
IsEnabled="{Binding MediaScanButtonEnabled}" Style="{DynamicResource CustomButtonStyle}" />
2022-03-02 00:43:05 -05:00
<Button x:Name="UpdateVolumeLabel" Height="22" Width="125" VerticalAlignment="Center" HorizontalAlignment="Center" Content="Update Label"
2023-10-08 22:49:46 -04:00
IsEnabled="{Binding UpdateVolumeLabelEnabled}" Style="{DynamicResource CustomButtonStyle}" />
2021-04-26 12:07:21 -07:00
<Button x:Name="CopyProtectScanButton" Height="22" Width="125" VerticalAlignment="Center" HorizontalAlignment="Center" Content="Scan for protection"
2023-10-08 22:49:46 -04:00
IsEnabled="{Binding CopyProtectScanButtonEnabled}" Style="{DynamicResource CustomButtonStyle}" />
2021-03-01 21:09:26 -08:00
</UniformGrid>
2021-02-28 02:28:53 -08:00
</GroupBox>
2018-05-18 22:32:30 -04:00
2021-02-28 02:28:53 -08:00
<GroupBox Margin="5,5,5,5" HorizontalAlignment="Stretch" Header="Status">
2021-03-01 21:09:26 -08:00
<UniformGrid Margin="5,5,5,5" Grid.ColumnSpan="2">
2023-10-08 20:52:29 -04:00
<TextBlock x:Name="StatusLabel" VerticalAlignment="Center" HorizontalAlignment="Center"
Text="{Binding Status, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
2021-03-01 21:09:26 -08:00
</UniformGrid>
2021-02-28 02:28:53 -08:00
</GroupBox>
2018-05-18 22:32:30 -04:00
2023-10-08 20:52:29 -04:00
<Expander Margin="5,5 5 5" MaxHeight="300" HorizontalAlignment="Stretch" Header="Log Output" x:Name="LogPanel"
2023-10-08 22:49:46 -04:00
IsExpanded="{Binding LogPanelExpanded}">
2021-02-28 02:28:53 -08:00
<controls:LogOutput x:Name="LogOutput"/>
</Expander>
</StackPanel>
2018-05-18 22:32:30 -04:00
</Grid>
2022-04-11 10:32:03 -07:00
</coreWindows:WindowBase>