Files
MaaAssistantArknights/src/MaaWpfGui/Views/UserControl/RoguelikeSettingsUserControl.xaml
2024-01-07 23:39:04 +08:00

163 lines
7.7 KiB
XML

<UserControl
x:Class="MaaWpfGui.Views.UserControl.RoguelikeSettingsUserControl"
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:controls="clr-namespace:MaaWpfGui.Styles.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:dd="urn:gong-wpf-dragdrop"
xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:local="clr-namespace:MaaWpfGui.Views.UserControl"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:s="https://github.com/canton7/Stylet"
xmlns:styles="clr-namespace:MaaWpfGui.Styles"
xmlns:ui="clr-namespace:MaaWpfGui.ViewModels.UI"
xmlns:viewModels="clr-namespace:MaaWpfGui.ViewModels"
xmlns:vm="clr-namespace:MaaWpfGui"
d:DataContext="{d:DesignInstance {x:Type ui:SettingsViewModel}}"
d:DesignWidth="220"
mc:Ignorable="d">
<UserControl.Resources>
<local:InvestmentButtonCheckedConverter x:Key="InvestmentButtonCheckedConverter" />
</UserControl.Resources>
<StackPanel>
<StackPanel IsEnabled="{Binding Idle}" Visibility="{c:Binding !TaskSettingVisibilities.EnableAdvancedSettings}">
<ComboBox
Margin="0,5"
hc:InfoElement.Title="{DynamicResource RoguelikeTheme}"
IsHitTestVisible="{Binding Idle}"
ItemsSource="{Binding RoguelikeThemeList}"
SelectedValue="{Binding RoguelikeTheme}"
SelectedValuePath="Value"
Style="{StaticResource ComboBoxExtend}" />
<ComboBox
Margin="0,5"
hc:InfoElement.Title="{DynamicResource Strategy}"
DisplayMemberPath="Display"
IsHitTestVisible="{Binding Path=Idle}"
ItemsSource="{Binding RoguelikeModeList}"
SelectedValue="{Binding RoguelikeMode}"
SelectedValuePath="Value"
Style="{StaticResource ComboBoxExtend}" />
<ComboBox
Margin="0,5"
hc:InfoElement.Title="{DynamicResource StartingSquad}"
DisplayMemberPath="Display"
IsHitTestVisible="{Binding Idle}"
ItemsSource="{Binding RoguelikeSquadList}"
MaxDropDownHeight="800"
SelectedValue="{Binding RoguelikeSquad}"
SelectedValuePath="Value"
Style="{StaticResource ComboBoxExtend}" />
</StackPanel>
<StackPanel Visibility="{c:Binding TaskSettingVisibilities.EnableAdvancedSettings}">
<hc:NumericUpDown
Margin="0,5"
Minimum="0"
hc:InfoElement.Title="{DynamicResource StartTimesLimit}"
Style="{StaticResource NumericUpDownExtend}"
ValueChanged="NumericUpDown_ValueChanged"
Value="{Binding RoguelikeStartsCount}" />
<CheckBox
Name="InvestmentEnabled"
Margin="0,10"
Content="{DynamicResource InvestmentEnabled}"
IsEnabled="{c:Binding 'RoguelikeMode != &quot;1&quot;'}">
<CheckBox.IsChecked>
<MultiBinding Converter="{StaticResource InvestmentButtonCheckedConverter}">
<Binding Path="RoguelikeInvestmentEnabled"/>
<Binding Path="RoguelikeMode"/>
</MultiBinding>
</CheckBox.IsChecked>
</CheckBox>
<CheckBox
Margin="0,10"
Content="{DynamicResource InvestmentEnterSecondFloor}"
IsChecked="{Binding RoguelikeInvestmentEnterSecondFloor}"
Visibility="{c:Binding 'RoguelikeMode == &quot;1&quot;'}"/>
<CheckBox
Margin="0,10"
IsChecked="{Binding RoguelikeStopWhenInvestmentFull}"
Visibility="{c:Binding ElementName=InvestmentEnabled, Path=IsChecked}">
<TextBlock
Block.TextAlignment="Left"
Text="{DynamicResource StopOnGoldLimit}"
TextWrapping="Wrap" />
</CheckBox>
<hc:NumericUpDown
Margin="0,5"
Minimum="0"
hc:InfoElement.Title="{DynamicResource GoldTimesLimit}"
Visibility="{c:Binding ElementName=InvestmentEnabled, Path=IsChecked}"
Style="{StaticResource NumericUpDownExtend}"
ValueChanged="NumericUpDown_ValueChanged"
Value="{Binding RoguelikeInvestsCount}" />
<CheckBox
Margin="0,10"
Content="{DynamicResource RefreshTraderWithDice}"
IsChecked="{Binding RoguelikeRefreshTraderWithDice}"
Visibility="{c:Binding 'RoguelikeTheme == &quot;Mizuki&quot;'}" />
<ComboBox
Margin="0,5"
hc:InfoElement.Title="{DynamicResource StartingRoles}"
DisplayMemberPath="Display"
IsHitTestVisible="{Binding Idle}"
ItemsSource="{Binding RoguelikeRolesList}"
SelectedValue="{Binding RoguelikeRoles}"
SelectedValuePath="Value"
Style="{StaticResource ComboBoxExtend}" />
<TextBlock
Margin="8,5,8,0"
HorizontalAlignment="Left"
Block.TextAlignment="Center"
Foreground="{DynamicResource PrimaryTextBrush}"
Text="{DynamicResource StartingCoreChar}"
TextWrapping="Wrap" />
<ComboBox
Margin="0,5"
IsEditable="True"
IsTextSearchEnabled="False"
ItemsSource="{Binding RoguelikeCoreCharList}"
Loaded="{s:Action MakeComboBoxSearchable}"
Text="{Binding RoguelikeCoreChar}"
ToolTip="{DynamicResource StartingCoreCharTip}" />
<CheckBox
Margin="0,10"
IsChecked="{c:Binding 'RoguelikeStartWithEliteTwo or RoguelikeMode == &quot;5&quot;'}"
IsEnabled="{c:Binding 'RoguelikeMode != &quot;5&quot;'}"
Visibility="{c:Binding '(RoguelikeMode == &quot;4&quot; or RoguelikeMode == &quot;5&quot;) and RoguelikeTheme != &quot;Phantom&quot;'}">
<TextBlock
Block.TextAlignment="Left"
Text="{DynamicResource RoguelikeStartWithEliteTwo}"
TextWrapping="Wrap" />
</CheckBox>
<CheckBox Margin="0,10" IsChecked="{Binding RoguelikeUseSupportUnit}">
<TextBlock
Block.TextAlignment="Left"
Text="{DynamicResource RoguelikeUseSupportUnit}"
TextWrapping="Wrap" />
</CheckBox>
<CheckBox
Margin="0,10"
IsChecked="{Binding RoguelikeEnableNonfriendSupport}"
IsEnabled="{Binding RoguelikeUseSupportUnit}">
<TextBlock
Block.TextAlignment="Left"
Text="{DynamicResource RoguelikeUseNonFriendSupport}"
TextWrapping="Wrap" />
</CheckBox>
<CheckBox
Margin="0,10"
IsEnabled="{Binding Idle}"
IsChecked="{Binding RoguelikeDelayAbortUntilCombatComplete}">
<TextBlock
Block.TextAlignment="Left"
Text="{DynamicResource RoguelikeDelayAbortUntilCombatComplete}"
TextWrapping="Wrap" />
</CheckBox>
</StackPanel>
</StackPanel>
</UserControl>