Ejemplo n.º 1
0
        /// <summary>
        /// 只进行提示
        /// </summary>
        public static void Tip(string tip, TipType tt = TipType.Normal)
        {
            SetConsole(tip);

            OnTip?.Invoke(tt, tip);

            LogViewer?.ShowTip(tip);
        }
Ejemplo n.º 2
0
        private void handleComplexObject(JArray decoded)
        {
            // only handle "event" types
            if (decoded[0].ToString() != "event")
            {
                return;
            }
            // only handle follows from twitch
            if (decoded[1]["provider"].ToString() != "twitch")
            {
                return;
            }
            switch (decoded[1]["type"].ToString())
            {
            case "follow":
                OnFollower?.Invoke(client, Parsing.Follower.handleFollower(decoded[1]["data"]));
                return;

            case "cheer":
                OnCheer?.Invoke(client, Parsing.Cheer.handleCheer(decoded[1]["data"]));
                return;

            case "host":
                OnHost?.Invoke(client, Parsing.Host.handleHost(decoded[1]["data"]));
                return;

            case "tip":
                OnTip?.Invoke(client, Parsing.Tip.handleTip(decoded[1]["data"]));
                return;

            case "subscriber":
                OnSubscriber?.Invoke(client, Parsing.Subscriber.handleSubscriber(decoded[1]["data"]));
                return;

            default:
                OnUnknownComplexObject?.Invoke(client, decoded[1]["type"].ToString());
                return;
            }
        }
Ejemplo n.º 3
0
 void Tip(string Receiver, decimal Amount)
 {
     OnTip?.Invoke(this, new TipEventArgs {
         Receiver = Receiver, Amount = Amount
     });
 }
Ejemplo n.º 4
0
 public void Tip(string message)
 {
     OnTip.InvokeIfExists(message);
 }