public void ConfirmInput() { string path = levelPathInput_.value; Predicate <HierarchyComponentData> search = (x) => string.Equals(x.Path, path, StringComparison.CurrentCultureIgnoreCase); HierarchyComponentData item = Current.Entries.Find(search) ?? NavigationElements.Find(search); if (item != null) { switch (item.Hierarchy) { case HierarchyLevel.Folder: Current = item as HierarchyComponentFolder; GenerateComponentNameList(); break; case HierarchyLevel.Special: switch (item.Path) { case "$parent-folder": Current = Current.Parent ?? Current; break; case "$root-folder": Current = Root; break; } GenerateComponentNameList(); break; } } }
public static ComponentEntry CreateEntry(HierarchyComponentData item, OnClickCallback onClick, OnClickCallback onDoubleClick, bool buttonIsClickable, Color color) { string name = item.Name; if (item is HierarchyComponentFolder) { name = $"/{name}"; } return(new ComponentEntry(string.Empty, name, onClick, onDoubleClick, buttonIsClickable, item, color)); }
private ComponentEntry( string objectName, string labelText, OnClickCallback onClick, OnClickCallback onDoubleClick, bool buttonIsClickable, HierarchyComponentData item, Color color) : base(objectName, labelText, onClick, onDoubleClick, buttonIsClickable) { item_ = item; color_ = color; }
private void OnItemSelected(HierarchyComponentData entry) { // TODO : Implment method }