コード例 #1
0
ファイル: HomeController.cs プロジェクト: kwolfenb/cs-madlibs
        public ActionResult Story(string exclamation, string adverb, string noun, string adjective)
        {
            WordVariables newWordVariable = new WordVariables();

            newWordVariable.SetExclamation(exclamation);
            newWordVariable.SetAdverb(adverb);
            newWordVariable.SetNoun(noun);
            newWordVariable.SetAdjective(adjective);

            return(View(newWordVariable));
        }
コード例 #2
0
        public ActionResult MadLib()
        {
            WordVariables wordVariable = new WordVariables();

            wordVariable.SetName(Request.Query["name"]);
            wordVariable.SetAdverb(Request.Query["adverb"]);
            wordVariable.SetNouns(Request.Query["nouns"]);
            wordVariable.SetVehicle(Request.Query["vehicle"]);
            wordVariable.SetAnimal(Request.Query["animal"]);
            wordVariable.SetNouns2(Request.Query["nouns2"]);
            return(View("mad_lib", wordVariable));
        }
コード例 #3
0
        public ActionResult Result()
        {
            WordVariables myWordVariable = new WordVariables();

            myWordVariable.SetName(Request.Query["name"]);
            myWordVariable.SetAdjOne(Request.Query["adjOne"]);
            myWordVariable.SetVerbOne(Request.Query["verbOne"]);

            myWordVariable.SetNounOne(Request.Query["nounOne"]);
            myWordVariable.SetVerbTwo(Request.Query["verbTwo"]);
            myWordVariable.SetNounTwo(Request.Query["nounTwo"]);

            myWordVariable.SetVerbThree(Request.Query["verbThree"]);
            myWordVariable.SetNounThree(Request.Query["nounThree"]);
            myWordVariable.SetAdverb(Request.Query["adverb"]);

            return(View(myWordVariable));
        }