private void newMessageSend_Click(object sender, EventArgs e) { try { ProgressShow("Opening Phone..."); using (PhoneClient phoneClient = new PhoneClient(serialPortList.Text)) { ProgressShow("Sending message..."); try { phoneClient.Send(new SmsSubmitMessage(new Address(newMessageTo.Text, TypeOfAddress.International, NumberingPlan.ISDNOrPhone), newMessageText.Text)); ProgressShow("Message Sent!"); } catch (Exception ex) { ProgressShow("Failed to list messages: " + ex.ToString()); } } } catch (Exception ex) { ProgressShow("Failed to open phone: " + ex.Message); } }