/// <summary> /// starts the checker function for the loaded processes /// </summary> /// <param name="mGPrc"></param> public void StartCheck(AWC.Global.GProcessData mGPrc) { try { if (mGPrc != null) { Log.cLogger.Log("ExternTool checker started"); if (myProcessToWatch == null) { myProcessToWatch = new Dictionary <string, List <ExternalToolConfig> >(); } myGPrc = mGPrc; myGPrc.HWND.Load(); Events_GProcessData(true); WindowToWatch(); } else { throw new ArgumentNullException("mGPrc"); } } catch (Exception ex) { Log.cLogger.Log(ex); } }
protected virtual void Dispose(bool mDispose) { try { if (!mDispose) { mDispose = true; if (myWindowsForWatching != null) { foreach (WindowHandle.Window w in myWindowsForWatching) { if (w != null) { Events_WatchingWindows(w, false); w.Dispose(); } } myWindowsForWatching.Clear(); myWindowsForWatching = null; } if (myProcessToWatch != null) { myProcessToWatch.Clear(); myProcessToWatch = null; } Events_GProcessData(false); myGPrc = null; } } catch (Exception ex) { Log.cLogger.Log(ex); } }
private static void InitGlobal() { myGPrc = new Global.GProcessData(); myExTool = new ExternTools.ExternTool(); Save.ConfigFileManager.Load(Save.ConfigFileManager.ConfigFileFullName); }