private void Button_Click(object sender, RoutedEventArgs e) { if (CurrentData.curMail == null) { Utility.MsgBox("Вам стоит выбрать почтовый ящик!", "Уведомление", this); return; } WriteLetterWindow wlw = new WriteLetterWindow(); if (wlw.ShowDialog().Value) { startSynchronization(); } this.Focus(); }
private void btn_reply_Click(object sender, RoutedEventArgs e) { if (listOfLetters.SelectedItem == null) { Utility.MsgBox("Вам стоит выбрать письмо, что бы ответить на него!", "Уведомление", this); return; } CurrentData.curLetter = (listOfLetters.SelectedItem as HelpMimeMessage).Msg; if (CurrentData.curLetter == null) { Utility.MsgBox("Что-то пошло не так, письмо всёравно не выбранно!", "Уведомление", this); return; } WriteLetterWindow wlw = new WriteLetterWindow(null, true); if (wlw.ShowDialog().Value) { startSynchronization(); } this.Focus(); }
private void btn_sendKey_Click(object sender, RoutedEventArgs e) { if (CurrentData.curMail != null) { CryptoKey key = lb_keys.SelectedItem as CryptoKey; if (key != null) { WriteLetterWindow wlw = new WriteLetterWindow(key.GetPublicCryptoKey()); wlw.ShowDialog(); } else { Utility.MsgBox("Выберите ключ для отправки!", "Ошибка", this); } } else { Utility.MsgBox("Для отправки открытого ключа, вернитесь на главный экран и выберите почтовый ящик", "Ошибка", this); } }