feat: 增加关卡备选

This commit is contained in:
uye
2022-08-15 12:45:29 +08:00
parent 4954a590a1
commit 7ab1a2bbf2
10 changed files with 196 additions and 27 deletions

View File

@@ -136,6 +136,7 @@
<system:String x:Key="MinimizeToTray">Hide to tray when minimized</system:String>
<system:String x:Key="SystemNotification">System Notification</system:String>
<system:String x:Key="UseAlternateStage">Use alternate stage</system:String>
<system:String x:Key="HideUnavailableStage">Hide today not open level</system:String>
<system:String x:Key="MainViewButtonFeature">Variable function button</system:String>
@@ -181,6 +182,7 @@
<system:String x:Key="AssignedMaterial">Material</system:String>
<system:String x:Key="Quantity">Quantity</system:String>
<system:String x:Key="StageSelect">Stage</system:String>
<system:String x:Key="StageSelect2">alternative</system:String>
<system:String x:Key="Amend">Amend</system:String>
<system:String x:Key="DefaultStage">Cur/Last Stage</system:String>

View File

@@ -136,6 +136,7 @@
<system:String x:Key="MinimizeToTray">最小化するとトレイに非表示</system:String>
<system:String x:Key="SystemNotification">重要な通知をポップアップする</system:String>
<system:String x:Key="UseAlternateStage">代替ステージを使う</system:String>
<system:String x:Key="HideUnavailableStage">当日は開放されないステージを隠します</system:String>
<system:String x:Key="MainViewButtonFeature">スタート画面左側のボタン</system:String>
@@ -181,6 +182,7 @@
<system:String x:Key="AssignedMaterial">素材限定</system:String>
<system:String x:Key="Quantity">ドロップ数</system:String>
<system:String x:Key="StageSelect">ステージ</system:String>
<system:String x:Key="StageSelect2">欲しい</system:String>
<system:String x:Key="Amend">改定</system:String>
<!--<system:String x:Key="CurrentStage">現在ステージ</system:String>

View File

@@ -136,6 +136,7 @@
<system:String x:Key="MinimizeToTray">트레이로 최소화</system:String>
<system:String x:Key="SystemNotification">중요 알림을 팝업</system:String>
<system:String x:Key="UseAlternateStage">대체 검문소를 사용합니다</system:String>
<system:String x:Key="HideUnavailableStage">당일 스테이지만 표시</system:String>
<system:String x:Key="MainViewButtonFeature">메인 화면 왼쪽의 버튼</system:String>
@@ -181,6 +182,7 @@
<system:String x:Key="AssignedMaterial">드롭 제한</system:String>
<system:String x:Key="Quantity">드롭 수</system:String>
<system:String x:Key="StageSelect">스테이지 선택</system:String>
<system:String x:Key="StageSelect2">참조</system:String>
<system:String x:Key="Amend">수정</system:String>
<!--<system:String x:Key="CurrentStage">현재 수테이지</system:String>

View File

@@ -136,6 +136,7 @@
<system:String x:Key="MinimizeToTray">🍷🕺🍻🍷🕺</system:String>
<system:String x:Key="SystemNotification">🍻💃🍻🍸🍷🍸</system:String>
<system:String x:Key="UseAlternateStage">🍻🍸🍷🍺🍸</system:String>
<system:String x:Key="HideUnavailableStage">🍻🍸🍷🍺🍺🍸🍸</system:String>
<system:String x:Key="MainViewButtonFeature">🍷🍺🍻🍺🍸🍺</system:String>
@@ -181,6 +182,7 @@
<system:String x:Key="AssignedMaterial">💃🍷🍺</system:String>
<system:String x:Key="Quantity">🕺🕺🍸</system:String>
<system:String x:Key="StageSelect">🍷🍻🍷</system:String>
<system:String x:Key="StageSelect2">🕺🍻</system:String>
<system:String x:Key="Amend">🍺🍺</system:String>
<!--<system:String x:Key="CurrentStage">🕺🍺🍻</system:String>

View File

@@ -136,6 +136,7 @@
<system:String x:Key="MinimizeToTray">最小化时隐藏至托盘</system:String>
<system:String x:Key="SystemNotification">重要信息弹出系统通知</system:String>
<system:String x:Key="UseAlternateStage">使用备选关卡</system:String>
<system:String x:Key="HideUnavailableStage">关卡选择隐藏当日不开放关卡</system:String>
<system:String x:Key="MainViewButtonFeature">主界面可选择按钮功能</system:String>
@@ -181,6 +182,7 @@
<system:String x:Key="AssignedMaterial">指定材料</system:String>
<system:String x:Key="Quantity">掉落数量</system:String>
<system:String x:Key="StageSelect">关卡选择</system:String>
<system:String x:Key="StageSelect2">备选</system:String>
<system:String x:Key="Amend">修改</system:String>
<!--<system:String x:Key="CurrentStage">当前关卡</system:String>

View File

