Exemplo n.º 1
0
        IEnumerator UpdateCustomSolutionAsync()
        {
            _projectHandler.OverwriteConfig();

            return(_prjCommandHandler.ProcessPrjCommand(
                       "Updating solution", PrjHelper.UpdateCustomSolutionAsync()));
        }
Exemplo n.º 2
0
        IEnumerator TryChangeProjectType(ProjectConfigTypes configType)
        {
            if (_projectHandler.HasProjectConfigChanged())
            {
                var fileName = Path.GetFileName(ProjenyEditorUtil.GetProjectConfigPath(_view.ProjectConfigType));
                var choice   = _view.PromptForUserChoice(
                    "Do you want to save changes to {0}?".Fmt(fileName), new[] { "Save", "Don't Save", "Cancel" }, null, null, 0, 2);

                yield return(choice);

                switch (choice.Current)
                {
                case 0:
                {
                    _projectHandler.OverwriteConfig();
                    break;
                }

                case 1:
                {
                    // Do nothing
                    break;
                }

                case 2:
                {
                    yield break;
                }

                default:
                {
                    Assert.Throw();
                    break;
                }
                }
            }

            _view.ProjectConfigType = configType;
            _projectHandler.RefreshProject();
        }