예제 #1
0
 public static void RegisterTable(string id, IGuiTable guiTable)
 {
     lock (Tables)
     {
         Tables.Add(id, guiTable);
     }
 }
예제 #2
0
        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);
            }
        }
예제 #3
0
        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;
            }

        }
예제 #4
0
 public static void RegisterTable(string id, IGuiTable guiTable)
 {
     lock (Tables)
     {
         Tables.Add(id, guiTable); 
     }
 }