void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.Window = ((Restaurant.TablesWindow)(target)); #line 12 "..\..\TablesWindow.xaml" this.Window.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Window_MouseLeftButtonDown); #line default #line hidden return; case 2: #line 37 "..\..\TablesWindow.xaml" ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.CloseCommand_Executed); #line default #line hidden return; case 3: this.ContentGrid = ((System.Windows.Controls.Grid)(target)); return; case 4: this.btnNewTable = ((System.Windows.Controls.Button)(target)); #line 48 "..\..\TablesWindow.xaml" this.btnNewTable.Click += new System.Windows.RoutedEventHandler(this.btnNewTable_Click); #line default #line hidden return; case 5: this.btnEdit = ((System.Windows.Controls.Button)(target)); #line 50 "..\..\TablesWindow.xaml" this.btnEdit.Click += new System.Windows.RoutedEventHandler(this.btnEdit_Click); #line default #line hidden return; case 6: this.btnDelete = ((System.Windows.Controls.Button)(target)); #line 51 "..\..\TablesWindow.xaml" this.btnDelete.Click += new System.Windows.RoutedEventHandler(this.btnDelete_Click); #line default #line hidden return; case 7: this.txbBorderTitle = ((System.Windows.Controls.TextBlock)(target)); return; case 8: this.BorderAddEdit = ((System.Windows.Controls.Border)(target)); return; case 9: this.txbTableNo = ((System.Windows.Controls.TextBlock)(target)); return; case 10: this.txbCapacity = ((System.Windows.Controls.TextBlock)(target)); return; case 11: this.txbDescription = ((System.Windows.Controls.TextBlock)(target)); return; case 12: this.txtTableNo = ((System.Windows.Controls.TextBox)(target)); return; case 13: this.txtCapacity = ((System.Windows.Controls.TextBox)(target)); #line 73 "..\..\TablesWindow.xaml" this.txtCapacity.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.txtCapacity_TextChanged); #line default #line hidden return; case 14: this.PersonHead = ((System.Windows.Shapes.Path)(target)); return; case 15: this.PersonBody = ((System.Windows.Shapes.Path)(target)); return; case 16: this.txtDescription = ((System.Windows.Controls.TextBox)(target)); return; case 17: this.btnSave = ((System.Windows.Controls.Button)(target)); #line 82 "..\..\TablesWindow.xaml" this.btnSave.Click += new System.Windows.RoutedEventHandler(this.btnSave_Click); #line default #line hidden return; case 18: this.btnCancel = ((System.Windows.Controls.Button)(target)); #line 83 "..\..\TablesWindow.xaml" this.btnCancel.Click += new System.Windows.RoutedEventHandler(this.btnCancel_Click); #line default #line hidden return; case 19: this.TablesGridView = ((Restaurant.SortableListView)(target)); return; } this._contentLoaded = true; }
private void TablesMenuItem_Click(object sender, RoutedEventArgs e) { try { this.Cursor = Cursors.Wait; ((Storyboard)this.Resources["StoryboardFadeOut"]).Begin(this); TablesWindow objTablesWindow = new TablesWindow(); objTablesWindow.Owner = this; objTablesWindow.ShowDialog(); objTablesWindow = null; ((Storyboard)this.Resources["StoryboardFadeIn"]).Begin(this); this.Cursor = Cursors.Arrow; } catch { MessageBox.Show(ErrorMessages.Default.UnhandledException, "Error", MessageBoxButton.OK, MessageBoxImage.Error); } }