forked from Grabacr07/KanColleViewer
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'Grabacr07/develop' into develop
- Loading branch information
Showing
19 changed files
with
367 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
source/Grabacr07.KanColleViewer/ViewModels/Contents/ShipSpeedExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using System; | ||
using System.Linq; | ||
using Grabacr07.KanColleWrapper.Models; | ||
|
||
namespace Grabacr07.KanColleViewer.ViewModels.Contents | ||
{ | ||
public static class ShipSpeedExtensions | ||
{ | ||
public static string ToDisplayString(this ShipSpeed? speed) => ToDisplayString(speed ?? ShipSpeed.Immovable); | ||
|
||
public static string ToDisplayString(this ShipSpeed speed) | ||
{ | ||
switch (speed) | ||
{ | ||
case ShipSpeed.Fastest: | ||
return "最速"; | ||
case ShipSpeed.Faster: | ||
return "高速+"; | ||
case ShipSpeed.Fast: | ||
return "高速"; | ||
case ShipSpeed.Slow: | ||
return "低速"; | ||
default: | ||
return ""; | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.