Ejemplo n.º 1
0
 private Resources.oActivity GetActivityByName(string name, Resources.oEnviroment env)
 {
     foreach (Resources.oActivity act in env.Activities)
     {
         if (act.name == name)
         {
             return(act);
         }
     }
     return(null);
 }
Ejemplo n.º 2
0
        private void PopulateListRecco()
        {
            //Now we call and populate the information into our arrays.  This format is needed so that we can set what items are
            //recommended for later use.  It's long but it's better than repeat if statments...right?
            Resources.oEnviroment e0 = new Resources.oEnviroment();
            e0.name = "Urban";

            // add the information to the activities dropdown
            Resources.oActivity a0 = new Resources.oActivity();
            //not passing in information for checkYN as checkboxes always default to false anyway.
            a0.name        = "Hit The Bar";
            a0.recommended = "Dance Shoes, Spare Change, Hair Gel";

            //set the activity array inside the enviroment.
            e0.Activities[0] = a0;
            //Add the information to the envrioment


            //duplicate the above for the rest of the data.
            Resources.oActivity a1 = new Resources.oActivity();
            a1.name          = "Convention";
            a1.recommended   = "Art Materials, Laptop, Power Cables, Convention Pass Docs";
            e0.Activities[1] = a1;


            Resources.oActivity a2 = new Resources.oActivity();
            a2.name          = "Go To The Zoo";
            a2.recommended   = "Water Bottle, Sun Screen, Bug Spray";
            e0.Activities[2] = a2;


            Resources.oActivity a3 = new Resources.oActivity();
            a3.name          = "Dine Out - Fancy";
            a3.recommended   = "Spare Change, Dress Suit/Clothes, Wind Breaker";
            e0.Activities[3] = a3;


            Resources.oActivity a4 = new Resources.oActivity();
            a4.name          = "Visit A Museum";
            a4.recommended   = "Art Materials, Compass, Spare Glasses";
            e0.Activities[4] = a4;


            Resources.oActivity a5 = new Resources.oActivity();
            a5.name          = "Sports Event";
            a5.recommended   = "Sports Jersey, Spare Glasses, Wind Breaker";
            e0.Activities[5] = a5;
            Enviroment.Add(e0);

            //Now one for Mountains. a0m stands for (a)activity (item 1)0 (m)mountains.
            Resources.oEnviroment e1 = new Resources.oEnviroment();
            e1.name = "Mountains";
            Resources.oActivity a0m = new Resources.oActivity();
            a0m.name         = "Hiking";
            a0m.recommended  = "Jacket, Compass, Boots";
            e1.Activities[0] = a0m;


            Resources.oActivity a1m = new Resources.oActivity();
            a1m.name         = "Horse Riding";
            a1m.recommended  = "Boots, Sun Screen, Compass";
            e1.Activities[1] = a1m;


            Resources.oActivity a2m = new Resources.oActivity();
            a2m.name         = "Camping";
            a2m.recommended  = "Water Bottle, Swimming Trunks, Spare Book(s)";
            e1.Activities[2] = a2m;


            Resources.oActivity a3m = new Resources.oActivity();
            a3m.name         = "Treasure Hunting";
            a3m.recommended  = "Gloves, Compass, Cap/Hat";
            e1.Activities[3] = a3m;


            Resources.oActivity a4m = new Resources.oActivity();
            a4m.name         = "Lake Cabin Trip";
            a4m.recommended  = "Art Materials, Sun Screen, Swimming Trunks";
            e1.Activities[4] = a4m;


            Resources.oActivity a5m = new Resources.oActivity();
            a5m.name         = "Mountain Climbing";
            a5m.recommended  = "Boots, Cap/Hat, Water Bottle";
            e1.Activities[5] = a5m;
            Enviroment.Add(e1);

            //Now one for Coastal. a0c stands for (a)activity (item 1)0 (m)mountains.
            Resources.oEnviroment e2 = new Resources.oEnviroment();
            e2.name = "Coastal";
            Resources.oActivity a0c = new Resources.oActivity();
            a0c.name         = "Resort Stay";
            a0c.recommended  = "Toothpaste & Toothbrush, Swimming Trunks, Socks";
            e2.Activities[0] = a0c;


            Resources.oActivity a1c = new Resources.oActivity();
            a1c.name         = "Amusement Park";
            a1c.recommended  = "Cap/Hat, Shorts, Spare Glasses";
            e2.Activities[1] = a1c;


            Resources.oActivity a2c = new Resources.oActivity();
            a2c.name         = "Surfing";
            a2c.recommended  = "Swimming Trunks, Bug Spray, Sun Screen";
            e2.Activities[2] = a2c;


            Resources.oActivity a3c = new Resources.oActivity();
            a3c.name         = "Visit Wildlife Sanctuary";
            a3c.recommended  = "Cap/Hat, Underwear/Boxers, Wind Breaker";
            e2.Activities[3] = a3c;


            Resources.oActivity a4c = new Resources.oActivity();
            a4c.name         = "Beach Bumming";
            a4c.recommended  = "Swimming Trunks, Spare Glasses, Sun Screen";
            e2.Activities[4] = a4c;


            Resources.oActivity a5c = new Resources.oActivity();
            a5c.name         = "Sailing";
            a5c.recommended  = "Sun Screen, Wind Breaker, Shorts";
            e2.Activities[5] = a5c;
            Enviroment.Add(e2);
        }