public Form1() { InitializeComponent(); //List<Canvas> canvases = new List<Canvas>(); c = new Canvas(panel2.CreateGraphics()); m.AddCanvas(c); //canvases.Add(c); c = new Canvas(panel3.CreateGraphics()); m.AddCanvas(c); //canvases.Add(c); c = new Canvas(panel4.CreateGraphics()); m.AddCanvas(c); //canvases.Add(c); c = new Canvas(panel5.CreateGraphics()); m.AddCanvas(c); //canvases.Add(c); //m.canvases = canvases; StateAC.Start(m); //sets manager as static variable in abs state //new DrawingState().Entry(); //panel2.Paint += new PaintEventHandler(panel1_Paint); }
public void ChangeState(int eventId) { currentState = currentState.ChangeState(eventId); }
public Manager() { threads = new List <IObserver>(); canvases = new List <Canvas>(); currentState = new IdleState(); }