private void sMail_MailSubmitted(object sender, SendMail.SendMailSubmittedEventArgs e) { if (e.gold != 0 && e.silver != 0 && e.copper != 0) { int totalmoney = (Convert.ToInt32(e.copper) % 100) + (Convert.ToInt32(e.silver) * 100) + (e.gold * 10000); SendToServer(String.Format("{0} {1} \"{2}\" \"{3}\" {4}", Constants.SendMoney, e.userName, e.subject, e.message, totalmoney)); } else { SendToServer(String.Format("{0} {1} \"{2}\" \"{3}\"", Constants.SendMail, e.userName, e.subject, e.message)); } if (e.itemEntryID != 0) { SendToServer(String.Format("{0} {1} \"{2}\" \"{3}\" {4}:1", Constants.SendItem, e.userName, e.subject, e.message, e.itemEntryID)); } TaskDialog.Show(new TaskDialogInfo("Success", eTaskDialogIcon.Information2, "Mail Sent!", String.Format("You have sent mail to: {0}", e.userName), eTaskDialogButton.Ok)); }
private void sendMailButton_Click(object sender, EventArgs e) { SendMail sendMail = new SendMail(); sendMail.ShowDialog(); }
private void sendMailButtonItem_Click(object sender, EventArgs e) { using (var sMail = new SendMail()) { sMail.MailSubmitted += sMail_MailSubmitted; sMail.ShowDialog(); } }