Skip to content

Commit

Permalink
Merge branch 'ui-localisation' into translation
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuubari committed Feb 19, 2016
2 parents f6d8faf + 72a46b7 commit 8018bf2
Show file tree
Hide file tree
Showing 13 changed files with 37 additions and 56 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ Please refer to the [FAQ](https://github.com/Yuubari/KanColleViewer/wiki/Frequen
The original developer, ([@Grabacr07](https://twitter.com/Grabacr07)), uses Windows 8.1 Pro to build and test this application.
The toast notification system from Windows 8 is not supported on Windows 7 (although you will still get the good old tray icon notifications). It's recommended to run KCV in Windows 8.

* [.NET Framework 4.5](http://www.microsoft.com/en-us/download/details.aspx?id=30653)
* .NET Framework 4.6 ([Web Installer](https://www.microsoft.com/en-us/download/details.aspx?id=48130) or [Offline Installer](https://www.microsoft.com/en-us/download/details.aspx?id=48137))

Windows 7 requires that you install .NET Framework 4.5.
Windows 8 comes with it pre-installed.
Windows 7 and 8.x require that you install .NET Framework 4.6.
Windows 10 comes with it pre-installed.

KCV uses IE to display the game's web page, so it depends on IE settings. If you're experiencing issues accessing the game, please verify that Flash works in Internet Explorer. It's also recommended to install the latest version of [Adobe Flash Player](https://get.adobe.com/flashplayer/).

Expand All @@ -54,7 +54,7 @@ KCV does not perform Flash extraction and instead provides a viewport of sorts t

### Development Environment and Language

Developed in C# + WPF on Windows 8.1 Pro using Visual Studio Enterprise 2015.
Developed in C# + WPF on Windows 10 Pro using Visual Studio Enterprise 2015.

### License

Expand Down
2 changes: 1 addition & 1 deletion source/Grabacr07.KanColleViewer/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
ResourceDictionaryLocation.None,
ResourceDictionaryLocation.SourceAssembly)]

[assembly: AssemblyVersion("4.2.0.0")]
[assembly: AssemblyVersion("4.2.3.0")]
Binary file not shown.
Binary file not shown.
Binary file not shown.
3 changes: 2 additions & 1 deletion source/Grabacr07.KanColleViewer/readme.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
提督業も忙しい! (KanColleViewer)
version 4.2.0 2016/02/08
version 4.2.1 2016/02/12
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━


Expand Down Expand Up @@ -167,6 +167,7 @@ Desktop Toast

■更新履歴

2016/02/12 - version 4.2.1 リリース
2016/02/08 - version 4.2 リリース
2015/11/10 - version 4.1.6 リリース
2015/10/30 - version 4.1.5 リリース
Expand Down
56 changes: 18 additions & 38 deletions source/Grabacr07.KanColleWrapper/Models/Expedition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,12 @@ private set

#endregion

#region ReturnTime / IsInExecution 変更通知プロパティ
#region ReturnTime / Remaining / IsInExecution 変更通知プロパティ

private DateTimeOffset? _ReturnTime;

/// <summary>
/// 遠征から帰還する日時を取得します。
/// </summary>
public DateTimeOffset? ReturnTime
{
get { return this._ReturnTime; }
Expand All @@ -69,11 +71,19 @@ private set
this._ReturnTime = value;
this.notificated = false;
this.RaisePropertyChanged();
this.RaisePropertyChanged(nameof(this.Remaining));
this.RaisePropertyChanged(nameof(this.IsInExecution));
}
}
}

/// <summary>
/// 遠征から帰還するまでの時間を取得します。
/// </summary>
public TimeSpan? Remaining
=> !this.ReturnTime.HasValue ? (TimeSpan?)null
: this.ReturnTime.Value < DateTimeOffset.Now ? TimeSpan.Zero
: this.ReturnTime.Value - DateTimeOffset.Now;

/// <summary>
/// 現在遠征を実行中かどうかを示す値を取得します。
Expand All @@ -82,25 +92,6 @@ private set

#endregion

#region Remaining 変更通知プロパティ

private TimeSpan? _Remaining;

public TimeSpan? Remaining
{
get { return this._Remaining; }
set
{
if (this._Remaining != value)
{
this._Remaining = value;
this.RaisePropertyChanged();
}
}
}

#endregion

/// <summary>
/// 艦隊が遠征から帰ったときに発生します。
/// </summary>
Expand All @@ -119,7 +110,6 @@ internal void Update(long[] rawData)
this.Id = -1;
this.Mission = null;
this.ReturnTime = null;
this.Remaining = null;
}
else
{
Expand All @@ -132,24 +122,14 @@ internal void Update(long[] rawData)

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

this.Remaining = remaining;
this.RaisePropertyChanged(nameof(this.Remaining));

if (!this.notificated
&& this.Returned != null
&& remaining <= TimeSpan.FromSeconds(KanColleClient.Current.Settings.NotificationShorteningTime))
{
this.Returned(this, new ExpeditionReturnedEventArgs(this.fleet.Name));
this.notificated = true;
}
}
else
if (!this.notificated
&& this.Returned != null
&& this.Remaining <= TimeSpan.FromSeconds(KanColleClient.Current.Settings.NotificationShorteningTime))
{
this.Remaining = null;
this.Returned(this, new ExpeditionReturnedEventArgs(this.fleet.Name));
this.notificated = true;
}
}

