public ProjectConfigurationView() { InitializeComponent(); _selectDirectoryService = ServiceLocator.Default.ResolveType <ISelectDirectoryService>(); _pwvm = ServiceLocator.Default.ResolveType <ProjectWizardViewModel>(); imgSelector.CommandBindings[0].Executed += imgSelector_Executed; }
public ProjectWizard(ObservableCollection <ProjectWizardViewModelBase> pages) { InitializeComponent(); UpdatePageIndexes(pages); AddDataTemplates(this, pages); _model = new ProjectWizardViewModel(this, pages); _model.RequestClose += ProjectWizardViewModel_RequestClose; DataContext = _model; }
public FinalizeSetupView() { InitializeComponent(); var command = ServiceLocator.Default.ResolveType <ApplicationCreateNewProjectCommandContainer>(); command.OnCommandCompleted += () => CancelProjectBtn_Click(null, null); _pwvm = ServiceLocator.Default.ResolveType <ProjectWizardViewModel>(); imgSelector.CommandBindings[0].Executed += imgSelector_Executed; }
private async Task NewProject(ProjectWizardViewModel project) { if (project == null) { CloseDialogCommand.Execute(null); return; } CloseModalCommand.Execute(null); await Task.Run(() => NewProjectTask(project)).ContinueWith((result) => { }); }
public ProjectWizard(ObservableCollection <IProgressHeaderItem> pages) { InitializeComponent(); UpdatePageIndexes(pages); AddDataTemplates(this, pages); _model = new ProjectWizardViewModel(this, pages); _model.SelectedPageChanged += Model_SelectedPageChanged; _model.RequestClose += ProjectWizardViewModel_RequestClose; DataContext = _model; }
public void RunStarted(object automationObject, Dictionary <string, string> replacementsDictionary, WizardRunKind runKind, object[] customParams) { try { replacementsDictionary.TryGetValue("$solutiondirectory$", out this.solutionDirectory); replacementsDictionary.TryGetValue("$destinationdirectory$", out this.projectDirectory); var wiz = new DotNet.Wizard.ProjectWizard(); var result = wiz.ShowDialog(); this._viewModel = wiz.ViewModel; if (!result ?? true) { throw new WizardBackoutException(); } replacementsDictionary = replacementsDictionary.Union(_viewModel.ReplacementDictionary).ToDictionary(s => s.Key, s => s.Value); } catch (Exception ex) { RemoveSolutionDirectory(); throw new WizardBackoutException("Wizard failed to create Aurelia Project Succesfully", ex); } }
private async Task NewProjectTask(ProjectWizardViewModel project) { try { var projectLocation = Path.Combine(project.ProjectPath, project.ProjectName, project.ProjectName + ".cpmodproj"); var np = new Cp77Project(projectLocation) { Name = project.ProjectName, Author = project.Author, Email = project.Email, Version = project.Version }; _projectManager.ActiveProject = np; await _projectManager.SaveAsync(); np.CreateDefaultDirectories(); await _projectManager.LoadAsync(projectLocation); DispatcherHelper.RunOnMainThread(() => { ActiveProject = _projectManager.ActiveProject; }); await _gameControllerFactory.GetController().HandleStartup().ContinueWith(_ => { UpdateTitle(); _notificationService.Success("Project " + project.ProjectName + " loaded!"); }, TaskContinuationOptions.OnlyOnRanToCompletion); } catch (Exception ex) { _loggerService.Error(ex.Message); _loggerService.Error("Failed to create a new project!"); } }
public SelectProjectTypeView() { InitializeComponent(); _fswvm = ServiceLocator.Default.ResolveType <ProjectWizardViewModel>(); }