string[] GetComboOptions(MimeTypePanelData mt) { List <string> values = new List <string> (); if (!this.panel.PolicyContainer.IsRoot) { values.Add(parentPolicyText); } foreach (PolicySet set in mt.GetSupportedPolicySets()) { values.Add(set.Name); } values.Add(customPolicyText); return(values.ToArray()); }
IEnumerable <PolicySet> GetCandidateSets(MimeTypePanelData mt) { var pset = mt.PolicyContainer as PolicySet; foreach (PolicySet set in mt.GetSupportedPolicySets()) { // The combo already has the System Default option, so no need to show the Defaut policy set. if (panel.IsCustomUserPolicy && set.Name == "Default") { continue; } // Don't allow selecting the set that is being edited if (pset != null && set.Name == pset.Name) { continue; } yield return(set); } }