Ejemplo n.º 1
0
        void ttclient_OnCmdChannelNew(Channel chan)
        {
            TreeNode parent = GetChannel(chan.nParentID);

            if (parent == null)
            {
                //it's the root channel

                //user servername as root channel name
                ServerProperties prop = new ServerProperties();
                ttclient.GetServerProperties(ref prop);
                TreeNode newnode = new TreeNode(prop.szServerName, (int)ImageIndex.CHANNEL, (int)ImageIndex.CHANNEL);
                newnode.Tag = chan.nChannelID;
                treeview.Nodes.Add(newnode);
            }
            else
            {
                TreeNode newnode = new TreeNode(chan.szName, (int)ImageIndex.CHANNEL, (int)ImageIndex.CHANNEL);
                newnode.Tag = chan.nChannelID;
                parent.Nodes.Add(newnode);
            }
        }
Ejemplo n.º 2
0
        public ServerPropertiesDlg(TeamTalk tt)
        {
            ttclient = tt;
            InitializeComponent();

            ttclient.GetServerProperties(ref prop);
            srvnameTextBox.Text            = prop.szServerName;
            maxusersNumericUpDown.Value    = prop.nMaxUsers;
            motdTextBox.Text               = prop.szMOTD;
            motdrawTextBox.Text            = prop.szMOTDRaw;
            tcpportNumericUpDown.Value     = prop.nTcpPort;
            udpportNumericUpDown.Value     = prop.nUdpPort;
            usertimeoutNumericUpDown.Value = prop.nUserTimeout;
            autosaveCheckBox.Checked       = prop.bAutoSave;

            voiceNumericUpDown1.Value     = prop.nMaxVoiceTxPerSecond / 1024;
            vidcapNumericUpDown5.Value    = prop.nMaxVideoCaptureTxPerSecond / 1024;
            mediafileNumericUpDown2.Value = prop.nMaxMediaFileTxPerSecond / 1024;
            desktopNumericUpDown3.Value   = prop.nMaxDesktopTxPerSecond / 1024;
            totalNumericUpDown4.Value     = prop.nMaxTotalTxPerSecond / 1024;

            versionTextBox.Text = prop.szServerVersion;
        }