private static void StopPopupWatcher(string key, PopupWatcher watcher) { watcher.Clear(); watcher.Stop(); Report.Info("Popup watcher stopped."); watchers.Remove(key); }
public static void StopPopupWatcher(RepoItemInfo findElement, RepoItemInfo clickElement) { var key = findElement.GetMetaInfos()["id"] + clickElement.GetMetaInfos()["id"]; PopupWatcher watcher = null; if (watchers.TryGetValue(key, out watcher)) { watcher.Clear(); watcher.Stop(); Report.Info("Popup watcher stopped."); watchers.Remove(key); } else { Report.Warn("The popup watcher you tried to remove does not exist."); } }