mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-14 19:49:15 +08:00
Add option to disable auto updates
This commit is contained in:
parent
45d5da98ca
commit
65577a67dc
@ -22,6 +22,8 @@ namespace Wox.Core.UserSettings
|
|||||||
public string ResultFontWeight { get; set; }
|
public string ResultFontWeight { get; set; }
|
||||||
public string ResultFontStretch { get; set; }
|
public string ResultFontStretch { get; set; }
|
||||||
|
|
||||||
|
public bool AutoUpdates { get; set; } = true;
|
||||||
|
|
||||||
public double WindowLeft { get; set; }
|
public double WindowLeft { get; set; }
|
||||||
public double WindowTop { get; set; }
|
public double WindowTop { get; set; }
|
||||||
public int MaxResultsToShow { get; set; } = 6;
|
public int MaxResultsToShow { get; set; } = 6;
|
||||||
|
@ -17,6 +17,7 @@ namespace Wox
|
|||||||
public static PublicAPIInstance API { get; private set; }
|
public static PublicAPIInstance API { get; private set; }
|
||||||
private const string Unique = "Wox_Unique_Application_Mutex";
|
private const string Unique = "Wox_Unique_Application_Mutex";
|
||||||
private static bool _disposed;
|
private static bool _disposed;
|
||||||
|
private Settings _settings;
|
||||||
|
|
||||||
[STAThread]
|
[STAThread]
|
||||||
public static void Main()
|
public static void Main()
|
||||||
@ -41,13 +42,13 @@ namespace Wox
|
|||||||
ImageLoader.PreloadImages();
|
ImageLoader.PreloadImages();
|
||||||
|
|
||||||
var storage = new JsonStrorage<Settings>();
|
var storage = new JsonStrorage<Settings>();
|
||||||
var settings = storage.Load();
|
_settings = storage.Load();
|
||||||
|
|
||||||
PluginManager.LoadPlugins(settings.PluginSettings);
|
PluginManager.LoadPlugins(_settings.PluginSettings);
|
||||||
var vm = new MainViewModel(settings, storage);
|
var vm = new MainViewModel(_settings, storage);
|
||||||
var pluginsSettings = settings.PluginSettings;
|
var pluginsSettings = _settings.PluginSettings;
|
||||||
var window = new MainWindow(settings, vm);
|
var window = new MainWindow(_settings, vm);
|
||||||
API = new PublicAPIInstance(settings, vm);
|
API = new PublicAPIInstance(_settings, vm);
|
||||||
PluginManager.InitializePlugins(API);
|
PluginManager.InitializePlugins(API);
|
||||||
|
|
||||||
RegisterExitEvents();
|
RegisterExitEvents();
|
||||||
@ -60,7 +61,11 @@ namespace Wox
|
|||||||
|
|
||||||
private async void OnActivated(object sender, EventArgs e)
|
private async void OnActivated(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Updater.UpdateApp();
|
// todo happlebao add option in gui
|
||||||
|
if (_settings.AutoUpdates)
|
||||||
|
{
|
||||||
|
Updater.UpdateApp();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void RegisterExitEvents()
|
private void RegisterExitEvents()
|
||||||
|
Loading…
Reference in New Issue
Block a user