Files
MaaAssistantArknights/src/MaaWpfGui/Views/UserControl/Settings/StartSettingsUserControl.xaml

114 lines
4.8 KiB
XML

<UserControl
x:Class="MaaWpfGui.Views.UserControl.Settings.StartSettingsUserControl"
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:helper="clr-namespace:MaaWpfGui.Helper"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:s="https://github.com/canton7/Stylet"
xmlns:viewModels="clr-namespace:MaaWpfGui.ViewModels.UserControl.Settings"
d:Background="White"
d:DataContext="{d:DesignInstance {x:Type viewModels:StartSettingsUserControlModel}}"
d:DesignHeight="300"
d:DesignWidth="500"
s:View.ActionTarget="{Binding}"
mc:Ignorable="d">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="250" />
<ColumnDefinition Width="250" />
</Grid.ColumnDefinitions>
<StackPanel
Grid.Column="0"
Margin="10"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Orientation="Vertical">
<controls:TextBlock
HorizontalAlignment="Center"
FontWeight="Bold"
Text="{DynamicResource GlobalConfigTip}"
TextAlignment="Center"
Visibility="{c:Binding 'ConfigurationList.Count > 1',
Source={x:Static helper:Instances.SettingsViewModel}}" />
<CheckBox
Margin="10"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Block.TextAlignment="Center"
Content="{DynamicResource LaunchOnSystemStartup}"
IsChecked="{Binding StartSelf}" />
<CheckBox
Margin="10"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Block.TextAlignment="Center"
Content="{DynamicResource MinimizeAfterLaunch}"
IsChecked="{Binding MinimizeDirectly}" />
<hc:Divider />
<CheckBox
Margin="10"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Block.TextAlignment="Center"
Content="{DynamicResource RunTaskAfterLaunch}"
IsChecked="{Binding RunDirectly}" />
<CheckBox
Margin="10"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Block.TextAlignment="Center"
Content="{DynamicResource OpenEmulatorAfterLaunch}"
IsChecked="{Binding OpenEmulatorAfterLaunch}" />
</StackPanel>
<StackPanel Grid.Column="1" VerticalAlignment="Center">
<StackPanel>
<StackPanel
Margin="10,0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Orientation="Horizontal">
<controls:TextBlock
VerticalAlignment="Center"
Block.TextAlignment="Center"
Text="{DynamicResource EmulatorPath}" />
<Button
Margin="10,0,0,0"
Command="{s:Action SelectEmulatorExec}"
Content="{DynamicResource Select}" />
</StackPanel>
<TextBox Margin="20,5" Text="{Binding EmulatorPath}" />
</StackPanel>
<StackPanel IsEnabled="{Binding EmulatorPath.Length}">
<StackPanel
HorizontalAlignment="Center"
VerticalAlignment="Center"
Orientation="Horizontal">
<controls:TextBlock Block.TextAlignment="Center" Text="{DynamicResource AdditionCommand}" />
</StackPanel>
<TextBox Margin="20,5" Text="{Binding EmulatorAddCommand}" />
</StackPanel>
<StackPanel
Margin="10"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Orientation="Horizontal">
<controls:TextBlock
Margin="3"
Block.TextAlignment="Center"
Text="{DynamicResource WaitForEmulator}" />
<TextBox
Width="50"
Margin="3"
InputMethod.IsInputMethodEnabled="False"
Text="{Binding EmulatorWaitSeconds}" />
</StackPanel>
</StackPanel>
</Grid>
</UserControl>