chore: 只有一个配置的时候不显示 此选项页为全局配置

This commit is contained in:
uye
2024-12-30 15:05:53 +08:00
parent de5e2c1ad1
commit 24ea72d415
5 changed files with 24 additions and 9 deletions

View File

@@ -7,6 +7,7 @@
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:local="clr-namespace:MaaWpfGui"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:s="https://github.com/canton7/Stylet"
@@ -26,7 +27,9 @@
HorizontalAlignment="Center"
FontWeight="Bold"
Text="{DynamicResource GlobalConfigTip}"
TextAlignment="Center" />
TextAlignment="Center"
Visibility="{c:Binding 'ConfigurationList.Count > 1',
Source={x:Static helper:Instances.SettingsViewModel}}" />
<StackPanel
HorizontalAlignment="Right"
VerticalAlignment="Center"

View File

@@ -22,7 +22,9 @@
HorizontalAlignment="Center"
FontWeight="Bold"
Text="{DynamicResource GlobalConfigTip}"
TextAlignment="Center" />
TextAlignment="Center"
Visibility="{c:Binding 'ConfigurationList.Count > 1',
Source={x:Static helper:Instances.SettingsViewModel}}" />
<Grid
Margin="10"
HorizontalAlignment="Center"

View File

@@ -6,6 +6,8 @@
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"
@@ -30,7 +32,9 @@
HorizontalAlignment="Center"
FontWeight="Bold"
Text="{DynamicResource GlobalConfigTip}"
TextAlignment="Center" />
TextAlignment="Center"
Visibility="{c:Binding 'ConfigurationList.Count > 1',
Source={x:Static helper:Instances.SettingsViewModel}}" />
<CheckBox
Margin="10"
HorizontalAlignment="Left"
@@ -43,15 +47,16 @@
HorizontalAlignment="Left"
VerticalAlignment="Top"
Block.TextAlignment="Center"
Content="{DynamicResource RunTaskAfterLaunch}"
IsChecked="{Binding RunDirectly}" />
Content="{DynamicResource MinimizeAfterLaunch}"
IsChecked="{Binding MinimizeDirectly}" />
<hc:Divider />
<CheckBox
Margin="10"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Block.TextAlignment="Center"
Content="{DynamicResource MinimizeAfterLaunch}"
IsChecked="{Binding MinimizeDirectly}" />
Content="{DynamicResource RunTaskAfterLaunch}"
IsChecked="{Binding RunDirectly}" />
<CheckBox
Margin="10"
HorizontalAlignment="Left"

View File

@@ -28,7 +28,9 @@
HorizontalAlignment="Center"
FontWeight="Bold"
Text="{DynamicResource GlobalConfigTip}"
TextAlignment="Center" />
TextAlignment="Center"
Visibility="{c:Binding 'ConfigurationList.Count > 1',
Source={x:Static helper:Instances.SettingsViewModel}}" />
<StackPanel
Grid.Row="1"
HorizontalAlignment="Center"

View File

@@ -7,6 +7,7 @@
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:ui="clr-namespace:MaaWpfGui.ViewModels.UI"
@@ -22,7 +23,9 @@
HorizontalAlignment="Center"
FontWeight="Bold"
Text="{DynamicResource GlobalConfigTip}"
TextAlignment="Center" />
TextAlignment="Center"
Visibility="{c:Binding 'ConfigurationList.Count > 1',
Source={x:Static helper:Instances.SettingsViewModel}}" />
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />