コード例 #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
ファイル: Core.cs プロジェクト: ASIXz/PowerAggregator
        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);
 }