Flow.Launcher/Plugins/Flow.Launcher.Plugin.Shell/Views/ShellSetting.xaml

101 lines
4.8 KiB
Text
Raw Normal View History

2021-12-14 08:19:08 +00:00
<UserControl
x:Class="Flow.Launcher.Plugin.Shell.Views.CMDSetting"
2021-12-14 08:19:08 +00:00
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"
2021-12-14 08:19:08 +00:00
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}"
2021-12-14 08:19:08 +00:00
d:DesignHeight="300"
d:DesignWidth="300"
mc:Ignorable="d">
<UserControl.Resources>
2025-09-29 15:12:02 +00:00
<converters:LeaveShellOpenOrCloseShellAfterPressEnabledConverter x:Key="LeaveShellOpenOrCloseShellAfterPressEnabledConverter" />
</UserControl.Resources>
<Grid Margin="{StaticResource SettingPanelMargin}" VerticalAlignment="Top">
2020-05-03 05:57:14 +00:00
<Grid.RowDefinitions>
2021-12-14 08:19:08 +00:00
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
2020-05-03 05:57:14 +00:00
</Grid.RowDefinitions>
2021-12-14 08:19:08 +00:00
<CheckBox
x:Name="ReplaceWinR"
Grid.Row="0"
Margin="{StaticResource SettingPanelItemRightTopBottomMargin}"
2021-12-14 08:19:08 +00:00
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}"
2025-09-29 15:12:02 +00:00
IsChecked="{Binding CloseShellAfterPress, Mode=TwoWay}">
<CheckBox.IsEnabled>
<MultiBinding Converter="{StaticResource LeaveShellOpenOrCloseShellAfterPressEnabledConverter}">
<Binding Mode="OneWay" Path="LeaveShellOpen" />
<Binding Mode="OneWay" Path="SelectedShell" />
</MultiBinding>
</CheckBox.IsEnabled>
</CheckBox>
2021-12-14 08:19:08 +00:00
<CheckBox
x:Name="LeaveShellOpen"
Grid.Row="2"
Margin="{StaticResource SettingPanelItemRightTopBottomMargin}"
2021-12-14 08:19:08 +00:00
HorizontalAlignment="Left"
Content="{DynamicResource flowlauncher_plugin_cmd_leave_cmd_open}"
IsChecked="{Binding LeaveShellOpen, Mode=TwoWay}">
<CheckBox.IsEnabled>
2025-09-29 15:12:02 +00:00
<MultiBinding Converter="{StaticResource LeaveShellOpenOrCloseShellAfterPressEnabledConverter}">
<Binding Mode="OneWay" Path="CloseShellAfterPress" />
<Binding Mode="OneWay" Path="SelectedShell" />
</MultiBinding>
</CheckBox.IsEnabled>
</CheckBox>
2021-12-14 08:19:08 +00:00
<CheckBox
x:Name="AlwaysRunAsAdministrator"
Grid.Row="3"
Margin="{StaticResource SettingPanelItemRightTopBottomMargin}"
2021-12-14 08:19:08 +00:00
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}" />
2021-12-14 08:19:08 +00:00
<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">
2021-12-14 08:19:08 +00:00
<CheckBox
x:Name="ShowOnlyMostUsedCMDs"
Margin="{StaticResource SettingPanelItemRightTopBottomMargin}"
Content="{DynamicResource flowlauncher_plugin_cmd_history}"
IsChecked="{Binding Settings.ShowOnlyMostUsedCMDs, Mode=TwoWay}" />
2021-12-14 08:19:08 +00:00
<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}" />
2021-12-14 08:19:08 +00:00
</StackPanel>
2020-05-03 05:57:14 +00:00
</Grid>
</UserControl>