Add Checkbox for Skip Confirm

This commit is contained in:
DB P 2026-02-20 17:06:31 +09:00
parent 886cd75ad2
commit 12fc597b56
4 changed files with 24 additions and 3 deletions

View file

@ -3,6 +3,9 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:system="clr-namespace:System;assembly=mscorlib">
<!-- Setting -->
<system:String x:Key="flowlauncher_plugin_sys_skip_confirm">Skip confirmation when Shutting down, Restarting, or Logging off</system:String>
<!-- Command List -->
<system:String x:Key="flowlauncher_plugin_sys_name">Name</system:String>
<system:String x:Key="flowlauncher_plugin_sys_desc">Description</system:String>

View file

@ -124,4 +124,13 @@ public class Settings : BaseModel
[JsonIgnore]
public Command SelectedCommand { get; set; }
private bool _skipPowerActionConfirmation;
public bool SkipPowerActionConfirmation
{
get => _skipPowerActionConfirmation;
set
{
_skipPowerActionConfirmation = value;
}
}
}

View file

@ -4,4 +4,6 @@
{
public Settings Settings { get; } = settings;
}
}

View file

@ -12,13 +12,20 @@
<Grid Margin="{StaticResource SettingPanelMargin}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<StackPanel
Grid.Row="0"
Margin="0 0 0 6"
HorizontalAlignment="Left"
Orientation="Horizontal">
<CheckBox Content="{DynamicResource flowlauncher_plugin_sys_skip_confirm}" IsChecked="{Binding Settings.SkipPowerActionConfirmation}" />
</StackPanel>
<ListView
x:Name="lbxCommands"
Grid.Row="0"
Grid.Row="1"
Margin="{StaticResource SettingPanelItemTopBottomMargin}"
BorderBrush="DarkGray"
BorderThickness="1"
@ -57,7 +64,7 @@
</ListView>
<StackPanel
Grid.Row="1"
Grid.Row="2"
Margin="{StaticResource SettingPanelItemTopBottomMargin}"
HorizontalAlignment="Right"
Orientation="Horizontal">