private void btnAdd_Click(object sender, RoutedEventArgs e) { PhonebookViewModel Phonebook = new PhonebookViewModel(); Phonebook.Identifier = Guid.NewGuid(); Phonebook_AddEdit addEditForm = new Phonebook_AddEdit(Phonebook, true, false); addEditForm.PhonebookCreatedUpdated += new PhonebookHandler(SyncData); FlyoutHelper.OpenFlyout(this, ((string)Application.Current.FindResource("Telefonski_imenik")), 95, addEditForm); }
private void btnEdit_Click(object sender, RoutedEventArgs e) { if (CurrentPhonebook == null) { MainWindow.WarningMessage = ((string)Application.Current.FindResource("Nije_moguće_menjati_ulayne_faktureUzvičnik")); return; } Phonebook_AddEdit PhonebookAddEditForm = new Phonebook_AddEdit(CurrentPhonebook, false); PhonebookAddEditForm.PhonebookCreatedUpdated += new PhonebookHandler(SyncData); FlyoutHelper.OpenFlyout(this, ((string)Application.Current.FindResource("Telefonski_imenik")), 95, PhonebookAddEditForm); }