Flow.Launcher/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml
DB p c385b9516d - Add Height Program Plugin Setting Panel
- Disable Done Button when Null in TextBoxes
- Adjust Dopus Arguments
2021-11-07 12:20:15 +09:00

228 lines
7.4 KiB
XML

<UserControl
x:Class="Flow.Launcher.Plugin.Program.Views.ProgramSetting"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:program="clr-namespace:Flow.Launcher.Plugin.Program"
Height="450"
d:DesignHeight="404.508"
d:DesignWidth="600"
DataContext="{Binding RelativeSource={RelativeSource Self}}"
mc:Ignorable="d">
<Grid Margin="20">
<Grid.RowDefinitions>
<RowDefinition Height="120" />
<RowDefinition Height="*" />
<RowDefinition Height="50" />
</Grid.RowDefinitions>
<StackPanel
Grid.Row="0"
HorizontalAlignment="Stretch"
Orientation="Horizontal">
<StackPanel Width="Auto" Orientation="Vertical">
<CheckBox
Name="StartMenuEnabled"
Margin="5"
Content="{DynamicResource flowlauncher_plugin_program_index_start}"
IsChecked="{Binding EnableStartMenuSource}"
ToolTip="{DynamicResource flowlauncher_plugin_program_index_start_tooltip}" />
<CheckBox
Name="RegistryEnabled"
Margin="5"
Content="{DynamicResource flowlauncher_plugin_program_index_registry}"
IsChecked="{Binding EnableRegistrySource}"
ToolTip="{DynamicResource flowlauncher_plugin_program_index_registry_tooltip}" />
<CheckBox
Name="DescriptionEnabled"
Margin="5"
Content="{DynamicResource flowlauncher_plugin_program_enable_description}"
IsChecked="{Binding EnableDescription}"
ToolTip="{DynamicResource flowlauncher_plugin_program_enable_description_tooltip}" />
</StackPanel>
<StackPanel
Width="Auto"
HorizontalAlignment="Right"
Orientation="Horizontal">
<Button
x:Name="btnLoadAllProgramSource"
Width="100"
Height="31"
Margin="10"
HorizontalAlignment="Right"
Click="btnLoadAllProgramSource_OnClick"
Content="{DynamicResource flowlauncher_plugin_program_all_programs}" />
<Button
x:Name="btnProgramSuffixes"
Width="100"
Height="31"
Margin="10"
HorizontalAlignment="Right"
Click="BtnProgramSuffixes_OnClick"
Content="{DynamicResource flowlauncher_plugin_program_suffixes}" />
<Button
x:Name="btnReindex"
Width="100"
Height="31"
Margin="10"
HorizontalAlignment="Right"
Click="btnReindex_Click"
Content="{DynamicResource flowlauncher_plugin_program_reindex}" />
</StackPanel>
</StackPanel>
<ListView
x:Name="programSourceView"
Grid.Row="1"
Margin="0,13,0,10"
AllowDrop="True"
BorderBrush="DarkGray"
BorderThickness="1"
DragEnter="programSourceView_DragEnter"
Drop="programSourceView_Drop"
GridViewColumnHeader.Click="GridViewColumnHeaderClickedHandler"
PreviewMouseRightButtonUp="ProgramSourceView_PreviewMouseRightButtonUp"
SelectionMode="Extended"
Style="{StaticResource {x:Static GridView.GridViewStyleKey}}">
<ListView.ItemContainerStyle>
<Style TargetType="ListViewItem">
<EventSetter Event="PreviewMouseUp" Handler="Row_OnClick" />
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
</Style>
</ListView.ItemContainerStyle>
<ListView.View>
<GridView>
<GridViewColumn Width="150" Header="Name">
<GridViewColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Name}" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
<GridViewColumn Header="Enabled">
<GridViewColumn.CellTemplate>
<DataTemplate>
<TextBlock
MaxWidth="60"
Text="{Binding Enabled}"
TextAlignment="Center" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
<GridViewColumn Width="550" Header="{DynamicResource flowlauncher_plugin_program_location}">
<GridViewColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Location, ConverterParameter=(null), Converter={program:LocationConverter}}" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
</GridView>
</ListView.View>
</ListView>
<DockPanel
Grid.Row="2"
Grid.RowSpan="1"
Margin="0,0,0,0">
<StackPanel
x:Name="indexingPanel"
HorizontalAlignment="Left"
Orientation="Horizontal"
Visibility="Hidden">
<ProgressBar
x:Name="progressBarIndexing"
Width="80"
Height="20"
IsIndeterminate="True"
Maximum="100"
Minimum="0" />
<TextBlock
Height="20"
Margin="10,0,0,0"
HorizontalAlignment="Center"
Text="{DynamicResource flowlauncher_plugin_program_indexing}" />
</StackPanel>
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
<Button
x:Name="btnProgramSourceStatus"
Width="100"
Margin="10"
Click="btnProgramSourceStatus_OnClick"
Content="{DynamicResource flowlauncher_plugin_program_disable}" />
<Button
x:Name="btnEditProgramSource"
Width="100"
Margin="10"
Click="btnEditProgramSource_OnClick"
Content="{DynamicResource flowlauncher_plugin_program_edit}" />
<Button
x:Name="btnAddProgramSource"
Width="100"
Margin="10,10,0,10"
Click="btnAddProgramSource_OnClick"
Content="{DynamicResource flowlauncher_plugin_program_add}" />
</StackPanel>
</DockPanel>
</Grid>
</UserControl>