Пример #1
0
 void PeerReload()
 {
     if (UniP2PManager.GetPeerCount() != 0)
     {
         peerInfoTreeView.Reload();
     }
     Repaint();
 }
Пример #2
0
        void OnGUI()
        {
            RenderHeadPanel();

            if (EnableAutoReload && UniP2PManager.GetPeerCount() != c_count)
            {
                PeerReload();
                c_count = UniP2PManager.GetPeerCount();
            }

            SplitterGUILayout.BeginVerticalSplit(this.splitterState, EmptyLayoutOption);
            {
                RenderTable();
            }
            SplitterGUILayout.EndVerticalSplit();
        }
Пример #3
0
        protected override TreeViewItem BuildRoot()
        {
            var rootItem = new TreeViewItem
            {
                depth = -1
            };

            var children = new List <TreeViewItem>();

            var index = 1;

            foreach (var peer in UniP2PManager.GetAllPeer())
            {
                children.Add(new PeerInfoItem(index++, peer));
            }

            CurrentBindingItems = children;
            rootItem.children   = CurrentBindingItems as List <TreeViewItem>;
            return(rootItem);
        }