2024-01-07 14:57:27 +00:00
|
|
|
<pu:WindowX
|
|
|
|
x:Class="VPet.Solution.Views.SettingEditor.SettingWindow"
|
|
|
|
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:ll="clr-namespace:LinePutScript.Localization.WPF;assembly=LinePutScript.Localization.WPF"
|
|
|
|
xmlns:local="clr-namespace:VPet.Solution"
|
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
|
xmlns:pu="https://opensource.panuon.com/wpf-ui"
|
|
|
|
xmlns:system="clr-namespace:System;assembly=mscorlib"
|
|
|
|
xmlns:vm="clr-namespace:VPet.Solution.ViewModels.SettingEditor"
|
2024-01-13 13:56:21 +00:00
|
|
|
Title="{ll:Str 'VPET 设置编辑器'}"
|
2024-01-07 14:57:27 +00:00
|
|
|
Width="800"
|
|
|
|
Height="450"
|
|
|
|
MinWidth="400"
|
|
|
|
MinHeight="200"
|
|
|
|
d:DataContext="{d:DesignInstance Type=vm:SettingWindowVM}"
|
|
|
|
WindowStartupLocation="CenterScreen"
|
|
|
|
mc:Ignorable="d">
|
|
|
|
<Grid>
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="Auto" MinWidth="100" />
|
|
|
|
<ColumnDefinition MinWidth="300" />
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Grid>
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
<RowDefinition Height="Auto" />
|
|
|
|
<RowDefinition />
|
2024-01-09 15:22:25 +00:00
|
|
|
<RowDefinition Height="Auto" />
|
|
|
|
<RowDefinition Height="Auto" />
|
2024-01-07 14:57:27 +00:00
|
|
|
</Grid.RowDefinitions>
|
2024-01-13 13:56:21 +00:00
|
|
|
<TextBox
|
|
|
|
pu:TextBoxHelper.Watermark="{ll:Str 搜索设置}"
|
|
|
|
Style="{DynamicResource StandardTextBoxStyle}"
|
|
|
|
Text="{Binding SearchSetting, UpdateSourceTrigger=PropertyChanged}" />
|
2024-01-07 14:57:27 +00:00
|
|
|
<ListBox
|
|
|
|
x:Name="ListBox_Saves"
|
|
|
|
Grid.Row="1"
|
|
|
|
d:ItemsSource="{d:SampleData ItemCount=5}"
|
|
|
|
ItemsSource="{Binding ShowSettings}"
|
|
|
|
SelectedItem="{Binding CurrentSetting}"
|
|
|
|
Style="{DynamicResource SideMenuListBoxStyle}">
|
|
|
|
<ListBox.ItemContainerStyle>
|
|
|
|
<Style BasedOn="{StaticResource {x:Type ListBoxItem}}" TargetType="ListBoxItem">
|
2024-01-09 15:22:25 +00:00
|
|
|
<Setter Property="Tag" Value="{Binding DataContext, RelativeSource={RelativeSource AncestorType=Window}}" />
|
2024-01-07 14:57:27 +00:00
|
|
|
<Setter Property="Content" Value="{Binding Name}" />
|
2024-01-09 15:22:25 +00:00
|
|
|
<Setter Property="ToolTip" Value="{Binding FilePath}" />
|
|
|
|
<Setter Property="ContextMenu">
|
|
|
|
<Setter.Value>
|
2024-01-11 16:28:22 +00:00
|
|
|
<ContextMenu DataContext="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource Mode=Self}}">
|
|
|
|
<MenuItem
|
2024-01-13 14:05:28 +00:00
|
|
|
Command="{Binding PlacementTarget.Tag.OpenFileCommand, RelativeSource={RelativeSource AncestorType=ContextMenu}}"
|
2024-01-11 16:28:22 +00:00
|
|
|
CommandParameter="{Binding}"
|
|
|
|
Header="{ll:Str 打开文件}" />
|
|
|
|
<MenuItem
|
|
|
|
Command="{Binding PlacementTarget.Tag.OpenFileInExplorerCommand, RelativeSource={RelativeSource AncestorType=ContextMenu}}"
|
|
|
|
CommandParameter="{Binding}"
|
|
|
|
Header="{ll:Str 从资源管理器打开文件}" />
|
2024-01-09 15:22:25 +00:00
|
|
|
<MenuItem
|
|
|
|
Command="{Binding PlacementTarget.Tag.SaveSettingCommand, RelativeSource={RelativeSource AncestorType=ContextMenu}}"
|
2024-01-11 16:28:22 +00:00
|
|
|
CommandParameter="{Binding}"
|
2024-01-09 15:22:25 +00:00
|
|
|
Header="{ll:Str 保存}" />
|
2024-01-10 13:37:17 +00:00
|
|
|
<MenuItem
|
|
|
|
Command="{Binding PlacementTarget.Tag.ResetSettingCommand, RelativeSource={RelativeSource AncestorType=ContextMenu}}"
|
2024-01-11 16:28:22 +00:00
|
|
|
CommandParameter="{Binding}"
|
2024-01-10 13:37:17 +00:00
|
|
|
Header="{ll:Str 重置}" />
|
2024-01-09 15:22:25 +00:00
|
|
|
</ContextMenu>
|
|
|
|
</Setter.Value>
|
|
|
|
</Setter>
|
2024-01-07 14:57:27 +00:00
|
|
|
</Style>
|
|
|
|
</ListBox.ItemContainerStyle>
|
|
|
|
</ListBox>
|
2024-01-09 15:22:25 +00:00
|
|
|
<Button
|
|
|
|
Grid.Row="3"
|
|
|
|
Margin="0"
|
|
|
|
HorizontalAlignment="Stretch"
|
|
|
|
Command="{Binding SaveAllSettingCommand}"
|
|
|
|
Content="{ll:Str 全部保存}"
|
|
|
|
Style="{DynamicResource Button_BaseStyle}" />
|
2024-01-07 14:57:27 +00:00
|
|
|
</Grid>
|
2024-01-10 13:37:17 +00:00
|
|
|
<Grid Grid.Column="1" IsEnabled="{Binding SelectedItem, ElementName=ListBox_Saves, Converter={StaticResource NullToFalse}}">
|
2024-01-07 14:57:27 +00:00
|
|
|
<Grid.RowDefinitions>
|
|
|
|
<RowDefinition Height="Auto" />
|
|
|
|
<RowDefinition />
|
|
|
|
</Grid.RowDefinitions>
|
2024-01-09 15:22:25 +00:00
|
|
|
<ListBox x:Name="ListBox_Pages" Style="{DynamicResource SideMenuListBoxStyle}">
|
2024-01-07 14:57:27 +00:00
|
|
|
<ListBox.ItemsPanel>
|
|
|
|
<ItemsPanelTemplate>
|
|
|
|
<StackPanel Orientation="Horizontal" />
|
|
|
|
</ItemsPanelTemplate>
|
|
|
|
</ListBox.ItemsPanel>
|
|
|
|
<ListBoxItem x:Name="ListBoxItem_GraphicsSettings" Content="{ll:Str 图形}" />
|
|
|
|
<ListBoxItem x:Name="ListBoxItem_SystemSettings" Content="{ll:Str 系统}" />
|
|
|
|
<ListBoxItem x:Name="ListBoxItem_InteractiveSettings" Content="{ll:Str 互动}" />
|
|
|
|
<ListBoxItem x:Name="ListBoxItem_CustomizedSettings" Content="{ll:Str 自定}" />
|
|
|
|
<ListBoxItem x:Name="ListBoxItem_DiagnosticSettings" Content="{ll:Str 诊断}" />
|
|
|
|
<ListBoxItem x:Name="ListBoxItem_ModSettings" Content="{ll:Str Mod管理}" />
|
|
|
|
</ListBox>
|
|
|
|
<Frame
|
|
|
|
x:Name="Frame_Main"
|
|
|
|
Grid.Row="1"
|
2024-01-09 15:22:25 +00:00
|
|
|
Content="{Binding SelectedItem.Tag, ElementName=ListBox_Pages}"
|
2024-01-07 14:57:27 +00:00
|
|
|
ContentRendered="Frame_Main_ContentRendered"
|
|
|
|
NavigationUIVisibility="Hidden" />
|
|
|
|
<!--<TabControl
|
|
|
|
x:Name="MainTab"
|
|
|
|
Grid.Column="1"
|
|
|
|
Margin="5"
|
|
|
|
d:SelectionChanged="MainTab_SelectionChanged"
|
|
|
|
pu:TabControlHelper.CanHeaderPanelScroll="True"
|
|
|
|
pu:TabControlHelper.ItemsCornerRadius="4"
|
|
|
|
pu:TabControlHelper.ItemsHeight="NaN"
|
|
|
|
pu:TabControlHelper.ItemsHoverBackground="{DynamicResource PrimaryLight}"
|
|
|
|
pu:TabControlHelper.ItemsPadding="10,7"
|
|
|
|
pu:TabControlHelper.ItemsSelectedBackground="{DynamicResource PrimaryDark}"
|
|
|
|
pu:TabControlHelper.ItemsSelectedForeground="{DynamicResource DARKPrimaryText}"
|
|
|
|
Background="Transparent"
|
|
|
|
BorderThickness="0"
|
|
|
|
Foreground="{DynamicResource PrimaryText}">
|
|
|
|
<TabControl.ContentTemplate>
|
|
|
|
<DataTemplate>
|
|
|
|
<Border
|
|
|
|
Margin="0,5,0,10"
|
|
|
|
Background="{DynamicResource DARKPrimaryText}"
|
|
|
|
CornerRadius="15">
|
|
|
|
<ContentControl Margin="10,5" Content="{Binding}" />
|
|
|
|
</Border>
|
|
|
|
</DataTemplate>
|
|
|
|
</TabControl.ContentTemplate>
|
|
|
|
<TabItem
|
|
|
|
BorderBrush="{DynamicResource PrimaryDarker}"
|
|
|
|
Foreground="{DynamicResource PrimaryText}"
|
|
|
|
Header="" />
|
|
|
|
<TabItem BorderBrush="{DynamicResource PrimaryDarker}" Header="{ll:Str 系统}" />
|
|
|
|
<TabItem BorderBrush="{DynamicResource PrimaryDarker}" Header="{ll:Str 互动}" />
|
|
|
|
<TabItem BorderBrush="{DynamicResource PrimaryDarker}" Header="{ll:Str 自定}" />
|
|
|
|
<TabItem BorderBrush="{DynamicResource PrimaryDarker}" Header="{ll:Str 诊断}" />
|
|
|
|
<TabItem BorderBrush="{DynamicResource PrimaryDarker}" Header="{ll:Str MOD管理}" />
|
|
|
|
</TabControl>
|
|
|
|
<Label
|
|
|
|
x:Name="GameVerison"
|
|
|
|
Grid.ColumnSpan="2"
|
|
|
|
HorizontalAlignment="Right"
|
|
|
|
VerticalAlignment="Bottom"
|
|
|
|
Background="{x:Null}"
|
|
|
|
Content="版本v1.0 (655366666)"
|
|
|
|
FontSize="10"
|
|
|
|
Foreground="Green" />-->
|
|
|
|
</Grid>
|
|
|
|
<!--<Grid Grid.Column="1">
|
|
|
|
<TextBox
|
|
|
|
x:Name="tb_seach_menu"
|
|
|
|
Margin="3,6,6,0"
|
|
|
|
VerticalAlignment="Top"
|
|
|
|
d:TextChanged="tb_seach_menu_textchange"
|
|
|
|
pu:TextBoxHelper.Watermark="{ll:Str 搜索设置}"
|
|
|
|
FontSize="16"
|
|
|
|
Style="{DynamicResource StandardTextBoxStyle}" />
|
|
|
|
<ListBox
|
|
|
|
x:Name="ListMenu"
|
|
|
|
Margin="3,40,6,3"
|
|
|
|
pu:ListBoxHelper.CornerRadius="5"
|
|
|
|
pu:ListBoxHelper.ItemsHoverBackground="{DynamicResource Primary}"
|
|
|
|
pu:ListBoxHelper.ItemsSelectedBackground="{DynamicResource SecondaryLight}"
|
|
|
|
Background="{DynamicResource SecondaryLighter}"
|
|
|
|
BorderBrush="{DynamicResource Primary}"
|
|
|
|
BorderThickness="2"
|
|
|
|
ScrollViewer.HorizontalScrollBarVisibility="Auto"
|
|
|
|
ScrollViewer.VerticalScrollBarVisibility="Auto" />
|
|
|
|
</Grid>-->
|
|
|
|
</Grid>
|
|
|
|
</pu:WindowX>
|