示例#1
0
 public void ApplyTo(PropertyEditor mainEditor, bool dontCollapse = true)
 {
     if (mainEditor == null) return;
     foreach (GroupedPropertyEditor child in mainEditor.GetChildEditorsDeep(false).OfType<GroupedPropertyEditor>())
     {
         if (child.Expanded && dontCollapse) continue;
         child.Expanded = this.IsEditorExpanded(child);
     }
 }
示例#2
0
 public void UpdateFrom(PropertyEditor mainEditor)
 {
     if (mainEditor == null)
     {
         return;
     }
     foreach (GroupedPropertyEditor child in mainEditor.GetChildEditorsDeep(false).OfType <GroupedPropertyEditor>())
     {
         this.SetEditorExpanded(child, child.Expanded);
     }
 }
示例#3
0
 public void ApplyTo(PropertyEditor mainEditor, bool dontCollapse = true)
 {
     if (mainEditor == null)
     {
         return;
     }
     foreach (GroupedPropertyEditor child in mainEditor.GetChildEditorsDeep(false).OfType <GroupedPropertyEditor>())
     {
         if (child.Expanded && dontCollapse)
         {
             continue;
         }
         child.Expanded = this.IsEditorExpanded(child);
     }
 }
示例#4
0
 public PropertyEditor GetFocusReciever(PropertyEditor primary, bool secondaryNext = true)
 {
     if (primary == null)
     {
         return(null);
     }
     while (!primary.CanGetFocus)
     {
         if (secondaryNext)
         {
             PropertyEditor[] childEditorsDeep = primary.GetChildEditorsDeep(true).ToArray();
             PropertyEditor   nextEditor       = this.GetNextFocusEditor(primary);
             if (childEditorsDeep.Any(e => e.CanGetFocus))
             {
                 primary = childEditorsDeep.FirstOrDefault(e => e.CanGetFocus);
             }
             else if (nextEditor != null)
             {
                 primary = nextEditor;
             }
             else if (primary.ParentEditor != null)
             {
                 primary = this.GetFocusReciever(this.GetNextFocusEditor(primary.ParentEditor), secondaryNext);
             }
             else
             {
                 return(null);
             }
         }
         else
         {
             PropertyEditor prevEditor = this.GetPrevFocusEditor(primary);
             if (prevEditor != null)
             {
                 primary = prevEditor;
             }
             else
             {
                 primary = this.GetFocusReciever(primary.ParentEditor, secondaryNext);
             }
         }
         if (primary == null)
         {
             break;
         }
     }
     return(primary);
 }
示例#5
0
 public void UpdateFrom(PropertyEditor mainEditor)
 {
     if (mainEditor == null) return;
     foreach (GroupedPropertyEditor child in mainEditor.GetChildEditorsDeep(false).OfType<GroupedPropertyEditor>())
         this.SetEditorExpanded(child, child.Expanded);
 }