コード例 #1
0
        public void addLS(string address, bool active)
        {
            LoginServerInfo info = new LoginServerInfo();

            info.name   = address;
            info.active = active;
            m_aLoginServers.Add(info);
            if (active)
            {
                m_currentLS = info;
            }
        }
コード例 #2
0
        public void refreshServerList()
        {
            treServers.Nodes.Clear();

            for (int i = 0; i < m_aLoginServers.Count; ++i)
            {
                LoginServerInfo ls   = ( LoginServerInfo )m_aLoginServers[i];
                TreeNode        node = new TreeNode(ls.name);
                node.Checked = ls.active;
                for (int j = 0; j < ls.clusters.Count; ++j)
                {
                    ClusterInfo ci          = ( ClusterInfo )ls.clusters[j];
                    TreeNode    clusternode = new TreeNode(ci.name);
                    clusternode.Checked = ci.active;
                    node.Nodes.Add(clusternode);
                }
                treServers.Nodes.Add(node);
            }
            treServers.ExpandAll();
            updateAllTabControls();
        }