Esempio n. 1
0
        private void UpdateDisplay()
        {
            FeatureLocations fLocs           = InstallProcessControl.GetFeaturedLocations(Form.Operation);
            string           locationSummary = (new LocationDisplay(fLocs)).GetLocationSummary();

            featureLocationSummaryLabel.Text = locationSummary;
            if (fLocs.GetTotalFeatureLocations() == 0)
            {
                dodeactivateFeaturesChoice.Enabled = false;
                doactivateFeaturesChoice.Enabled   = false;
            }
            else
            {
                dodeactivateFeaturesChoice.Enabled = true;
                doactivateFeaturesChoice.Enabled   = upgradeRadioButton.Checked && dodeactivateFeaturesChoice.Checked;
            }
        }
Esempio n. 2
0
        public string GetLocationSummary()
        {
            StringBuilder text = new StringBuilder();

            text.AppendFormat("{0} Locations", featuredLocations.GetTotalFeatureLocations());
            Queue <string> locFrags = GetLocationFragments();
            bool           first    = true;

            while (locFrags.Count > 0)
            {
                string fragment = locFrags.Dequeue();
                if (first)
                {
                    text.Append(": ");
                }
                else
                {
                    text.Append(", ");
                }
                text.Append(fragment);
                first = false;
            }
            return(text.ToString());
        }