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

                ProjectSelectionDialog dialog = new ProjectSelectionDialog();
                dialog.ShowDialog();

                _result = dialog.Result;

                if (_result == ProjectSelectionResult.None)
                {
                    throw new WizardBackoutException();
                }
            }
            catch
            {
                if (Directory.Exists(_solutionDir))
                {
                    Directory.Delete(_solutionDir, true);
                }

                throw;
            }
        }
コード例 #2
0
        private void CreateButton_Click(object sender, RoutedEventArgs e)
        {
            Result = ProjectSelectionResult.None;

            if (UWPCheckBox.IsChecked == true)
            {
                Result = Result | ProjectSelectionResult.UWP;
            }

            if (IOSCheckBox.IsChecked == true)
            {
                Result = Result | ProjectSelectionResult.iOS;
            }

            if (AndroidCheckBox.IsChecked == true)
            {
                Result = Result | ProjectSelectionResult.Android;
            }

            this.Close();
        }