internal static void Initialize() { VirtualDesktopManager = Utils.CreateInstance <IVirtualDesktopManager>(CLSID.VirtualDesktopManager); VirtualDesktopManagerInternal = VirtualDesktopManagerInternal.GetInstance(); VirtualDesktopPinnedApps = Utils.FromShell <IVirtualDesktopPinnedApps>(CLSID.VirtualDesktopPinnedApps); ApplicationViewCollection = Utils.FromShell <IApplicationViewCollection>(); }
public MainForm(Option option) { this.Option = option; _VirtualDesktopManager = VirtualDesktopManager.CreateInstance(); _GetCurrentDesktop = VirtualDesktopManagerInternal._GetCurrentDesktopGetter(); this.ControlAdded += MainForm_ControlAdded; InitializeComponent(); ResetCounter(); if (!string.IsNullOrEmpty(AppSettings.Debug.TimerInterval)) { timer1.Interval = int.Parse(AppSettings.Debug.TimerInterval); } }