Beispiel #1
0
        /// <summary>Executes the callback part of the repeat command.</summary>
        /// <param name="queue">The command queue involved.</param>
        /// <param name="entry">Entry to be executed.</param>
        public static bool TryRepeatCIL(CommandQueue queue, CommandEntry entry)
        {
            RepeatCommandData dat = queue.CurrentRunnable.EntryData[entry.BlockStart - 1] as RepeatCommandData;

            ++dat.Index;
            if (dat.Index <= dat.Total)
            {
                if (entry.ShouldShowGood(queue))
                {
                    entry.GoodOutput(queue, "Repeating...: " + TextStyle.Separate + dat.Index + TextStyle.Base + "/" + TextStyle.Separate + dat.Total);
                }
                return(true);
            }
            if (entry.ShouldShowGood(queue))
            {
                entry.GoodOutput(queue, "Repeat stopping.");
            }
            return(false);
        }
Beispiel #2
0
        public static bool TryRepeatCILNoDebug(CommandQueue queue, int entry_ind)
        {
            RepeatCommandData dat = queue.CurrentRunnable.EntryData[entry_ind] as RepeatCommandData;

            return((++dat.Index) <= dat.Total);
        }