Ejemplo n.º 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;
            }
        }
 private void XamarinFormsNewProjectDialog_Closed(object sender, System.EventArgs e)
 {
     Result = new XamarinFormsNewProjectDialogResult();
     Result.CreateAndroid  = _chkAndroid.IsChecked.HasValue ? _chkAndroid.IsChecked.Value : false;
     Result.CreateiOS      = _chkiOS.IsChecked.HasValue ? _chkiOS.IsChecked.Value : false;
     Result.CreateUwp      = _chkUwp.IsChecked.HasValue ? _chkUwp.IsChecked.Value : false;
     Result.CreateWinStore = _chkWinStore.IsChecked.HasValue ? _chkWinStore.IsChecked.Value : false;
     Result.CreateWinPhone = _chkWinPhone.IsChecked.HasValue ? _chkWinPhone.IsChecked.Value : false;
 }
 private void XamarinFormsNewProjectDialog_Closed(object sender, System.EventArgs e)
 {
     Result = new XamarinFormsNewProjectDialogResult();
     Result.CreateAndroid = _chkAndroid.IsChecked.HasValue ? _chkAndroid.IsChecked.Value : false;
     Result.CreateiOS = _chkiOS.IsChecked.HasValue ? _chkiOS.IsChecked.Value : false;
     Result.CreateUwp = _chkUwp.IsChecked.HasValue ? _chkUwp.IsChecked.Value : false;
     Result.CreateWinStore = _chkWinStore.IsChecked.HasValue ? _chkWinStore.IsChecked.Value : false;
     Result.CreateWinPhone = _chkWinPhone.IsChecked.HasValue ? _chkWinPhone.IsChecked.Value : false;
 }
Ejemplo n.º 4
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;
        }
 public XamarinFormsNewProjectDialog()
 {
     InitializeComponent();
     Result  = new XamarinFormsNewProjectDialogResult();
     Closed += XamarinFormsNewProjectDialog_Closed;
 }