Example #1
0
 public void RemoveEventListener(Event e)
 {
     if (EventDictionary.ContainsKey(e))
     {
         EventDictionary.Remove(e);
     }
 }
        private void btOK_Click(object sender, EventArgs e)
        {
            RegKey regKey = RegKey.Parse(RegExplorer.RegistryFavoritePath, true);

            foreach (var item in lstKeys.SelectedItems)
            {
                string key = item.ToString();
                regKey.Key.DeleteValue(key);
                favorites.Remove(key);
            }
        }
Example #3
0
        public void RemoveImage(Object item)
        {
            if (!ImageDictionary.TryGetValue(item, out String hash))
            {
                return;
            }

            ImageDictionary.Remove(item);

            if (hash != null && !hash.Equals("null", StringComparison.OrdinalIgnoreCase) &&
                !ImageDictionary.Any(pair => pair.Value.Equals(hash, StringComparison.OrdinalIgnoreCase)))
            {
                Images.Images.RemoveByKey(hash);
            }
        }
Example #4
0
 public void RemoveColor(Object item)
 {
     ColorDictionary.Remove(item);
 }
 public void Unsubscribe(string eventName)
 {
     AmeisenBotLogger.Instance.Log($"[{WowActionExecutor.ProcessId.ToString("X", CultureInfo.InvariantCulture.NumberFormat)}]\tUnsubscribed from \"{eventName}\"");
     WowActionExecutor.LuaDoString($"abFrame:UnregisterEvent(\"{eventName}\");");
     EventDictionary.Remove(eventName);
 }
Example #6
0
 /// <summary>
 /// Unsubscribe from an event
 /// </summary>
 /// <param name="eventName">event name</param>
 public void Unsubscribe(string eventName)
 {
     AmeisenCore.LuaDoString($"abFrame:UnregisterEvent(\"{eventName}\");");
     EventDictionary.Remove(eventName);
 }