Example #1
0
        public string getInfoString(ApiHandler.Stream s)
        {
            DateTime dt   = DateTime.Now;
            string   data = dt.ToString("HH:mm  dd/MM/yy");

            channelURL = s.channel.url;
            return(String.Format("Game: {0}\nViewers: {1}\nStatus: {2}\nURL: {3}\nfollowers: {4}\n\nLast Updated: {5}", s.game, s.viewers, s.channel.status, channelURL, s.channel.followers, data));
        }
Example #2
0
 private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
 {
     try
     {
         stream = api.getStreamInfo(txtChannelName.Text);
         backgroundWorker1.ReportProgress(1);
         viewers = api.getChatInfo(txtChannelName.Text).chatters.viewers;
         backgroundWorker1.ReportProgress(2);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Oops", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }