public ApplicationPanel() { this.Disposed += new EventHandler(ApplicationPanel_Disposed); SuperPuTTY.LayoutChanged += new EventHandler<Data.LayoutChangedEventArgs>(SuperPuTTY_LayoutChanged); // setup up the hook to watch for all EVENT_SYSTEM_FOREGROUND events system wide string typeName = string.IsNullOrEmpty(SuperPuTTY.Settings.WindowActivator) ? ActivatorTypeName : SuperPuTTY.Settings.WindowActivator; this.m_windowActivator = (WindowActivator)Activator.CreateInstance(Type.GetType(typeName)); //this.m_windowActivator = new SetFGCombinedWindowActivator(); SuperPuTTY.Settings.SettingsSaving += Settings_SettingsSaving; SuperPuTTY.WindowEvents.SystemSwitch += new EventHandler<GlobalWindowEventArgs>(OnSystemSwitch); }
public ApplicationPanel() { this.Disposed += new EventHandler(ApplicationPanel_Disposed); SuperPuTTY.LayoutChanged += new EventHandler<Data.LayoutChangedEventArgs>(SuperPuTTY_LayoutChanged); // setup up the hook to watch for all EVENT_SYSTEM_FOREGROUND events system wide string typeName = string.IsNullOrEmpty(SuperPuTTY.Settings.WindowActivator) ? ActivatorTypeName : SuperPuTTY.Settings.WindowActivator; this.m_windowActivator = (WindowActivator)Activator.CreateInstance(Type.GetType(typeName)); //this.m_windowActivator = new SetFGCombinedWindowActivator(); this.m_winEventDelegate = new NativeMethods.WinEventDelegate(WinEventProc); this.m_hWinEventHook = NativeMethods.SetWinEventHook( (int) NativeMethods.WinEvents.EVENT_SYSTEM_FOREGROUND, (int) NativeMethods.WinEvents.EVENT_OBJECT_NAMECHANGE, IntPtr.Zero, this.m_winEventDelegate, 0, 0, NativeMethods.WINEVENT_OUTOFCONTEXT); SuperPuTTY.Settings.SettingsSaving += Settings_SettingsSaving; }
public ApplicationPanel() { this.Disposed += new EventHandler(ApplicationPanel_Disposed); SuperPuTTY.LayoutChanged += new EventHandler<Data.LayoutChangedEventArgs>(SuperPuTTY_LayoutChanged); // setup up the hook to watch for all EVENT_SYSTEM_FOREGROUND events system wide string typeName = string.IsNullOrEmpty(SuperPuTTY.Settings.WindowActivator) ? ActivatorTypeName : SuperPuTTY.Settings.WindowActivator; this.m_windowActivator = (WindowActivator)Activator.CreateInstance(Type.GetType(typeName)); //this.m_windowActivator = new SetFGCombinedWindowActivator(); SuperPuTTY.Settings.SettingsSaving += Settings_SettingsSaving; SuperPuTTY.WindowEvents.SystemSwitch += new EventHandler<GlobalWindowEventArgs>(OnSystemSwitch); this.ApplicationName = ""; this.ApplicationParameters = ""; this.ApplicationWorkingDirectory = ""; this.AppWindowHandle = this.m_AppWin; this.ExternalProcessCaptured = (this.m_AppWin != IntPtr.Zero); }