Пример #1
0
 public void RegisterChatPlugin(string main, IChatPlugin plugin)
 {
     if (!ChatPlugins.ContainsKey(main))
     {
         ChatPlugins.Add(main, plugin);
     }
 }
Пример #2
0
 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());
     }
 }
Пример #3
0
        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);
            }
        }
Пример #4
0
 public void RegisterChatPlugin(string main, IChatPlugin plugin)
 {
     if (!ChatPlugins.ContainsKey(main))
         ChatPlugins.Add(main, plugin);
 }