コード例 #1
0
        public void RunStarted(object automationObject, Dictionary<string, string> replacementsDictionary, WizardRunKind runKind, object[] customParams)
        {
            try
            {
                _dte = automationObject as EnvDTE.DTE;
                _projectName = replacementsDictionary["$safeprojectname$"];
                _container = replacementsDictionary["$container$"];
                _solutionDir = System.IO.Path.GetDirectoryName(replacementsDictionary["$destinationdirectory$"]);
                _templateDir = System.IO.Path.GetDirectoryName(customParams[0] as string);

                XamarinFormsNewProjectDialog dialog = new XamarinFormsNewProjectDialog();
                dialog.ShowDialog();
                _dialogResult = dialog.Result;

                if (_dialogResult.Cancelled)
                    throw new WizardBackoutException();
            }
            catch (Exception ex)
            {
                if (Directory.Exists(_solutionDir))
                    Directory.Delete(_solutionDir, true);

                throw;
            }
        }
コード例 #2
0
        public void RunStarted(object automationObject, Dictionary<string, string> replacementsDictionary, WizardRunKind runKind, object[] customParams)
        {
            _dte = automationObject as EnvDTE.DTE;
            _projectName = replacementsDictionary["$safeprojectname$"];
            _container = replacementsDictionary["$container$"];
            _solutionDir = System.IO.Path.GetDirectoryName(replacementsDictionary["$destinationdirectory$"]);
            _templateDir = System.IO.Path.GetDirectoryName(customParams[0] as string);

            XamarinFormsNewProjectDialog dialog = new XamarinFormsNewProjectDialog();
            dialog.ShowDialog();
            _dialogResult = dialog.Result;
        }