@@ -136,6 +136,7 @@
<system:String x:Key="MinimizeToTray">最小化時隱藏至托盤</system:String>
<system:String x:Key="SystemNotification">重要訊息彈出系統通知</system:String>
<system:String x:Key="UseAlternateStage">使用備選關卡</system:String>
<system:String x:Key="HideUnavailableStage">關卡選擇隱藏當日不開放關卡</system:String>
<system:String x:Key="MainViewButtonFeature">主介面可選擇按鈕功能</system:String>
@@ -181,6 +182,7 @@
<system:String x:Key="AssignedMaterial">指定材料</system:String>
<system:String x:Key="Quantity">掉落數量</system:String>
<system:String x:Key="StageSelect">關卡選擇</system:String>
<system:String x:Key="StageSelect2">備選</system:String>
<system:String x:Key="Amend">修改</system:String>
<!--<system:String x:Key="CurrentStage">當前關卡</system:String>

View File

@@ -19,31 +19,33 @@
<ColumnDefinition Width="70" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="150" />
<RowDefinition Height="150" />
<RowDefinition Height="138" />
<RowDefinition Height="138" />
<RowDefinition Height="46" />
<RowDefinition Height="30" />
</Grid.RowDefinitions>
<StackPanel
Grid.ColumnSpan="3"
Grid.Row="0"
Grid.ColumnSpan="2"
HorizontalAlignment="Left"
Orientation="Horizontal">
<StackPanel Orientation="Vertical">
<CheckBox
Height="30"
Margin="10"
Margin="10,8"
Content="{DynamicResource UseSanityPotion}"
IsChecked="{Binding UseMedicine}" />
<CheckBox
Height="30"
Margin="10"
Margin="10,8"
Content="{DynamicResource UseOriginitePrime}"
IsChecked="{Binding UseStone}"
ToolTip="{DynamicResource CheckBoxesNotSaved}" />
<CheckBox
Height="30"
Margin="10"
Margin="10,8"
Content="{DynamicResource PerformBattles}"
IsChecked="{Binding HasTimesLimited}"
ToolTip="{DynamicResource CheckBoxesNotSaved}" />
@@ -52,7 +54,7 @@
<hc:TextBox
Width="50"
Height="30"
Margin="10"
Margin="10,8"
InputMethod.IsInputMethodEnabled="False"
Text="{Binding MedicineNumber}"
TextType="Int"
@@ -60,7 +62,7 @@
<hc:TextBox
Width="50"
Height="30"
Margin="10"
Margin="10,8"
InputMethod.IsInputMethodEnabled="False"
Text="{Binding StoneNumber}"
TextType="Int"
@@ -68,7 +70,7 @@
<hc:TextBox
Width="50"
Height="30"
Margin="10"
Margin="10,8"
InputMethod.IsInputMethodEnabled="False"
Text="{Binding MaxTimes}"
TextType="Int"
@@ -79,11 +81,11 @@
<StackPanel Grid.Row="1" Orientation="Vertical">
<CheckBox
Height="30"
Margin="10"
Margin="10,8"
Content="{DynamicResource AssignedMaterial}"
IsChecked="{Binding IsSpecifiedDrops}"
ToolTip="{DynamicResource NoAutoNavigation}" />
<Grid Height="50">
<Grid Height="46">
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center"
@@ -91,9 +93,9 @@
Text="{DynamicResource Quantity}"
TextAlignment="Center" />
</Grid>
<Grid Height="50">
<Grid Height="46">
<TextBlock
Margin="10"
Margin="10,8"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Style="{StaticResource TextBlockDefault}"
@@ -110,7 +112,7 @@
<ComboBox
Width="120"
Height="30"
Margin="10"
Margin="10,8"
DisplayMemberPath="Display"
IsDropDownOpen="{Binding IsDropDown}"
IsEditable="True"
@@ -123,7 +125,7 @@
<hc:TextBox
Width="120"
Height="30"
Margin="10"
Margin="10,8"
InputMethod.IsInputMethodEnabled="False"
Text="{Binding DropsQuantity}"
TextType="Int"
@@ -132,19 +134,45 @@
<ComboBox
Width="120"
Height="30"
Margin="10"
Margin="10,8"
DisplayMemberPath="Display"
IsHitTestVisible="{c:Binding !FightTaskRunning}"
ItemsSource="{Binding StageList}"
SelectedValue="{Binding Stage}"
SelectedValue="{Binding Stage1}"
SelectedValuePath="Value" />
</StackPanel>
<Button
<StackPanel Grid.Row="2" Orientation="Vertical">
<Grid Height="46">
<TextBlock
Margin="10,8"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Style="{StaticResource TextBlockDefault}"
Text="{DynamicResource StageSelect2}"
TextAlignment="Center"
TextWrapping="Wrap"
Visibility="{Binding AlternateStageDisplay}" />
</Grid>
</StackPanel>
<StackPanel
Grid.Row="2"
Grid.Column="1"
Grid.ColumnSpan="2"
Orientation="Vertical">
<ComboBox
Width="120"
Height="30"
Margin="10,8"
DisplayMemberPath="Display"
IsHitTestVisible="{c:Binding !FightTaskRunning}"
ItemsSource="{Binding StageList}"
SelectedValue="{Binding Stage2}"
SelectedValuePath="Value"
Visibility="{Binding AlternateStageDisplay}" />
</StackPanel>
<Button
Grid.Row="3"
Grid.Column="2"
Width="60"
Height="30"
Margin="0,0,10,0"
Command="{s:Action SetParams}"
Content="{DynamicResource Amend}"
FontSize="10"

