Exemple #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();
            }
        }
Exemple #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();
            }
        }
Exemple #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();
     }
 }
Exemple #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();
        }
 private void server_ConnectionRequested(object sender, NetSockConnectionRequestEventArgs e)
 {
     account.Log(new ConnectionTextInformation("Connection Requested: " + ((System.Net.IPEndPoint)e.Client.RemoteEndPoint).Address.ToString()), 4);
     this.server.Accept(e.Client);
     account.Init();
 }