protected override void btnRefresh_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(tbName.Text) == false) { m_Acc = new SMSAccount(tbName.Text); tbAddress.Text = m_Acc.GenerateKey(); } else { MessageBox.Show("Name is empty", Text, MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
private void button2_Click(object sender, RoutedEventArgs e) { mke = new SMSAccount("ALICE"); mke.AddressBook = addressbook; string err = mke.LoadKey(null); if (string.IsNullOrEmpty(err) == false) { mke.GenerateKey(); err = mke.SaveKey(null); } if (string.IsNullOrEmpty(err) == false) { MessageBox.Show(err); } client = new SMSNet(mke); client.Connect("127.0.0.1", 5555); }