void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.LoginWindow = ((PresentationTier.Login)(target)); return; case 2: this.labelUserName = ((System.Windows.Controls.TextBlock)(target)); return; case 3: this.labelPassword = ((System.Windows.Controls.TextBlock)(target)); return; case 4: this.button = ((System.Windows.Controls.Button)(target)); #line 44 "..\..\Login.xaml" this.button.Click += new System.Windows.RoutedEventHandler(this.Button_Click); #line default #line hidden return; case 5: this.userTextBox = ((System.Windows.Controls.TextBox)(target)); #line 48 "..\..\Login.xaml" this.userTextBox.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.TextBox_TextChanged); #line default #line hidden return; case 6: this.Response = ((System.Windows.Controls.TextBlock)(target)); return; case 7: this.passwordBox = ((System.Windows.Controls.PasswordBox)(target)); #line 64 "..\..\Login.xaml" this.passwordBox.PasswordChanged += new System.Windows.RoutedEventHandler(this.PasswordChangedHandler); #line default #line hidden return; } this._contentLoaded = true; }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Login login = new Login(); if (login.ShowDialog() == DialogResult.OK) { // can put parameter in Home() Application.Run(new Main()); } else { Application.Exit(); } }