Beispiel #1
0
 //Draw van
 public void DrawVan(int id)
 {
     try
     {
         Database myDatabase = new Database();
         Bitmap icon_on;
         Bitmap icon_off;
         int pixel_x = Convert.ToInt32(myDatabase.getValPixel_x(id));
         int pixel_y = Convert.ToInt32(myDatabase.getValPixel_y(id));
         icon_on = new Bitmap(path_icon_val_on);
         icon_off = new Bitmap(path_icon_val_off);
         string status = myDatabase.getStateVal(id);
         if (status == "on")
         {
             gr.DrawImage(icon_on, pixel_x, pixel_y);
         }
         else
         {
             gr.DrawImage(icon_off, pixel_x, pixel_y);
         }
         gr.DrawString("V" + id, draw_font, draw_brush, pixel_x, pixel_y);
     }
     catch
     { }
 }