示例#1
0
        private void Client_OnConnected(object sender, TwitchLib.Events.Client.OnConnectedArgs e)
        {
            using (SQLiteConnection db = new SQLiteConnection(ConnectionString))
            {
                db.Open();
                using (SQLiteCommand dbCommand = new SQLiteCommand($"UPDATE `settings` SET `value`='{username}' WHERE `name`='username';UPDATE `settings` SET `value`='{oauth}' WHERE `name`='password';UPDATE `settings` SET `value`='{channel}' WHERE `name`='channel';", db))
                {
                    dbCommand.ExecuteNonQuery();
                }
            }
            metroButton2.BeginInvoke((MethodInvoker) delegate() {
                metroButton2.Text = "Disconnect";
            });
            lbl_status.BeginInvoke((MethodInvoker) delegate() {
                lbl_status.Style = MetroFramework.MetroColorStyle.Green;
                lbl_status.Text  = "Connected";
            });
            tbx_channel.BeginInvoke((MethodInvoker) delegate() {
                tbx_channel.Enabled = false;
            });
            tbx_username.BeginInvoke((MethodInvoker) delegate() {
                tbx_username.Enabled = false;
            });
            tbx_password.BeginInvoke((MethodInvoker) delegate() {
                tbx_password.Enabled = false;
            });

            RefreshUsers();
        }
示例#2
0
 private static void _client_OnConnected(object sender, TwitchLib.Events.Client.OnConnectedArgs e)
 {
     Log.Information("Connected to Twitch");
 }
示例#3
0
 /// <summary>
 /// Fires when Client connected
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void OnConnected(object sender, TwitchLib.Events.Client.OnConnectedArgs e)
 {
     AivaTwitchClient.JoinChannel(Channel);
 }
示例#4
0
 private void Client_OnConnected(object sender, TwitchLib.Events.Client.OnConnectedArgs e)
 {
     Log.Information("TwitchClient has Connected to Twitch");
 }
示例#5
0
 private async void Client_OnConnected(object sender, TwitchLib.Events.Client.OnConnectedArgs e)
 {
     _logger.Information("Connected to Twitch Channel {Channel}", e.AutoJoinChannel);
     await SendMessage($"{Bot.BotNickname} Online...").ConfigureAwait(false);
 }
示例#6
0
 private void TwitchWhispers_OnConnected(object sender, TwitchLib.Events.Client.OnConnectedArgs e)
 {
     _logger.Information("Twitch Whisper Client Connected");
 }