예제 #1
0
        public ActionResult Goosebumps(string noun, string verb, string name)
        {
            MadLibVariables myMadLibVariables = new MadLibVariables();

            myMadLibVariables.Name = name;
            myMadLibVariables.Verb = verb;
            myMadLibVariables.Noun = noun;
            return(View(myMadLibVariables));
        }
예제 #2
0
        public ActionResult Puppies(string noun, string noun2, string adjective, string adjective2, string adverb)
        {
            MadLibVariables myMadLibVariables = new MadLibVariables();

            myMadLibVariables.Noun       = noun;
            myMadLibVariables.Noun2      = noun2;
            myMadLibVariables.Adjective  = adjective;
            myMadLibVariables.Adjective2 = adjective2;
            myMadLibVariables.Adverb     = adverb;
            return(View(myMadLibVariables));
        }
예제 #3
0
        public ActionResult Zoo(string noun, string adjective, string verb, string place, string name)
        {
            MadLibVariables myMadLibVariables = new MadLibVariables();

            Console.WriteLine(noun);
            myMadLibVariables.Name      = name;
            myMadLibVariables.Verb      = verb;
            myMadLibVariables.Noun      = noun;
            myMadLibVariables.Adjective = adjective;
            myMadLibVariables.Place     = place;
            return(View(myMadLibVariables));
        }
예제 #4
0
        public HomeModule()
        {
            Get["/form"] = _ => {
                return(View["form.cshtml"]);
            };

            Get["/story"] = _ => {
                MadLibVariables myMadLibVariables = new MadLibVariables();
                myMadLibVariables.SetAdjective1(Request.Query["adjective1"]);
                myMadLibVariables.SetAdjective2(Request.Query["adjective2"]);
                myMadLibVariables.SetPerson(Request.Query["person"]);
                myMadLibVariables.SetPluralNoun(Request.Query["pluralNoun"]);
                myMadLibVariables.SetNoun1(Request.Query["noun1"]);
                myMadLibVariables.SetNoun2(Request.Query["noun2"]);
                myMadLibVariables.SetVerb(Request.Query["verb"]);
                myMadLibVariables.SetVegetable(Request.Query["vegetable"]);
                myMadLibVariables.SetColor(Request.Query["color"]);
                myMadLibVariables.SetNoun3(Request.Query["noun3"]);
                return(View["story.cshtml", myMadLibVariables]);
            };
        }