Flow.Launcher/Plugins/Flow.Launcher.Plugin.WebSearch/SearchSourceSetting.xaml

375 lines
No EOL
18 KiB
XML

<Window
x:Class="Flow.Launcher.Plugin.WebSearch.SearchSourceSettingWindow"
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:vm="clr-namespace:Flow.Launcher.Plugin.WebSearch"
Title="{DynamicResource flowlauncher_plugin_websearch_window_title}"
Width="550"
d:DataContext="{d:DesignInstance vm:SearchSourceViewModel}"
Background="{DynamicResource PopupBGColor}"
Foreground="{DynamicResource PopupTextColor}"
ResizeMode="NoResize"
SizeToContent="Height"
WindowStartupLocation="CenterScreen"
mc:Ignorable="d">
<WindowChrome.WindowChrome>
<WindowChrome CaptionHeight="32" ResizeBorderThickness="{x:Static SystemParameters.WindowResizeBorderThickness}" />
</WindowChrome.WindowChrome>
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition Height="80" />
</Grid.RowDefinitions>
<StackPanel Grid.Row="0">
<StackPanel>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Button
Grid.Column="4"
Click="OnCancelButtonClick"
Style="{StaticResource TitleBarCloseButtonStyle}">
<Path
Width="46"
Height="32"
Data="M 18,11 27,20 M 18,20 27,11"
Stroke="{Binding Path=Foreground, RelativeSource={RelativeSource AncestorType={x:Type Button}}}"
StrokeThickness="1">
<Path.Style>
<Style TargetType="Path">
<Style.Triggers>
<DataTrigger Binding="{Binding Path=IsActive, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}" Value="False">
<Setter Property="Opacity" Value="0.5" />
</DataTrigger>
</Style.Triggers>
</Style>
</Path.Style>
</Path>
</Button>
</Grid>
</StackPanel>
<StackPanel Margin="26 12 26 0">
<Grid>
<StackPanel>
<StackPanel Grid.Row="0" Margin="0 0 0 12">
<TextBlock
Grid.Column="0"
Margin="0 0 0 0"
FontSize="20"
FontWeight="SemiBold"
Text="{DynamicResource flowlauncher_plugin_websearch_window_title}"
TextAlignment="Left" />
</StackPanel>
<StackPanel>
<TextBlock
FontSize="14"
Text="{DynamicResource flowlauncher_plugin_websearch_guide_1}"
TextAlignment="Left"
TextWrapping="WrapWithOverflow" />
<TextBox
Margin="0 12 0 12"
FontSize="14"
FontWeight="SemiBold"
IsReadOnly="True"
Text="{DynamicResource flowlauncher_plugin_websearch_guide_2}"
TextAlignment="Center"
TextWrapping="WrapWithOverflow" />
<TextBlock
Margin="0 0 0 14"
FontSize="14"
Text="{DynamicResource flowlauncher_plugin_websearch_guide_3}"
TextAlignment="Left"
TextWrapping="WrapWithOverflow" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<Grid Width="500">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<TextBlock
Grid.Row="0"
Grid.Column="0"
Margin="10 10 15 10"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
FontSize="14"
Text="{DynamicResource flowlauncher_plugin_websearch_title}" />
<TextBox
Grid.Row="0"
Grid.Column="1"
Margin="10"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
Text="{Binding SearchSource.Title}" />
<TextBlock
Grid.Row="1"
Grid.Column="0"
Margin="10 10 15 10"
HorizontalAlignment="Left"
VerticalAlignment="Center"
FontSize="14"
Text="{DynamicResource flowlauncher_plugin_websearch_icon}" />
<StackPanel
Grid.Row="1"
Grid.Column="1"
Orientation="Horizontal">
<Button
Height="35"
Margin="10 0 0 0"
VerticalAlignment="Center"
Click="OnSelectIconClick"
Content="{DynamicResource flowlauncher_plugin_websearch_select_icon}" />
<Image
Name="imgPreviewIcon"
Width="24"
Height="24"
Margin="14 0 0 0"
VerticalAlignment="Center" />
</StackPanel>
<TextBlock
Grid.Row="2"
Grid.Column="0"
Margin="10 10 15 10"
HorizontalAlignment="Left"
VerticalAlignment="Center"
FontSize="14"
Text="{DynamicResource flowlauncher_plugin_websearch_url}" />
<TextBox
Grid.Row="2"
Grid.Column="1"
Margin="10"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
Text="{Binding SearchSource.Url}" />
<TextBlock
Grid.Row="3"
Grid.Column="0"
Margin="10 10 15 10"
HorizontalAlignment="Left"
VerticalAlignment="Center"
FontSize="14"
Text="{DynamicResource flowlauncher_plugin_websearch_action_keyword}" />
<TextBox
Grid.Row="3"
Grid.Column="1"
Margin="10 0 10 0"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
DataObject.Pasting="TextBox_Pasting"
PreviewKeyDown="TextBox_PreviewKeyDown"
Text="{Binding SearchSource.ActionKeyword}" />
<TextBlock
Grid.Row="4"
Grid.Column="0"
Margin="10 10 15 15"
HorizontalAlignment="Left"
VerticalAlignment="Center"
FontSize="14"
Text="{DynamicResource flowlauncher_plugin_websearch_enabled_label}" />
<CheckBox
Grid.Row="4"
Grid.Column="1"
Margin="10 10 10 15"
VerticalAlignment="Center"
IsChecked="{Binding SearchSource.Enabled}" />
</Grid>
</StackPanel>
</StackPanel>
</Grid>
</StackPanel>
</StackPanel>
<Border
Grid.Row="1"
Background="{DynamicResource PopupButtonAreaBGColor}"
BorderBrush="{DynamicResource PopupButtonAreaBorderColor}"
BorderThickness="0 1 0 0">
<StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
<Button
MinWidth="140"
Margin="10 0 5 0"
Click="OnCancelButtonClick"
Content="{DynamicResource flowlauncher_plugin_websearch_cancel}" />
<Button
MinWidth="140"
Margin="5 0 10 0"
Click="OnConfirmButtonClick"
Content="{DynamicResource flowlauncher_plugin_websearch_confirm}"
Style="{DynamicResource AccentButtonStyle}" />
</StackPanel>
</Border>
</Grid>
<!--
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition Height="80" />
</Grid.RowDefinitions>
<Border
Padding="26,26,26,0"
Background="#ffffff"
BorderBrush="#e5e5e5"
BorderThickness="0,0,0,1">
<Grid>
<StackPanel>
<StackPanel Grid.Row="0" Margin="0,0,0,12">
<TextBlock
Grid.Column="0"
Margin="0,0,0,0"
FontFamily="Segoe UI"
FontSize="20"
FontWeight="SemiBold"
Text="{DynamicResource flowlauncher_plugin_websearch_window_title}"
TextAlignment="Left" />
</StackPanel>
<StackPanel Orientation="Vertical">
<TextBlock
FontSize="14"
Foreground="#1b1b1b"
Text="{DynamicResource flowlauncher_plugin_websearch_guide_1}"
TextAlignment="Left"
TextWrapping="WrapWithOverflow" />
<TextBlock
Margin="0,12,0,12"
FontSize="14"
FontWeight="SemiBold"
Foreground="#1b1b1b"
Text="{DynamicResource flowlauncher_plugin_websearch_guide_2}"
TextAlignment="Center"
TextWrapping="WrapWithOverflow" />
<TextBlock
Margin="0,0,0,14"
FontSize="14"
Foreground="#1b1b1b"
Text="{DynamicResource flowlauncher_plugin_websearch_guide_3}"
TextAlignment="Left"
TextWrapping="WrapWithOverflow" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock
Width="100"
Margin="10"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
FontSize="14"
Text="{DynamicResource flowlauncher_plugin_websearch_title}" />
<TextBox
Width="330"
Margin="10"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Text="{Binding SearchSource.Title}" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock
Grid.Row="4"
Grid.Column="0"
Width="100"
Margin="10"
HorizontalAlignment="Left"
VerticalAlignment="Center"
FontSize="14"
Text="{DynamicResource flowlauncher_plugin_websearch_icon}" />
<Button
Height="35"
Margin="10,0,0,0"
VerticalAlignment="Center"
Click="OnSelectIconClick"
Content="{DynamicResource flowlauncher_plugin_websearch_select_icon}" />
<Image
Name="imgPreviewIcon"
Width="24"
Height="24"
Margin="14,0,0,0"
VerticalAlignment="Center" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock
Width="100"
Margin="10"
HorizontalAlignment="Left"
VerticalAlignment="Center"
FontSize="14"
Text="{DynamicResource flowlauncher_plugin_websearch_url}" />
<TextBox
Grid.Row="1"
Grid.Column="1"
Width="330"
Margin="10"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Text="{Binding SearchSource.Url}" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock
Grid.Row="2"
Grid.Column="0"
Width="100"
Margin="10"
HorizontalAlignment="Left"
VerticalAlignment="Center"
FontSize="14"
Text="{DynamicResource flowlauncher_plugin_websearch_action_keyword}" />
<TextBox
Grid.Row="2"
Grid.Column="1"
Width="330"
Margin="10,0,10,0"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Text="{Binding SearchSource.ActionKeyword}" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock
Grid.Row="3"
Grid.Column="0"
Width="100"
Margin="10"
HorizontalAlignment="Left"
VerticalAlignment="Center"
FontSize="14"
Text="{DynamicResource flowlauncher_plugin_websearch_enable}" />
<CheckBox
Grid.Row="3"
Grid.Column="1"
Margin="10"
VerticalAlignment="Center"
IsChecked="{Binding SearchSource.Enabled}" />
</StackPanel>
</StackPanel>
</Grid>
</Border>
<StackPanel
Grid.Row="1"
HorizontalAlignment="Center"
Orientation="Horizontal">
<Button
Width="100"
Margin="10,0,5,0"
Click="OnCancelButtonClick"
Content="{DynamicResource flowlauncher_plugin_websearch_cancel}" />
<Button
Width="100"
Margin="5,0,10,0"
Click="OnConfirmButtonClick"
Content="{DynamicResource flowlauncher_plugin_websearch_confirm}" />
</StackPanel>
</Grid>
-->
</Window>