|
1 |
| -<UserControl x:Class="Flow.Launcher.Plugin.Program.Views.ProgramSetting" |
2 |
| - xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
3 |
| - xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
4 |
| - xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
5 |
| - xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
6 |
| - xmlns:program="clr-namespace:Flow.Launcher.Plugin.Program" |
7 |
| - DataContext="{Binding RelativeSource={RelativeSource Self}}" |
8 |
| - mc:Ignorable="d" |
9 |
| - d:DesignHeight="404.508" d:DesignWidth="600"> |
10 |
| - <Grid Margin="10"> |
| 1 | +<UserControl |
| 2 | + x:Class="Flow.Launcher.Plugin.Program.Views.ProgramSetting" |
| 3 | + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
| 4 | + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| 5 | + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
| 6 | + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
| 7 | + xmlns:program="clr-namespace:Flow.Launcher.Plugin.Program" |
| 8 | + Height="450" |
| 9 | + d:DesignHeight="404.508" |
| 10 | + d:DesignWidth="600" |
| 11 | + DataContext="{Binding RelativeSource={RelativeSource Self}}" |
| 12 | + mc:Ignorable="d"> |
| 13 | + <Grid Margin="20"> |
11 | 14 | <Grid.RowDefinitions>
|
12 |
| - <RowDefinition Height="120"/> |
13 |
| - <RowDefinition Height="*"/> |
14 |
| - <RowDefinition Height="50"/> |
| 15 | + <RowDefinition Height="120" /> |
| 16 | + <RowDefinition Height="*" /> |
| 17 | + <RowDefinition Height="50" /> |
15 | 18 | </Grid.RowDefinitions>
|
16 |
| - <StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Stretch"> |
17 |
| - <StackPanel Orientation="Vertical" Width="Auto"> |
18 |
| - <CheckBox Name="StartMenuEnabled" IsChecked="{Binding EnableStartMenuSource}" Margin="5" Content="{DynamicResource flowlauncher_plugin_program_index_start}" ToolTip="{DynamicResource flowlauncher_plugin_program_index_start_tooltip}" /> |
19 |
| - <CheckBox Name="RegistryEnabled" IsChecked="{Binding EnableRegistrySource}" Margin="5" Content="{DynamicResource flowlauncher_plugin_program_index_registry}" ToolTip="{DynamicResource flowlauncher_plugin_program_index_registry_tooltip}" /> |
20 |
| - <CheckBox Name="DescriptionEnabled" IsChecked="{Binding EnableDescription}" Margin="5" Content="{DynamicResource flowlauncher_plugin_program_enable_description}" ToolTip="{DynamicResource flowlauncher_plugin_program_enable_description_tooltip}" /> |
| 19 | + <StackPanel |
| 20 | + Grid.Row="0" |
| 21 | + HorizontalAlignment="Stretch" |
| 22 | + Orientation="Horizontal"> |
| 23 | + <StackPanel Width="Auto" Orientation="Vertical"> |
| 24 | + <CheckBox |
| 25 | + Name="StartMenuEnabled" |
| 26 | + Margin="5" |
| 27 | + Content="{DynamicResource flowlauncher_plugin_program_index_start}" |
| 28 | + IsChecked="{Binding EnableStartMenuSource}" |
| 29 | + ToolTip="{DynamicResource flowlauncher_plugin_program_index_start_tooltip}" /> |
| 30 | + <CheckBox |
| 31 | + Name="RegistryEnabled" |
| 32 | + Margin="5" |
| 33 | + Content="{DynamicResource flowlauncher_plugin_program_index_registry}" |
| 34 | + IsChecked="{Binding EnableRegistrySource}" |
| 35 | + ToolTip="{DynamicResource flowlauncher_plugin_program_index_registry_tooltip}" /> |
| 36 | + <CheckBox |
| 37 | + Name="DescriptionEnabled" |
| 38 | + Margin="5" |
| 39 | + Content="{DynamicResource flowlauncher_plugin_program_enable_description}" |
| 40 | + IsChecked="{Binding EnableDescription}" |
| 41 | + ToolTip="{DynamicResource flowlauncher_plugin_program_enable_description_tooltip}" /> |
21 | 42 | </StackPanel>
|
22 |
| - <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Width="Auto"> |
23 |
| - <Button Height="31" HorizontalAlignment="Right" Margin="10" Width="100" x:Name="btnLoadAllProgramSource" Click="btnLoadAllProgramSource_OnClick" Content="{DynamicResource flowlauncher_plugin_program_all_programs}" /> |
24 |
| - <Button Height="31" HorizontalAlignment="Right" Margin="10" Width="100" x:Name="btnProgramSuffixes" Click="BtnProgramSuffixes_OnClick" Content="{DynamicResource flowlauncher_plugin_program_suffixes}" /> |
25 |
| - <Button Height="31" HorizontalAlignment="Right" Margin="10" Width="100" x:Name="btnReindex" Click="btnReindex_Click" Content="{DynamicResource flowlauncher_plugin_program_reindex}" /> |
| 43 | + <StackPanel |
| 44 | + Width="Auto" |
| 45 | + HorizontalAlignment="Right" |
| 46 | + Orientation="Horizontal"> |
| 47 | + <Button |
| 48 | + x:Name="btnLoadAllProgramSource" |
| 49 | + Width="100" |
| 50 | + Height="31" |
| 51 | + Margin="10" |
| 52 | + HorizontalAlignment="Right" |
| 53 | + Click="btnLoadAllProgramSource_OnClick" |
| 54 | + Content="{DynamicResource flowlauncher_plugin_program_all_programs}" /> |
| 55 | + <Button |
| 56 | + x:Name="btnProgramSuffixes" |
| 57 | + Width="100" |
| 58 | + Height="31" |
| 59 | + Margin="10" |
| 60 | + HorizontalAlignment="Right" |
| 61 | + Click="BtnProgramSuffixes_OnClick" |
| 62 | + Content="{DynamicResource flowlauncher_plugin_program_suffixes}" /> |
| 63 | + <Button |
| 64 | + x:Name="btnReindex" |
| 65 | + Width="100" |
| 66 | + Height="31" |
| 67 | + Margin="10" |
| 68 | + HorizontalAlignment="Right" |
| 69 | + Click="btnReindex_Click" |
| 70 | + Content="{DynamicResource flowlauncher_plugin_program_reindex}" /> |
26 | 71 | </StackPanel>
|
27 | 72 | </StackPanel>
|
28 |
| - <ListView x:Name="programSourceView" Grid.Row="1" AllowDrop="True" SelectionMode="Extended" Style="{StaticResource {x:Static GridView.GridViewStyleKey}}" |
29 |
| - Margin="0,13,0,10" |
30 |
| - BorderBrush="DarkGray" |
31 |
| - BorderThickness="1" |
32 |
| - GridViewColumnHeader.Click="GridViewColumnHeaderClickedHandler" |
33 |
| - PreviewMouseRightButtonUp="ProgramSourceView_PreviewMouseRightButtonUp" |
34 |
| - DragEnter="programSourceView_DragEnter" |
35 |
| - Drop="programSourceView_Drop"> |
| 73 | + <ListView |
| 74 | + x:Name="programSourceView" |
| 75 | + Grid.Row="1" |
| 76 | + Margin="0,13,0,10" |
| 77 | + AllowDrop="True" |
| 78 | + BorderBrush="DarkGray" |
| 79 | + BorderThickness="1" |
| 80 | + DragEnter="programSourceView_DragEnter" |
| 81 | + Drop="programSourceView_Drop" |
| 82 | + GridViewColumnHeader.Click="GridViewColumnHeaderClickedHandler" |
| 83 | + PreviewMouseRightButtonUp="ProgramSourceView_PreviewMouseRightButtonUp" |
| 84 | + SelectionMode="Extended" |
| 85 | + Style="{StaticResource {x:Static GridView.GridViewStyleKey}}"> |
36 | 86 | <ListView.ItemContainerStyle>
|
37 | 87 | <Style TargetType="ListViewItem">
|
38 |
| - <EventSetter Event="PreviewMouseUp" Handler="Row_OnClick"/> |
| 88 | + <EventSetter Event="PreviewMouseUp" Handler="Row_OnClick" /> |
39 | 89 | <Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
40 | 90 | </Style>
|
41 | 91 | </ListView.ItemContainerStyle>
|
42 | 92 | <ListView.View>
|
43 | 93 | <GridView>
|
44 |
| - <GridViewColumn Header="Name" Width="150"> |
| 94 | + <GridViewColumn Width="150" Header="Name"> |
45 | 95 | <GridViewColumn.CellTemplate>
|
46 | 96 | <DataTemplate>
|
47 |
| - <TextBlock Text="{Binding Name}"/> |
| 97 | + <TextBlock Text="{Binding Name}" /> |
48 | 98 | </DataTemplate>
|
49 | 99 | </GridViewColumn.CellTemplate>
|
50 | 100 | </GridViewColumn>
|
51 | 101 | <GridViewColumn Header="Enabled">
|
52 | 102 | <GridViewColumn.CellTemplate>
|
53 | 103 | <DataTemplate>
|
54 |
| - <TextBlock Text="{Binding Enabled}" MaxWidth="60" TextAlignment="Center"/> |
| 104 | + <TextBlock |
| 105 | + MaxWidth="60" |
| 106 | + Text="{Binding Enabled}" |
| 107 | + TextAlignment="Center" /> |
55 | 108 | </DataTemplate>
|
56 | 109 | </GridViewColumn.CellTemplate>
|
57 | 110 | </GridViewColumn>
|
58 |
| - <GridViewColumn Header="{DynamicResource flowlauncher_plugin_program_location}" Width="550"> |
| 111 | + <GridViewColumn Width="550" Header="{DynamicResource flowlauncher_plugin_program_location}"> |
59 | 112 | <GridViewColumn.CellTemplate>
|
60 | 113 | <DataTemplate>
|
61 |
| - <TextBlock Text="{Binding Location, ConverterParameter=(null), Converter={program:LocationConverter}}"/> |
| 114 | + <TextBlock Text="{Binding Location, ConverterParameter=(null), Converter={program:LocationConverter}}" /> |
62 | 115 | </DataTemplate>
|
63 | 116 | </GridViewColumn.CellTemplate>
|
64 | 117 | </GridViewColumn>
|
65 | 118 | </GridView>
|
66 | 119 | </ListView.View>
|
67 | 120 | </ListView>
|
68 |
| - <DockPanel Grid.Row="2" Margin="0,0,0,0" Grid.RowSpan="1"> |
69 |
| - <StackPanel x:Name="indexingPanel" Visibility="Hidden" HorizontalAlignment="Left" Orientation="Horizontal"> |
70 |
| - <ProgressBar x:Name="progressBarIndexing" Height="20" Width="80" Minimum="0" Maximum="100" IsIndeterminate="True" /> |
71 |
| - <TextBlock Margin="10 0 0 0" Height="20" HorizontalAlignment="Center" Text="{DynamicResource flowlauncher_plugin_program_indexing}" /> |
| 121 | + <DockPanel |
| 122 | + Grid.Row="2" |
| 123 | + Grid.RowSpan="1" |
| 124 | + Margin="0,0,0,0"> |
| 125 | + <StackPanel |
| 126 | + x:Name="indexingPanel" |
| 127 | + HorizontalAlignment="Left" |
| 128 | + Orientation="Horizontal" |
| 129 | + Visibility="Hidden"> |
| 130 | + <ProgressBar |
| 131 | + x:Name="progressBarIndexing" |
| 132 | + Width="80" |
| 133 | + Height="20" |
| 134 | + IsIndeterminate="True" |
| 135 | + Maximum="100" |
| 136 | + Minimum="0" /> |
| 137 | + <TextBlock |
| 138 | + Height="20" |
| 139 | + Margin="10,0,0,0" |
| 140 | + HorizontalAlignment="Center" |
| 141 | + Text="{DynamicResource flowlauncher_plugin_program_indexing}" /> |
72 | 142 | </StackPanel>
|
73 | 143 | <StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
|
74 |
| - <Button x:Name="btnProgramSourceStatus" Click="btnProgramSourceStatus_OnClick" Width="100" Margin="10" Content="{DynamicResource flowlauncher_plugin_program_disable}" /> |
75 |
| - <Button x:Name="btnEditProgramSource" Click="btnEditProgramSource_OnClick" Width="100" Margin="10" Content="{DynamicResource flowlauncher_plugin_program_edit}"/> |
76 |
| - <Button x:Name="btnAddProgramSource" Click="btnAddProgramSource_OnClick" Width="100" Margin="10 10 0 10" Content="{DynamicResource flowlauncher_plugin_program_add}"/> |
| 144 | + <Button |
| 145 | + x:Name="btnProgramSourceStatus" |
| 146 | + Width="100" |
| 147 | + Margin="10" |
| 148 | + Click="btnProgramSourceStatus_OnClick" |
| 149 | + Content="{DynamicResource flowlauncher_plugin_program_disable}" /> |
| 150 | + <Button |
| 151 | + x:Name="btnEditProgramSource" |
| 152 | + Width="100" |
| 153 | + Margin="10" |
| 154 | + Click="btnEditProgramSource_OnClick" |
| 155 | + Content="{DynamicResource flowlauncher_plugin_program_edit}" /> |
| 156 | + <Button |
| 157 | + x:Name="btnAddProgramSource" |
| 158 | + Width="100" |
| 159 | + Margin="10,10,0,10" |
| 160 | + Click="btnAddProgramSource_OnClick" |
| 161 | + Content="{DynamicResource flowlauncher_plugin_program_add}" /> |
77 | 162 | </StackPanel>
|
78 | 163 | </DockPanel>
|
79 | 164 | </Grid>
|
|
0 commit comments