public async Task <IViewComponentResult> InvokeAsync(string ViewName = "Default") { var s = new StepsViewModel(); s.CurrentStep = 0; switch (_repository.GetActionName.ToLower()) { case "addturn": s.CurrentStep = 1; break; case "verifyturn": s.CurrentStep = 2; break; case "verified": s.CurrentStep = 3; break; } s.StepNames.Add("انتخاب ساعت"); s.StepNames.Add("تکمیل اطلاعات"); s.StepNames.Add("پایان"); return(View(ViewName, s)); }
public ApplicationViewModel() { Steps = new StepsViewModel(); StartCommand = new DelegateCommand(obj => Start()); ContinueCommand = new DelegateCommand(obj => Continue()); StepForwardCommand = new DelegateCommand(obj => StepForward()); ClearPopulationCommand = new DelegateCommand(obj => ClearPopulation()); }
public Steps() { InitializeComponent(); var vm = new StepsViewModel(); DataContext = vm; MVMIoc.SimpleIoc <MVMUI.IStepsController> .Register(vm); MVMIoc.SimpleIoc <MVMUI.IStepsExecutionController> .Register(vm); MVMIoc.SimpleIoc <MSVMI.IStepsContainer> .Register(vm); }
public IActionResult Steps(Scenario scenario) { var model = new StepsViewModel() { Feature = _featureServices.GetFeatureByScenarioId(scenario.Id), Scenario = scenario }; Step step = new Step(); step.Content = "Test Content for Step"; model.Scenario.StepList.Add(step); return(View(model)); }
public ApplicationViewModel() { Steps = new StepsViewModel(); StartCommand = new DelegateCommand(obj => Start()); ContinueCommand = new DelegateCommand(obj => Continue()); StepForwardCommand = new DelegateCommand(obj => StepForward()); ClearPopulationCommand = new DelegateCommand(obj => ClearPopulation()); _citiesService = new CitiesService(srcFilePath); //var path = new int[] { 1, 8, 38, 31, 44, 18, 7, 28, 6, 37, 19, 27, 17, 43, 30, 36, 46, 33, 20, 47, 21, 32, 39, 48, 5, 42, 24, 10, 45, 35, 4, 26, 2, 29, 34, 41, 16, 22, 3, 23, 14, 25, 13, 11, 12, 15, 40, 9 }; //var cities = new City[path.Length]; //for (int i = 0; i < path.Length; i++) //{ // var city = _citiesService.Cities.First(c => c.number == (path[i] - 1)); // cities[i] = city; //} //var dist = CountSumDistance(cities); //int a = 0; }
public ProcedureViewModel(Procedure procedure) { ShowStepsCommand = new RelayCommand(OnShowSteps); ShowVariablesCommand = new RelayCommand(OnShowVariables); ShowArgumentsCommand = new RelayCommand(OnShowArguments); ShowConditionsCommand = new RelayCommand(OnShowConditions); Procedure = procedure; procedure.PlanElementUIDsChanged += UpdateVisualizationState; StepsViewModel = new StepsViewModel(procedure); VariablesViewModel = new VariablesViewModel(procedure); ArgumentsViewModel = new ArgumentsViewModel(procedure); ConditionsViewModel = new ConditionsViewModel(procedure); MenuTypes = new ObservableRangeCollection<MenuType> { MenuType.IsSteps, MenuType.IsVariables, MenuType.IsArguments, MenuType.IsConditions }; SelectedMenuType = MenuTypes.FirstOrDefault(); }
public Steps() { InitializeComponent(); DataContext = new StepsViewModel(); }