Expand Down
7 changes: 4 additions & 3 deletions source/Grabacr07.KanColleWrapper/Models/FleetState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -251,12 +251,13 @@ public FleetState(Homeport homeport, params Fleet[] fleets)
public void Calculate()
{
var ships = this.source.SelectMany(x => x.Ships).WithoutEvacuated().ToArray();
var firstFleetShips = this.source.FirstOrDefault()?.Ships.WithoutEvacuated().ToArray() ?? new Ship[0];

this.TotalLevel = ships.HasItems() ? ships.Sum(x => x.Level) : 0;
this.AverageLevel = ships.HasItems() ? (double)this.TotalLevel / ships.Length : 0.0;
this.AirSuperiorityPotential = ships.Sum(s => s.CalcAirSuperiorityPotential());
this.MinAirSuperiorityPotential = ships.Sum(s => s.CalcMinAirSuperiorityPotential());
this.MaxAirSuperiorityPotential = ships.Sum(s => s.CalcMaxAirSuperiorityPotential());
this.AirSuperiorityPotential = firstFleetShips.Sum(s => s.CalcAirSuperiorityPotential());
this.MinAirSuperiorityPotential = firstFleetShips.Sum(s => s.CalcMinAirSuperiorityPotential());
this.MaxAirSuperiorityPotential = firstFleetShips.Sum(s => s.CalcMaxAirSuperiorityPotential());
this.Speed = ships.All(x => x.Info.Speed == ShipSpeed.Fast)
? FleetSpeed.Fast
: ships.All(x => x.Info.Speed == ShipSpeed.Low)
Expand Down
4 changes: 2 additions & 2 deletions source/Grabacr07.KanColleWrapper/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
[assembly: ComVisible(false)]
[assembly: Guid("8A13AB28-4E9F-423D-80AD-23EEF2821959")]

[assembly: AssemblyVersion("1.4.0")]
[assembly: AssemblyInformationalVersion("1.4.0")]
[assembly: AssemblyVersion("1.5.0")]
[assembly: AssemblyInformationalVersion("1.5.0")]
4 changes: 2 additions & 2 deletions source/Plugins/TaskbarProgress/ExpeditionProgress.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ namespace Grabacr07.KanColleViewer.Plugins
[Export(typeof(ITaskbarProgress))]
[Export(typeof(ISettings))]
[ExportMetadata("Guid", guid)]
[ExportMetadata("Title", "ExpeditionProgressIndicator")]
[ExportMetadata("Title", "タスク バー遠征モニター")]
[ExportMetadata("Description", "遠征の状況をタスク バー インジケーターに報告します。")]
[ExportMetadata("Version", "1.0")]
[ExportMetadata("Version", "1.1")]
[ExportMetadata("Author", "@Grabacr07")]
public class ExpeditionProgress : IPlugin, ITaskbarProgress, ISettings, IDisposableHolder
{
Expand Down
4 changes: 1 addition & 3 deletions source/Plugins/TaskbarProgress/ExpeditionWrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ public ExpeditionWrapper(int id, Expedition expedition)
{
this.Id = id;
this.Source = expedition;
this.Source
.Subscribe(nameof(Expedition.ReturnTime), () => this.UpdateState()).AddTo(this)
.Subscribe(nameof(Expedition.Remaining), () => this.UpdateState()).AddTo(this);
this.Source.Subscribe(nameof(Expedition.Remaining), () => this.UpdateState()).AddTo(this);

}

Expand Down
3 changes: 2 additions & 1 deletion source/Plugins/TaskbarProgress/HpProgress.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace Grabacr07.KanColleViewer.Plugins
[ExportMetadata("Guid", guid)]
[ExportMetadata("Title", "HpProgressIndicator")]
[ExportMetadata("Description", "艦隊内の最大損害艦 HP をタスク バー インジケーターに報告します。")]
[ExportMetadata("Version", "1.0")]
[ExportMetadata("Version", "1.1")]
[ExportMetadata("Author", "@veigr")]
public class HpProgress : IPlugin, ITaskbarProgress, IDisposableHolder
{
Expand Down Expand Up @@ -86,6 +86,7 @@ public void Update()
ships = org.Fleets.Values
.Where(x => x.IsInSortie)
.SelectMany(x => x.Ships)
.Where(s => (s.Situation & (ShipSituation.Tow | ShipSituation.Evacuation)) == 0)
.ToArray();
}
else
Expand Down
2 changes: 1 addition & 1 deletion source/Plugins/TaskbarProgress/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
ResourceDictionaryLocation.None,
ResourceDictionaryLocation.SourceAssembly)]

[assembly: AssemblyVersion("1.0.0")]
[assembly: AssemblyVersion("1.2.0")]

0 comments on commit 8018bf2

Please sign in to comment.