public void RegisterChatPlugin(string main, IChatPlugin plugin) { if (!ChatPlugins.ContainsKey(main)) { ChatPlugins.Add(main, plugin); } }
private void comboAccounts_SelectedIndexChanged(object sender, EventArgs e) { if (comboAccounts.SelectedIndex >= 0) { chatter = core.Chatters[comboAccounts.SelectedIndex]; textId.Text = chatter.Id; //textLogin.Text = Cahtter.; textPlugin.Text = chatter.GetType().Name; listChattersContacts.Clear(); listChattersContacts.Items.AddRange(core.ChatterUsers.Where(x => x.Chatter == chatter).Select(x => new ListViewItem(x.ToString())).ToArray()); } }
public IChatPlugin AddChatter(IChatPlugin ChatPlugin, string Name, string Id) { try { if (Chatters.Any(x => x.Id == Id)) { return(null); } ChatPlugin.Initialize(Name, Id); ChatPlugin.MessageRecived += AddMessage; Chatters.Add(ChatPlugin); return(ChatPlugin); } catch (Exception ex) { return(null); } }
public void RegisterChatPlugin(string main, IChatPlugin plugin) { if (!ChatPlugins.ContainsKey(main)) ChatPlugins.Add(main, plugin); }