private void Button_Click_Comment(object sender, RoutedEventArgs e) { if (vm.SelectedArticle != null) { AddCommentDialogWindow myDialog = new AddCommentDialogWindow(); ArticleButton.IsEnabled = false; myDialog.vm.SelectedArticle = this.vm.SelectedArticle; myDialog.mainVM = this.vm; myDialog.mainWindowCommentButton = ArticleButton; myDialog.ShowDialog(); } else { MessageBox.Show("Wybierz artykuł"); } }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.ThisWindowC = ((WpfApp1.AddCommentDialogWindow)(target)); return; case 2: this.Anuluj = ((System.Windows.Controls.Button)(target)); #line 21 "..\..\AddCommentDialogWindow.xaml" this.Anuluj.Click += new System.Windows.RoutedEventHandler(this.Button_Click_Anuluj); #line default #line hidden return; case 3: this.Dodaj = ((System.Windows.Controls.Button)(target)); return; } this._contentLoaded = true; }