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" />
-
+
+
+
+
+
+
+
+
+
+
+
+
-
+
\ No newline at end of file
diff --git a/src/MeoAsstGui/ViewModels/SettingsViewModel.cs b/src/MeoAsstGui/ViewModels/SettingsViewModel.cs
index 06f472dfad..2577c09426 100644
--- a/src/MeoAsstGui/ViewModels/SettingsViewModel.cs
+++ b/src/MeoAsstGui/ViewModels/SettingsViewModel.cs
@@ -145,6 +145,16 @@ namespace MeoAsstGui
InfrastItemViewModels = new ObservableCollection(temp_order_list);
+ DefaultInfrastList = new List
+ {
+ new CombData { Display = Localization.GetString("UserDefined"), Value = "user_defined" },
+ new CombData { Display = Localization.GetString("153_3"), Value = "153_layout_3_times_pre_day.json" },
+ new CombData { Display = Localization.GetString("243_3"), Value = "243_layout_3_times_pre_day.json" },
+ new CombData { Display = Localization.GetString("243_4"), Value = "243_layout_4_times_per_day.json" },
+ new CombData { Display = Localization.GetString("252_3"), Value = "252_layout_3_times_pre_day.json" },
+ new CombData { Display = Localization.GetString("333_3"), Value = "333_layout_for_Orundum_3_times_pre_day.json" },
+ };
+
UsesOfDronesList = new List
{
new CombData { Display = Localization.GetString("DronesNotUse"), Value = "_NotUse" },
@@ -464,6 +474,11 @@ namespace MeoAsstGui
///
public List UsesOfDronesList { get; set; }
+ ///
+ /// Gets or sets the list of uses of default infrast.
+ ///
+ public List DefaultInfrastList { get; set; }
+
///
/// Gets or sets the list of roguelike lists.
///
@@ -586,6 +601,26 @@ namespace MeoAsstGui
}
}
+ private string _defaultInfrast = ViewStatusStorage.Get("Infrast.DefaultInfrast", "user_defined");
+
+ ///
+ /// Gets or sets the uses of drones.
+ ///
+ public string DefaultInfrast
+ {
+ get => _defaultInfrast;
+ set
+ {
+ SetAndNotify(ref _defaultInfrast, value);
+ if (_defaultInfrast != "user_defined")
+ {
+ CustomInfrastFile = "resource\\custom_infrast\\" + value;
+ }
+
+ ViewStatusStorage.Set("Infrast.DefaultInfrast", value);
+ }
+ }
+
private string _dormFilterNotStationedEnabled = ViewStatusStorage.Get("Infrast.DormFilterNotStationedEnabled", false.ToString());
///
@@ -659,6 +694,8 @@ namespace MeoAsstGui
{
CustomInfrastFile = dialog.FileName;
}
+
+ DefaultInfrast = "user_defined";
}
private string _customInfrastFile = ViewStatusStorage.Get("Infrast.CustomInfrastFile", string.Empty);