Exemplo n.º 1
0
        private void btnQueryAll_Click(object sender, EventArgs e)
        {
            ConferenceRoomManagement crm = new ConferenceRoomManagement(txtConference.Text, txtAddress.Text, txtPort.Text);

            if (!crm.IsExistConferenceRoom())
            {
                MessageBox.Show("会议室不存在!");
                return;
            }
            var lst = query(txtConference.Text, txtAddress.Text, txtPort.Text);
            var sb  = new StringBuilder();

            for (var i = 0; i < lst.Length; i++)
            {
                var arr      = lst[i].Split('\t');
                var userCode = arr[0];
                var userId   = arr[1];
                var isMuted  = arr[2] == "Mute" ? "静音" : "正常";
                int speakerVolume;
                crm.GetSpeakerVolume(Convert.ToInt32(userCode), out speakerVolume);
                int micPhoneVolume;
                crm.GetMicPhoneVolume(Convert.ToInt32(userCode), out micPhoneVolume);
                sb.Append($"会议室ID={txtConference.Text},用户代码={userCode},用户ID={userId},是否静音={isMuted},输入={micPhoneVolume},输出={speakerVolume}{System.Environment.NewLine}");
            }
            MessageBox.Show(sb.ToString());
        }
Exemplo n.º 2
0
        private void btnGetSpeakerVolume_Click(object sender, EventArgs e)
        {
            ConferenceRoomManagement crm = new ConferenceRoomManagement(txtConference.Text, txtAddress.Text, txtPort.Text);

            if (!crm.IsExistConferenceRoom())
            {
                MessageBox.Show("会议室不存在!");
                return;
            }
            int volume;

            crm.GetSpeakerVolume(Convert.ToInt32(txtUserCode.Text), out volume);
            txtRtnVolume.Text = volume.ToString();
        }