public DrawingEngine(UdpCommunicator c, Form1.Connectivity connectivity) { this.selected = null; this.offlineShapes = new List <Shape>(); this.com = c; this.mode = connectivity; }
// 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); } }
// Changes the connectivity public void EditConnectivity(Form1.Connectivity c) { this.mode = c; }