Example #1
0
 private void connect_draw_stanZbiornik()
 {
     udp client = new udp();
     stanReturnZbiornik = client.udp_konfig(adres, port, byte_stanZbiornikSend);
     try
     {
         rysZbiornik rys2 = new rysZbiornik(pictureBox1.Width, pictureBox1.Height, Convert.ToInt32(stanReturnZbiornik));
         pictureBox1.Image = rys2.wypelnienie;
         pictureBox2.Image = rys2.wypelnienie;
         pictureBox3.Image = rys2.wypelnienie;
         stanLabel.Text = stanReturnZbiornik + " %";
         stanLabel.Visible = true;
         toolStripStatusLabel1.Text = "Połączono";
     }
     catch
     {
         //DateTime localDate = DateTime.Now;
         //listBox1.Items.Add(localDate.ToString("HH:mm")+ "\t" + stanReturn);
         //toolStripStatusLabel1.Text = stanReturnZbiornik;
         //stanLabel.Visible = false;
     }            
 }
Example #2
0
 private void inicjalizacja()
 {
     rysZbiornik rys = new rysZbiornik(pictureBox1.Width, pictureBox1.Height);
     pictureBox1.Image = rys.wypelnienie;
     pictureBox2.Image = rys.wypelnienie;
     pictureBox3.Image = rys.wypelnienie;
     rysPompa rys3 = new rysPompa(pictureBox4.Width, pictureBox4.Height);
     pictureBox4.Image = rys3.wypelnienie;
 }