public IActionResult Privacy(string gameFilter = "All", string categoryFilter = "All")
        {
            FlagsModel model = new FlagsModel();

            model.gameFilter     = gameFilter;
            model.categoryFilter = categoryFilter;
            return(View(model));
        }
Beispiel #2
0
        public ActionResult Index()
        {
            var flagsModel = new FlagsModel
            {
                CurrentFlagCount = flagChecker.GetCurrentFlagsCount(),
                TotalFlagCount   = flagChecker.GetTotalFlagCount
            };

            return(View(flagsModel));
        }
Beispiel #3
0
        public PartialViewResult SubmitFlag(string flag)
        {
            flag = flag
                   .Replace("\n", "")
                   .Replace("\r", "")
                   .Replace("\\n", "")
                   .ToUpper();

            bool wasLastTrySuccessful = flagChecker.SubmitFlag(flag);

            var flagsModel = new FlagsModel
            {
                WasLastSubmitSuccessful = wasLastTrySuccessful,
                CurrentFlagCount        = flagChecker.GetCurrentFlagsCount(),
                TotalFlagCount          = flagChecker.GetTotalFlagCount
            };

            return(PartialView("_Flags", flagsModel));
        }