예제 #1
0
        private void btnCreateProfile_Click(object sender, EventArgs e)
        {
            // create a new profile
            DeploymentProfile profile = new DeploymentProfile();

            FrmConnSettings frmConnSettings = new FrmConnSettings()
            {
                Profile = profile,
                ExistingProfileNames = deploymentSettings.GetExistingProfileNames()
            };

            if (frmConnSettings.ShowDialog() == DialogResult.OK)
            {
                AddProfileToLists(profile);
                SaveDeploymentSettings();
            }
        }
예제 #2
0
        private void btnCreateProfile_Click(object sender, EventArgs e)
        {
            // create a new profile
            HashSet <string> existingNames      = deploymentSettings.GetExistingProfileNames();
            string           defaultProfileName = string.Format(ProfileNameFormat, instance.Name);

            DeploymentProfile profile = new DeploymentProfile
            {
                InstanceID = instance.ID,
                Name       = existingNames.Contains(defaultProfileName) ? "" : defaultProfileName
            };

            FrmProfileEdit frmProfileEdit = new FrmProfileEdit
            {
                Profile = profile,
                ExistingProfileNames = existingNames
            };

            if (frmProfileEdit.ShowDialog() == DialogResult.OK)
            {
                AddProfileToLists(profile);
                SaveDeploymentSettings();
            }
        }