Exemplo n.º 1
0
        private void AttachLoginControl()
        {
            if (this.InvokeRequired == true)
            {
                this.Invoke(new AttachLoginControlDelegate(AttachNewAccountControl));
            }
            else
            {
                _accountControlsPanel.Controls.Clear();

                _loginControl = new Controls.Login();
                _loginControl.StatusChanged          += new Client.Controls.LoginControlBase.StatusChangedHandler(_loginControl_StatusChanged);
                _loginControl.LauncherSignInComplete += new Client.Controls.Login.LauncherSignInCompleteHandler(_loginControl_LoginComplete);
                _loginControl.ShowNewAccountSignUp   += new Client.Controls.Login.ShowNewAccountSignUpHandler(_loginControl_ShowNewAccountSignUp);
                _loginControl.ShowOfflineLaunch      += new Client.Controls.Login.ShowOfflineLaunchHandler(_loginControl_ShowOfflineLaunch);
                _loginControl.ShowVirtualMachineInfo += new Client.Controls.Login.ShowVirtualMachineInfoHandler(_loginControl_ShowVirtualMachineInfo);
                _loginControl.Dock = DockStyle.Fill;

                _accountControlsPanel.Controls.Add(_loginControl);
            }
        }
        private void AttachLoginControl()
        {
            if (this.InvokeRequired == true)
            {
                this.Invoke(new AttachLoginControlDelegate(AttachNewAccountControl));
            }
            else
            {
                _accountControlsPanel.Controls.Clear();

                _loginControl = new Controls.Login();
                _loginControl.StatusChanged += new Client.Controls.LoginControlBase.StatusChangedHandler(_loginControl_StatusChanged);
                _loginControl.LauncherSignInComplete += new Client.Controls.Login.LauncherSignInCompleteHandler(_loginControl_LoginComplete);
                _loginControl.ShowNewAccountSignUp += new Client.Controls.Login.ShowNewAccountSignUpHandler(_loginControl_ShowNewAccountSignUp);
                _loginControl.ShowOfflineLaunch += new Client.Controls.Login.ShowOfflineLaunchHandler(_loginControl_ShowOfflineLaunch);
                _loginControl.ShowVirtualMachineInfo += new Client.Controls.Login.ShowVirtualMachineInfoHandler(_loginControl_ShowVirtualMachineInfo);
                _loginControl.Dock = DockStyle.Fill;

                _accountControlsPanel.Controls.Add(_loginControl);
            }
        }