public void SendSMS(string address, string text) { if (ApplicationSettings.Instance.Active) { Boolean bPresentDlg = true; if (address != null && text != null) { if (address.Length != 0 && text.Length != 0) { SMSCmd cmd = new SMSCmd(); cmd.Address = address; cmd.Text = text; sendCommand(cmd); bPresentDlg = false; } } if (bPresentDlg) { SMSDlg dlg = new SMSDlg(); dlg.setAddress(address); dlg.setText(text); dlg.Show(); } } else { BuyDlg dlg = new BuyDlg(); dlg.ShowDialog(); //MessageBox.Show("Upgrade to Blurts Pro to enable this feature.", "Blurts - by MLH Software"); } }
private void SMSDlg_FormClosing(object sender, FormClosingEventArgs e) { SMSDlg.RemoveSMSDialog(m_ident); //FIX m_form.SMSMessageEvent -= new SMSMessageEventHandler(SMSMessageArrived); //FIX m_form.DisconnectEvent -= new DisconnectEventHandler(DisconnectEventFired); }
private void SMSDlg_Load(object sender, EventArgs e) { if (m_address.Length == 0) { if (selectContact() == false) { Close(); return; } } else { m_contactName = Contacts.Instance.getContactName(m_ident); } if (!SMSDlg.AddSMSDialog(m_ident, this)) { m_ident = ""; // dialog with this number already esists so close this dialog Close(); return; } try { m_smsXmlDoc = new XmlDocument(); if (File.Exists(m_xmlFilepath)) { m_smsXmlDoc.Load(m_xmlFilepath); } else { m_smsXmlDoc.LoadXml("<BlurtsData><Messages/></BlurtsData>"); m_smsXmlDoc.Save(m_xmlFilepath); } //FIX m_form.SMSMessageEvent += new SMSMessageEventHandler(SMSMessageArrived); //FIX m_form.DisconnectEvent += new DisconnectEventHandler(DisconnectEventFired); } catch (Exception) { } webBrowser.AllowWebBrowserDrop = false; webBrowser.IsWebBrowserContextMenuEnabled = false; webBrowser.WebBrowserShortcutsEnabled = true; webBrowser.ScriptErrorsSuppressed = true; // Add an event handler that prints the document after it loads. //webBrowser.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(DocumentComlpete); webBrowser.ObjectForScripting = this; addressTxtBox.Text = m_address; msgTxtBox.Text = m_text; UpdateState(); Display(); }
static public Boolean AddSMSDialog(string number, SMSDlg dlg) { Boolean retVal = false; if (m_SMSDailogs.ContainsKey(number)) { SMSDlg smsDlg = m_SMSDailogs[number]; smsDlg.BringToFront(); } else { m_SMSDailogs.Add(number, dlg); retVal = true; } return(retVal); }