/// <include file='doc\DeviceSpecificChoiceCollection.uex' path='docs/doc[@for="DeviceSpecificChoiceCollection.Remove"]/*' /> public void Remove(DeviceSpecificChoice choice) { int index = Items.IndexOf(choice, 0, Count); if (index != -1) { Items.RemoveAt(index); } }
protected override void AddParsedSubObject(Object obj) { DeviceSpecificChoice choice = obj as DeviceSpecificChoice; if (choice != null) { Choices.Add(choice); } }
/// <include file='doc\DeviceSpecificChoiceCollection.uex' path='docs/doc[@for="DeviceSpecificChoiceCollection.AddAt"]/*' /> public void AddAt(int index, DeviceSpecificChoice choice) { choice.Owner = _owner; if (index == -1) { Items.Add(choice); } else { Items.Insert(index, choice); } }
/// <include file='doc\DeviceSpecificChoiceCollection.uex' path='docs/doc[@for="DeviceSpecificChoiceCollection.Add"]/*' /> public void Add(DeviceSpecificChoice choice) { AddAt(-1, choice); }
protected bool IsHTMLSchema(DeviceSpecificChoice choice) { Debug.Assert(choice != null); return choice.Xmlns != null && choice.Xmlns.ToLower(CultureInfo.InvariantCulture).IndexOf(_htmlString, StringComparison.Ordinal) != -1; }
private bool ChoiceHasContent(DeviceSpecificChoice runtimeChoice) { return (runtimeChoice.Contents.Count > 0) || runtimeChoice.HasTemplates; }
private void LoadChoice(DeviceSpecificChoice runtimeChoice) { DeviceFilterNode filterUsed = FindAvailableFilter(runtimeChoice.Filter); ChoiceTreeNode choice = new ChoiceTreeNode( filterUsed, runtimeChoice, _designer ); _appliedFiltersList.TvList.Nodes.Add(choice); }
internal ChoicePropertyFilter( DeviceSpecificChoice choice, IDeviceSpecificDesigner designer, ISite site ) { _events = new EventHandlerList(); _choice = choice; _site = site; _designer = designer; CreateLocalCopiesOfObjects(); }
internal static void SetDeviceSpecificChoice(Style style, DeviceSpecificChoice choice) { typeof(DeviceSpecific).InvokeMember("SetDesignerChoice", BindingFlags.InvokeMethod | BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance, null, style.get_DeviceSpecific(), new object[] { choice }); }
internal static bool IsChoiceEmpty(DeviceSpecificChoice choice) { if ((choice != null) && (choice.get_HasTemplates() || ((choice.get_Contents() != null) && (choice.get_Contents().Count != 0)))) { return false; } return true; }
internal static string CreateUniqueChoiceName(DeviceSpecificChoice choice) { string str = choice.get_Filter(); string str2 = choice.get_Argument(); if (str2 == null) { return str; } return string.Format("{0} (\"{1}\")", str, str2); }
internal static String ChoiceToUniqueIdentifier(DeviceSpecificChoice choice) { Debug.Assert(choice != null); return ChoiceToUniqueIdentifier(choice.Filter, choice.Argument); }
internal void SetDesignerChoice(DeviceSpecificChoice choice) { // This will enforce SelectedChoice to return current choice. _haveSelectedChoice = true; _selectedChoice = choice; }
internal ChoiceTreeNode( DeviceFilterNode filter, IDeviceSpecificDesigner designer ) : base() { Name = filter.Name; _designer = designer; _runtimeChoice = new DeviceSpecificChoice(); _runtimeChoice.Filter = filter.Name; if( // This looks like circular reasoning, but the designer is a // IDeviceSpecificDesigner and we are interested in the // type of the designer's parent control. Adapters.DesignerAdapterUtil.ControlDesigner(designer.UnderlyingControl) is MobileTemplatedControlDesigner ) { _runtimeChoice.Xmlns = SR.GetString(SR.MarkupSchema_HTML32); } }
private void debug_CheckChoicesForDuplicate(DeviceSpecificChoice runtimeChoice) { foreach(ChoiceTreeNode choiceNode in _cbChoices.Items) { if(choiceNode.Name == runtimeChoice.Filter && choiceNode.RuntimeChoice.Argument == runtimeChoice.Argument) { Debug.Fail("Loaded duplicate choice: " + DesignerUtility.ChoiceToUniqueIdentifier(runtimeChoice)); } } }
internal ChoiceTreeNode( DeviceFilterNode filter, DeviceSpecificChoice runtimeChoice, IDeviceSpecificDesigner designer ) : base() { _designer = designer; _runtimeChoice = runtimeChoice; Name = _runtimeChoice.Filter; Argument = _runtimeChoice.Argument; }