Ejemplo n.º 1
0
        public AccountFrm(string username, string password, bool socket)
        {
            InitializeComponent();
            // Add the UC
            AccountUC Uc = new AccountUC(username, password, socket);

            this.Controls.Add(Uc);
            Uc.Show();

            // Show the form
            this.Show();

            // Not in a group
            Uc.IsMaster = false;
            Uc.IsSlave  = false;

            // Fill the account form
            Uc.Dock = DockStyle.Fill;

            // Call socket/mitm init
            if (socket)
            {
                Uc.Init();
            }
            else
            {
                Uc.InitMITM();
            }
        }
Ejemplo n.º 2
0
        private void Init()
        {
            AccountUC Uc = new AccountUC(m_user, m_pass, m_socket, this);

            m_UC = Uc;
            this.Controls.Add(Uc);
            Uc.Show();

            // Show the form
            this.Show();

            // Not in a group
            Uc.IsMaster = false;
            Uc.IsSlave  = false;

            // Fill the account form
            Uc.Dock = DockStyle.Fill;

            // Call socket/mitm init
            if (m_socket)
            {
                Uc.Init();
            }
            else
            {
                Uc.InitMITM();
            }
        }
Ejemplo n.º 3
0
 public GroupForm(List <AccountUC> accounts, string name)
 {
     InitializeComponent();
     this.Text = name;
     list      = new List <Account>();
     foreach (AccountUC account in accounts)
     {
         TabPage   tab      = new TabPage(account.AccountName);
         AccountUC naccount = new AccountUC(account.AccountName, account.AccountPassword, true);
         AccountTabs.TabPages.Add(tab);
         tab.Controls.Add(naccount);
         naccount.Dock = DockStyle.Fill;
         naccount.Show();
         naccount.MyGroup = new Group(accounts, this.Name);
         list.Add(new Account(account.AccountName, account.AccountPassword));
         naccount.Init();
     }
 }
Ejemplo n.º 4
0
        public void Reconnect(AccountUC account)
        {
            if (account.InvokeRequired)
            {
                Invoke(new Callback(Reconnect), account);
                return;
            }
            Controls.Remove(account);
            string user = account.AccountName;
            string pass = account.AccountPassword;

            account = new AccountUC(user, pass, true, this);
            Controls.Add(account);
            account.Show();
            Show();
            account.IsMaster = false;
            account.IsSlave  = false;
            account.Dock     = DockStyle.Fill;
            account.Init();
        }