/// <summary>
 /// Call this function (from a subclass) as soon as the process is started.
 /// </summary>
 protected void StartDialogWatcher()
 {
     if (Settings.AutoStartDialogWatcher && _dialogWatcher == null)
     {
         _dialogWatcher = DialogWatcher.GetDialogWatcherForProcess(ProcessID);
         _dialogWatcher.IncreaseReferenceCount();
     }
 }
        /// <summary>
        /// Call this function (from a subclass) as soon as the process is started.
        /// </summary>
        protected void StartDialogWatcher()
        {
            if (!Settings.AutoStartDialogWatcher || DialogWatcher != null)
            {
                return;
            }

            DialogWatcher = DialogWatcher.GetDialogWatcher(hWnd);
            DialogWatcher.IncreaseReferenceCount();
        }