示例#1
0
 private void LoadAgain(object sender, EventArgs e)
 {
     if (InvokeRequired)
     {
         Invoke(new Action <object, EventArgs>(LoadAgain), new object[] { sender, e });
         return;
     }
     // If user choose supported mail accounts kind
     if (Operations.GlobalVarriable.ChooseMailSuccess == true)
     {
         if (Operations.GlobalVarriable.AddAccountToPanel == true)
         {
             emptyX.Hide();
             Operations.GlobalVarriable.CountAccount++;
             Accounts.AddNew Add = new Accounts.AddNew(Operations.Gmail.GmailAccountInfo.get.DisplayName, Operations.Gmail.GmailAccountInfo.get.Avatar, Operations.Gmail.GmailAccountInfo.get.Email, Operations.Gmail.GmailAccountInfo.get.Unread);
             Add.UserClicked += new EventHandler(CallDirectEvent);
             ListOfAccount.Controls.Add(Add);
         }
     }
     // If user choose unsupport mail account kind
     else
     {
         // Nothing here
     }
 }
示例#2
0
 private void AddAccount(string _displayname, Image _avatar, string _mailaddress, string _unreadcounts)
 {
     if (InvokeRequired)
     {
         Invoke(new Action <string, Image, string, string>(AddAccount), new object[] { _displayname, _avatar, _mailaddress, _unreadcounts });
         return;
     }
     Accounts.AddNew add = new Accounts.AddNew(_displayname, _avatar, _mailaddress, _unreadcounts);
     add.Name = _mailaddress.Replace("@", "_").Replace(".", "_");
     ListOfAccount.Controls.Add(add);
     Operations.GlobalVarriable.MailsAddressList.Add(_mailaddress);
     emptyX.Hide();
 }