Пример #1
0
        //Button logic
        public MainMenuScene(GraphicsDevice graphDevice, string ID) : base(graphDevice, ID)
        {
            Maxnegoffset = new Point(0, -1200);
            Maxposoffset = new Point(0, 0);
            //dynamicTest = new DynamicButtonHorizontal(0, 150, 0.75, 1, Color.Crimson, graphDevice);
            dynamiclol1 = new DynamicButtonHorizontal(200, 200, 0.25, 0.75, Color.Crimson, graphDevice);
            dynamiclol2 = new DynamicButtonHorizontal(450, 200, 0.25, 0.75, Color.Crimson, graphDevice);
            dynamiclol3 = new DynamicButtonHorizontal(700, 200, 0.25, 0.75, Color.Crimson, graphDevice);
            dynamiclol4 = new DynamicButtonHorizontal(950, 200, 0.25, 0.75, Color.Crimson, graphDevice);
            dynamiclol5 = new DynamicButtonHorizontal(1200, 200, 0.25, 0.75, Color.Crimson, graphDevice);
            dynamiclol6 = new DynamicButtonHorizontal(1450, 200, 0.25, 0.75, Color.Crimson, graphDevice);
            dynamiclol7 = new DynamicButtonHorizontal(1700, 200, 0.25, 0.75, Color.Crimson, graphDevice);
            dynamiclol8 = new DynamicButtonHorizontal(1950, 200, 0.25, 0.75, Color.Crimson, graphDevice);

            //dynamicTest.SetDelegate(new Action(() => SceneManager.ChangeScene("TestScene")));
            dynamiclol1.SetDelegate(new Action(() => SceneManager.ChangeScene("Button1Scene")));
            dynamiclol2.SetDelegate(new Action(() => SceneManager.ChangeScene("Button2Scene")));
            dynamiclol3.SetDelegate(new Action(() => SceneManager.ChangeScene("Button3Scene")));
            dynamiclol4.SetDelegate(new Action(() => SceneManager.ChangeScene("Button4Scene")));
            dynamiclol5.SetDelegate(new Action(() => SceneManager.ChangeScene("Button5Scene")));
            //dynamiclol6.SetDelegate(new Action(() => SceneManager.ChangeScene("Button6Scene")));
            dynamiclol6.SetDelegate(new Action(() => Appointment.button6action()));
            dynamiclol7.SetDelegate(new Action(() => SceneManager.ChangeScene("Button7Scene")));
            dynamiclol8.SetDelegate(new Action(() => SceneManager.ChangeScene("Button8Scene")));

            //dynamicTest.SetText("Test");
            dynamiclol1.SetText("5 Neighbourhoods with\nthe most bike containers");
            dynamiclol2.SetText("Stolen bikes per month");
            dynamiclol3.SetText("Grouper bar chart stolen\nbikes and bike containers\ninstalled per neighbourhood");
            dynamiclol4.SetText("Pie chart stolen bikes\nby brand and color");
            dynamiclol5.SetText("Save current location of bike");
            dynamiclol6.SetText("Make an appointment\nto pick up your bike");
            dynamiclol7.SetText("S1");
            dynamiclol8.SetText("S2");
        }
Пример #2
0
        public Scene(GraphicsDevice graphDevice, string ID)
        {
            this.Id = ID;

            dynamichome = new DynamicButtonHorizontal(0, 150, 0, 0.25, Color.Crimson, graphDevice);
            dynamichome.SetDelegate(new Action(() => SceneManager.ChangeScene("MainMenuScene")));
            dynamichome.SetText("Main Menu");
        }
Пример #3
0
        //Button 5 scene
        public Button5Scene(GraphicsDevice graphDevice, string ID) : base(graphDevice, ID)
        {
            Save   = new DynamicButtonHorizontal(200, 200, 0.25, 0.75, Color.Red, graphDevice);
            Delete = new DynamicButtonHorizontal(400, 200, 0.25, 0.75, Color.Red, graphDevice);

            Save.SetText("Save Location");
            Delete.SetText("Delete Location");

            Save.SetDelegate(new Action(() => LocationApplication.SaveCurrentLocationToFile()));
            Delete.SetDelegate(new Action(() => LocationApplication.DeleteLocationFile()));
        }
Пример #4
0
        //Button 3 scene
        public Button3Scene(GraphicsDevice graphDevice, string ID) : base(graphDevice, ID)
        {
            Maxnegoffset = new Point(0, -1000);

            ChooseNeighbourhood = new DynamicButtonHorizontal(800, 200, 0.5, 1, Color.Crimson, graphDevice);
            ChooseNeighbourhood.SetText("Choose neighbourhood");
            ChooseNeighbourhood.SetDelegate(new Action(() => SceneManager.AddSceneOnStack("ChooseNeighbourhoodScene")));

            List <Duodata <string, int> > temp = DataAccess.dataAccess.BoxPNeighbourhood();

            string[] neighbourhoods = new string[temp.Count];
            for (int i = 0; i < temp.Count; i++)
            {
                neighbourhoods[i] = temp[i].GetAttr1();
            }
            SceneManager.getAScene("ChooseNeighbourhoodScene").SetParaMeters(neighbourhoods);
            data1 = new List <Duodata <string, int> >();
            data2 = new List <Duodata <string, int> >();

            data1.Add(new Duodata <string, int>("een", 10));
            data1.Add(new Duodata <string, int>("twee", 21));
            data1.Add(new Duodata <string, int>("drie", 60));
            data1.Add(new Duodata <string, int>("vier", 41));
            data1.Add(new Duodata <string, int>("vijf", 50));
            data1.Add(new Duodata <string, int>("zes", 10));
            data1.Add(new Duodata <string, int>("zeven", 20));
            data1.Add(new Duodata <string, int>("acht", 30));

            data2.Add(new Duodata <string, int>("een", 50));
            data2.Add(new Duodata <string, int>("twee", 21));
            data2.Add(new Duodata <string, int>("drie", 60));
            data2.Add(new Duodata <string, int>("vier", 41));
            data2.Add(new Duodata <string, int>("vijf", 50));
            data2.Add(new Duodata <string, int>("zes", 50));
            data2.Add(new Duodata <string, int>("zeven", 20));
            data2.Add(new Duodata <string, int>("acht", 16));
        }