Пример #1
0
 public AddNewContact(ContactManagerrr c, int index)
 {
     this.indextoedit = index;
     this.instan      = c;
     isEdit           = true;
     InitializeComponent();
 }
Пример #2
0
 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();
     }
 }
Пример #3
0
        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();
            }
        }
Пример #4
0
        private void ListBox_DoubleClick(object sender, EventArgs e)
        {
            if (ListBox.SelectedIndex >= 0)
            {
                int ag                = ListBox.SelectedIndex;
                ContactManagerrr c    = instances[ag];
                AddNewContact    ance = new AddNewContact(c, ag);

                ance.isEdit = true;
                ance.ShowDialog();

                ReloadRoster();
            }
        }
Пример #5
0
        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();
                }
            }
        }
Пример #6
0
        private void SaveButton_Click(object sender, EventArgs e)
        {
            if (isValidated())
            {
                ContactManagerrr cm = new ContactManagerrr();

                cm.setName(NametextBox.Text.Trim());
                cm.setEmail(EmailtextBox.Text.Trim());
                cm.setSubject(SubjecttextBox.Text.Trim());
                cm.SetMessage(MessagetextBox.Text.Trim());

                ContactManagerUi.messages.Add(cm);
                MessageBox.Show("Email Sent", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information);
                ResetForm();
                this.Close();
            }
        }
Пример #7
0
        private void Savebutton_Click(object sender, EventArgs e)
        {
            if (isValidated())
            {
                ContactManagerrr cm = new ContactManagerrr();

                cm.setName(NametextBox.Text.Trim());
                cm.setEmail(EmailtextBox.Text.Trim());
                if (!isEdit)
                {
                    ContactManagerUi.instances.Add(cm);
                    MessageBox.Show("All Data Saved", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                if (isEdit)
                {
                    ContactManagerUi.instances[indextoedit] = cm;
                }
                ResetForm();
                this.Close();
            }
        }