public static void RegisterTable(string id, IGuiTable guiTable) { lock (Tables) { Tables.Add(id, guiTable); } }
public static string RegisterTreeNode(RemoteUiTreeNode itm, Func <string> getValue = null, IGuiTable tableData = null) { if (tableData != null) { lock (Tables) { itm.TableId = itm.TableId ?? TablePrefix + (_tableIndex++); Tables.Add(itm.TableId, tableData); } } lock (TreeNodes) { itm.Id = NodePrefix + (_nodeIndex++); TreeNodes.Add(itm.Id, RemoteUiTreeNodeItem.Create(itm, getValue)); return(itm.Id); } }
public static string RegisterTreeNode(RemoteUiTreeNode itm, Func<string> getValue = null, IGuiTable tableData = null) { if (tableData != null) lock (Tables) { itm.TableId = itm.TableId ?? TablePrefix + (_tableIndex++); Tables.Add(itm.TableId, tableData); } lock (TreeNodes) { itm.Id = NodePrefix + (_nodeIndex++); TreeNodes.Add(itm.Id, RemoteUiTreeNodeItem.Create(itm, getValue)); return itm.Id; } }