Пример #1
0
 private void lv_Contacts_DoubleClick(object sender, EventArgs e)
 {
     if (lv_Contacts.FocusedItem != null)
     {
         f_AddContacts fa = new f_AddContacts();
         fa.edit = true;
         fa.conn = bday.getConnectionById(Convert.ToInt32(lv_Contacts.FocusedItem.Tag.ToString()));
         fa.ShowDialog();
         if (fa.ok)
         {
             bday.setConnectionById(fa.conn.id, fa.conn);
         }
         fillContacts();
     }
 }
Пример #2
0
        private void button3_Click(object sender, EventArgs e)
        {
            f_AddContacts fa = new f_AddContacts();

            fa.bday = bday;
            fa.ShowDialog();

            if (fa.ok)
            {
                fa.conn.orderer = bday.connections.Count;
                bday.connections.Add(fa.conn);
            }

            fillContacts();
        }