mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
95 lines
4.6 KiB
XML
95 lines
4.6 KiB
XML
<UserControl
|
|
x:Class="Flow.Launcher.Plugin.Shell.Views.CMDSetting"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:converters="clr-namespace:Flow.Launcher.Plugin.Shell.Converters"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:vm="clr-namespace:Flow.Launcher.Plugin.Shell.ViewModels"
|
|
d:DataContext="{d:DesignInstance vm:ShellSettingViewModel}"
|
|
d:DesignHeight="300"
|
|
d:DesignWidth="300"
|
|
mc:Ignorable="d">
|
|
<UserControl.Resources>
|
|
<converters:CloseShellAfterPressEnabledConverter x:Key="CloseShellAfterPressEnabledConverter" />
|
|
<converters:LeaveShellOpenEnabledConverter x:Key="LeaveShellOpenEnabledConverter" />
|
|
</UserControl.Resources>
|
|
|
|
<Grid Margin="{StaticResource SettingPanelMargin}" VerticalAlignment="Top">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
</Grid.RowDefinitions>
|
|
<CheckBox
|
|
x:Name="ReplaceWinR"
|
|
Grid.Row="0"
|
|
Margin="{StaticResource SettingPanelItemRightTopBottomMargin}"
|
|
HorizontalAlignment="Left"
|
|
Content="{DynamicResource flowlauncher_plugin_cmd_relace_winr}"
|
|
IsChecked="{Binding Settings.ReplaceWinR, Mode=TwoWay}" />
|
|
<CheckBox
|
|
x:Name="CloseShellAfterPress"
|
|
Grid.Row="1"
|
|
Margin="{StaticResource SettingPanelItemRightTopBottomMargin}"
|
|
HorizontalAlignment="Left"
|
|
Content="{DynamicResource flowlauncher_plugin_cmd_close_cmd_after_press}"
|
|
IsChecked="{Binding CloseShellAfterPress, Mode=TwoWay}"
|
|
IsEnabled="{Binding LeaveShellOpen, Converter={StaticResource CloseShellAfterPressEnabledConverter}, Mode=OneWay}" />
|
|
<CheckBox
|
|
x:Name="LeaveShellOpen"
|
|
Grid.Row="2"
|
|
Margin="{StaticResource SettingPanelItemRightTopBottomMargin}"
|
|
HorizontalAlignment="Left"
|
|
Content="{DynamicResource flowlauncher_plugin_cmd_leave_cmd_open}"
|
|
IsChecked="{Binding LeaveShellOpen, Mode=TwoWay}">
|
|
<CheckBox.IsEnabled>
|
|
<MultiBinding Converter="{StaticResource LeaveShellOpenEnabledConverter}">
|
|
<Binding Mode="OneWay" Path="CloseShellAfterPress" />
|
|
<Binding Mode="OneWay" Path="SelectedShell" />
|
|
</MultiBinding>
|
|
</CheckBox.IsEnabled>
|
|
</CheckBox>
|
|
<CheckBox
|
|
x:Name="AlwaysRunAsAdministrator"
|
|
Grid.Row="3"
|
|
Margin="{StaticResource SettingPanelItemRightTopBottomMargin}"
|
|
HorizontalAlignment="Left"
|
|
Content="{DynamicResource flowlauncher_plugin_cmd_always_run_as_administrator}"
|
|
IsChecked="{Binding Settings.RunAsAdministrator, Mode=TwoWay}" />
|
|
<CheckBox
|
|
x:Name="UseWindowsTerminal"
|
|
Grid.Row="4"
|
|
Margin="{StaticResource SettingPanelItemRightTopBottomMargin}"
|
|
HorizontalAlignment="Left"
|
|
Content="{DynamicResource flowlauncher_plugin_cmd_use_windows_terminal}"
|
|
IsChecked="{Binding Settings.UseWindowsTerminal, Mode=TwoWay}" />
|
|
<ComboBox
|
|
x:Name="ShellComboBox"
|
|
Grid.Row="5"
|
|
Margin="{StaticResource SettingPanelItemRightTopBottomMargin}"
|
|
HorizontalAlignment="Left"
|
|
DisplayMemberPath="Display"
|
|
ItemsSource="{Binding AllShells, Mode=OneTime}"
|
|
SelectedValue="{Binding SelectedShell, Mode=TwoWay}"
|
|
SelectedValuePath="Value" />
|
|
<StackPanel Grid.Row="6" Orientation="Horizontal">
|
|
<CheckBox
|
|
x:Name="ShowOnlyMostUsedCMDs"
|
|
Margin="{StaticResource SettingPanelItemRightTopBottomMargin}"
|
|
Content="{DynamicResource flowlauncher_plugin_cmd_history}"
|
|
IsChecked="{Binding Settings.ShowOnlyMostUsedCMDs, Mode=TwoWay}" />
|
|
<ComboBox
|
|
x:Name="ShowOnlyMostUsedCMDsNumber"
|
|
Margin="{StaticResource SettingPanelItemRightTopBottomMargin}"
|
|
HorizontalAlignment="Left"
|
|
IsEnabled="{Binding Settings.ShowOnlyMostUsedCMDs, Mode=OneWay}"
|
|
ItemsSource="{Binding OnlyMostUsedCMDsNumbers, Mode=OneTime}"
|
|
SelectedItem="{Binding SelectedOnlyMostUsedCMDsNumber, Mode=TwoWay}" />
|
|
</StackPanel>
|
|
</Grid>
|
|
</UserControl>
|