Grabacr07.KanColleWrapper.Models.RepairingDock.Tick C# (CSharp) Method

Tick() protected method

protected Tick ( ) : void
return void
        protected override void Tick()
        {
            base.Tick();

            if (this.CompleteTime.HasValue)
            {
                var remaining = this.CompleteTime.Value - DateTimeOffset.Now;
                if (remaining.Ticks < 0) remaining = TimeSpan.Zero;

                this.Remaining = remaining;

                if (!this.notificated
                    && this.Completed != null
                    && remaining <= TimeSpan.FromSeconds(KanColleClient.Current.Settings.NotificationShorteningTime))
                {
                    this.Completed(this, new RepairingCompletedEventArgs(this.Id, this.Ship));
                    this.notificated = true;
                }
            }
            else
            {
                this.Remaining = null;
            }
        }