mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-14 03:37:10 +08:00
389 lines
24 KiB
XML
389 lines
24 KiB
XML
<Window
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:wox="clr-namespace:Wox"
|
|
x:Class="Wox.SettingWindow"
|
|
xmlns:woxPlugin="clr-namespace:Wox.Plugin;assembly=Wox.Plugin"
|
|
xmlns:image="clr-namespace:Wox.Infrastructure.Image;assembly=Wox.Infrastructure"
|
|
Icon="Images\app.png"
|
|
Title="{DynamicResource wox_settings}"
|
|
ResizeMode="NoResize"
|
|
WindowStartupLocation="CenterScreen"
|
|
Height="600" Width="800" PreviewKeyDown="Window_PreviewKeyDown">
|
|
<Window.Resources>
|
|
<ListBoxItem HorizontalContentAlignment="Stretch"
|
|
IsEnabled="False"
|
|
IsHitTestVisible="False" x:Key="FeatureBoxSeperator">
|
|
<Separator Width="{Binding ElementName=PluginsListBox, Path=ActualWidth}" />
|
|
</ListBoxItem>
|
|
<image:ImagePathConverter x:Key="ImageConverter" />
|
|
</Window.Resources>
|
|
<TabControl Height="auto" x:Name="SettingTab" SelectionChanged="settingTab_SelectionChanged">
|
|
<TabItem Header="{DynamicResource general}">
|
|
<StackPanel Orientation="Vertical">
|
|
<CheckBox x:Name="AutoStartup" Unchecked="CbStartWithWindows_OnUnchecked"
|
|
Checked="CbStartWithWindows_OnChecked" Margin="10">
|
|
<TextBlock Text="{DynamicResource startWoxOnSystemStartup}" />
|
|
</CheckBox>
|
|
<CheckBox x:Name="HideOnStartup" Margin="10">
|
|
<TextBlock Text="{DynamicResource hideOnStartup}" />
|
|
</CheckBox>
|
|
<CheckBox x:Name="HideWhenDeactive" Margin="10">
|
|
<TextBlock Text="{DynamicResource hideWoxWhenLoseFocus}" />
|
|
</CheckBox>
|
|
<CheckBox x:Name="RememberLastLocation" Margin="10">
|
|
<TextBlock Text="{DynamicResource rememberLastLocation}" />
|
|
</CheckBox>
|
|
<CheckBox x:Name="IgnoreHotkeysOnFullscreen" Margin="10">
|
|
<TextBlock Text="{DynamicResource ignoreHotkeysOnFullscreen}" />
|
|
</CheckBox>
|
|
<CheckBox x:Name="AutoUpdates" Margin="10">
|
|
<TextBlock Text="{DynamicResource autoUpdates}" />
|
|
</CheckBox>
|
|
<StackPanel Margin="10" Orientation="Horizontal">
|
|
<TextBlock Text="{DynamicResource language}" />
|
|
<ComboBox Margin="10 0 0 0" Width="120" x:Name="Languages" />
|
|
</StackPanel>
|
|
<StackPanel Orientation="Horizontal" Margin="10">
|
|
<TextBlock Text="{DynamicResource maxShowResults}" />
|
|
<ComboBox Margin="10 0 0 0" Width="45" Name="MaxResults" />
|
|
</StackPanel>
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBlock Text="{DynamicResource pythonDirectory}" Margin="10" />
|
|
<TextBox Width="300" Margin="10" x:Name="PythonDirectory" />
|
|
<Button Click="SelectPythonDirectoryOnClick" Content="{DynamicResource selectPythonDirectory}"
|
|
VerticalAlignment="Center" />
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</TabItem>
|
|
<TabItem Header="{DynamicResource plugin}" x:Name="PluginTab">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="200" />
|
|
<ColumnDefinition />
|
|
</Grid.ColumnDefinitions>
|
|
<DockPanel Grid.Column="0">
|
|
<TextBlock DockPanel.Dock="Top" Margin="10" HorizontalAlignment="Left" Cursor="Hand"
|
|
MouseUp="tbMorePlugins_MouseUp" Foreground="Blue"
|
|
Text="{DynamicResource browserMorePlugins}" />
|
|
<ListBox x:Name="PluginsListBox" Margin="10, 0, 10, 10"
|
|
SelectionChanged="lbPlugins_OnSelectionChanged"
|
|
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
|
|
ScrollViewer.HorizontalScrollBarVisibility="Disabled" Grid.IsSharedSizeScope="True">
|
|
<ListBox.Resources>
|
|
<DataTemplate DataType="{x:Type woxPlugin:PluginPair}">
|
|
<Grid Height="36" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="3">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="32" />
|
|
<ColumnDefinition />
|
|
</Grid.ColumnDefinitions>
|
|
<Image Width="32" Height="32" HorizontalAlignment="Left"
|
|
Source="{Binding Metadata.IcoPath,Converter={StaticResource ImageConverter},IsAsync=True}" />
|
|
<Grid Margin="3 0 3 0" Grid.Column="1" HorizontalAlignment="Stretch">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
<TextBlock VerticalAlignment="Center" ToolTip="{Binding Metadata.Name}"
|
|
x:Name="tbTitle" Text="{Binding Metadata.Name}" />
|
|
<TextBlock ToolTip="{Binding Metadata.Description}"
|
|
Grid.Row="1" x:Name="tbSubTitle"
|
|
Text="{Binding Metadata.Description}" Opacity="0.5" />
|
|
</Grid>
|
|
</Grid>
|
|
</DataTemplate>
|
|
</ListBox.Resources>
|
|
</ListBox>
|
|
</DockPanel>
|
|
<Grid Margin="0" Grid.Column="1">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
<ContentControl Grid.ColumnSpan="1" Grid.Row="0" Margin="10 10 10 0">
|
|
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="48" />
|
|
<ColumnDefinition />
|
|
</Grid.ColumnDefinitions>
|
|
<Image Width="48" Height="48" HorizontalAlignment="Left" VerticalAlignment="Top"
|
|
x:Name="PluginIcon" />
|
|
<Grid Margin="10,0,0,0" Grid.Column="1" HorizontalAlignment="Stretch">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
</Grid.RowDefinitions>
|
|
<DockPanel Grid.Row="0">
|
|
<TextBlock x:Name="PluginTitle" Text="Plugin Title" Cursor="Hand"
|
|
MouseUp="PluginTitle_OnMouseUp"
|
|
ToolTip="{Binding Source=pluginTitle, Path=Text}" FontSize="24" />
|
|
<TextBlock Opacity="0.5" VerticalAlignment="Bottom" HorizontalAlignment="Right"
|
|
x:Name="PluginAuthor" Text="{DynamicResource author}" />
|
|
</DockPanel>
|
|
<TextBlock Grid.Row="1" x:Name="PluginSubTitle" Opacity="0.5"
|
|
ToolTip="{Binding Source=pluginSubTitle, Path=Text}" />
|
|
<DockPanel Grid.Row="2" Margin="0 10 0 8">
|
|
<CheckBox x:Name="DisablePlugin" Click="OnDisablePluginClicked">
|
|
<TextBlock Text="{DynamicResource disable}" />
|
|
</CheckBox>
|
|
<TextBlock Margin="20 0 0 0"
|
|
x:Name="PluginActionKeywordsTitle"
|
|
Text="{DynamicResource actionKeywords}" />
|
|
<TextBlock Margin="5 0 0 0" ToolTip="Change Action Keywords" Cursor="Hand"
|
|
MouseUp="PluginActionKeywords_OnMouseUp" Foreground="Blue" Text="keys"
|
|
x:Name="PluginActionKeywords" />
|
|
<TextBlock Margin="10 0 0 0" Text="Initialize time: 0ms" x:Name="PluginInitTime" />
|
|
<TextBlock Margin="10 0 0 0" Text="Query time: 0ms" x:Name="PluginQueryTime" />
|
|
<TextBlock HorizontalAlignment="Right" Cursor="Hand"
|
|
MouseUp="tbOpenPluginDirecoty_MouseUp" Foreground="Blue"
|
|
Text="{DynamicResource pluginDirectory}" x:Name="OpenPluginDirecoty" />
|
|
</DockPanel>
|
|
</Grid>
|
|
</Grid>
|
|
</ContentControl>
|
|
|
|
<ContentControl x:Name="PluginContentPanel" Grid.ColumnSpan="1" Grid.Row="1" Margin="0"
|
|
HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
|
|
</Grid>
|
|
</Grid>
|
|
</TabItem>
|
|
<TabItem Header="{DynamicResource theme}" x:Name="ThemeTab">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="200" />
|
|
<ColumnDefinition />
|
|
</Grid.ColumnDefinitions>
|
|
<DockPanel Grid.Column="0">
|
|
<TextBlock DockPanel.Dock="Top" Margin="10" HorizontalAlignment="Left" Cursor="Hand"
|
|
MouseUp="tbMoreThemes_MouseUp" Foreground="Blue"
|
|
Text="{DynamicResource browserMoreThemes}" />
|
|
<ListBox x:Name="Theme" Margin="10, 0, 10, 10"
|
|
SelectionChanged="ThemeComboBox_OnSelectionChanged" HorizontalAlignment="Stretch"
|
|
VerticalAlignment="Stretch" Width="180" />
|
|
</DockPanel>
|
|
<Grid Margin="0" Grid.Column="1">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition />
|
|
<RowDefinition Height="100" />
|
|
</Grid.RowDefinitions>
|
|
<StackPanel x:Name="PreviewPanel" Grid.Row="0" Margin="0">
|
|
<StackPanel Orientation="Horizontal" Margin="10"
|
|
HorizontalAlignment="Center" VerticalAlignment="Center">
|
|
<Border Width="500" Style="{DynamicResource WindowBorderStyle}">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="50" />
|
|
<RowDefinition />
|
|
</Grid.RowDefinitions>
|
|
<TextBox Text="{DynamicResource helloWox}" IsReadOnly="True"
|
|
Style="{DynamicResource QueryBoxStyle}" Grid.Row="0" />
|
|
<wox:ResultListBox Grid.Row="1" x:Name="ResultListBoxPreview" />
|
|
</Grid>
|
|
</Border>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
|
|
<StackPanel Grid.Row="1" Margin="0 10 0 10" Orientation="Vertical">
|
|
<StackPanel Orientation="Horizontal" Margin="2">
|
|
<TextBlock Text="{DynamicResource queryBoxFont}" />
|
|
<ComboBox Margin="10 -2 5 0" x:Name="QueryBoxFont"
|
|
ItemsSource="{x:Static Fonts.SystemFontFamilies}"
|
|
SelectionChanged="CbQueryBoxFont_OnSelectionChanged" HorizontalAlignment="Left"
|
|
VerticalAlignment="Top" Width="160" />
|
|
<ComboBox Margin="0 -2 0 0"
|
|
x:Name="QueryBoxFontFaces"
|
|
ItemsSource="{Binding SelectedValue.FamilyTypefaces, ElementName=QueryBoxFont}"
|
|
SelectionChanged="CbQueryBoxFontFaces_OnSelectionChanged"
|
|
HorizontalAlignment="Left" VerticalAlignment="Top" Width="120">
|
|
<ComboBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<ItemsControl ItemsSource="{Binding AdjustedFaceNames}">
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding Value}" />
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
</DataTemplate>
|
|
</ComboBox.ItemTemplate>
|
|
</ComboBox>
|
|
</StackPanel>
|
|
<StackPanel Orientation="Horizontal" Margin="2">
|
|
<TextBlock Text="{DynamicResource resultItemFont}" />
|
|
<ComboBox Margin="5 -2 5 0" x:Name="ResultFontComboBox"
|
|
ItemsSource="{x:Static Fonts.SystemFontFamilies}"
|
|
SelectionChanged="OnResultFontSelectionChanged" HorizontalAlignment="Left"
|
|
VerticalAlignment="Top" Width="160" />
|
|
<ComboBox Margin="0 -2 0 0"
|
|
x:Name="ResultFontFacesComboBox"
|
|
ItemsSource="{Binding SelectedValue.FamilyTypefaces, ElementName=ResultFontComboBox}"
|
|
SelectionChanged="OnResultFontFacesSelectionChanged" HorizontalAlignment="Left"
|
|
VerticalAlignment="Top" Width="120">
|
|
<ComboBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<ItemsControl ItemsSource="{Binding AdjustedFaceNames}">
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding Value}" />
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
</DataTemplate>
|
|
</ComboBox.ItemTemplate>
|
|
</ComboBox>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
|
|
</Grid>
|
|
</Grid>
|
|
</TabItem>
|
|
<TabItem Header="{DynamicResource hotkey}" x:Name="HotkeyTab">
|
|
<Grid Margin="10">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="30" />
|
|
<RowDefinition />
|
|
<RowDefinition Height="50" />
|
|
</Grid.RowDefinitions>
|
|
<StackPanel Grid.Row="0" Orientation="Horizontal" VerticalAlignment="Center">
|
|
<TextBlock VerticalAlignment="Center" Margin="0 0 10 0" Text="{DynamicResource woxHotkey}" />
|
|
<wox:HotkeyControl x:Name="HotkeyControl" />
|
|
</StackPanel>
|
|
<Grid Grid.Row="1">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="20" />
|
|
<RowDefinition />
|
|
</Grid.RowDefinitions>
|
|
<TextBlock VerticalAlignment="Center" Grid.Row="0" Margin="0 0 10 0"
|
|
Text="{DynamicResource customQueryHotkey}" />
|
|
<ListView x:Name="CustomHotkies" Margin="0 5 0 0" Grid.Row="1">
|
|
<ListView.View>
|
|
<GridView>
|
|
<GridViewColumn Header="{DynamicResource hotkey}" Width="180">
|
|
<GridViewColumn.CellTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding Hotkey}" />
|
|
</DataTemplate>
|
|
</GridViewColumn.CellTemplate>
|
|
</GridViewColumn>
|
|
<GridViewColumn Header="{DynamicResource actionKeywords}" Width="500">
|
|
<GridViewColumn.CellTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding ActionKeywords}" />
|
|
</DataTemplate>
|
|
</GridViewColumn.CellTemplate>
|
|
</GridViewColumn>
|
|
</GridView>
|
|
</ListView.View>
|
|
</ListView>
|
|
|
|
</Grid>
|
|
<StackPanel Grid.Row="2" HorizontalAlignment="Right" Orientation="Horizontal">
|
|
<Button Click="BtnDeleteCustomHotkey_OnClick" Width="100"
|
|
Margin="10" Content="{DynamicResource delete}" />
|
|
<Button Click="BtnEditCustomHotkey_OnClick" Width="100" Margin="10"
|
|
Content="{DynamicResource edit}" />
|
|
<Button Click="BtnAddCustomeHotkey_OnClick" Width="100" Margin="10"
|
|
Content="{DynamicResource add}" />
|
|
</StackPanel>
|
|
</Grid>
|
|
</TabItem>
|
|
<TabItem Header="{DynamicResource proxy}" Height="22" VerticalAlignment="Top">
|
|
<StackPanel>
|
|
<CheckBox x:Name="ToggleProxy" Margin="10" Checked="ProxyToggled" Unchecked="ProxyToggled">
|
|
<TextBlock Text="{DynamicResource enableProxy}" />
|
|
</CheckBox>
|
|
<Grid Margin="10" IsEnabled="{Binding IsChecked, ElementName=ToggleProxy}">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="80" />
|
|
<ColumnDefinition Width="220" />
|
|
<ColumnDefinition Width="80" />
|
|
<ColumnDefinition />
|
|
</Grid.ColumnDefinitions>
|
|
<Border Grid.Row="0" Grid.Column="0" Padding="5">
|
|
<TextBlock Text="{DynamicResource server}" />
|
|
</Border>
|
|
<Border Grid.Row="0" Grid.Column="1" Padding="5">
|
|
<TextBox Width="200" HorizontalAlignment="Left" x:Name="ProxyServer" />
|
|
</Border>
|
|
<Border Grid.Row="0" Grid.Column="2" Padding="5">
|
|
<TextBlock Text="{DynamicResource port}" />
|
|
</Border>
|
|
<Border Grid.Row="0" Grid.Column="3" Padding="5">
|
|
<TextBox Width="50" HorizontalAlignment="Left" x:Name="ProxyPort" />
|
|
</Border>
|
|
<Border Grid.Row="1" Grid.Column="0" Padding="5">
|
|
<TextBlock Text="{DynamicResource userName}" />
|
|
</Border>
|
|
<Border Grid.Row="1" Grid.Column="1" Padding="5">
|
|
<TextBox Width="200" HorizontalAlignment="Left" x:Name="ProxyUserName" />
|
|
</Border>
|
|
<Border Grid.Row="1" Grid.Column="2" Padding="5">
|
|
<TextBlock Text="{DynamicResource password}" />
|
|
</Border>
|
|
<Border Grid.Row="1" Grid.Column="3" Padding="5">
|
|
<PasswordBox Width="200" HorizontalAlignment="Left" x:Name="ProxyPassword" />
|
|
</Border>
|
|
</Grid>
|
|
<StackPanel Orientation="Horizontal" IsEnabled="{Binding IsChecked, ElementName=ToggleProxy}">
|
|
<Button Width="80" HorizontalAlignment="Left" Margin="10" Click="btnTestProxy_Click"
|
|
Content="{DynamicResource testProxy}" />
|
|
<Button Width="80" HorizontalAlignment="Left" Margin="10" Click="btnSaveProxy_Click"
|
|
Content="{DynamicResource save}" />
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</TabItem>
|
|
<TabItem Header="{DynamicResource about}">
|
|
<Grid>
|
|
<Grid.Resources>
|
|
<Style TargetType="{x:Type TextBlock}">
|
|
<Setter Property="Margin" Value="10, 10, 0, 0" />
|
|
</Style>
|
|
</Grid.Resources>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<TextBlock x:Name="ActivatedTimes" Grid.Row="0" Grid.ColumnSpan="3"
|
|
Text="{DynamicResource about_activate_times}" />
|
|
|
|
<TextBlock Grid.Column="0" Grid.Row="1" Text="{DynamicResource website}" />
|
|
<TextBlock Grid.Column="1" Grid.Row="1" HorizontalAlignment="Left">
|
|
<Hyperlink NavigateUri="https://github.com/Wox-launcher/Wox" RequestNavigate="OnRequestNavigate">
|
|
https://github.com/Wox-launcher/Wox
|
|
</Hyperlink>
|
|
</TextBlock>
|
|
|
|
|
|
<TextBlock Grid.Column="0" Grid.Row="2" Text="{DynamicResource version}" />
|
|
<TextBlock Grid.Column="1" Grid.Row="2" HorizontalAlignment="Left" x:Name="Version" Text="1.0.0" />
|
|
|
|
<TextBlock Grid.Column="0" Grid.Row="3" Text="{DynamicResource releaseNotes}" />
|
|
<TextBlock Grid.Column="1" Grid.Row="3" HorizontalAlignment="Left">
|
|
<Hyperlink NavigateUri="https://github.com/Wox-launcher/Wox/releases/latest"
|
|
RequestNavigate="OnRequestNavigate">
|
|
https://github.com/Wox-launcher/Wox/releases/latest
|
|
</Hyperlink>
|
|
</TextBlock>
|
|
|
|
<Button Grid.Column="0" Grid.Row="4" Content="{DynamicResource checkUpdates}"
|
|
HorizontalAlignment="Left" Margin="10 10 10 10" Click="OnCheckUpdates" />
|
|
<TextBlock Grid.Column="1" Grid.Row="4" Name="NewVersionTips" HorizontalAlignment="Left"
|
|
Text="{DynamicResource newVersionTips}" Visibility="Hidden" />
|
|
|
|
</Grid>
|
|
</TabItem>
|
|
</TabControl>
|
|
</Window> |