예제 #1
0
파일: Form1.cs 프로젝트: herbalrp/TSST-NCC
        public void dodaj_wezel(Wezel wezel)
        {
            Console.WriteLine("JESTEM");
            try {
                dataGridView1.Invoke(new Action(delegate ()
                {
                    dataGridView1.Rows.Add(wezel.getID(), wezel.getstan());
                }));


                comboBox1.Invoke(new Action(delegate ()
                {
                    comboBox1.Items.Add(wezel.getID());
                }));
            }
            catch(Exception)
            {

            }
            
        }
예제 #2
0
파일: Form1.cs 프로젝트: herbalrp/TSST-NCC
        public void zmien_stan_operacyjny(Wezel wezel)
        {
            try
            {


                dataGridView1.Invoke(new Action(delegate ()
                {

                    foreach (DataGridViewRow a in dataGridView1.Rows)
                    {
                        if (a.Cells[0].Value.Equals(wezel.getID()))
                        {

                            a.Cells[1].Value = wezel.getstan();

                            break;
                        }
                    }


                }));
            } catch(Exception)
            {
                Console.WriteLine("BŁĄD KRYTYCZNY");
            }
           
        }