コード例 #1
0
ファイル: LoginDialog.cs プロジェクト: kanbang/Colt
 /// <summary>
 /// Initializes a new instance of the <see cref="LoginDialog"/> class.
 /// </summary>
 public LoginDialog()
 {
     InitializeComponent();
     _http = new HttpLoginCtrl() { Dock = DockStyle.Fill };
     _localNative = new LocalNativeLoginCtrl() { Dock = DockStyle.Fill };
     _local = new LocalLoginCtrl() { Dock = DockStyle.Fill };
     _localNativeStub = new LocalNativeStubCtrl() { Dock = DockStyle.Fill };
     _localStub = new LocalStubCtrl() { Dock = DockStyle.Fill };
     _controls = new ILoginCtrl[]
     {
         _http,
         _localNative,
         _local,
         _localNativeStub,
         _localStub
     };
     _controls[0].EnableOk += OnEnableOk;
     _controls[1].EnableOk += OnEnableOk;
     _controls[2].EnableOk += OnEnableOk;
     _controls[3].EnableOk += OnEnableOk;
     _controls[4].EnableOk += OnEnableOk;
     _controls[0].CheckSavedPassword += (sender, e) => { chkSavePassword.Checked = true; };
     _controls[1].CheckSavedPassword += (sender, e) => { chkSavePassword.Checked = true; };
     _controls[2].CheckSavedPassword += (sender, e) => { chkSavePassword.Checked = true; };
     _controls[3].CheckSavedPassword += (sender, e) => { chkSavePassword.Checked = true; };
     _controls[4].CheckSavedPassword += (sender, e) => { chkSavePassword.Checked = true; };
     _controls[0].DisabledOk += OnDisableOk;
     _controls[1].DisabledOk += OnDisableOk;
     _controls[2].DisabledOk += OnDisableOk;
     _controls[3].DisabledOk += OnDisableOk;
     _controls[4].DisabledOk += OnDisableOk;
 }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="LoginDialog"/> class.
 /// </summary>
 public LoginDialog()
 {
     InitializeComponent();
     _http = new HttpLoginCtrl()
     {
         Dock = DockStyle.Fill
     };
     _localNative = new LocalNativeLoginCtrl()
     {
         Dock = DockStyle.Fill
     };
     _local = new LocalLoginCtrl()
     {
         Dock = DockStyle.Fill
     };
     _localNativeStub = new LocalNativeStubCtrl()
     {
         Dock = DockStyle.Fill
     };
     _localStub = new LocalStubCtrl()
     {
         Dock = DockStyle.Fill
     };
     _controls = new ILoginCtrl[]
     {
         _http,
         _localNative,
         _local,
         _localNativeStub,
         _localStub
     };
     _controls[0].EnableOk           += OnEnableOk;
     _controls[1].EnableOk           += OnEnableOk;
     _controls[2].EnableOk           += OnEnableOk;
     _controls[3].EnableOk           += OnEnableOk;
     _controls[4].EnableOk           += OnEnableOk;
     _controls[0].CheckSavedPassword += (sender, e) => { chkSavePassword.Checked = true; };
     _controls[1].CheckSavedPassword += (sender, e) => { chkSavePassword.Checked = true; };
     _controls[2].CheckSavedPassword += (sender, e) => { chkSavePassword.Checked = true; };
     _controls[3].CheckSavedPassword += (sender, e) => { chkSavePassword.Checked = true; };
     _controls[4].CheckSavedPassword += (sender, e) => { chkSavePassword.Checked = true; };
     _controls[0].DisabledOk         += OnDisableOk;
     _controls[1].DisabledOk         += OnDisableOk;
     _controls[2].DisabledOk         += OnDisableOk;
     _controls[3].DisabledOk         += OnDisableOk;
     _controls[4].DisabledOk         += OnDisableOk;
 }