Example #1
0
        private void подробнееToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (listView1.SelectedItems.Count == 0)
            {
                return;
            }
            Nick nick = (Nick)listView1.SelectedItems[0].Tag;

            new Form6(nick).Show();
        }
Example #2
0
        private void удалитьToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (listView1.SelectedItems.Count == 0)
            {
                return;
            }
            Nick nick = (Nick)listView1.SelectedItems[0].Tag;

            dB.nicks.Remove(nick);
            dB.Save();
        }
Example #3
0
        private void редактироватьToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (listView1.SelectedItems.Count == 0)
            {
                return;
            }
            Nick  nick  = (Nick)listView1.SelectedItems[0].Tag;
            Form7 form7 = new Form7(nick, dB);

            form7.ShowDialog();
            dB.Save();
        }
Example #4
0
        private void button1_Click(object sender, EventArgs e)
        {
            Nick nick = new Nick();

            nick.categoriy   = (Categoriy)comboBox3.SelectedItem;
            nick.group       = (Group)comboBox4.SelectedItem;
            nick.Name        = textBox3.Text;
            nick.Fname       = textBox2.Text;
            nick.Oname       = textBox7.Text;
            nick.phone       = new Phone();
            nick.phone.phone = textBox4.Text;
            nick.Email       = textBox5.Text;
            nick.Adres       = textBox6.Text;
            nick.Notes       = textBox1.Text;
            dB.nicks.Add(nick);
            dB.Save();
            Close();
        }
Example #5
0
 public Form7(Nick nick, DB dB)
 {
     InitializeComponent();
     this.nick               = nick;
     this.dB                 = dB;
     comboBox1.DataSource    = dB.categoriys;
     comboBox1.DisplayMember = "Name";
     comboBox1.SelectedItem  = nick.categoriy;
     comboBox2.DataSource    = dB.groups;
     comboBox2.DisplayMember = "Name";
     comboBox2.SelectedItem  = nick.group;
     textBox3.Text           = nick.Name;
     textBox2.Text           = nick.Fname;
     textBox7.Text           = nick.Oname;
     textBox4.Text           = nick.phone.phone;
     textBox5.Text           = nick.Email;
     textBox6.Text           = nick.Adres;
     textBox1.Text           = nick.Notes;
 }
Example #6
0
File: Form6.cs Project: Scg69/-
 public Form6(Nick nick)
 {
     InitializeComponent();
     this.nick = nick;
     timer1.Start();
 }