Пример #1
0
        public void Setup()
        {
            List <LightingUnit> AllLights = new List <LightingUnit>();

            AllLights.Add(new LightingUnit(0, 0, 2));
            AllLights.Add(new LightingUnit(0, 1, 2));
            AllLights.Add(new LightingUnit(0, 2, 2));
            Controller = new DALIController(AllLights);
        }
Пример #2
0
 public InfoScreen(Form window, DALIController Controller)
 {
     CurrentWindow          = window;
     _controller            = Controller;
     LightunitInfo          = new Label();
     LightunitInfo.Location = new Point(GEngine.SimulationWidht / 2 + CurrentWindow.Width / 2, CurrentWindow.Height / 2 - GEngine.SimulationHeigt / 4);
     LightunitInfo.AutoSize = true;
     CurrentWindow.Controls.Add(LightunitInfo);
 }
Пример #3
0
 public ControlPanel(Form form, DALIController Controller, List <LightingUnit> Lights, InfoScreen Info, PictureBox simulationRoom)
 {
     window         = form;
     SimulationRoom = simulationRoom;
     light          = Lights;
     DALIController = Controller;
     InitializeControlPanelButtons();
     _currentUnitIds            = new List <int>();
     InfoScreen                 = Info;
     SimulationRoom.MouseClick += new MouseEventHandler(this.Form1_MouseClick);
     l = new Label();
     l.Show();
     l.Location = new Point(100, 100);
     window.Controls.Add(l);
 }
Пример #4
0
        public void Start()
        {
            //Initializations
            _occupant = new Occupant(Map, Window, 'W', 'S', 'A', 'D');
            gEngine   = new GEngine(Window, Map, SimulationRoom);
            CreateLightUnit();
            Controller = new DALIController(LightUnitCoordinates);
            Controller.InitGroups();
            InfoScreen   = new InfoScreen(Window, Controller);
            ControlPanel = new ControlPanel(Window, Controller, LightUnitCoordinates, InfoScreen, SimulationRoom);


            //Draw info
            Info = new InfoDrawing(Window);
            Info.initWattInfo();
            Info.InitBrugerPosWiFi();
            Info.InitBrugerPos();

            //Quadtree, initialize the graphics engine and load the visual level
            _tree.CreateQuadTree(LightUnitCoordinates);
            gEngine.init();
            gEngine.LoadLevel(LightUnitCoordinates, Router1, Router2);
        }