private void buttonAmericano_Copy_Click(object sender, RoutedEventArgs e) { if (noOrder.IsChecked == true) { MessageBox.Show("Silahkan pilih order terlebih dahulu!"); } else { newCustomer.makeInvoice(newInvoice); Console.WriteLine(newCustomer.getInvoice().getOrderedItems().Contains(app.getDrinkByName("Cappucino"))); //seharusnya bernilai true Console.WriteLine(newCustomer.getInvoice().getOrderedItems().Contains(app.getDrinkByName("Americano"))); //seharusnya bernilai true Console.WriteLine(newCustomer.getInvoice().getOrderedItems().Contains(app.getDrinkByName("Chocolate"))); //seharusnya bernilai true Console.WriteLine(newCustomer.getInvoice().getOrderedItems().Contains(app.getDrinkByName("Coffe Late"))); //seharusnya bernilai false Console.WriteLine(newCustomer.getInvoice().getOrderedItems().Contains(app.getDrinkByName("Thai Tea"))); //seharusnya bernilai false Console.WriteLine(newCustomer.getInvoice().getOrderedItems().Contains(app.getDrinkByName("Ice Tea"))); //seharusnya bernilai false Console.WriteLine(newCustomer.getInvoice().getOrderedItems().Contains(app.getDrinkByName("Cappucino"))); //seharusnya bernilai true Console.WriteLine(newCustomer.getInvoice().getOrderedItems().Contains(app.getDrinkByName("Americano"))); //seharusnya bernilai true Console.WriteLine(newCustomer.getInvoice().getOrderedItems().Contains(app.getDrinkByName("Chocolate"))); //seharusnya bernilai true Console.WriteLine(newCustomer.getInvoice().getOrderedItems().Contains(app.getDrinkByName("Coffe Late"))); //seharusnya bernilai true Console.WriteLine(newCustomer.getInvoice().getOrderedItems().Contains(app.getDrinkByName("Thai Tea"))); //seharusnya bernilai true Console.WriteLine(newCustomer.getInvoice().getOrderedItems().Contains(app.getDrinkByName("Ice Tea"))); //seharusnya bernilai true ConfirmationView nextWindow = new ConfirmationView(); nextWindow.Show(); this.Close(); } }
public RemindersPage() { InitializeComponent(); BindingContext = ViewModel = new RemindersViewModel(CreateReminder, RequestDeleteReminder, ConfirmDeleteReminder); Titlebar.IsVisible = true; _confirmationView = new ConfirmationView() { BodyText = AppResource.AreYouSureWantToDeleteReminder, BodyTextStyle = (Style)Application.Current.Resources["Instructions_Label"], BodyTextColor = (Color)Application.Current.Resources["LightBlue"], DestructiveText = AppResource.NoKeepUpper, DestructiveImage = ImageSource.FromFile("icon_close"), DestructiveImagePressed = ImageSource.FromFile("icon_close"), PositiveText = AppResource.YesDeleteUpper, PositiveImage = ImageSource.FromFile("icon_checkmark_light_pink"), PositiveImagePressed = ImageSource.FromFile("icon_checkmark_light_pink") }; _confirmationView.BindingContext = ViewModel; _confirmationView.SetBinding(IsVisibleProperty, new Binding("ShowDeletePopup")); _confirmationView.SetBinding(ConfirmationView.DestructiveCommandProperty, new Binding("RejectDeletionCommand")); _confirmationView.SetBinding(ConfirmationView.PositiveCommandProperty, new Binding("ConfirmDeletionCommand")); }
/// <summary> /// Checks if user is logged in. /// </summary> /// <returns></returns> private Boolean Is_Users_Loggedin() { ConfirmationView confirmation = new ConfirmationView(); confirmation.ShowDialog(); Boolean result = confirmation.result; confirmation.Close(); return(result); }
public bool ShowConfirmMessage(string title, string message) { var viewModel = _container.Resolve <ConfirmMessageViewModel>(); viewModel.Title = title; viewModel.Message = message; ConfirmationView view = _container.Resolve <ConfirmationView>(); view.DataContext = viewModel; view.ShowDialog(); return(viewModel.IsConfirmed); }
private bool CheckIfUserWantsToCancelEmail(object item) { try { IConfirmationView view = new ConfirmationView(); var presenter = new ConfirmationPresenter(); return(!presenter.SenderWantsToCancel(view, (MailItem)item)); } catch (Exception ex) { MessageBox.Show(ex.StackTrace, ex.Message, MessageBoxButtons.OK, MessageBoxIcon.Error); return(true); } }
internal void Close(HexFileViewModel fileToClose) { if (fileToClose.IsDirty) { ConfirmationSaveViewModel vm = new ConfirmationSaveViewModel(fileToClose.FileName); ConfirmationView v = new ConfirmationView(vm); v.Owner = Application.Current.MainWindow; if ((bool)v.ShowDialog()) { Save(fileToClose); } } _files.Remove(fileToClose); GC.Collect(); RaiseCanExecuteChanged(); }
/// <summary> /// Shows confirmation dialog /// </summary> /// <returns></returns> public bool?ShowConfirmationDialog(string title, string body, string accept = "Yes", string reject = "No", string cancel = "Cancel") { ModalDialog modalDialog = new ModalDialog(); if (_parentWindow != null) { modalDialog.Owner = _parentWindow; } ConfirmationView confirmationView = new ConfirmationView(); ConfirmationViewModel viewModel = new ConfirmationViewModel(body, accept, reject, cancel); confirmationView.DataContext = viewModel; modalDialog.WindowTitle = title; modalDialog.Body = confirmationView; modalDialog.Confirmation = viewModel; return(ShowDialog(modalDialog)); }
public void ShowTheForm() { var confirmationDialog = new ConfirmationView(); confirmationDialog.AccountName = "This is the Account Name"; confirmationDialog.To = new List <string> { "Homer", "Bart" }; confirmationDialog.CC = new List <string> { "Maggie", "Lisa" }; confirmationDialog.BCC = new List <string> { "Marge1", "Marge2", "Marge3", "Marge4", "Marge5", "Marge6", "Marge7", "Marge8", "Marge9" }; confirmationDialog.Subject = "This is the subject"; confirmationDialog.Sender = "*****@*****.**"; confirmationDialog.NumberOfAttachments = 5; DialogResult result = confirmationDialog.ShowDialog(); }