mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
parent
67ab979a9b
commit
87497d2d09
6 changed files with 18 additions and 1 deletions
|
|
@ -44,6 +44,7 @@ namespace Wox.Core.UserSettings
|
||||||
public bool EnableUpdateLog { get; set; }
|
public bool EnableUpdateLog { get; set; }
|
||||||
|
|
||||||
public bool StartWoxOnSystemStartup { get; set; }
|
public bool StartWoxOnSystemStartup { get; set; }
|
||||||
|
public bool HideOnStartup { get; set; }
|
||||||
public bool LeaveCmdOpen { get; set; }
|
public bool LeaveCmdOpen { get; set; }
|
||||||
public bool HideWhenDeactive { get; set; }
|
public bool HideWhenDeactive { get; set; }
|
||||||
public bool RememberLastLaunchLocation { get; set; }
|
public bool RememberLastLaunchLocation { get; set; }
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@
|
||||||
<system:String x:Key="wox_settings">Wox Settings</system:String>
|
<system:String x:Key="wox_settings">Wox Settings</system:String>
|
||||||
<system:String x:Key="general">General</system:String>
|
<system:String x:Key="general">General</system:String>
|
||||||
<system:String x:Key="startWoxOnSystemStartup">Start Wox on system startup</system:String>
|
<system:String x:Key="startWoxOnSystemStartup">Start Wox on system startup</system:String>
|
||||||
|
<system:String x:Key="hideOnStartup">Hide Wox on startup</system:String>
|
||||||
<system:String x:Key="hideWoxWhenLoseFocus">Hide Wox when loses focus</system:String>
|
<system:String x:Key="hideWoxWhenLoseFocus">Hide Wox when loses focus</system:String>
|
||||||
<system:String x:Key="dontPromptUpdateMsg">Don't show upgrade msg if new version available</system:String>
|
<system:String x:Key="dontPromptUpdateMsg">Don't show upgrade msg if new version available</system:String>
|
||||||
<system:String x:Key="rememberLastLocation">Remember last launch location</system:String>
|
<system:String x:Key="rememberLastLocation">Remember last launch location</system:String>
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@
|
||||||
<system:String x:Key="woxsettings">Wox设置</system:String>
|
<system:String x:Key="woxsettings">Wox设置</system:String>
|
||||||
<system:String x:Key="general">通用</system:String>
|
<system:String x:Key="general">通用</system:String>
|
||||||
<system:String x:Key="startWoxOnSystemStartup">开机启动</system:String>
|
<system:String x:Key="startWoxOnSystemStartup">开机启动</system:String>
|
||||||
|
<system:String x:Key="hideOnStartup">启动时不显示主窗口</system:String>
|
||||||
<system:String x:Key="hideWoxWhenLoseFocus">失去焦点时自动隐藏Wox</system:String>
|
<system:String x:Key="hideWoxWhenLoseFocus">失去焦点时自动隐藏Wox</system:String>
|
||||||
<system:String x:Key="dontPromptUpdateMsg">不显示新版本提示</system:String>
|
<system:String x:Key="dontPromptUpdateMsg">不显示新版本提示</system:String>
|
||||||
<system:String x:Key="rememberLastLocation">记住上次启动位置</system:String>
|
<system:String x:Key="rememberLastLocation">记住上次启动位置</system:String>
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ namespace Wox
|
||||||
// happlebao todo delete
|
// happlebao todo delete
|
||||||
vm.Left = GetWindowsLeft();
|
vm.Left = GetWindowsLeft();
|
||||||
vm.Top = GetWindowsTop();
|
vm.Top = GetWindowsTop();
|
||||||
vm.MainWindowVisibility = Visibility.Visible;
|
vm.MainWindowVisibility = _settings.HideOnStartup ? Visibility.Hidden : Visibility.Visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void RegisterEvents(MainViewModel vm)
|
private void RegisterEvents(MainViewModel vm)
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,9 @@
|
||||||
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">
|
||||||
|
<TextBlock Text="{DynamicResource hideOnStartup}" />
|
||||||
|
</CheckBox>
|
||||||
<CheckBox x:Name="cbHideWhenDeactive" Margin="10">
|
<CheckBox x:Name="cbHideWhenDeactive" Margin="10">
|
||||||
<TextBlock Text="{DynamicResource hideWoxWhenLoseFocus}" />
|
<TextBlock Text="{DynamicResource hideWoxWhenLoseFocus}" />
|
||||||
</CheckBox>
|
</CheckBox>
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,16 @@ namespace Wox
|
||||||
{
|
{
|
||||||
#region General
|
#region General
|
||||||
|
|
||||||
|
cbHideOnStartup.Checked += (o, e) =>
|
||||||
|
{
|
||||||
|
_settings.HideOnStartup = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
cbHideOnStartup.Unchecked += (o, e) =>
|
||||||
|
{
|
||||||
|
_settings.HideOnStartup = false;
|
||||||
|
};
|
||||||
|
|
||||||
cbHideWhenDeactive.Checked += (o, e) =>
|
cbHideWhenDeactive.Checked += (o, e) =>
|
||||||
{
|
{
|
||||||
_settings.HideWhenDeactive = true;
|
_settings.HideWhenDeactive = true;
|
||||||
|
|
@ -114,6 +124,7 @@ namespace Wox
|
||||||
//MainWindow.pnlResult.lbResults.GetBindingExpression(MaxHeightProperty).UpdateTarget();
|
//MainWindow.pnlResult.lbResults.GetBindingExpression(MaxHeightProperty).UpdateTarget();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
cbHideOnStartup.IsChecked = _settings.HideOnStartup;
|
||||||
cbHideWhenDeactive.IsChecked = _settings.HideWhenDeactive;
|
cbHideWhenDeactive.IsChecked = _settings.HideWhenDeactive;
|
||||||
cbDontPromptUpdateMsg.IsChecked = _settings.DontPromptUpdateMsg;
|
cbDontPromptUpdateMsg.IsChecked = _settings.DontPromptUpdateMsg;
|
||||||
cbRememberLastLocation.IsChecked = _settings.RememberLastLaunchLocation;
|
cbRememberLastLocation.IsChecked = _settings.RememberLastLaunchLocation;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue