Ejemplo n.º 1
0
        private void Startbutton_Click(object sender, EventArgs e)
        {
            client.SetSamplingrate(samplingrate.SelectedItem.ToString());
            client.SetFacebook(facebook.Text);
            client.SetTwitch(twitch.Text);

            int result = client.Start();

            switch (result)
            {
            case 0:
                MessageBox.Show("ffmpeg path not set.", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
                ffmpeg_test.Text = "ERROR";
                break;

            case 1:
                MessageBox.Show("Invalid ffmpeg output.", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
                ffmpeg_test.Text = "ERROR";
                break;

            case 2:
                MessageBox.Show("streamlink path not set.", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
                streamlink_test.Text = "ERROR";
                break;

            case 3:
                MessageBox.Show("Invalid streamlink output.", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
                streamlink_test.Text = "ERROR";
                break;

            case 4:
                MessageBox.Show("Facebook key not set.", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
                break;

            case 5:
                MessageBox.Show("Enter Twitch account to re-stream.", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
                break;

            default:
                MessageBox.Show("Finished Stream!", "INFORMATION", MessageBoxButtons.OK, MessageBoxIcon.Information);
                break;
            }
        }
        private void button2_Click(object sender, EventArgs e)
        {
            client.SetSamplingrate(samplingrate.SelectedItem.ToString());
            client.SetFacebook(facebook.Text);
            client.SetTwitch(twitch.Text);

            int result = client.Start();

            switch (result)
            {
            case 0:
                MessageBox.Show("ffmpeg path not set.");
                ffmpeg_test.Text = "ERROR";
                break;

            case 1:
                MessageBox.Show("Invalid ffmpeg output.");
                ffmpeg_test.Text = "ERROR";
                break;

            case 2:
                MessageBox.Show("streamlink path not set.");
                streamlink_test.Text = "ERROR";
                break;

            case 3:
                MessageBox.Show("Invalid streamlink output.");
                streamlink_test.Text = "ERROR";
                break;

            case 4:
                MessageBox.Show("Facebook key not set.");
                break;

            case 5:
                MessageBox.Show("Enter Twitch account to re-stream.");
                break;

            default:

                break;
            }
        }