From 0e3c61d394da72b643ef9acf0c6c385ffb5a821a Mon Sep 17 00:00:00 2001 From: Grabacr07 Date: Wed, 6 Aug 2014 11:46:34 +0900 Subject: [PATCH] =?UTF-8?q?=E9=81=A0=E5=BE=81=E3=81=A8=E5=85=A5=E6=B8=A0?= =?UTF-8?q?=E3=81=AE=E3=82=AB=E3=82=A6=E3=83=B3=E3=83=88=E3=83=80=E3=82=A6?= =?UTF-8?q?=E3=83=B3=E3=81=AE=E4=BB=95=E6=A7=98=E5=A4=89=E6=9B=B4=20?= =?UTF-8?q?=E3=83=BB=E8=A1=A8=E7=A4=BA=E3=81=AF=E3=82=B2=E3=83=BC=E3=83=A0?= =?UTF-8?q?=E3=81=AE=E8=A1=A8=E7=A4=BA=E9=80=9A=E3=82=8A=20=E3=83=BB?= =?UTF-8?q?=E9=80=9A=E7=9F=A5=E3=81=AE=E3=81=BF=E8=A8=AD=E5=AE=9A=E7=A7=92?= =?UTF-8?q?=E6=95=B0=E3=81=A0=E3=81=91=E6=97=A9=E3=82=81=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fixed #51 --- Grabacr07.KanColleWrapper/Models/Expedition.cs | 6 ++++-- Grabacr07.KanColleWrapper/Models/RepairingDock.cs | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Grabacr07.KanColleWrapper/Models/Expedition.cs b/Grabacr07.KanColleWrapper/Models/Expedition.cs index 78fceb736..b33de8f39 100644 --- a/Grabacr07.KanColleWrapper/Models/Expedition.cs +++ b/Grabacr07.KanColleWrapper/Models/Expedition.cs @@ -139,12 +139,14 @@ private void UpdateCore() { if (this.ReturnTime.HasValue) { - var remaining = this.ReturnTime.Value - TimeSpan.FromSeconds(KanColleClient.Current.Settings.NotificationShorteningTime) - DateTimeOffset.Now; + var remaining = this.ReturnTime.Value - DateTimeOffset.Now; if (remaining.Ticks < 0) remaining = TimeSpan.Zero; this.Remaining = remaining; - if (!this.notificated && this.Returned != null && remaining.Ticks <= 0) + if (!this.notificated + && this.Returned != null + && remaining <= TimeSpan.FromSeconds(KanColleClient.Current.Settings.NotificationShorteningTime)) { this.Returned(this, new ExpeditionReturnedEventArgs(this.fleet.Name)); this.notificated = true; diff --git a/Grabacr07.KanColleWrapper/Models/RepairingDock.cs b/Grabacr07.KanColleWrapper/Models/RepairingDock.cs index 481e6f5f8..bd5e7d5bc 100644 --- a/Grabacr07.KanColleWrapper/Models/RepairingDock.cs +++ b/Grabacr07.KanColleWrapper/Models/RepairingDock.cs @@ -186,12 +186,14 @@ protected override void Tick() if (this.CompleteTime.HasValue) { - var remaining = this.CompleteTime.Value - TimeSpan.FromSeconds(KanColleClient.Current.Settings.NotificationShorteningTime) - DateTimeOffset.Now; + var remaining = this.CompleteTime.Value - DateTimeOffset.Now; if (remaining.Ticks < 0) remaining = TimeSpan.Zero; this.Remaining = remaining; - if (!this.notificated && this.Completed != null && remaining.Ticks <= 0) + 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;