private void AddNewContact_Load(object sender, EventArgs e) { if (isEdit) { NametextBox.Text = instan.getName(); EmailtextBox.Text = instan.getEmail(); } }
private void EmailDetilsVievwer() { if (MessagesListBoc.SelectedIndex >= 0) { int index = MessagesListBoc.SelectedIndex; ContactManagerrr a = messages[index]; EmailSending email = new EmailSending(a.getName(), a.getEmail(), a.getSubject(), a.getMessage()); email.ShowDialog(); } }
private void sendEmailToolStripMenuItem_Click(object sender, EventArgs e) { if (ListBox.SelectedIndex >= 0) { int ag = ListBox.SelectedIndex; ContactManagerrr m = instances[ag]; EmailSending emailsending = new EmailSending(m.getName(), m.getEmail()); emailsending.ShowDialog(); ReloadMessaging(); ReloadRoster(); } }
private void deleteToolStripMenuItem_Click(object sender, EventArgs e) { if (ListBox.SelectedIndex >= 0) { int IndexofSelected = ListBox.SelectedIndex; ContactManagerrr c = instances[IndexofSelected]; if (MessageBox.Show("Are you Sure to want to delete " + c.getName(), "Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.Yes) { instances.RemoveAt(IndexofSelected); ReloadRoster(); } } }