Example #1
0
        private void mSetAuthTokenButton_Click(object sender, EventArgs e)
        {
            LoginForm frm = new LoginForm();

            frm.ShowPasswordField = false;
            DialogResult result = frm.ShowDialog();

            if (result != System.Windows.Forms.DialogResult.OK)
            {
                return;
            }

            // attempt to read the previously cached authtoken from file

            string str = null;

            try
            {
                str = System.IO.File.ReadAllText(kAuthTokenFile);
            }
            catch (Exception x)
            {
                MessageBox.Show(x.ToString());
                return;
            }

            AuthToken token = new AuthToken(str);

            mBroadcastController.ClientSecret = mClientSecretText.Text;
            mBroadcastController.SetAuthToken(frm.UserName, token);
        }
Example #2
0
 protected void HandleAuthTokenRequestComplete(Twitch.ErrorCode result, Twitch.AuthToken authToken)
 {
     if (Twitch.Error.Failed(result))
     {
         MessageBox.Show("Auth token request failed, please check your credentials and CA cert file path and try again.");
         mBroadcastController.ShutdownTwitch();
     }
 }
Example #3
0
 protected void HandleAuthTokenRequestComplete(Twitch.ErrorCode result, Twitch.AuthToken authToken)
 {
     if (Twitch.Error.Failed(result))
     {
         mTwitchUsername = null;
         mTwitchPassword = null;
         MessageBox.Show("Login failed, please check your credentials and try again.");
     }
 }
Example #4
0
 protected void HandleAuthTokenRequestComplete(ErrorCode result, AuthToken authToken)
 {
     if (Twitch.Error.Failed(result))
     {
         MessageBox.Show("Auth token request failed, please check your username and password and try again");
     }
     else
     {
         // cache the auth token for reuse on consecutive runs
         try
         {
             System.IO.File.WriteAllText(kAuthTokenFile, authToken.Data);
         }
         catch (Exception x)
         {
             MessageBox.Show(x.ToString());
         }
     }
 }
Example #5
0
        private void mSetAuthTokenButton_Click(object sender, EventArgs e)
        {
            LoginForm frm = new LoginForm();
            frm.ShowPasswordField = false;
            DialogResult result = frm.ShowDialog();
            if (result != System.Windows.Forms.DialogResult.OK)
            {
                return;
            }

            // attempt to read the previously cached authtoken from file

            string str = null;
            try
            {
                str = System.IO.File.ReadAllText(kAuthTokenFile);
            }
            catch (Exception x)
            {
                MessageBox.Show(x.ToString());
                return;
            }

            AuthToken token = new AuthToken(str);

            mBroadcastController.ClientSecret = mClientSecretText.Text;
            mBroadcastController.SetAuthToken(frm.UserName, token);
        }
Example #6
0
 protected void HandleAuthTokenRequestComplete(ErrorCode result, AuthToken authToken)
 {
     if (Twitch.Error.Failed(result))
     {
         MessageBox.Show("Auth token request failed, please check your username and password and try again");
     }
     else
     {
         // cache the auth token for reuse on consecutive runs
         try
         {
             System.IO.File.WriteAllText(kAuthTokenFile, authToken.Data);
         }
         catch (Exception x)
         {
             MessageBox.Show(x.ToString());
         }
     }
 }