mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-01-06 03:07:54 +08:00
rename
This commit is contained in:
parent
014757a0f7
commit
299864a9cf
@ -18,38 +18,35 @@
|
|||||||
</ListBoxItem>
|
</ListBoxItem>
|
||||||
<image:ImagePathConverter x:Key="ImageConverter" />
|
<image:ImagePathConverter x:Key="ImageConverter" />
|
||||||
</Window.Resources>
|
</Window.Resources>
|
||||||
<TabControl Height="auto" x:Name="settingTab" SelectionChanged="settingTab_SelectionChanged">
|
<TabControl Height="auto" x:Name="SettingTab" SelectionChanged="settingTab_SelectionChanged">
|
||||||
<TabItem Header="{DynamicResource general}">
|
<TabItem Header="{DynamicResource general}">
|
||||||
<StackPanel Orientation="Vertical">
|
<StackPanel Orientation="Vertical">
|
||||||
<CheckBox x:Name="cbStartWithWindows" Unchecked="CbStartWithWindows_OnUnchecked"
|
<CheckBox x:Name="AutoStartup" Unchecked="CbStartWithWindows_OnUnchecked"
|
||||||
Checked="CbStartWithWindows_OnChecked" Margin="10">
|
Checked="CbStartWithWindows_OnChecked" Margin="10">
|
||||||
<TextBlock Text="{DynamicResource startWoxOnSystemStartup}" />
|
<TextBlock Text="{DynamicResource startWoxOnSystemStartup}" />
|
||||||
</CheckBox>
|
</CheckBox>
|
||||||
<CheckBox x:Name="cbHideOnStartup" Margin="10">
|
<CheckBox x:Name="HideOnStartup" Margin="10">
|
||||||
<TextBlock Text="{DynamicResource hideOnStartup}" />
|
<TextBlock Text="{DynamicResource hideOnStartup}" />
|
||||||
</CheckBox>
|
</CheckBox>
|
||||||
<CheckBox x:Name="cbHideWhenDeactive" Margin="10">
|
<CheckBox x:Name="HideWhenDeactive" Margin="10">
|
||||||
<TextBlock Text="{DynamicResource hideWoxWhenLoseFocus}" />
|
<TextBlock Text="{DynamicResource hideWoxWhenLoseFocus}" />
|
||||||
</CheckBox>
|
</CheckBox>
|
||||||
<CheckBox x:Name="cbDontPromptUpdateMsg" Margin="10">
|
<CheckBox x:Name="RememberLastLocation" Margin="10">
|
||||||
<TextBlock Text="{DynamicResource dontPromptUpdateMsg}" />
|
|
||||||
</CheckBox>
|
|
||||||
<CheckBox x:Name="cbRememberLastLocation" Margin="10">
|
|
||||||
<TextBlock Text="{DynamicResource rememberLastLocation}" />
|
<TextBlock Text="{DynamicResource rememberLastLocation}" />
|
||||||
</CheckBox>
|
</CheckBox>
|
||||||
<CheckBox x:Name="cbIgnoreHotkeysOnFullscreen" Margin="10">
|
<CheckBox x:Name="IgnoreHotkeysOnFullscreen" Margin="10">
|
||||||
<TextBlock Text="{DynamicResource ignoreHotkeysOnFullscreen}" />
|
<TextBlock Text="{DynamicResource ignoreHotkeysOnFullscreen}" />
|
||||||
</CheckBox>
|
</CheckBox>
|
||||||
<CheckBox x:Name="AutoUpdatesCheckBox" Margin="10">
|
<CheckBox x:Name="AutoUpdates" Margin="10">
|
||||||
<TextBlock Text="{DynamicResource autoUpdates}" />
|
<TextBlock Text="{DynamicResource autoUpdates}" />
|
||||||
</CheckBox>
|
</CheckBox>
|
||||||
<StackPanel Margin="10" Orientation="Horizontal">
|
<StackPanel Margin="10" Orientation="Horizontal">
|
||||||
<TextBlock Text="{DynamicResource language}" />
|
<TextBlock Text="{DynamicResource language}" />
|
||||||
<ComboBox Margin="10 0 0 0" Width="120" x:Name="cbLanguages" />
|
<ComboBox Margin="10 0 0 0" Width="120" x:Name="Languages" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel Orientation="Horizontal" Margin="10">
|
<StackPanel Orientation="Horizontal" Margin="10">
|
||||||
<TextBlock Text="{DynamicResource maxShowResults}" />
|
<TextBlock Text="{DynamicResource maxShowResults}" />
|
||||||
<ComboBox Margin="10 0 0 0" Width="45" Name="comboMaxResultsToShow" />
|
<ComboBox Margin="10 0 0 0" Width="45" Name="MaxResults" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<TextBlock Text="{DynamicResource pythonDirectory}" Margin="10"/>
|
<TextBlock Text="{DynamicResource pythonDirectory}" Margin="10"/>
|
||||||
@ -58,7 +55,7 @@
|
|||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem Header="{DynamicResource plugin}" x:Name="tabPlugin">
|
<TabItem Header="{DynamicResource plugin}" x:Name="PluginTab">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="200" />
|
<ColumnDefinition Width="200" />
|
||||||
@ -66,7 +63,7 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<DockPanel Grid.Column="0">
|
<DockPanel Grid.Column="0">
|
||||||
<TextBlock DockPanel.Dock="Top" Margin="10" HorizontalAlignment="Left" Cursor="Hand"
|
<TextBlock DockPanel.Dock="Top" Margin="10" HorizontalAlignment="Left" Cursor="Hand"
|
||||||
MouseUp="tbMorePlugins_MouseUp" x:Name="tbMorePlugins" Foreground="Blue"
|
MouseUp="tbMorePlugins_MouseUp" Foreground="Blue"
|
||||||
Text="{DynamicResource browserMorePlugins}" />
|
Text="{DynamicResource browserMorePlugins}" />
|
||||||
<ListBox x:Name="PluginsListBox" Margin="10, 0, 10, 10" SelectionChanged="lbPlugins_OnSelectionChanged"
|
<ListBox x:Name="PluginsListBox" Margin="10, 0, 10, 10" SelectionChanged="lbPlugins_OnSelectionChanged"
|
||||||
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
|
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
|
||||||
@ -101,14 +98,14 @@
|
|||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<ContentControl x:Name="PluginInfoPanel" Grid.ColumnSpan="1" Grid.Row="0" Margin="10 10 10 0">
|
<ContentControl Grid.ColumnSpan="1" Grid.Row="0" Margin="10 10 10 0">
|
||||||
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="48" />
|
<ColumnDefinition Width="48" />
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Image Width="48" Height="48" HorizontalAlignment="Left" VerticalAlignment="Top"
|
<Image Width="48" Height="48" HorizontalAlignment="Left" VerticalAlignment="Top"
|
||||||
x:Name="pluginIcon" />
|
x:Name="PluginIcon" />
|
||||||
<Grid Margin="10,0,0,0" Grid.Column="1" HorizontalAlignment="Stretch">
|
<Grid Margin="10,0,0,0" Grid.Column="1" HorizontalAlignment="Stretch">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition />
|
<RowDefinition />
|
||||||
@ -116,28 +113,29 @@
|
|||||||
<RowDefinition />
|
<RowDefinition />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<DockPanel Grid.Row="0">
|
<DockPanel Grid.Row="0">
|
||||||
<TextBlock x:Name="pluginTitle" Text="Plugin Title" Cursor="Hand"
|
<TextBlock x:Name="PluginTitle" Text="Plugin Title" Cursor="Hand"
|
||||||
MouseUp="PluginTitle_OnMouseUp"
|
MouseUp="PluginTitle_OnMouseUp"
|
||||||
ToolTip="{Binding Source=pluginTitle, Path=Text}" FontSize="24" />
|
ToolTip="{Binding Source=pluginTitle, Path=Text}" FontSize="24" />
|
||||||
<TextBlock Opacity="0.5" VerticalAlignment="Bottom" HorizontalAlignment="Right"
|
<TextBlock Opacity="0.5" VerticalAlignment="Bottom" HorizontalAlignment="Right"
|
||||||
x:Name="pluginAuthor" Text="{DynamicResource author}" />
|
x:Name="PluginAuthor" Text="{DynamicResource author}" />
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
<TextBlock Grid.Row="1" x:Name="pluginSubTitle" Opacity="0.5"
|
<TextBlock Grid.Row="1" x:Name="PluginSubTitle" Opacity="0.5"
|
||||||
ToolTip="{Binding Source=pluginSubTitle, Path=Text}"/>
|
ToolTip="{Binding Source=pluginSubTitle, Path=Text}"/>
|
||||||
<DockPanel Grid.Row="2" Margin="0 10 0 8">
|
<DockPanel Grid.Row="2" Margin="0 10 0 8">
|
||||||
<CheckBox x:Name="cbDisablePlugin" Click="OnDisablePluginClicked">
|
<CheckBox x:Name="DisablePlugin" Click="OnDisablePluginClicked">
|
||||||
<TextBlock Text="{DynamicResource disable}" />
|
<TextBlock Text="{DynamicResource disable}" />
|
||||||
</CheckBox>
|
</CheckBox>
|
||||||
<TextBlock x:Name="pluginActionKeywordsTitle" Margin="20 0 0 0"
|
<TextBlock Margin="20 0 0 0"
|
||||||
Text="{DynamicResource actionKeywords}" />
|
x:Name="PluginActionKeywordsTitle"
|
||||||
|
Text="{DynamicResource actionKeywords}"/>
|
||||||
<TextBlock Margin="5 0 0 0" ToolTip="Change Action Keywords" Cursor="Hand"
|
<TextBlock Margin="5 0 0 0" ToolTip="Change Action Keywords" Cursor="Hand"
|
||||||
MouseUp="PluginActionKeywords_OnMouseUp" Foreground="Blue" Text="keys"
|
MouseUp="PluginActionKeywords_OnMouseUp" Foreground="Blue" Text="keys"
|
||||||
x:Name="pluginActionKeywords" />
|
x:Name="PluginActionKeywords" />
|
||||||
<TextBlock Margin="10 0 0 0" Text="Initialize time: 0ms" x:Name="pluginInitTime" />
|
<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 Margin="10 0 0 0" Text="Query time: 0ms" x:Name="PluginQueryTime" />
|
||||||
<TextBlock HorizontalAlignment="Right" Cursor="Hand"
|
<TextBlock HorizontalAlignment="Right" Cursor="Hand"
|
||||||
MouseUp="tbOpenPluginDirecoty_MouseUp" Foreground="Blue"
|
MouseUp="tbOpenPluginDirecoty_MouseUp" Foreground="Blue"
|
||||||
Text="{DynamicResource pluginDirectory}" x:Name="tbOpenPluginDirecoty" />
|
Text="{DynamicResource pluginDirectory}" x:Name="OpenPluginDirecoty" />
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
@ -148,7 +146,7 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem Header="{DynamicResource theme}" x:Name="tabTheme">
|
<TabItem Header="{DynamicResource theme}" x:Name="ThemeTab">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="200" />
|
<ColumnDefinition Width="200" />
|
||||||
@ -156,9 +154,9 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<DockPanel Grid.Column="0">
|
<DockPanel Grid.Column="0">
|
||||||
<TextBlock DockPanel.Dock="Top" Margin="10" HorizontalAlignment="Left" Cursor="Hand"
|
<TextBlock DockPanel.Dock="Top" Margin="10" HorizontalAlignment="Left" Cursor="Hand"
|
||||||
MouseUp="tbMoreThemes_MouseUp" x:Name="tbMoreThemes" Foreground="Blue"
|
MouseUp="tbMoreThemes_MouseUp" Foreground="Blue"
|
||||||
Text="{DynamicResource browserMoreThemes}" />
|
Text="{DynamicResource browserMoreThemes}" />
|
||||||
<ListBox x:Name="themeComboBox" Margin="10, 0, 10, 10"
|
<ListBox x:Name="Theme" Margin="10, 0, 10, 10"
|
||||||
SelectionChanged="ThemeComboBox_OnSelectionChanged" HorizontalAlignment="Stretch"
|
SelectionChanged="ThemeComboBox_OnSelectionChanged" HorizontalAlignment="Stretch"
|
||||||
VerticalAlignment="Stretch" Width="180" />
|
VerticalAlignment="Stretch" Width="180" />
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
@ -167,11 +165,8 @@
|
|||||||
<RowDefinition />
|
<RowDefinition />
|
||||||
<RowDefinition Height="100" />
|
<RowDefinition Height="100" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition />
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<StackPanel x:Name="PreviewPanel" Grid.Row="0" Margin="0">
|
<StackPanel x:Name="PreviewPanel" Grid.Row="0" Margin="0">
|
||||||
<StackPanel x:Name="PreviewMainPanel" Orientation="Horizontal" Margin="10"
|
<StackPanel Orientation="Horizontal" Margin="10"
|
||||||
HorizontalAlignment="Center" VerticalAlignment="Center">
|
HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||||
<Border Width="500" Style="{DynamicResource WindowBorderStyle}">
|
<Border Width="500" Style="{DynamicResource WindowBorderStyle}">
|
||||||
<Grid>
|
<Grid>
|
||||||
@ -190,13 +185,13 @@
|
|||||||
<StackPanel Grid.Row="1" Margin="0 10 0 10" Orientation="Vertical">
|
<StackPanel Grid.Row="1" Margin="0 10 0 10" Orientation="Vertical">
|
||||||
<StackPanel Orientation="Horizontal" Margin="2">
|
<StackPanel Orientation="Horizontal" Margin="2">
|
||||||
<TextBlock Text="{DynamicResource queryBoxFont}" />
|
<TextBlock Text="{DynamicResource queryBoxFont}" />
|
||||||
<ComboBox Margin="10 -2 5 0" x:Name="cbQueryBoxFont"
|
<ComboBox Margin="10 -2 5 0" x:Name="QueryBoxFont"
|
||||||
ItemsSource="{x:Static Fonts.SystemFontFamilies}"
|
ItemsSource="{x:Static Fonts.SystemFontFamilies}"
|
||||||
SelectionChanged="CbQueryBoxFont_OnSelectionChanged" HorizontalAlignment="Left"
|
SelectionChanged="CbQueryBoxFont_OnSelectionChanged" HorizontalAlignment="Left"
|
||||||
VerticalAlignment="Top" Width="160" />
|
VerticalAlignment="Top" Width="160" />
|
||||||
<ComboBox Margin="0 -2 0 0"
|
<ComboBox Margin="0 -2 0 0"
|
||||||
x:Name="cbQueryBoxFontFaces"
|
x:Name="QueryBoxFontFaces"
|
||||||
ItemsSource="{Binding SelectedValue.FamilyTypefaces, ElementName=cbQueryBoxFont}"
|
ItemsSource="{Binding SelectedValue.FamilyTypefaces, ElementName=QueryBoxFont}"
|
||||||
SelectionChanged="CbQueryBoxFontFaces_OnSelectionChanged"
|
SelectionChanged="CbQueryBoxFontFaces_OnSelectionChanged"
|
||||||
HorizontalAlignment="Left" VerticalAlignment="Top" Width="120">
|
HorizontalAlignment="Left" VerticalAlignment="Top" Width="120">
|
||||||
<ComboBox.ItemTemplate>
|
<ComboBox.ItemTemplate>
|
||||||
@ -241,7 +236,7 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem Header="{DynamicResource hotkey}" x:Name="tabHotkey">
|
<TabItem Header="{DynamicResource hotkey}" x:Name="HotkeyTab">
|
||||||
<Grid Margin="10">
|
<Grid Margin="10">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="30" />
|
<RowDefinition Height="30" />
|
||||||
@ -250,7 +245,7 @@
|
|||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<StackPanel Grid.Row="0" Orientation="Horizontal" VerticalAlignment="Center">
|
<StackPanel Grid.Row="0" Orientation="Horizontal" VerticalAlignment="Center">
|
||||||
<TextBlock VerticalAlignment="Center" Margin="0 0 10 0" Text="{DynamicResource woxHotkey}" />
|
<TextBlock VerticalAlignment="Center" Margin="0 0 10 0" Text="{DynamicResource woxHotkey}" />
|
||||||
<wox:HotkeyControl x:Name="ctlHotkey" />
|
<wox:HotkeyControl x:Name="HotkeyControl" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<Grid Grid.Row="1">
|
<Grid Grid.Row="1">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
@ -259,7 +254,7 @@
|
|||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<TextBlock VerticalAlignment="Center" Grid.Row="0" Margin="0 0 10 0"
|
<TextBlock VerticalAlignment="Center" Grid.Row="0" Margin="0 0 10 0"
|
||||||
Text="{DynamicResource customQueryHotkey}" />
|
Text="{DynamicResource customQueryHotkey}" />
|
||||||
<ListView x:Name="lvCustomHotkey" Margin="0 5 0 0" Grid.Row="1">
|
<ListView x:Name="CustomHotkies" Margin="0 5 0 0" Grid.Row="1">
|
||||||
<ListView.View>
|
<ListView.View>
|
||||||
<GridView>
|
<GridView>
|
||||||
<GridViewColumn Header="{DynamicResource hotkey}" Width="180">
|
<GridViewColumn Header="{DynamicResource hotkey}" Width="180">
|
||||||
@ -282,11 +277,11 @@
|
|||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
<StackPanel Grid.Row="2" HorizontalAlignment="Right" Orientation="Horizontal">
|
<StackPanel Grid.Row="2" HorizontalAlignment="Right" Orientation="Horizontal">
|
||||||
<Button x:Name="btnDeleteCustomHotkey" Click="BtnDeleteCustomHotkey_OnClick" Width="100"
|
<Button Click="BtnDeleteCustomHotkey_OnClick" Width="100"
|
||||||
Margin="10" Content="{DynamicResource delete}" />
|
Margin="10" Content="{DynamicResource delete}" />
|
||||||
<Button x:Name="btnEditCustomHotkey" Click="BtnEditCustomHotkey_OnClick" Width="100" Margin="10"
|
<Button Click="BtnEditCustomHotkey_OnClick" Width="100" Margin="10"
|
||||||
Content="{DynamicResource edit}" />
|
Content="{DynamicResource edit}" />
|
||||||
<Button x:Name="btnAddCustomeHotkey" Click="BtnAddCustomeHotkey_OnClick" Width="100" Margin="10"
|
<Button Click="BtnAddCustomeHotkey_OnClick" Width="100" Margin="10"
|
||||||
Content="{DynamicResource add}" />
|
Content="{DynamicResource add}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
@ -311,30 +306,30 @@
|
|||||||
<TextBlock Text="{DynamicResource server}" />
|
<TextBlock Text="{DynamicResource server}" />
|
||||||
</Border>
|
</Border>
|
||||||
<Border Grid.Row="0" Grid.Column="1" Padding="5">
|
<Border Grid.Row="0" Grid.Column="1" Padding="5">
|
||||||
<TextBox Width="200" HorizontalAlignment="Left" x:Name="tbProxyServer" />
|
<TextBox Width="200" HorizontalAlignment="Left" x:Name="ProxyServer" />
|
||||||
</Border>
|
</Border>
|
||||||
<Border Grid.Row="0" Grid.Column="2" Padding="5">
|
<Border Grid.Row="0" Grid.Column="2" Padding="5">
|
||||||
<TextBlock Text="{DynamicResource port}" />
|
<TextBlock Text="{DynamicResource port}" />
|
||||||
</Border>
|
</Border>
|
||||||
<Border Grid.Row="0" Grid.Column="3" Padding="5">
|
<Border Grid.Row="0" Grid.Column="3" Padding="5">
|
||||||
<TextBox Width="50" HorizontalAlignment="Left" x:Name="tbProxyPort" />
|
<TextBox Width="50" HorizontalAlignment="Left" x:Name="ProxyPort" />
|
||||||
</Border>
|
</Border>
|
||||||
<Border Grid.Row="1" Grid.Column="0" Padding="5">
|
<Border Grid.Row="1" Grid.Column="0" Padding="5">
|
||||||
<TextBlock Text="{DynamicResource userName}" />
|
<TextBlock Text="{DynamicResource userName}" />
|
||||||
</Border>
|
</Border>
|
||||||
<Border Grid.Row="1" Grid.Column="1" Padding="5">
|
<Border Grid.Row="1" Grid.Column="1" Padding="5">
|
||||||
<TextBox Width="200" HorizontalAlignment="Left" x:Name="tbProxyUserName" />
|
<TextBox Width="200" HorizontalAlignment="Left" x:Name="ProxyUserName" />
|
||||||
</Border>
|
</Border>
|
||||||
<Border Grid.Row="1" Grid.Column="2" Padding="5">
|
<Border Grid.Row="1" Grid.Column="2" Padding="5">
|
||||||
<TextBlock Text="{DynamicResource password}" />
|
<TextBlock Text="{DynamicResource password}" />
|
||||||
</Border>
|
</Border>
|
||||||
<Border Grid.Row="1" Grid.Column="3" Padding="5">
|
<Border Grid.Row="1" Grid.Column="3" Padding="5">
|
||||||
<PasswordBox Width="200" HorizontalAlignment="Left" x:Name="tbProxyPassword" />
|
<PasswordBox Width="200" HorizontalAlignment="Left" x:Name="ProxyPassword" />
|
||||||
</Border>
|
</Border>
|
||||||
</Grid>
|
</Grid>
|
||||||
<StackPanel Orientation="Horizontal" IsEnabled="{Binding IsChecked, ElementName=ToggleProxy}">
|
<StackPanel Orientation="Horizontal" IsEnabled="{Binding IsChecked, ElementName=ToggleProxy}">
|
||||||
<Button x:Name="btnTestProxy" Width="80" HorizontalAlignment="Left" Margin="10" Click="btnTestProxy_Click" Content="{DynamicResource testProxy}"/>
|
<Button Width="80" HorizontalAlignment="Left" Margin="10" Click="btnTestProxy_Click" Content="{DynamicResource testProxy}"/>
|
||||||
<Button x:Name="btnSaveProxy" Width="80" HorizontalAlignment="Left" Margin="10" Click="btnSaveProxy_Click" Content="{DynamicResource save}"/>
|
<Button Width="80" HorizontalAlignment="Left" Margin="10" Click="btnSaveProxy_Click" Content="{DynamicResource save}"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
@ -369,7 +364,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<TextBlock Grid.Column="0" Grid.Row="2" Text="{DynamicResource version}" />
|
<TextBlock Grid.Column="0" Grid.Row="2" Text="{DynamicResource version}" />
|
||||||
<TextBlock Grid.Column="1" Grid.Row="2" HorizontalAlignment="Left" x:Name="tbVersion" Text="1.0.0" />
|
<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>
|
<TextBlock Grid.Column="0" Grid.Row="3" Text="{DynamicResource releaseNotes}"></TextBlock>
|
||||||
<TextBlock Grid.Column="1" Grid.Row="3" HorizontalAlignment="Left" >
|
<TextBlock Grid.Column="1" Grid.Row="3" HorizontalAlignment="Left" >
|
||||||
@ -378,8 +373,7 @@
|
|||||||
</Hyperlink>
|
</Hyperlink>
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
|
|
||||||
<Button Grid.Column="0" Grid.Row="4" Content="{DynamicResource checkUpdates}" HorizontalAlignment="Left" Margin="10 10 10 10"
|
<Button Grid.Column="0" Grid.Row="4" Content="{DynamicResource checkUpdates}" HorizontalAlignment="Left" Margin="10 10 10 10" Click="OnCheckUpdates"/>
|
||||||
Click="OnCheckUpdates"/>
|
|
||||||
<TextBlock Grid.Column="1" Grid.Row="4" Name="NewVersionTips" HorizontalAlignment="Left" Text="{DynamicResource newVersionTips}" Visibility="Hidden"/>
|
<TextBlock Grid.Column="1" Grid.Row="4" Name="NewVersionTips" HorizontalAlignment="Left" Text="{DynamicResource newVersionTips}" Visibility="Hidden"/>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
@ -55,88 +55,77 @@ namespace Wox
|
|||||||
{
|
{
|
||||||
#region General
|
#region General
|
||||||
|
|
||||||
cbHideOnStartup.Checked += (o, e) =>
|
HideOnStartup.Checked += (o, e) =>
|
||||||
{
|
{
|
||||||
_settings.HideOnStartup = true;
|
_settings.HideOnStartup = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
cbHideOnStartup.Unchecked += (o, e) =>
|
HideOnStartup.Unchecked += (o, e) =>
|
||||||
{
|
{
|
||||||
_settings.HideOnStartup = false;
|
_settings.HideOnStartup = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
cbHideWhenDeactive.Checked += (o, e) =>
|
HideWhenDeactive.Checked += (o, e) =>
|
||||||
{
|
{
|
||||||
_settings.HideWhenDeactive = true;
|
_settings.HideWhenDeactive = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
cbHideWhenDeactive.Unchecked += (o, e) =>
|
HideWhenDeactive.Unchecked += (o, e) =>
|
||||||
{
|
{
|
||||||
_settings.HideWhenDeactive = false;
|
_settings.HideWhenDeactive = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
cbRememberLastLocation.Checked += (o, e) =>
|
RememberLastLocation.Checked += (o, e) =>
|
||||||
{
|
{
|
||||||
_settings.RememberLastLaunchLocation = true;
|
_settings.RememberLastLaunchLocation = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
cbRememberLastLocation.Unchecked += (o, e) =>
|
RememberLastLocation.Unchecked += (o, e) =>
|
||||||
{
|
{
|
||||||
_settings.RememberLastLaunchLocation = false;
|
_settings.RememberLastLaunchLocation = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
cbDontPromptUpdateMsg.Checked += (o, e) =>
|
IgnoreHotkeysOnFullscreen.Checked += (o, e) =>
|
||||||
{
|
|
||||||
_settings.DontPromptUpdateMsg = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
cbDontPromptUpdateMsg.Unchecked += (o, e) =>
|
|
||||||
{
|
|
||||||
_settings.DontPromptUpdateMsg = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
cbIgnoreHotkeysOnFullscreen.Checked += (o, e) =>
|
|
||||||
{
|
{
|
||||||
_settings.IgnoreHotkeysOnFullscreen = true;
|
_settings.IgnoreHotkeysOnFullscreen = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
cbIgnoreHotkeysOnFullscreen.Unchecked += (o, e) =>
|
IgnoreHotkeysOnFullscreen.Unchecked += (o, e) =>
|
||||||
{
|
{
|
||||||
_settings.IgnoreHotkeysOnFullscreen = false;
|
_settings.IgnoreHotkeysOnFullscreen = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
AutoUpdatesCheckBox.Checked += (o, e) =>
|
AutoUpdates.Checked += (o, e) =>
|
||||||
{
|
{
|
||||||
_settings.AutoUpdates = true;
|
_settings.AutoUpdates = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
AutoUpdatesCheckBox.Unchecked += (o, e) =>
|
AutoUpdates.Unchecked += (o, e) =>
|
||||||
{
|
{
|
||||||
_settings.AutoUpdates = false;
|
_settings.AutoUpdates = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
cbStartWithWindows.IsChecked = _settings.StartWoxOnSystemStartup;
|
AutoStartup.IsChecked = _settings.StartWoxOnSystemStartup;
|
||||||
comboMaxResultsToShow.SelectionChanged += (o, e) =>
|
MaxResults.SelectionChanged += (o, e) =>
|
||||||
{
|
{
|
||||||
_settings.MaxResultsToShow = (int)comboMaxResultsToShow.SelectedItem;
|
_settings.MaxResultsToShow = (int)MaxResults.SelectedItem;
|
||||||
//MainWindow.pnlResult.lbResults.GetBindingExpression(MaxHeightProperty).UpdateTarget();
|
//MainWindow.pnlResult.lbResults.GetBindingExpression(MaxHeightProperty).UpdateTarget();
|
||||||
};
|
};
|
||||||
|
|
||||||
cbHideOnStartup.IsChecked = _settings.HideOnStartup;
|
HideOnStartup.IsChecked = _settings.HideOnStartup;
|
||||||
cbHideWhenDeactive.IsChecked = _settings.HideWhenDeactive;
|
HideWhenDeactive.IsChecked = _settings.HideWhenDeactive;
|
||||||
cbDontPromptUpdateMsg.IsChecked = _settings.DontPromptUpdateMsg;
|
RememberLastLocation.IsChecked = _settings.RememberLastLaunchLocation;
|
||||||
cbRememberLastLocation.IsChecked = _settings.RememberLastLaunchLocation;
|
IgnoreHotkeysOnFullscreen.IsChecked = _settings.IgnoreHotkeysOnFullscreen;
|
||||||
cbIgnoreHotkeysOnFullscreen.IsChecked = _settings.IgnoreHotkeysOnFullscreen;
|
AutoUpdates.IsChecked = _settings.AutoUpdates;
|
||||||
AutoUpdatesCheckBox.IsChecked = _settings.AutoUpdates;
|
|
||||||
|
|
||||||
LoadLanguages();
|
LoadLanguages();
|
||||||
|
|
||||||
comboMaxResultsToShow.ItemsSource = Enumerable.Range(2, 16);
|
MaxResults.ItemsSource = Enumerable.Range(2, 16);
|
||||||
var maxResults = _settings.MaxResultsToShow;
|
var maxResults = _settings.MaxResultsToShow;
|
||||||
comboMaxResultsToShow.SelectedItem = maxResults == 0 ? 6 : maxResults;
|
MaxResults.SelectedItem = maxResults == 0 ? 6 : maxResults;
|
||||||
|
|
||||||
PythonDirectory.Text = _settings.PluginSettings.PythonDirectory;
|
PythonDirectory.Text = _settings.PluginSettings.PythonDirectory;
|
||||||
|
|
||||||
@ -145,13 +134,13 @@ namespace Wox
|
|||||||
#region Proxy
|
#region Proxy
|
||||||
|
|
||||||
ToggleProxy.IsChecked = _settings.ProxyEnabled;
|
ToggleProxy.IsChecked = _settings.ProxyEnabled;
|
||||||
tbProxyServer.Text = _settings.ProxyServer;
|
ProxyServer.Text = _settings.ProxyServer;
|
||||||
if (_settings.ProxyPort != 0)
|
if (_settings.ProxyPort != 0)
|
||||||
{
|
{
|
||||||
tbProxyPort.Text = _settings.ProxyPort.ToString();
|
ProxyPort.Text = _settings.ProxyPort.ToString();
|
||||||
}
|
}
|
||||||
tbProxyUserName.Text = _settings.ProxyUserName;
|
ProxyUserName.Text = _settings.ProxyUserName;
|
||||||
tbProxyPassword.Password = _settings.ProxyPassword;
|
ProxyPassword.Password = _settings.ProxyPassword;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@ -160,7 +149,7 @@ namespace Wox
|
|||||||
string activateTimes = string.Format(
|
string activateTimes = string.Format(
|
||||||
InternationalizationManager.Instance.GetTranslation("about_activate_times"), _settings.ActivateTimes);
|
InternationalizationManager.Instance.GetTranslation("about_activate_times"), _settings.ActivateTimes);
|
||||||
ActivatedTimes.Text = activateTimes;
|
ActivatedTimes.Text = activateTimes;
|
||||||
tbVersion.Text = Infrastructure.Constant.Version;
|
Version.Text = Infrastructure.Constant.Version;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@ -172,22 +161,22 @@ namespace Wox
|
|||||||
switch (tabName)
|
switch (tabName)
|
||||||
{
|
{
|
||||||
case "general":
|
case "general":
|
||||||
settingTab.SelectedIndex = 0;
|
SettingTab.SelectedIndex = 0;
|
||||||
break;
|
break;
|
||||||
case "plugin":
|
case "plugin":
|
||||||
settingTab.SelectedIndex = 1;
|
SettingTab.SelectedIndex = 1;
|
||||||
break;
|
break;
|
||||||
case "theme":
|
case "theme":
|
||||||
settingTab.SelectedIndex = 2;
|
SettingTab.SelectedIndex = 2;
|
||||||
break;
|
break;
|
||||||
case "hotkey":
|
case "hotkey":
|
||||||
settingTab.SelectedIndex = 3;
|
SettingTab.SelectedIndex = 3;
|
||||||
break;
|
break;
|
||||||
case "proxy":
|
case "proxy":
|
||||||
settingTab.SelectedIndex = 4;
|
SettingTab.SelectedIndex = 4;
|
||||||
break;
|
break;
|
||||||
case "about":
|
case "about":
|
||||||
settingTab.SelectedIndex = 5;
|
SettingTab.SelectedIndex = 5;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -195,17 +184,17 @@ namespace Wox
|
|||||||
private void settingTab_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
private void settingTab_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||||
{
|
{
|
||||||
// Update controls inside the selected tab
|
// Update controls inside the selected tab
|
||||||
if (e.OriginalSource != settingTab) return;
|
if (e.OriginalSource != SettingTab) return;
|
||||||
|
|
||||||
if (tabPlugin.IsSelected)
|
if (PluginTab.IsSelected)
|
||||||
{
|
{
|
||||||
OnPluginTabSelected();
|
OnPluginTabSelected();
|
||||||
}
|
}
|
||||||
else if (tabTheme.IsSelected)
|
else if (ThemeTab.IsSelected)
|
||||||
{
|
{
|
||||||
OnThemeTabSelected();
|
OnThemeTabSelected();
|
||||||
}
|
}
|
||||||
else if (tabHotkey.IsSelected)
|
else if (HotkeyTab.IsSelected)
|
||||||
{
|
{
|
||||||
OnHotkeyTabSelected();
|
OnHotkeyTabSelected();
|
||||||
}
|
}
|
||||||
@ -215,16 +204,16 @@ namespace Wox
|
|||||||
|
|
||||||
private void LoadLanguages()
|
private void LoadLanguages()
|
||||||
{
|
{
|
||||||
cbLanguages.ItemsSource = InternationalizationManager.Instance.LoadAvailableLanguages();
|
Languages.ItemsSource = InternationalizationManager.Instance.LoadAvailableLanguages();
|
||||||
cbLanguages.DisplayMemberPath = "Display";
|
Languages.DisplayMemberPath = "Display";
|
||||||
cbLanguages.SelectedValuePath = "LanguageCode";
|
Languages.SelectedValuePath = "LanguageCode";
|
||||||
cbLanguages.SelectedValue = _settings.Language;
|
Languages.SelectedValue = _settings.Language;
|
||||||
cbLanguages.SelectionChanged += cbLanguages_SelectionChanged;
|
Languages.SelectionChanged += cbLanguages_SelectionChanged;
|
||||||
}
|
}
|
||||||
|
|
||||||
void cbLanguages_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
void cbLanguages_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||||
{
|
{
|
||||||
InternationalizationManager.Instance.ChangeLanguage(cbLanguages.SelectedItem as Language);
|
InternationalizationManager.Instance.ChangeLanguage(Languages.SelectedItem as Language);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CbStartWithWindows_OnChecked(object sender, RoutedEventArgs e)
|
private void CbStartWithWindows_OnChecked(object sender, RoutedEventArgs e)
|
||||||
@ -305,9 +294,9 @@ namespace Wox
|
|||||||
|
|
||||||
void ctlHotkey_OnHotkeyChanged(object sender, EventArgs e)
|
void ctlHotkey_OnHotkeyChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (ctlHotkey.CurrentHotkeyAvailable)
|
if (HotkeyControl.CurrentHotkeyAvailable)
|
||||||
{
|
{
|
||||||
SetHotkey(ctlHotkey.CurrentHotkey, delegate
|
SetHotkey(HotkeyControl.CurrentHotkey, delegate
|
||||||
{
|
{
|
||||||
if (!System.Windows.Application.Current.MainWindow.IsVisible)
|
if (!System.Windows.Application.Current.MainWindow.IsVisible)
|
||||||
{
|
{
|
||||||
@ -319,7 +308,7 @@ namespace Wox
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
RemoveHotkey(_settings.Hotkey);
|
RemoveHotkey(_settings.Hotkey);
|
||||||
_settings.Hotkey = ctlHotkey.CurrentHotkey.ToString();
|
_settings.Hotkey = HotkeyControl.CurrentHotkey.ToString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -348,14 +337,14 @@ namespace Wox
|
|||||||
|
|
||||||
private void OnHotkeyTabSelected()
|
private void OnHotkeyTabSelected()
|
||||||
{
|
{
|
||||||
ctlHotkey.HotkeyChanged += ctlHotkey_OnHotkeyChanged;
|
HotkeyControl.HotkeyChanged += ctlHotkey_OnHotkeyChanged;
|
||||||
ctlHotkey.SetHotkey(_settings.Hotkey, false);
|
HotkeyControl.SetHotkey(_settings.Hotkey, false);
|
||||||
lvCustomHotkey.ItemsSource = _settings.CustomPluginHotkeys;
|
CustomHotkies.ItemsSource = _settings.CustomPluginHotkeys;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void BtnDeleteCustomHotkey_OnClick(object sender, RoutedEventArgs e)
|
private void BtnDeleteCustomHotkey_OnClick(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
CustomPluginHotkey item = lvCustomHotkey.SelectedItem as CustomPluginHotkey;
|
CustomPluginHotkey item = CustomHotkies.SelectedItem as CustomPluginHotkey;
|
||||||
if (item == null)
|
if (item == null)
|
||||||
{
|
{
|
||||||
MessageBox.Show(InternationalizationManager.Instance.GetTranslation("pleaseSelectAnItem"));
|
MessageBox.Show(InternationalizationManager.Instance.GetTranslation("pleaseSelectAnItem"));
|
||||||
@ -370,14 +359,14 @@ namespace Wox
|
|||||||
MessageBoxButton.YesNo) == MessageBoxResult.Yes)
|
MessageBoxButton.YesNo) == MessageBoxResult.Yes)
|
||||||
{
|
{
|
||||||
_settings.CustomPluginHotkeys.Remove(item);
|
_settings.CustomPluginHotkeys.Remove(item);
|
||||||
lvCustomHotkey.Items.Refresh();
|
CustomHotkies.Items.Refresh();
|
||||||
RemoveHotkey(item.Hotkey);
|
RemoveHotkey(item.Hotkey);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void BtnEditCustomHotkey_OnClick(object sender, RoutedEventArgs e)
|
private void BtnEditCustomHotkey_OnClick(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
CustomPluginHotkey item = lvCustomHotkey.SelectedItem as CustomPluginHotkey;
|
CustomPluginHotkey item = CustomHotkies.SelectedItem as CustomPluginHotkey;
|
||||||
if (item != null)
|
if (item != null)
|
||||||
{
|
{
|
||||||
CustomQueryHotkeySetting window = new CustomQueryHotkeySetting(this, _settings);
|
CustomQueryHotkeySetting window = new CustomQueryHotkeySetting(this, _settings);
|
||||||
@ -397,7 +386,7 @@ namespace Wox
|
|||||||
|
|
||||||
public void ReloadCustomPluginHotkeyView()
|
public void ReloadCustomPluginHotkeyView()
|
||||||
{
|
{
|
||||||
lvCustomHotkey.Items.Refresh();
|
CustomHotkies.Items.Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
@ -422,11 +411,11 @@ namespace Wox
|
|||||||
if (!string.IsNullOrEmpty(_settings.QueryBoxFont) &&
|
if (!string.IsNullOrEmpty(_settings.QueryBoxFont) &&
|
||||||
Fonts.SystemFontFamilies.Count(o => o.FamilyNames.Values.Contains(_settings.QueryBoxFont)) > 0)
|
Fonts.SystemFontFamilies.Count(o => o.FamilyNames.Values.Contains(_settings.QueryBoxFont)) > 0)
|
||||||
{
|
{
|
||||||
cbQueryBoxFont.Text = _settings.QueryBoxFont;
|
QueryBoxFont.Text = _settings.QueryBoxFont;
|
||||||
|
|
||||||
cbQueryBoxFontFaces.SelectedItem =
|
QueryBoxFontFaces.SelectedItem =
|
||||||
SyntaxSugars.CallOrRescueDefault(
|
SyntaxSugars.CallOrRescueDefault(
|
||||||
() => ((FontFamily)cbQueryBoxFont.SelectedItem).ConvertFromInvariantStringsOrNormal(
|
() => ((FontFamily)QueryBoxFont.SelectedItem).ConvertFromInvariantStringsOrNormal(
|
||||||
_settings.QueryBoxFontStyle,
|
_settings.QueryBoxFontStyle,
|
||||||
_settings.QueryBoxFontWeight,
|
_settings.QueryBoxFontWeight,
|
||||||
_settings.QueryBoxFontStretch
|
_settings.QueryBoxFontStretch
|
||||||
@ -501,10 +490,10 @@ namespace Wox
|
|||||||
foreach (string theme in ThemeManager.Instance.LoadAvailableThemes())
|
foreach (string theme in ThemeManager.Instance.LoadAvailableThemes())
|
||||||
{
|
{
|
||||||
string themeName = Path.GetFileNameWithoutExtension(theme);
|
string themeName = Path.GetFileNameWithoutExtension(theme);
|
||||||
themeComboBox.Items.Add(themeName);
|
Theme.Items.Add(themeName);
|
||||||
}
|
}
|
||||||
|
|
||||||
themeComboBox.SelectedItem = _settings.Theme;
|
Theme.SelectedItem = _settings.Theme;
|
||||||
|
|
||||||
var wallpaper = WallpaperPathRetrieval.GetWallpaperPath();
|
var wallpaper = WallpaperPathRetrieval.GetWallpaperPath();
|
||||||
if (wallpaper != null && File.Exists(wallpaper))
|
if (wallpaper != null && File.Exists(wallpaper))
|
||||||
@ -528,27 +517,27 @@ namespace Wox
|
|||||||
|
|
||||||
private void ThemeComboBox_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
|
private void ThemeComboBox_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||||
{
|
{
|
||||||
string themeName = themeComboBox.SelectedItem.ToString();
|
string themeName = Theme.SelectedItem.ToString();
|
||||||
ThemeManager.Instance.ChangeTheme(themeName);
|
ThemeManager.Instance.ChangeTheme(themeName);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CbQueryBoxFont_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
|
private void CbQueryBoxFont_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||||
{
|
{
|
||||||
if (!settingsLoaded) return;
|
if (!settingsLoaded) return;
|
||||||
string queryBoxFontName = cbQueryBoxFont.SelectedItem.ToString();
|
string queryBoxFontName = QueryBoxFont.SelectedItem.ToString();
|
||||||
_settings.QueryBoxFont = queryBoxFontName;
|
_settings.QueryBoxFont = queryBoxFontName;
|
||||||
cbQueryBoxFontFaces.SelectedItem = ((FontFamily)cbQueryBoxFont.SelectedItem).ChooseRegularFamilyTypeface();
|
QueryBoxFontFaces.SelectedItem = ((FontFamily)QueryBoxFont.SelectedItem).ChooseRegularFamilyTypeface();
|
||||||
ThemeManager.Instance.ChangeTheme(_settings.Theme);
|
ThemeManager.Instance.ChangeTheme(_settings.Theme);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CbQueryBoxFontFaces_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
|
private void CbQueryBoxFontFaces_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||||
{
|
{
|
||||||
if (!settingsLoaded) return;
|
if (!settingsLoaded) return;
|
||||||
FamilyTypeface typeface = (FamilyTypeface)cbQueryBoxFontFaces.SelectedItem;
|
FamilyTypeface typeface = (FamilyTypeface)QueryBoxFontFaces.SelectedItem;
|
||||||
if (typeface == null)
|
if (typeface == null)
|
||||||
{
|
{
|
||||||
if (cbQueryBoxFontFaces.Items.Count > 0)
|
if (QueryBoxFontFaces.Items.Count > 0)
|
||||||
cbQueryBoxFontFaces.SelectedIndex = 0;
|
QueryBoxFontFaces.SelectedIndex = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -599,34 +588,34 @@ namespace Wox
|
|||||||
List<string> actionKeywords = null;
|
List<string> actionKeywords = null;
|
||||||
if (pair == null) return;
|
if (pair == null) return;
|
||||||
actionKeywords = pair.Metadata.ActionKeywords;
|
actionKeywords = pair.Metadata.ActionKeywords;
|
||||||
pluginAuthor.Visibility = Visibility.Visible;
|
PluginAuthor.Visibility = Visibility.Visible;
|
||||||
pluginInitTime.Text =
|
PluginInitTime.Text =
|
||||||
string.Format(InternationalizationManager.Instance.GetTranslation("plugin_init_time"), pair.InitTime);
|
string.Format(InternationalizationManager.Instance.GetTranslation("plugin_init_time"), pair.InitTime);
|
||||||
pluginQueryTime.Text =
|
PluginQueryTime.Text =
|
||||||
string.Format(InternationalizationManager.Instance.GetTranslation("plugin_query_time"),
|
string.Format(InternationalizationManager.Instance.GetTranslation("plugin_query_time"),
|
||||||
pair.AvgQueryTime);
|
pair.AvgQueryTime);
|
||||||
if (actionKeywords.Count > 1)
|
if (actionKeywords.Count > 1)
|
||||||
{
|
{
|
||||||
pluginActionKeywordsTitle.Visibility = Visibility.Collapsed;
|
PluginActionKeywordsTitle.Visibility = Visibility.Collapsed;
|
||||||
pluginActionKeywords.Visibility = Visibility.Collapsed;
|
PluginActionKeywords.Visibility = Visibility.Collapsed;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pluginActionKeywordsTitle.Visibility = Visibility.Visible;
|
PluginActionKeywordsTitle.Visibility = Visibility.Visible;
|
||||||
pluginActionKeywords.Visibility = Visibility.Visible;
|
PluginActionKeywords.Visibility = Visibility.Visible;
|
||||||
}
|
}
|
||||||
tbOpenPluginDirecoty.Visibility = Visibility.Visible;
|
OpenPluginDirecoty.Visibility = Visibility.Visible;
|
||||||
pluginTitle.Text = pair.Metadata.Name;
|
PluginTitle.Text = pair.Metadata.Name;
|
||||||
pluginTitle.Cursor = Cursors.Hand;
|
PluginTitle.Cursor = Cursors.Hand;
|
||||||
pluginActionKeywords.Text = string.Join(Query.ActionKeywordSeperater, actionKeywords.ToArray());
|
PluginActionKeywords.Text = string.Join(Query.ActionKeywordSeperater, actionKeywords.ToArray());
|
||||||
pluginAuthor.Text = InternationalizationManager.Instance.GetTranslation("author") + ": " +
|
PluginAuthor.Text = InternationalizationManager.Instance.GetTranslation("author") + ": " +
|
||||||
pair.Metadata.Author;
|
pair.Metadata.Author;
|
||||||
pluginSubTitle.Text = pair.Metadata.Description;
|
PluginSubTitle.Text = pair.Metadata.Description;
|
||||||
pluginId = pair.Metadata.ID;
|
pluginId = pair.Metadata.ID;
|
||||||
pluginIcon.Source = ImageLoader.Load(pair.Metadata.IcoPath);
|
PluginIcon.Source = ImageLoader.Load(pair.Metadata.IcoPath);
|
||||||
|
|
||||||
var customizedPluginConfig = _settings.PluginSettings.Plugins[pluginId];
|
var customizedPluginConfig = _settings.PluginSettings.Plugins[pluginId];
|
||||||
cbDisablePlugin.IsChecked = customizedPluginConfig != null && customizedPluginConfig.Disabled;
|
DisablePlugin.IsChecked = customizedPluginConfig != null && customizedPluginConfig.Disabled;
|
||||||
|
|
||||||
PluginContentPanel.Content = null;
|
PluginContentPanel.Content = null;
|
||||||
var settingProvider = pair.Plugin as ISettingProvider;
|
var settingProvider = pair.Plugin as ISettingProvider;
|
||||||
@ -688,7 +677,7 @@ namespace Wox
|
|||||||
changeKeywordsWindow.ShowDialog();
|
changeKeywordsWindow.ShowDialog();
|
||||||
PluginPair plugin = PluginManager.GetPluginForId(id);
|
PluginPair plugin = PluginManager.GetPluginForId(id);
|
||||||
if (plugin != null)
|
if (plugin != null)
|
||||||
pluginActionKeywords.Text = string.Join(Query.ActionKeywordSeperater,
|
PluginActionKeywords.Text = string.Join(Query.ActionKeywordSeperater,
|
||||||
pair.Metadata.ActionKeywords.ToArray());
|
pair.Metadata.ActionKeywords.ToArray());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -775,45 +764,45 @@ namespace Wox
|
|||||||
int port = 80;
|
int port = 80;
|
||||||
if (_settings.ProxyEnabled)
|
if (_settings.ProxyEnabled)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(tbProxyServer.Text))
|
if (string.IsNullOrEmpty(ProxyServer.Text))
|
||||||
{
|
{
|
||||||
MessageBox.Show(InternationalizationManager.Instance.GetTranslation("serverCantBeEmpty"));
|
MessageBox.Show(InternationalizationManager.Instance.GetTranslation("serverCantBeEmpty"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (string.IsNullOrEmpty(tbProxyPort.Text))
|
if (string.IsNullOrEmpty(ProxyPort.Text))
|
||||||
{
|
{
|
||||||
MessageBox.Show(InternationalizationManager.Instance.GetTranslation("portCantBeEmpty"));
|
MessageBox.Show(InternationalizationManager.Instance.GetTranslation("portCantBeEmpty"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!int.TryParse(tbProxyPort.Text, out port))
|
if (!int.TryParse(ProxyPort.Text, out port))
|
||||||
{
|
{
|
||||||
MessageBox.Show(InternationalizationManager.Instance.GetTranslation("invalidPortFormat"));
|
MessageBox.Show(InternationalizationManager.Instance.GetTranslation("invalidPortFormat"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_settings.ProxyServer = tbProxyServer.Text;
|
_settings.ProxyServer = ProxyServer.Text;
|
||||||
_settings.ProxyPort = port;
|
_settings.ProxyPort = port;
|
||||||
_settings.ProxyUserName = tbProxyUserName.Text;
|
_settings.ProxyUserName = ProxyUserName.Text;
|
||||||
_settings.ProxyPassword = tbProxyPassword.Password;
|
_settings.ProxyPassword = ProxyPassword.Password;
|
||||||
|
|
||||||
MessageBox.Show(InternationalizationManager.Instance.GetTranslation("saveProxySuccessfully"));
|
MessageBox.Show(InternationalizationManager.Instance.GetTranslation("saveProxySuccessfully"));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void btnTestProxy_Click(object sender, RoutedEventArgs e)
|
private void btnTestProxy_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(tbProxyServer.Text))
|
if (string.IsNullOrEmpty(ProxyServer.Text))
|
||||||
{
|
{
|
||||||
MessageBox.Show(InternationalizationManager.Instance.GetTranslation("serverCantBeEmpty"));
|
MessageBox.Show(InternationalizationManager.Instance.GetTranslation("serverCantBeEmpty"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (string.IsNullOrEmpty(tbProxyPort.Text))
|
if (string.IsNullOrEmpty(ProxyPort.Text))
|
||||||
{
|
{
|
||||||
MessageBox.Show(InternationalizationManager.Instance.GetTranslation("portCantBeEmpty"));
|
MessageBox.Show(InternationalizationManager.Instance.GetTranslation("portCantBeEmpty"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
int port;
|
int port;
|
||||||
if (!int.TryParse(tbProxyPort.Text, out port))
|
if (!int.TryParse(ProxyPort.Text, out port))
|
||||||
{
|
{
|
||||||
MessageBox.Show(InternationalizationManager.Instance.GetTranslation("invalidPortFormat"));
|
MessageBox.Show(InternationalizationManager.Instance.GetTranslation("invalidPortFormat"));
|
||||||
return;
|
return;
|
||||||
@ -822,14 +811,14 @@ namespace Wox
|
|||||||
HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://www.baidu.com");
|
HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://www.baidu.com");
|
||||||
request.Timeout = 1000 * 5;
|
request.Timeout = 1000 * 5;
|
||||||
request.ReadWriteTimeout = 1000 * 5;
|
request.ReadWriteTimeout = 1000 * 5;
|
||||||
if (string.IsNullOrEmpty(tbProxyUserName.Text))
|
if (string.IsNullOrEmpty(ProxyUserName.Text))
|
||||||
{
|
{
|
||||||
request.Proxy = new WebProxy(tbProxyServer.Text, port);
|
request.Proxy = new WebProxy(ProxyServer.Text, port);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
request.Proxy = new WebProxy(tbProxyServer.Text, port);
|
request.Proxy = new WebProxy(ProxyServer.Text, port);
|
||||||
request.Proxy.Credentials = new NetworkCredential(tbProxyUserName.Text, tbProxyPassword.Password);
|
request.Proxy.Credentials = new NetworkCredential(ProxyUserName.Text, ProxyPassword.Password);
|
||||||
}
|
}
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -854,7 +843,7 @@ namespace Wox
|
|||||||
private void Window_PreviewKeyDown(object sender, KeyEventArgs e)
|
private void Window_PreviewKeyDown(object sender, KeyEventArgs e)
|
||||||
{
|
{
|
||||||
// Hide window with ESC, but make sure it is not pressed as a hotkey
|
// Hide window with ESC, but make sure it is not pressed as a hotkey
|
||||||
if (e.Key == Key.Escape && !ctlHotkey.IsFocused)
|
if (e.Key == Key.Escape && !HotkeyControl.IsFocused)
|
||||||
{
|
{
|
||||||
Close();
|
Close();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user