public NewsWaitingState(MachineContext context, double time) : base(context) { this.timer = new Util.StaticTimer(context.RetryTimeout); this.queueTime = new Util.StaticTimer(TimeSpan.FromMilliseconds(time)); this.retriesUsed = 0; }
public NewsTransferState(MachineContext context, IState prev) : base(context) { this.prev = prev; this._timer = new Util.StaticTimer(TimeSpan.FromSeconds(8)); this.queueMsg = new Queue<NewsMessage>(); }
public NewsCrawlerState(MachineContext context, IState prev) : base(context) { this.prev = prev; this._timer = new Util.StaticTimer(TimeSpan.FromMinutes(3)); InitRssFeed(); }
public override void OnStart() { base.Start = true; this.waitingForOverlayAnimationCompleted = new Util.StaticTimer(TimeSpan.FromSeconds(10)); Trace("[Overlay] Waiting for close..."); base.Context.CloseOverlay(false); }
public override void OnTimer() { if (base.Start) { if (openOverlay) { Trace("[Overlay] Created window"); overlayAnimation = new Util.StaticTimer(TimeSpan.FromSeconds(9)); openOverlay = false; } if (overlayAnimation != null && overlayAnimation.IsTimeout()) { base.Context.SetState(new NewsQueueState(base.Context)); base.Context.Start(); } else if (waitingForOverlayAnimationCompleted.IsTimeout()) { Trace("[Overlay] Waiting for animation completed..."); waitingForOverlayAnimationCompleted.Restart(); } } }
public NewsBeginState(MachineContext context) : base(context) { waitingForOverlayAnimationCompleted = new Util.StaticTimer(TimeSpan.FromSeconds(1)); }
public override void OnStart() { base.Start = true; this._timer = new Util.StaticTimer(TimeSpan.FromMinutes(1)); }
public NewsEndState(MachineContext context) : base(context) { _timer = new Util.StaticTimer(TimeSpan.FromSeconds(1)); }