mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-14 11:39:16 +08:00
parent
eb8aa195c2
commit
533bc4c2fe
@ -43,12 +43,14 @@ namespace Wox
|
|||||||
base.OnStartup(e);
|
base.OnStartup(e);
|
||||||
WoxDirectroy.Executable = Directory.GetParent(Assembly.GetExecutingAssembly().Location).ToString();
|
WoxDirectroy.Executable = Directory.GetParent(Assembly.GetExecutingAssembly().Location).ToString();
|
||||||
RegisterUnhandledException();
|
RegisterUnhandledException();
|
||||||
ThreadPool.QueueUserWorkItem(o => { ImageLoader.ImageLoader.PreloadImages(); });
|
|
||||||
|
ThreadPool.SetMaxThreads(30, 10);
|
||||||
|
ThreadPool.SetMinThreads(10, 5);
|
||||||
|
ThreadPool.QueueUserWorkItem(_ => { ImageLoader.ImageLoader.PreloadImages(); });
|
||||||
|
|
||||||
MainViewModel mainVM = new MainViewModel();
|
MainViewModel mainVM = new MainViewModel();
|
||||||
API = new PublicAPIInstance(mainVM);
|
API = new PublicAPIInstance(mainVM);
|
||||||
Window = new MainWindow();
|
Window = new MainWindow {DataContext = mainVM};
|
||||||
Window.DataContext = mainVM;
|
|
||||||
|
|
||||||
NotifyIconManager notifyIconManager = new NotifyIconManager(API);
|
NotifyIconManager notifyIconManager = new NotifyIconManager(API);
|
||||||
|
|
||||||
|
@ -30,8 +30,7 @@ namespace Wox
|
|||||||
{
|
{
|
||||||
this.MainVM = mainVM;
|
this.MainVM = mainVM;
|
||||||
|
|
||||||
ThreadPool.SetMaxThreads(30, 10);
|
|
||||||
ThreadPool.SetMinThreads(10, 5);
|
|
||||||
GlobalHotkey.Instance.hookedKeyboardCallback += KListener_hookedKeyboardCallback;
|
GlobalHotkey.Instance.hookedKeyboardCallback += KListener_hookedKeyboardCallback;
|
||||||
WebRequest.RegisterPrefix("data", new DataWebRequestFactory());
|
WebRequest.RegisterPrefix("data", new DataWebRequestFactory());
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user