Flow.Launcher/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/CustomBrowserSetting.xaml

203 lines
9.7 KiB
XML

<Window
x:Class="Flow.Launcher.Plugin.BrowserBookmark.Views.CustomBrowserSettingWindow"
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:local="clr-namespace:Flow.Launcher.Plugin.BrowserBookmark.Models"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="{DynamicResource flowlauncher_plugin_browserbookmark_bookmarkDataSetting}"
Width="550"
Background="{DynamicResource PopuBGColor}"
Foreground="{DynamicResource PopupTextColor}"
KeyDown="WindowKeyDown"
ResizeMode="NoResize"
SizeToContent="Height"
WindowStartupLocation="CenterScreen"
mc:Ignorable="d">
<WindowChrome.WindowChrome>
<WindowChrome CaptionHeight="32" ResizeBorderThickness="{x:Static SystemParameters.WindowResizeBorderThickness}" />
</WindowChrome.WindowChrome>
<Window.DataContext>
<local:CustomBrowser />
</Window.DataContext>
<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="CancelEditCustomBrowser"
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 0 26 0">
<StackPanel Margin="0 0 0 12">
<TextBlock
Margin="0 0 0 0"
FontSize="20"
FontWeight="SemiBold"
Text="{DynamicResource flowlauncher_plugin_browserbookmark_bookmarkDataSetting}"
TextAlignment="Left" />
</StackPanel>
<StackPanel Margin="0 0 0 20" Orientation="Horizontal">
<Grid Width="474" HorizontalAlignment="Stretch">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<StackPanel
Grid.Row="0"
Grid.Column="0"
Grid.ColumnSpan="2"
Margin="5 0 0 20">
<TextBlock
Margin="0 0 0 4"
HorizontalAlignment="Left"
VerticalAlignment="Center"
FontSize="14"
Text="{DynamicResource flowlauncher_plugin_browserbookmark_guideMessage01}"
TextWrapping="WrapWithOverflow" />
<TextBlock
Margin="0 4 0 4"
HorizontalAlignment="Left"
VerticalAlignment="Center"
FontSize="14"
Text="{DynamicResource flowlauncher_plugin_browserbookmark_guideMessage02}"
TextWrapping="WrapWithOverflow" />
<TextBlock
Margin="0 4 0 0"
HorizontalAlignment="Left"
VerticalAlignment="Center"
FontSize="14"
Text="{DynamicResource flowlauncher_plugin_browserbookmark_guideMessage03}"
TextWrapping="WrapWithOverflow" />
</StackPanel>
<TextBlock
Grid.Row="1"
Grid.Column="0"
Margin="5 0 20 0"
HorizontalAlignment="Left"
VerticalAlignment="Center"
FontSize="14"
Text="{DynamicResource flowlauncher_plugin_browserbookmark_browserName}" />
<TextBox
Grid.Row="1"
Grid.Column="1"
Width="120"
Height="34"
Margin="5 0 10 0"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Text="{Binding Name}" />
<TextBlock
Grid.Row="2"
Grid.Column="0"
Margin="5 10 20 0"
HorizontalAlignment="Left"
VerticalAlignment="Center"
FontSize="14"
Text="{DynamicResource flowlauncher_plugin_browserbookmark_browserEngine}" />
<ComboBox
Grid.Row="2"
Grid.Column="1"
Width="120"
Height="34"
Margin="5 10 10 0"
HorizontalAlignment="Left"
VerticalAlignment="Center"
DisplayMemberPath="Display"
ItemsSource="{Binding AllBrowserTypes}"
SelectedValue="{Binding BrowserType}"
SelectedValuePath="Value" />
<TextBlock
Grid.Row="3"
Grid.Column="0"
Margin="5 10 20 0"
HorizontalAlignment="Left"
VerticalAlignment="Center"
FontSize="14"
Text="{DynamicResource flowlauncher_plugin_browserbookmark_browserBookmarkDataDirectory}" />
<DockPanel
Grid.Row="3"
Grid.Column="1"
LastChildFill="True">
<Button
Height="34"
MinWidth="100"
Margin="5 10 0 0"
VerticalContentAlignment="Stretch"
Click="OnSelectPathClick"
Content="{DynamicResource flowlauncher_plugin_browserbookmark_browseBrowserBookmark}"
DockPanel.Dock="Right" />
<TextBox
Name="PathTextBox"
Height="34"
Margin="5 10 0 0"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
Text="{Binding DataDirectoryPath}" />
</DockPanel>
</Grid>
</StackPanel>
</StackPanel>
</StackPanel>
<Border
Grid.Row="1"
Background="{DynamicResource PopupButtonAreaBGColor}"
BorderBrush="{DynamicResource PopupButtonAreaBorderColor}"
BorderThickness="0 1 0 0">
<StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
<Button
x:Name="btnCancel"
MinWidth="145"
Margin="0 0 5 0"
Click="CancelEditCustomBrowser"
Content="{DynamicResource cancel}" />
<Button
Name="btnConfirm"
MinWidth="145"
Margin="5 0 0 0"
Click="ConfirmEditCustomBrowser"
Style="{StaticResource AccentButtonStyle}">
<TextBlock x:Name="lblAdd" Text="{DynamicResource done}" />
</Button>
</StackPanel>
</Border>
</Grid>
</Window>