Ejemplo n.º 1
0
 private void Client_Hosting(object sender, OnNowHostingArgs e)
 {
     if (Settings.AnnounceNowHosting)
     {
         client.SendMessage(e.Channel, $"{e.HostedChannel} {Settings.Messages.mNowHosting}");
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Invokes the now hosting.
        /// </summary>
        /// <param name="client">The client.</param>
        /// <param name="channel">The channel.</param>
        /// <param name="hostedChannel">The hosted channel.</param>
        public static void InvokeNowHosting(this TwitchClient client, string channel, string hostedChannel)
        {
            OnNowHostingArgs model = new OnNowHostingArgs()
            {
                Channel       = channel,
                HostedChannel = hostedChannel
            };

            client.RaiseEvent("OnNowHosting", model);
        }
Ejemplo n.º 3
0
        private void OnNowHosting(object sender, OnNowHostingArgs e)
        {
            string content = "";

            content = "<div><span style=\"color:#A4A0A0; font-family:Arial,Helvetica,sans-serif; font-size:10pt;\">" + e.Channel + " is now hosting " + e.HostedChannel + "</span></div>";
            if (webChat.InvokeRequired)
            {
                Action act = () => this.webChat.Document.Body.InnerHtml += content;
                webChat.Invoke(act);
                act = () => ScrollToBottom();
                webChat.Invoke(act);
            }
        }
Ejemplo n.º 4
0
 private void onNowHosting(object sender, OnNowHostingArgs e)
 {
     MessageBox.Show($"The joined channel '{e.Channel}' is now hosting {e.HostedChannel}");
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Passes <see cref="OnNowHosting"/> events down to subscribed plugins.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">An <see cref="OnNowHostingArgs"/> object.</param>
 private void TwitchClient_OnNowHosting(object sender, OnNowHostingArgs e) => this.OnNowHosting?.Invoke(this, e);
Ejemplo n.º 6
0
 private void _client_OnNowHosting(object sender, OnNowHostingArgs e)
 {
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Called when the channel is now hosting another channel.
 /// </summary>
 private void Client_OnNowHosting(object sender, OnNowHostingArgs e)
 {
     Console.WriteLine($"[{e.Channel}] Now hosting {e.HostedChannel}.");
     client.SendMessage(e.Channel, $"{e.Channel} is now hosting {e.HostedChannel}");
 }