Ejemplo n.º 1
0
 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;
 }
Ejemplo n.º 2
0
        public void RemoveAccount()
        {

            this.tlp_CountList.Controls.Remove(this.Current);
            this.Current = (AccountTag)this.tlp_CountList.Controls[this.tlp_CountList.Controls.Count];
        }
Ejemplo n.º 3
0
 private void tsb_disableAccount_Click(object sender, EventArgs e)
 {
     if (this.Current == null)
     {
         return;
     }
     this.Current.Account.IsEnable = false;
     this.Current = this.Current;
 }
Ejemplo n.º 4
0
 private void tsb_disconnectAccount_Click(object sender, EventArgs e)
 {
     if (this.Current == null)
     {
         return;
     }
     this.Current.Account.IsConnected = false;
     this.Current = this.Current;
 }
Ejemplo n.º 5
0
 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);
 }
Ejemplo n.º 6
0
        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);
            }
        }