Ejemplo n.º 1
0
        private void favStreamGrid_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            var streamer = favStreamGrid.SelectedItem as favStreamer;

                if (streamer != null)
                {
                    string streamName = streamer.streamerName;

                    if (checkBox_doChat.IsChecked == true)
                    {
                        ProcessStartInfo StartChat = new ProcessStartInfo("http://www.twitch.tv/chat/embed?channel=" + streamName + "&popout_chat=true");
                        StartChat.WindowStyle = ProcessWindowStyle.Normal;
                        Process.Start(StartChat);
                    }

                    tabController.SelectedIndex = 0;
                    classLog.logWithTime("Started Stream: " + "'" + streamName + "'" + " " + "on" + " '" + "Twitch" + "' " + " with" + " '" + "Source" + "' " + "quality.", rtb_Console);

                    backgroundProcess startStream = new backgroundProcess();
                    startStream.startProcess(streamName, fav_CbBox.SelectedIndex);

                    foreach (string s in startStream.consoleOutputs)
                    {
                        classLog.logWithTime(s, rtb_Console);
                    }
                    rtb_Console.AppendText("\n");
                }
                e.Handled = true;
        }
Ejemplo n.º 2
0
        // When the "Go!" button is clicked, do things.
        private void btn_Go_Click(object sender, RoutedEventArgs e)
        {
            if (tb_Channel.Text == string.Empty)
            {
                System.Media.SystemSounds.Hand.Play();
                classLog.logWithTime("Error: One of the required fields were left blank!", rtb_Console);
            }
            else
            {
                if (checkBox_doChat.IsChecked == true)
                {
                    ProcessStartInfo StartChat = new ProcessStartInfo("http://www.twitch.tv/chat/embed?channel=" + tb_Channel.Text + "&popout_chat=true");
                    StartChat.WindowStyle = ProcessWindowStyle.Normal;
                    Process.Start(StartChat);
                }

                try
                {
                    backgroundProcess startStream = new backgroundProcess();
                    startStream.startProcess(tb_Channel.Text, cb_StreamQuality.SelectedIndex);
                    classLog.logWithTime("Started Stream: " + "'" + tb_Channel.Text + "'" + " " + "on" + " '" + cb_StreamSource.Text + "' " + " with" + " '" + cb_StreamQuality.Text + "' " + "quality.", rtb_Console);;
                    foreach (string s in startStream.consoleOutputs)
                    {
                        classLog.logWithTime(s, rtb_Console);
                    }

                    if (checkbox_doStats.IsChecked == true)
                    {
                        tabController.SelectedIndex = 1;
                        pollStreamerMainTab(tb_Channel.Text);
                    }
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.ToString(), ApplicationName, MessageBoxButton.OK, MessageBoxImage.Error);
                    this.Close();
                }
                rtb_Console.AppendText("\n");
            }
        }