Example #1
0
        public void AutoFixUpdate(Model.AutoFixType selection, IntPtr hwnd)
        {
            switch (selection)  // Properties.Settings.Default.AutoFix does not contain yet the new value
            {
            case Model.AutoFixType.None:
                WndCreateHook.UnregisterHook();
                WndPolling.Disable();
                break;

            case Model.AutoFixType.WindowsHook:
                RefreshApps(true);
                WndCreateHook.RegisterHook(hwnd);
                WndPolling.Disable();
                break;

            case Model.AutoFixType.WindowPolling:
                RefreshApps(true);
                WndCreateHook.UnregisterHook();
                WndPolling.Enable();
                break;

            case Model.AutoFixType.All:
                RefreshApps(true);
                WndCreateHook.RegisterHook(hwnd);
                WndPolling.Enable();
                break;
            }
        }
Example #2
0
 void AppStartup(object sender, StartupEventArgs args)
 {
     Settings = new Settings();
     AppsData = new AppsData(Settings);
     AppInfos = new ObservableCollection <AppInfo>();
     Settings.LoadFilterData();
     Settings.RefreshFilters();
     //MainWindow mainWindow = new MainWindow();
     //mainWindow.Show();
     // AutoFix
     WndPolling    = new WndPolling();
     WndCreateHook = new WndCreateHook();
 }