public void AddAccount(AccountModel p)
 {
     AccountTag accountTag = new AccountTag(this, p);
     ItemList.Add(accountTag);
     accountTag.Dock = System.Windows.Forms.DockStyle.Fill;
     accountTag.Name = "accountTag" + (++i);
     accountTag.Padding = new System.Windows.Forms.Padding(2);
     accountTag.Size = new System.Drawing.Size(207, 27);
     accountTag.TabIndex = 1;
     this.tlp_CountList.RowCount = ItemList.Count + 1;
     this.tlp_CountList.RowStyles.Insert(0, new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 80F));
     this.tlp_CountList.Controls.Add(accountTag, 0, ItemList.Count - 1);
     Current = accountTag;
 }
        public void RemoveAccount()
        {

            this.tlp_CountList.Controls.Remove(this.Current);
            this.Current = (AccountTag)this.tlp_CountList.Controls[this.tlp_CountList.Controls.Count];
        }
 private void tsb_disableAccount_Click(object sender, EventArgs e)
 {
     if (this.Current == null)
     {
         return;
     }
     this.Current.Account.IsEnable = false;
     this.Current = this.Current;
 }
 private void tsb_disconnectAccount_Click(object sender, EventArgs e)
 {
     if (this.Current == null)
     {
         return;
     }
     this.Current.Account.IsConnected = false;
     this.Current = this.Current;
 }
 private void tsb_connectAccount_Click(object sender, EventArgs e)
 {
     if (this.Current == null)
     {
         return;
     }
     this.Current.Account.IsConnected = true;
     this.Current = this.Current;
     new AccountBuz().Connect(this.Current.Account);
 }
        private void tsb_deleteAccount_Click(object sender, EventArgs e)
        {
            if (this.Current != null)
            {
                this.tlp_CountList.Controls.Remove(this.Current);
                int index = this.ItemList.IndexOf(this.Current);
                this.ItemList.Remove(this.Current);
                if (this.ItemList.Count > 0)
                {
                    this.Current = this.ItemList.Last();
                }

                RefreshAcountList(index);
            }
        }