Ejemplo n.º 1
0
        public ActionResult AlgorithmDetails(int id)
        {
            var formType          = algorithmRepository.retrieveFormType(id);
            AlgorithmViewModel vm = new AlgorithmViewModel();

            vm.algoDetails = algorithmRepository.FindThis(id).SingleOrDefault();
            vm.algoNavBar  = algorithmRepository.FindSameParadigmTypeAlgorithm(id).ToList();

            return(View(vm));
        }
Ejemplo n.º 2
0
        public ActionResult SortAnimation(int id)
        {
            AnimationViewModel vm   = new AnimationViewModel();
            SortAlgorithm      sort = new SortAlgorithm();

            int noOfInput = Int32.Parse(Request.Form["noOfSortInput"]);

            List <int> indexValueList = new List <int>();

            for (int i = 1; i <= noOfInput; i++)
            {
                int val = Int32.Parse(Request.Form["indexValue_" + i]);
                indexValueList.Add(val);
            }

            sort.IndexValues = indexValueList;

            vm.sortAnimationData = sort;
            vm.algoNavBar        = algorithmRepository.FindSameParadigmTypeAlgorithm(id).ToList();
            vm.algoDetails       = algorithmRepository.FindThis(id).SingleOrDefault();
            vm.noOfIndex         = noOfInput;

            return(View(vm));
        }