mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-14 03:37:10 +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 ResultFontStretch { get; set; }
|
||||
|
||||
public bool AutoUpdates { get; set; } = true;
|
||||
|
||||
public double WindowLeft { get; set; }
|
||||
public double WindowTop { get; set; }
|
||||
public int MaxResultsToShow { get; set; } = 6;
|
||||
|
@ -17,6 +17,7 @@ namespace Wox
|
||||
public static PublicAPIInstance API { get; private set; }
|
||||
private const string Unique = "Wox_Unique_Application_Mutex";
|
||||
private static bool _disposed;
|
||||
private Settings _settings;
|
||||
|
||||
[STAThread]
|
||||
public static void Main()
|
||||
@ -41,13 +42,13 @@ namespace Wox
|
||||
ImageLoader.PreloadImages();
|
||||
|
||||
var storage = new JsonStrorage<Settings>();
|
||||
var settings = storage.Load();
|
||||
_settings = storage.Load();
|
||||
|
||||
PluginManager.LoadPlugins(settings.PluginSettings);
|
||||
var vm = new MainViewModel(settings, storage);
|
||||
var pluginsSettings = settings.PluginSettings;
|
||||
var window = new MainWindow(settings, vm);
|
||||
API = new PublicAPIInstance(settings, vm);
|
||||
PluginManager.LoadPlugins(_settings.PluginSettings);
|
||||
var vm = new MainViewModel(_settings, storage);
|
||||
var pluginsSettings = _settings.PluginSettings;
|
||||
var window = new MainWindow(_settings, vm);
|
||||
API = new PublicAPIInstance(_settings, vm);
|
||||
PluginManager.InitializePlugins(API);
|
||||
|
||||
RegisterExitEvents();
|
||||
@ -59,9 +60,13 @@ namespace Wox
|
||||
}
|
||||
|
||||
private async void OnActivated(object sender, EventArgs e)
|
||||
{
|
||||
// todo happlebao add option in gui
|
||||
if (_settings.AutoUpdates)
|
||||
{
|
||||
Updater.UpdateApp();
|
||||
}
|
||||
}
|
||||
|
||||
private void RegisterExitEvents()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user