private static void RedeemQueue()
        {
            Write("Probing Queue in 15 seconds...");
            Thread.Sleep(15000);
            while (true)
            {
                if (CodeQueue.GetCodeQueue().Count > 0)
                {
                    foreach (var queuedCode in CodeQueue.GetCodeQueue())
                    {
                        // get the event list and pass it the code we want it to type
                        //
                        var loop = GetRedeemLoop(queuedCode);

                        // call the main loop to carry out the event of redeeming the code
                        //
                        DolphinScript.Lib.Backend.Common.DoLoop(loop);

                        // save the code to the internal list of redeemed codes
                        //
                        Properties.Settings.Default.RedeemedCodes.Add(queuedCode);

                        // remove the redeemed code from the code queue
                        //
                        CodeQueue.RemoveCodeFromQueue(queuedCode);
                    }
                }
                else
                {
                    Write("No codes currently in the queue...");
                }

                Thread.Sleep(15000);
            }
        }
예제 #2
0
        private static void Chat_OnMessageReceived(ChatMessageEventArgs e)
        {
            if (e.Message.Contains("AP"))
            {
                var m = e.Message;
                try
                {
                    var code = m.Substring(m.IndexOf("AP"), 17);

                    if (!Properties.Settings.Default.RedeemedCodes.Contains(code) && !CodeQueue.GetCodeQueue().Contains(code) && !code.Contains(" "))
                    {
                        CodeQueue.AddCodeToQueue(code);

                        foreach (var queuedCode in CodeQueue.GetCodeQueue())
                        {
                            var loop = GetRedeemLoop(queuedCode);
                            DolphinScript.Lib.Backend.Common.DoLoop(loop);

                            Properties.Settings.Default.RedeemedCodes.Add(code);

                            CodeQueue.RemoveCodeFromQueue(code);
                        }
                    }
                }
                catch { }
            }
        }
예제 #3
0
 private void CodeMatrix_CodeSelectedEvent(object sender, byte e)
 {
     CodeQueue.InputCode(e);
     foreach (UCCodeTarget codeTarget in FLPCodeTargets.Controls)
     {
         codeTarget.InputCode(e);
     }
 }
예제 #4
0
 /// <summary>
 /// Creates a clone of this instance
 /// </summary>
 /// <returns>Clone of this instance</returns>
 public object Clone()
 {
     return(new Channels
     {
         HTTP = (Channel)HTTP.Clone(),
         Telnet = (Channel)Telnet.Clone(),
         File = (Channel)File.Clone(),
         USB = (Channel)USB.Clone(),
         AUX = (Channel)AUX.Clone(),
         Daemon = (Channel)Daemon.Clone(),
         CodeQueue = (Channel)CodeQueue.Clone(),
         LCD = (Channel)LCD.Clone(),
         SPI = (Channel)SPI.Clone(),
         AutoPause = (Channel)AutoPause.Clone()
     });
 }
        private static void Chat_OnMessageReceived(ChatMessageEventArgs e)
        {
            if (e.Message.Contains("AP"))
            {
                var m = e.Message;
                try
                {
                    var code = m.Substring(m.IndexOf("AP"), 17);

                    if (!Properties.Settings.Default.RedeemedCodes.Contains(code) && !CodeQueue.GetCodeQueue().Contains(code) && !code.Contains(" "))
                    {
                        CodeQueue.AddCodeToQueue(code);
                    }
                    else
                    {
                        Write("Code Spotted: " + code + " (Already Redeemed).");
                    }
                }
                catch { }
            }
        }
예제 #6
0
        /// <summary>
        /// Assigns every property from another instance
        /// </summary>
        /// <param name="from">Object to assign from</param>
        /// <exception cref="ArgumentNullException">other is null</exception>
        /// <exception cref="ArgumentException">Types do not match</exception>
        public void Assign(object from)
        {
            if (from == null)
            {
                throw new ArgumentNullException();
            }
            if (!(from is Channels other))
            {
                throw new ArgumentException("Invalid type");
            }

            HTTP.Assign(other.HTTP);
            Telnet.Assign(other.Telnet);
            File.Assign(other.File);
            USB.Assign(other.USB);
            AUX.Assign(other.AUX);
            Daemon.Assign(other.Daemon);
            CodeQueue.Assign(other.CodeQueue);
            LCD.Assign(other.LCD);
            SPI.Assign(other.SPI);
            AutoPause.Assign(other.AutoPause);
        }