Example #1
0
        public void RemoveAccountListItemView(IAccountListItemView accountListItemView)
        {
            if (this.pAccounts.Controls.Contains(accountListItemView.Control))
            {
                Action(delegate { this.pAccounts.Controls.Remove(accountListItemView.Control); });

                int position = 0;
                foreach (UserControl item in this.pAccounts.Controls)
                {
                    Action(delegate { item.Location = new Point(0, position); });
                    position += 22;
                }
            }
        }
Example #2
0
 public void AddAccountListItemView(IAccountListItemView accountListItemView)
 {
     UserControl item = accountListItemView.Control;
     item.Location = new Point(0, 22 * this.pAccounts.Controls.Count);
     Action(delegate
     {
         this.pAccounts.Controls.Add(item);
         this.tbLogin.Text = String.Empty;
         this.tbPasswd.Text = String.Empty;
     });
 }