public string Prompt() { HostMailPassWindow PassDialog = new HostMailPassWindow(); PassDialog.ShowDialog(); return(PassDialog.psbHostMailPass.Password); }
private void btnOrderSendMail_Click(object sender, RoutedEventArgs e) { if (lsvSendMail.SelectedIndex < 0) { MessageBox.Show("נא לבחור יחידת אירוח", "שגיאה", MessageBoxButton.OK, MessageBoxImage.Error, MessageBoxResult.None, MessageBoxOptions.RtlReading); } else { order = listOrdersThatNotAddressed[lsvSendMail.SelectedIndex]; hostingUnit = bl.getHostingUnitByOrder(order); guestRequest = bl.getGuestReqByOrder(order); HostMailPassWindow passWin = new HostMailPassWindow(); pass = passWin.Prompt(); if (worker.IsBusy != true) { worker.RunWorkerAsync(); } } }