void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.mainForm = ((GloryView.RFID.MainForm)(target)); return; case 2: this.perentGrid = ((System.Windows.Controls.Grid)(target)); return; case 3: this.home = ((GloryView.RFID.Controls.DazzleTabItem)(target)); return; case 4: this.login = ((System.Windows.Controls.Grid)(target)); return; case 5: this.exit = ((System.Windows.Controls.TextBlock)(target)); return; case 6: this.Details = ((System.Windows.Documents.Hyperlink)(target)); #line 223 "..\..\..\MainForm.xaml" this.Details.Click += new System.Windows.RoutedEventHandler(this.exitSystem); #line default #line hidden return; case 7: this.grid1 = ((System.Windows.Controls.Grid)(target)); return; case 8: this.wellcome = ((System.Windows.Controls.Label)(target)); return; case 9: this.label2 = ((System.Windows.Controls.Label)(target)); return; case 10: this.loginTime = ((System.Windows.Controls.Label)(target)); return; case 11: this.textBlock3 = ((System.Windows.Controls.TextBlock)(target)); return; case 12: #line 234 "..\..\..\MainForm.xaml" ((System.Windows.Documents.Hyperlink)(target)).Click += new System.Windows.RoutedEventHandler(this.Change_Password); #line default #line hidden return; case 13: this.User_Manager = ((GloryView.RFID.Controls.DazzleTabItem)(target)); return; case 14: this.showGrid = ((System.Windows.Controls.Grid)(target)); return; case 15: this.gridList = ((System.Windows.Controls.Grid)(target)); return; case 16: this.menu1 = ((System.Windows.Controls.Menu)(target)); return; case 17: this.users = ((System.Windows.Controls.MenuItem)(target)); #line 271 "..\..\..\MainForm.xaml" this.users.Click += new System.Windows.RoutedEventHandler(this.userManager); #line default #line hidden return; case 18: this.border1 = ((System.Windows.Controls.Border)(target)); return; case 19: this.border2 = ((System.Windows.Controls.Border)(target)); return; case 20: this.equipmentInfo = ((GloryView.RFID.Controls.DazzleTabItem)(target)); return; case 21: this.roomGrid = ((System.Windows.Controls.Grid)(target)); return; case 22: #line 325 "..\..\..\MainForm.xaml" ((System.Windows.Controls.TreeView)(target)).SelectedItemChanged += new System.Windows.RoutedPropertyChangedEventHandler<object>(this.SelectRoom); #line default #line hidden return; case 23: this.rooms = ((System.Windows.Controls.TreeViewItem)(target)); return; case 24: this.RoomScene = ((GloryView.RFID.Controls.DazzleTabItem)(target)); return; case 25: this.roomgrid = ((System.Windows.Controls.Grid)(target)); return; case 26: this.System_Manager = ((GloryView.RFID.Controls.DazzleTabItem)(target)); return; case 27: this.listBox4 = ((System.Windows.Controls.ListBox)(target)); return; case 28: this.treeView11 = ((System.Windows.Controls.TreeView)(target)); #line 413 "..\..\..\MainForm.xaml" this.treeView11.SelectedItemChanged += new System.Windows.RoutedPropertyChangedEventHandler<object>(this.System_set); #line default #line hidden return; case 29: this.systemGrid = ((System.Windows.Controls.Grid)(target)); return; case 30: this.Equipment_Manager = ((GloryView.RFID.Controls.DazzleTabItem)(target)); return; case 31: this.moveGrid = ((System.Windows.Controls.Grid)(target)); return; case 32: #line 452 "..\..\..\MainForm.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.Device_Incoming); #line default #line hidden return; case 33: #line 453 "..\..\..\MainForm.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.Device_Out); #line default #line hidden return; case 34: #line 454 "..\..\..\MainForm.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.Device_Move); #line default #line hidden return; case 35: #line 455 "..\..\..\MainForm.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.Device_Repair); #line default #line hidden return; case 36: #line 456 "..\..\..\MainForm.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.Device_Mains); #line default #line hidden return; case 37: this.EquipmentAram = ((GloryView.RFID.Controls.DazzleTabItem)(target)); return; case 38: this.listBox6 = ((System.Windows.Controls.ListBox)(target)); return; case 39: #line 483 "..\..\..\MainForm.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.Arning); #line default #line hidden return; case 40: #line 484 "..\..\..\MainForm.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.Alarm_History); #line default #line hidden return; case 41: this.saveDevice = ((System.Windows.Controls.Grid)(target)); return; case 42: this.saomiao = ((GloryView.RFID.Controls.DazzleTabItem)(target)); return; case 43: this.label5 = ((System.Windows.Controls.Label)(target)); return; case 44: this.button1 = ((System.Windows.Controls.Button)(target)); return; case 45: this.button2 = ((System.Windows.Controls.Button)(target)); return; case 46: this.button3 = ((System.Windows.Controls.Button)(target)); return; case 47: this.label6 = ((System.Windows.Controls.Label)(target)); return; case 48: this.textBlock1 = ((System.Windows.Controls.TextBlock)(target)); return; case 49: this.label7 = ((System.Windows.Controls.Label)(target)); return; case 50: this.textBlock2 = ((System.Windows.Controls.TextBlock)(target)); return; case 51: this.label8 = ((System.Windows.Controls.Label)(target)); return; case 52: this.comboBox1 = ((System.Windows.Controls.ComboBox)(target)); return; case 53: this.move = ((System.Windows.Controls.Label)(target)); return; } this._contentLoaded = true; }
private void submit_Click(object sender, RoutedEventArgs e) { //MysqlDataDao login = new MysqlDataDaoImpl(); string account = this.account.Text; string password = this.password.Password; if (account == null || "".Equals(account)) { MessageBox.Show("请输入用户帐号!"); return; } if (password == null || "".Equals(password)) { MessageBox.Show("请输入密码!"); return; } Users user=new Users(); int state = user.userLogin(account,password); if (state==BaseRequest.SUCCESS) { MainForm mf = new MainForm(); mf.wellcome.Content = Session.UserAccount+" 欢迎您..."; mf.loginTime.Content = Session.LoginTime; mf.Show(); this.Close(); } else if (state == BaseRequest.SYSTEM_EXCEPTION) { MessageBox.Show("系统异常,请联系管理员!"); } else { MessageBox.Show("用户名或密码不正确,请确认!"); this.account.Text = null; this.password.Password = null; } }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.mainForm = ((GloryView.RFID.MainForm)(target)); return; case 2: this.perentGrid = ((System.Windows.Controls.Grid)(target)); return; case 3: this.home = ((GloryView.RFID.Controls.DazzleTabItem)(target)); return; case 4: this.login = ((System.Windows.Controls.Grid)(target)); return; case 5: this.exit = ((System.Windows.Controls.TextBlock)(target)); return; case 6: this.Details = ((System.Windows.Documents.Hyperlink)(target)); #line 223 "..\..\..\MainForm.xaml" this.Details.Click += new System.Windows.RoutedEventHandler(this.exitSystem); #line default #line hidden return; case 7: this.grid1 = ((System.Windows.Controls.Grid)(target)); return; case 8: this.wellcome = ((System.Windows.Controls.Label)(target)); return; case 9: this.label2 = ((System.Windows.Controls.Label)(target)); return; case 10: this.loginTime = ((System.Windows.Controls.Label)(target)); return; case 11: this.textBlock3 = ((System.Windows.Controls.TextBlock)(target)); return; case 12: #line 234 "..\..\..\MainForm.xaml" ((System.Windows.Documents.Hyperlink)(target)).Click += new System.Windows.RoutedEventHandler(this.Change_Password); #line default #line hidden return; case 13: this.User_Manager = ((GloryView.RFID.Controls.DazzleTabItem)(target)); return; case 14: this.showGrid = ((System.Windows.Controls.Grid)(target)); return; case 15: this.gridList = ((System.Windows.Controls.Grid)(target)); return; case 16: this.menu1 = ((System.Windows.Controls.Menu)(target)); return; case 17: this.users = ((System.Windows.Controls.MenuItem)(target)); #line 271 "..\..\..\MainForm.xaml" this.users.Click += new System.Windows.RoutedEventHandler(this.userManager); #line default #line hidden return; case 18: this.border1 = ((System.Windows.Controls.Border)(target)); return; case 19: this.border2 = ((System.Windows.Controls.Border)(target)); return; case 20: this.equipmentInfo = ((GloryView.RFID.Controls.DazzleTabItem)(target)); return; case 21: this.roomGrid = ((System.Windows.Controls.Grid)(target)); return; case 22: #line 325 "..\..\..\MainForm.xaml" ((System.Windows.Controls.TreeView)(target)).SelectedItemChanged += new System.Windows.RoutedPropertyChangedEventHandler <object>(this.SelectRoom); #line default #line hidden return; case 23: this.rooms = ((System.Windows.Controls.TreeViewItem)(target)); return; case 24: this.RoomScene = ((GloryView.RFID.Controls.DazzleTabItem)(target)); return; case 25: this.roomgrid = ((System.Windows.Controls.Grid)(target)); return; case 26: this.System_Manager = ((GloryView.RFID.Controls.DazzleTabItem)(target)); return; case 27: this.listBox4 = ((System.Windows.Controls.ListBox)(target)); return; case 28: this.treeView11 = ((System.Windows.Controls.TreeView)(target)); #line 413 "..\..\..\MainForm.xaml" this.treeView11.SelectedItemChanged += new System.Windows.RoutedPropertyChangedEventHandler <object>(this.System_set); #line default #line hidden return; case 29: this.systemGrid = ((System.Windows.Controls.Grid)(target)); return; case 30: this.Equipment_Manager = ((GloryView.RFID.Controls.DazzleTabItem)(target)); return; case 31: this.moveGrid = ((System.Windows.Controls.Grid)(target)); return; case 32: #line 452 "..\..\..\MainForm.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.Device_Incoming); #line default #line hidden return; case 33: #line 453 "..\..\..\MainForm.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.Device_Out); #line default #line hidden return; case 34: #line 454 "..\..\..\MainForm.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.Device_Move); #line default #line hidden return; case 35: #line 455 "..\..\..\MainForm.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.Device_Repair); #line default #line hidden return; case 36: #line 456 "..\..\..\MainForm.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.Device_Mains); #line default #line hidden return; case 37: this.EquipmentAram = ((GloryView.RFID.Controls.DazzleTabItem)(target)); return; case 38: this.listBox6 = ((System.Windows.Controls.ListBox)(target)); return; case 39: #line 483 "..\..\..\MainForm.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.Arning); #line default #line hidden return; case 40: #line 484 "..\..\..\MainForm.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.Alarm_History); #line default #line hidden return; case 41: this.saveDevice = ((System.Windows.Controls.Grid)(target)); return; case 42: this.saomiao = ((GloryView.RFID.Controls.DazzleTabItem)(target)); return; case 43: this.label5 = ((System.Windows.Controls.Label)(target)); return; case 44: this.button1 = ((System.Windows.Controls.Button)(target)); return; case 45: this.button2 = ((System.Windows.Controls.Button)(target)); return; case 46: this.button3 = ((System.Windows.Controls.Button)(target)); return; case 47: this.label6 = ((System.Windows.Controls.Label)(target)); return; case 48: this.textBlock1 = ((System.Windows.Controls.TextBlock)(target)); return; case 49: this.label7 = ((System.Windows.Controls.Label)(target)); return; case 50: this.textBlock2 = ((System.Windows.Controls.TextBlock)(target)); return; case 51: this.label8 = ((System.Windows.Controls.Label)(target)); return; case 52: this.comboBox1 = ((System.Windows.Controls.ComboBox)(target)); return; case 53: this.move = ((System.Windows.Controls.Label)(target)); return; } this._contentLoaded = true; }