예제 #1
0
        public void RunStarted(object automationObject, Dictionary <string, string> replacementsDictionary, WizardRunKind runKind, object[] customParams)
        {
            dte = (EnvDTE.DTE)automationObject;
            string destinationDirectory = replacementsDictionary["$destinationdirectory$"];

            string fullOFRoot = Path.Combine(destinationDirectory, "..\\..\\..");

            while (!isOFDirectory(fullOFRoot))
            {
                var ofPathForm   = new FormOFRoot();
                var resultOFPAth = ofPathForm.ShowDialog();
                if (resultOFPAth == DialogResult.Cancel)
                {
                    throw new WizardBackoutException();
                }
                else
                {
                    fullOFRoot = ofPathForm.getOFRoot();
                    ofRoot     = fullOFRoot;
                }
            }

            // Display a form to the user. The form collects
            // input for the custom message.
            inputForm = new FormAddons(destinationDirectory, ofRoot);
            var result = inputForm.ShowDialog();

            if (result == DialogResult.Cancel)
            {
                throw new WizardBackoutException();
            }

            // Add custom parameters.
            replacementsDictionary.Add("$ofroot$", ofRoot);
        }
예제 #2
0
        public void RunStarted(object automationObject, Dictionary<string, string> replacementsDictionary, WizardRunKind runKind, object[] customParams)
        {
            dte = (EnvDTE.DTE)automationObject;
            string destinationDirectory = replacementsDictionary["$destinationdirectory$"];
            
            string fullOFRoot = Path.Combine(destinationDirectory, "..\\..\\..");
            while (!isOFDirectory(fullOFRoot))
            {
                var ofPathForm = new FormOFRoot();
                var resultOFPAth = ofPathForm.ShowDialog();
                if (resultOFPAth == DialogResult.Cancel)
                {
                    throw new WizardBackoutException();
                }
                else
                {
                    fullOFRoot = ofPathForm.getOFRoot();
                    ofRoot = fullOFRoot;
                }
            }

            // Display a form to the user. The form collects 
            // input for the custom message.
            inputForm = new FormAddons(destinationDirectory, ofRoot);
            var result = inputForm.ShowDialog();
            if(result == DialogResult.Cancel)
            {
                throw new WizardBackoutException();
            }

            // Add custom parameters.
            replacementsDictionary.Add("$ofroot$", ofRoot);

        }