View File

@@ -27,6 +27,11 @@
HorizontalAlignment="Left"
Content="{DynamicResource SystemNotification}"
IsChecked="{Binding UseNotify}" />
<CheckBox
Margin="10"
HorizontalAlignment="Left"
Content="{DynamicResource UseAlternateStage}"
IsChecked="{Binding UseAlternateStage}" />
<CheckBox
Margin="10"
HorizontalAlignment="Left"

View File

@@ -1770,6 +1770,29 @@ namespace MeoAsstGui
}
}
private bool _useAlternateStage = Convert.ToBoolean(ViewStatusStorage.Get("GUI.UseAlternateStage", bool.FalseString));
/// <summary>
/// Gets or sets a value indicating whether to use alternate stage.
/// </summary>
public bool UseAlternateStage
{
get
{
return _useAlternateStage;
}
set
{
SetAndNotify(ref _useAlternateStage, value);
ViewStatusStorage.Set("GUI.UseAlternateStage", value.ToString());
if (value)
{
HideUnavailableStage = false;
}
}
}
private bool _hideUnavailableStage = Convert.ToBoolean(ViewStatusStorage.Get("GUI.HideUnavailableStage", bool.TrueString));
/// <summary>
@@ -1786,6 +1809,12 @@ namespace MeoAsstGui
{
SetAndNotify(ref _hideUnavailableStage, value);
ViewStatusStorage.Set("GUI.HideUnavailableStage", value.ToString());
if (value)
{
UseAlternateStage = false;
}
var mainModel = _container.Get<TaskQueueViewModel>();
mainModel.UpdateStageList();
}

View File

@@ -343,6 +343,7 @@ namespace MeoAsstGui
}
StageList = newList;
StageList2 = newList;
bool hasSavedValue = false;
foreach (var item in StageList)
@@ -356,7 +357,7 @@ namespace MeoAsstGui
if (!hasSavedValue)
{
Stage = string.Empty;
Stage1 = string.Empty;
}
}
@@ -1350,22 +1351,116 @@ namespace MeoAsstGui
}
}
private string _stage = ViewStatusStorage.Get("MainFunction.Stage", string.Empty);
private ObservableCollection<CombData> _stageList2 = new ObservableCollection<CombData>();
/// <summary>
/// Gets or sets the stage.
/// Gets or sets the list of stages2.
/// </summary>
public ObservableCollection<CombData> StageList2
{
get
{
return _stageList2;
}
set
{
SetAndNotify(ref _stageList2, value);
}
}
/// <summary>
/// Gets the stage.
/// </summary>
public string Stage
{
get
{
return _stage;
var settingsModel = _container.Get<SettingsViewModel>();
if (settingsModel.UseAlternateStage)
{
ObservableCollection<CombData> newList;
newList = new ObservableCollection<CombData>();
foreach (var item in AllStageList)
{
if (_stageAvailableInfo.ContainsKey(item.Value))
{
var info = _stageAvailableInfo[item.Value];
if (info.Item1.Contains(_curDayOfWeek))
{
newList.Add(item);
}
}
else
{
newList.Add(item);
}
}
foreach (var stage in newList)
{
if (stage.Value == _stage1)
{
return _stage1;
}
}
}
return _stage2;
}
}
private string _stage1 = ViewStatusStorage.Get("MainFunction.Stage1", string.Empty);
/// <summary>
/// Gets or sets the stage1.
/// </summary>
public string Stage1
{
get
{
return _stage1;
}
set
{
SetAndNotify(ref _stage1, value);
ViewStatusStorage.Set("MainFunction.Stage1", value);
}
}
private string _stage2 = ViewStatusStorage.Get("MainFunction.Stage2", string.Empty);
/// <summary>
/// Gets or sets the stage2.
/// </summary>
public string Stage2
{
get
{
return _stage2;
}
set
{
SetAndNotify(ref _stage2, value);
ViewStatusStorage.Set("MainFunction.Stage2", value);
}
}
/// <summary>
/// Gets or sets a value indicating whether to use alternate stage.
/// </summary>
public string AlternateStageDisplay
{
get
{
var settingsModel = _container.Get<SettingsViewModel>();
return settingsModel.UseAlternateStage ? "Visible" : "Hidden";
}
set
{
SetAndNotify(ref _stage, value);
ViewStatusStorage.Set("MainFunction.Stage", value);
}
}