Example #1
0
 public void openDeleteDialog()
 {
     if (SelectedKontakt != null)
     {
         DeleteDialog deleteDialog = new DeleteDialog(SelectedKontakt.DisplayName);
         if (deleteDialog.ShowDialog() == true)
         {
             Kontakte.Remove(Kontakte.SingleOrDefault(i => i.DisplayName == SelectedKontakt.DisplayName));
         }
     }
     else
     {
         MessageBox.Show("Wählen sie einen Kontakt aus");
     }
 }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.DeleteDialogUi = ((Kontaktverwaltung.DeleteDialog)(target));
                return;

            case 2:
                this.tbdelKontakt = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 3:

            #line 16 "..\..\..\DeleteDialog.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.DeleteOKButton_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }