コード例 #1
0
 public DrawingEngine(UdpCommunicator c, Form1.Connectivity connectivity)
 {
     this.selected      = null;
     this.offlineShapes = new List <Shape>();
     this.com           = c;
     this.mode          = connectivity;
 }
コード例 #2
0
 // Draws either the offline or online shapes
 public void Draw(Graphics g, Form1.Connectivity connectivity)
 {
     if (this.mode == Form1.Connectivity.Offline)
     {
         for (int i = 0; i < this.offlineShapes.Count; i++)
         {
             this.offlineShapes[i].Draw(g);
         }
     }
     else
     {
         this.DrawOnline(g);
     }
 }
コード例 #3
0
 // Changes the connectivity
 public void EditConnectivity(Form1.Connectivity c)
 {
     this.mode = c;
 }