Exemple #1
0
        /// <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);
            }
        }
Exemple #2
0
        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);
            }
        }
Exemple #3
0
 private static void InitGlobal()
 {
     myGPrc   = new Global.GProcessData();
     myExTool = new ExternTools.ExternTool();
     Save.ConfigFileManager.Load(Save.ConfigFileManager.ConfigFileFullName);
 }