Beispiel #1
0
        protected internal override void Activate()
        {
            base.Activate();
            ConnectionWizardData data = (ConnectionWizardData)WizardData;
            var folder       = Path.GetDirectoryName(data.SolutionFile);
            var solutionName = Path.GetFileNameWithoutExtension(data.SolutionFile);

            _vsFile = Path.Combine(folder, ".vs", "config", "applicationHost.config");
            if (!File.Exists(_vsFile))
            {
                _vsFile = Path.Combine(folder, ".vs", solutionName, "config", "applicationHost.config");
            }

            _riderFile             = Path.Combine(folder, ".idea", "config", "applicationHost.config");
            rbVisualStudio.Enabled = File.Exists(_vsFile);
            rbRider.Enabled        = File.Exists(_riderFile);
            if (rbVisualStudio.Enabled)
            {
                rbVisualStudio.Checked = true;
            }
            else if (rbRider.Enabled)
            {
                rbRider.Checked = true;
            }
        }
Beispiel #2
0
        public override bool OnNext()
        {
            ConnectionWizardData data = (ConnectionWizardData)WizardData;

            data.FileName = rbRider.Checked ? _riderFile : _vsFile;
            data.Server   = new IisExpressServerManager(data.FileName);
            return(true);
        }
Beispiel #3
0
        private void BtnBrowseClick(object sender, EventArgs e)
        {
            ConnectionWizardData wizardData = (ConnectionWizardData)WizardData;

            DialogHelper.ShowOpenFileDialog(
                txtName,
                wizardData.UseVisualStudio
                    ? "Solution Files|*.sln|All Files|*.*"
                    : "Config Files|*.config|All Files|*.*");
        }
Beispiel #4
0
        protected internal override void Activate()
        {
            base.Activate();
            _initialized = false;
            ConnectionWizardData wizardData = (ConnectionWizardData)WizardData;

            txtName.Text = wizardData.UseVisualStudio ? wizardData.SolutionFile : wizardData.FileName;
            Caption      = wizardData.UseVisualStudio ? "Specify a Visual Studio Solution File" : "Specify a Configuration File";
            txtType.Text = wizardData.UseVisualStudio ? "Visual Studio solution file name:" : "Configuration file name:";
            if (wizardData.UseVisualStudio)
            {
                SetNextPage(_solutionTypePage);
            }
            else
            {
                SetNextPage(_finishPage);
            }

            _initialized = true;
            txtName.Focus();
            txtName.SelectAll();
        }