Exemple #1
0
        private void edytujToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (contactList.SelectedItems.Count == 1)
            {
                Contact contact = _communicator.contacts.getList()[contactList.SelectedItems[0].Index];

                EditContact dialog = new EditContact(contact.name, contact.login);
                dialog.ShowDialog();

                refreschContacts();
                _communicator.contacts.saveToFile(_communicator.contactFile);
            }
            else if (contactList.SelectedItems.Count > 1)
            {
                MessageBox.Show("Wybierz tylko jeden kontakt, aby zmienić dane.");
            }            
        }
Exemple #2
0
        private void addContactStripMenuItem_Click(object sender, EventArgs e)
        {
            EditContact dialog = new EditContact();            
            dialog.ShowDialog();

            refreschContacts();
            _communicator.contacts.saveToFile(_communicator.contactFile);
        }