mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-16 01:40:46 +08:00
feat.选中自动关机后按H出现的休眠选项。
This commit is contained in:
@@ -37,6 +37,22 @@ namespace MeoAsstGui
|
||||
InitTimer();
|
||||
}
|
||||
|
||||
public void ShowButton()
|
||||
{
|
||||
Visible = Visibility.Visible;
|
||||
Hibernate = true;
|
||||
}
|
||||
|
||||
private Visibility _visible = Visibility.Collapsed;
|
||||
public Visibility Visible
|
||||
{
|
||||
get { return _visible; }
|
||||
set
|
||||
{
|
||||
SetAndNotify(ref _visible, value);
|
||||
}
|
||||
}
|
||||
|
||||
private System.Windows.Forms.Timer _timer = new System.Windows.Forms.Timer();
|
||||
|
||||
private void InitTimer()
|
||||
|
||||
@@ -51,9 +51,13 @@
|
||||
</Grid>
|
||||
</Border>
|
||||
<StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment ="Center">
|
||||
<CheckBox IsChecked="{Binding Shutdown}" Content="自动关机" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
<CheckBox IsChecked="{Binding Hibernate}" Content="休眠" Visibility="Collapsed" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
<CheckBox IsChecked="{Binding Suspend}" Content="待机" Visibility="Collapsed" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
<CheckBox IsChecked="{Binding Shutdown}" Content="自动关机" HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<CheckBox.InputBindings>
|
||||
<KeyBinding Key="H" Command="{s:Action ShowButton}"/>
|
||||
</CheckBox.InputBindings>
|
||||
</CheckBox>
|
||||
<CheckBox IsChecked="{Binding Hibernate}" Content="休眠" Visibility="{Binding Visible}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
<CheckBox IsChecked="{Binding Suspend}" Content="待机" Visibility="{Binding Visible}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
|
||||
<Button Grid.Row="2" Command="{s:Action LinkStart}" IsEnabled="{Binding Idle}" Content="LinkStart !" HorizontalAlignment="Center" Width="120" Height="50" Margin="5" />
|
||||
|
||||
Reference in New Issue
Block a user