void OnSend(object sender, RoutedEventArgs e)
{
if (FormMain.I.EnsurePassphraseUnlock()) {
var prevCursor = Cursor;
Cursor = Cursors.Wait;
string address = textAddress.Text,
comment = textComment.Text;
try {
Wallet.AddRecipient(address, comment);
} catch (Exception) {
}
try {
var prov = new NumberFormatInfo();
prov.NumberDecimalSeparator = ".";
decimal amount = Convert.ToDecimal(textAmount.Text.Replace(',', '.'), prov);
Wallet.SendTo(amount, address, comment);
} finally {
Cursor = prevCursor;
}
textAmount.Text = "";
textAddress.Text = "";
textComment.Text = "";
MessageBox.Show("The coins were sent successfully");
}
if (Send != null)
Send(this, null);
}