Пример #1
0
        private void MakeLoopbackButton()
        {
            loopbackButton             = new MocrButton();
            loopbackButton.Location    = new Point(794, 130);
            loopbackButton.Size        = new Size(85, 35);
            loopbackButton.buttonStyle = MocrButton.style.THIN_BORDER_LIGHT;
            loopbackButton.Text        = "LOOPBACK";
            loopbackButton.Font        = smallFont;
            loopbackButton.setLightColor(MocrButton.color.BLANK);
            loopbackButton.Click += ToggleLoopback;
            this.Controls.Add(loopbackButton);

            ToolTip toolTip1 = new ToolTip();

            toolTip1.ShowAlways     = true;
            toolTip1.AutomaticDelay = 1000;
            toolTip1.UseFading      = true;
            toolTip1.ToolTipTitle   = "LOOPBACK";
            toolTip1.SetToolTip(loopbackButton, "If loopback is active no data is transmitted to,"
                                + "\nor received from the server. Instead the audio"
                                + "\nis run through the encoder and straight into"
                                + "\nthe decoder. This is usefull for testing the"
                                + "\nlocal inputs and outputs, and for evaluating"
                                + "\nthe different codecs without a server connection.");
        }
Пример #2
0
        private void MakeTransmitControls()
        {
            CustomLabel lbl = new CustomLabel();

            lbl.Location = new Point(794, 250);
            lbl.Size     = new Size(85, 28);
            lbl.Font     = tinyFont;
            lbl.setCharWidth(8);
            lbl.type = CustomLabel.LabelType.ENGRAVED;
            lbl.Text = "TRANSMIT";
            this.Controls.Add(lbl);

            transmitOpenButton             = new MocrButton();
            transmitOpenButton.Location    = new Point(794, 278);
            transmitOpenButton.Size        = new Size(85, 20);
            transmitOpenButton.buttonStyle = MocrButton.style.THIN_BORDER_LIGHT;
            transmitOpenButton.Text        = "OPEN";
            transmitOpenButton.Font        = tinyFont;
            transmitOpenButton.setLightColor(MocrButton.color.BLANK);
            transmitOpenButton.setLitState(true);
            transmitOpenButton.Click += (a, b) => SetTransmitMode(a, b, 0);
            this.Controls.Add(transmitOpenButton);

            transmitPTTButton             = new MocrButton();
            transmitPTTButton.Location    = new Point(794, 298);
            transmitPTTButton.Size        = new Size(85, 20);
            transmitPTTButton.buttonStyle = MocrButton.style.THIN_BORDER_LIGHT;
            transmitPTTButton.Text        = "PTT";
            transmitPTTButton.Font        = tinyFont;
            transmitPTTButton.setLightColor(MocrButton.color.BLANK);
            transmitPTTButton.Click += (a, c) => SetTransmitMode(a, c, 1);
            this.Controls.Add(transmitPTTButton);

            askForPTTKeyBox           = new Label();
            askForPTTKeyBox.Text      = "Press the key you wish to use for PTT(Push - To - Talk)";
            askForPTTKeyBox.Size      = new Size(300, 200);
            askForPTTKeyBox.Location  = new Point((this.ClientSize.Width - 300) / 2, (this.ClientSize.Height - 200) / 2);
            askForPTTKeyBox.Font      = font;
            askForPTTKeyBox.Visible   = false;
            askForPTTKeyBox.TextAlign = ContentAlignment.MiddleCenter;
            askForPTTKeyBox.BackColor = Color.FromArgb(96, 96, 96);
            this.Controls.Add(askForPTTKeyBox);

            MocrButton btn = new MocrButton();

            btn.Text        = "SET KEY";
            btn.Font        = tinyFont;
            btn.buttonStyle = MocrButton.style.DSKY;
            btn.Size        = new Size(65, 20);
            btn.Location    = new Point(880, 298);
            btn.Click      += AskForPTTKey;
            this.Controls.Add(btn);
        }