Ejemplo n.º 1
0
 internal static AnimationControler.AnimePacket AnimeCustomPacket(string queueName, int sleepTime, CustomAnimeHandler method, int maxIteration, bool queue, int queueLevel, object qOwner, AnimationControler.FinalCallback finalCallback)
 {
     CustomThreadParam baseThreadParam = new CustomThreadParam();
     baseThreadParam.time = sleepTime;
     baseThreadParam.customMethod = method;
     baseThreadParam.MaxIteration = maxIteration;
     baseThreadParam.QueueLevel = queueLevel;
     baseThreadParam.finalCallback = finalCallback;
     baseThreadParam.queueName = queueName;
     return new AnimationControler.AnimePacket() { isQueue = queue && queueLevel >= 0, queueOwner = qOwner, method = Custom, threadParam = baseThreadParam };
 }
Ejemplo n.º 2
0
 public static object AnimeCustom(Control ctrl, string queueName, int sleepTime, CustomAnimeHandler method, int maxIteration, bool queue, int queueLevel, object queueOwner, AnimationControler.FinalCallback finalCallback)
 {
     return AnimationControler.ProcessPacket(ctrl, AnimeCustomPacket(queueName, sleepTime, method, maxIteration, queue, queueLevel, queueOwner, finalCallback));
 }
Ejemplo n.º 3
0
 private static void CustomObjectMethod(object ctrl, AnimationControler.AnimatorState state, CustomAnimeHandler method)
 {
     if (ctrl is Control)
     {
         ((Control)ctrl).Invoke(new CustomAnimeHandler(method), state);
         return;
     }
     if (ctrl is DrawRect)
     {
         ((DrawRect)ctrl).Invoke(new CustomAnimeHandler(method), state);
         return;
     }
     method(state);
 }