Ejemplo n.º 1
0
        /// <summary>
        /// Gets the dialog watcher for the specified process. It creates
        /// a new instance if no dialog watcher for the specified process
        /// exists.
        /// </summary>
        /// <param name="ieProcessId">The ie process id.</param>
        /// <returns></returns>
        public static DialogWatcher GetDialogWatcherForProcess(int ieProcessId)
        {
            CleanupDialogWatcherCache();

            DialogWatcher dialogWatcher = GetDialogWatcherFromCache(ieProcessId);

            // If no dialogwatcher exists for the ieprocessid then
            // create a new one, store it and return it.
            if (dialogWatcher == null)
            {
                dialogWatcher = new DialogWatcher(ieProcessId);

                dialogWatchers.Add(dialogWatcher);
            }

            return(dialogWatcher);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Starts the dialog watcher.
 /// </summary>
 private void StartDialogWatcher()
 {
     if (ItiNdialogWatcher == null)
     {
         ItiNdialogWatcher = DialogWatcher.GetDialogWatcherForProcess(ProcessId);
         ItiNdialogWatcher.IncreaseReferenceCount();
     }
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Gets the dialog watcher for the specified process. It creates
        /// a new instance if no dialog watcher for the specified process 
        /// exists.
        /// </summary>
        /// <param name="ieProcessId">The ie process id.</param>
        /// <returns></returns>
        public static DialogWatcher GetDialogWatcherForProcess(int ieProcessId)
        {
            CleanupDialogWatcherCache();

            DialogWatcher dialogWatcher = GetDialogWatcherFromCache(ieProcessId);

            // If no dialogwatcher exists for the ieprocessid then
            // create a new one, store it and return it.
            if (dialogWatcher == null)
            {
                dialogWatcher = new DialogWatcher(ieProcessId);

                dialogWatchers.Add(dialogWatcher);
            }

            return dialogWatcher;
        }