private void RaiseWriteNewMessagePopupRequest() { Account sendingAccount; if (this.selectedAccount == null) { if (AccountManager.Instance.Accounts.Count > 0) { sendingAccount = AccountManager.Instance.Accounts[0]; } else { // We should not get here because we should only allow sending a message // when there exists at least one user account to be used as the sender address. sendingAccount = null; } } else { sendingAccount = this.selectedAccount; } WriteNewMessageNotification notification = new WriteNewMessageNotification(sendingAccount); notification.Title = "New Message"; WriteNewMessagePopupRequest.Raise(notification); }
private void RaiseForwardMessagePopupRequest() { Account sendingAccount; sendingAccount = AccountManager.Instance.GetAccountByName(Message.AccountName); if (sendingAccount == null) { MessageBoxResult error = MessageBox.Show("No user account selected for sender"); return; } WriteNewMessageNotification notification = new WriteNewMessageNotification(sendingAccount, Subject, TextBody, ProcessedHtmlBody, savedAttachments, savedCidContents); notification.Title = "FW: " + Subject; WriteNewMessagePopupRequest.Raise(notification); }