From b3c1b95bf2285de1dc707b721ff82b5fa8d2b576 Mon Sep 17 00:00:00 2001 From: uye <2396806385@qq.com> Date: Tue, 8 Nov 2022 23:09:28 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E5=9F=BA=E5=BB=BA?= =?UTF-8?q?=E6=8E=92=E7=8F=AD=E5=86=85=E7=BD=AE=E9=85=8D=E7=BD=AE=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E9=80=89=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Resources/Localizations/en-us.xaml | 7 + .../Resources/Localizations/zh-cn.xaml | 7 + .../InfrastSettingsUserControl.xaml | 183 ++++++++++-------- .../ViewModels/SettingsViewModel.cs | 37 ++++ 4 files changed, 157 insertions(+), 77 deletions(-) diff --git a/src/MeoAsstGui/Resources/Localizations/en-us.xaml b/src/MeoAsstGui/Resources/Localizations/en-us.xaml index 832091a037..1ed04c6391 100644 --- a/src/MeoAsstGui/Resources/Localizations/en-us.xaml +++ b/src/MeoAsstGui/Resources/Localizations/en-us.xaml @@ -40,6 +40,13 @@ Do not put stationed opers in dorm Originium Shard auto replenishment Enable Custom Base (beta) + Default Infrast + User defined + 153 3 times a day + 243 3 times a day + 243 4 times a day + 252 3 times a day + 333 3 times a day Base Configuration Base Configuration Parsing Error! Base Configuration: diff --git a/src/MeoAsstGui/Resources/Localizations/zh-cn.xaml b/src/MeoAsstGui/Resources/Localizations/zh-cn.xaml index daf50b6b18..65a84b237b 100644 --- a/src/MeoAsstGui/Resources/Localizations/zh-cn.xaml +++ b/src/MeoAsstGui/Resources/Localizations/zh-cn.xaml @@ -40,6 +40,13 @@ 不将已进驻的干员放入宿舍 源石碎片自动补货 启用自定义基建配置(beta) + 内置配置 + 自定义 + 153 一天3换 + 243 一天3换 + 243 一天4换 + 252 一天3换 + 333 一天3换 自定义基建配置文件 自定义基建配置文件解析错误! 自定义基建配置: diff --git a/src/MeoAsstGui/UserControl/InfrastSettingsUserControl.xaml b/src/MeoAsstGui/UserControl/InfrastSettingsUserControl.xaml index d0a66c9b1a..96b00f03f1 100644 --- a/src/MeoAsstGui/UserControl/InfrastSettingsUserControl.xaml +++ b/src/MeoAsstGui/UserControl/InfrastSettingsUserControl.xaml @@ -2,9 +2,9 @@ x:Class="MeoAsstGui.InfrastSettingsUserControl" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:c="clr-namespace:CalcBinding;assembly=CalcBinding" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:dd="urn:gong-wpf-dragdrop" - xmlns:c="clr-namespace:CalcBinding;assembly=CalcBinding" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:s="https://github.com/canton7/Stylet" xmlns:vm="clr-namespace:MeoAsstGui;assembly=MeoAsstGui" @@ -23,14 +23,14 @@ + Grid.Column="0" + Width="200" + Margin="10" + dd:DragDrop.IsDragSource="True" + dd:DragDrop.IsDropTarget="True" + ItemsSource="{Binding Path=InfrastItemViewModels}" + SelectionChanged="{s:Action InfrastOrderSelectionChanged}" + ToolTip="{DynamicResource LabelSequenceTip}"> @@ -48,106 +48,135 @@ - + Orientation="Vertical"> + + Width="150" + Margin="0,5" + DisplayMemberPath="Display" + IsEnabled="{c:Binding !CustomInfrastEnabled}" + ItemsSource="{Binding UsesOfDronesList}" + SelectedValue="{Binding UsesOfDrones}" + SelectedValuePath="Value" /> + Grid.Row="1" + HorizontalAlignment="Center" + VerticalAlignment="Center" + Orientation="Vertical"> + Margin="0,5" + HorizontalAlignment="Center" + VerticalAlignment="Center" + Style="{StaticResource TextBlockDefault}" + Text="{Binding DormThresholdLabel}" + ToolTip="{DynamicResource InfrastThresholdTip}" /> + Width="200" + Margin="0,5" + HorizontalAlignment="Center" + VerticalAlignment="Center" + Maximum="100" + Minimum="0" + ToolTip="{DynamicResource InfrastThresholdTip}" + Value="{Binding DormThreshold}" /> - + Orientation="Vertical"> + Margin="5" + HorizontalAlignment="Left" + VerticalAlignment="Center" + Content="{DynamicResource DormTrustEnabled}" + IsChecked="{Binding DormTrustEnabled}" /> + + MaxWidth="180" + Text="{DynamicResource DormFilterNotStationedEnabled}" + TextWrapping="Wrap" /> + Margin="5" + HorizontalAlignment="Left" + VerticalAlignment="Center" + IsChecked="{Binding OriginiumShardAutoReplenishment}"> + MaxWidth="180" + Text="{DynamicResource OriginiumShardAutoReplenishment}" + TextWrapping="Wrap" /> - + + Margin="10" + HorizontalAlignment="Center" + VerticalAlignment="Center" + IsChecked="{Binding CustomInfrastEnabled}"> + MaxWidth="180" + Text="{DynamicResource CustomInfrastEnabled}" + TextWrapping="Wrap" /> - + + + + + + + + + + + +