forked from Zharay/KanColleViewer
-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/Grabacr07/KanColleViewer …
…into prototype Conflicts: .gitignore Grabacr07.KanColleViewer/Properties/AssemblyInfo.cs Grabacr07.KanColleViewer/Properties/Resources.Designer.cs Grabacr07.KanColleViewer/Properties/Resources.en.resx Grabacr07.KanColleViewer/Properties/Resources.ko-KR.resx Grabacr07.KanColleViewer/Properties/Resources.resx Grabacr07.KanColleViewer/Properties/Resources.zh-CN.resx Grabacr07.KanColleViewer/ViewModels/Catalogs/SortableColumnViewModel.cs Grabacr07.KanColleViewer/Views/BrowserNavigator.xaml Grabacr07.KanColleViewer/Views/Catalogs/ShipCatalogWindow.xaml Grabacr07.KanColleViewer/Views/Contents/Overview.xaml Grabacr07.KanColleViewer/Views/Controls/ZoomFactorSelector.xaml Grabacr07.KanColleViewer/Views/MainWindow.xaml Grabacr07.KanColleViewer/Views/StartContent.xaml Grabacr07.KanColleViewer/Views/StatusBar.xaml Grabacr07.KanColleWrapper/Models/Fleet.cs README.md
- Loading branch information
Showing
60 changed files
with
2,980 additions
and
2,451 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
# Auto detect text files and perform LF normalization | ||
# * text=auto | ||
|
||
# Custom for Visual Studio | ||
*.cs diff=csharp | ||
*.sln merge=union | ||
*.csproj merge=union | ||
*.vbproj merge=union | ||
*.fsproj merge=union | ||
*.dbproj merge=union | ||
|
||
# Standard to msysgit | ||
*.doc diff=astextplain | ||
*.DOC diff=astextplain | ||
*.docx diff=astextplain | ||
*.DOCX diff=astextplain | ||
*.dot diff=astextplain | ||
*.DOT diff=astextplain | ||
*.pdf diff=astextplain | ||
*.PDF diff=astextplain | ||
*.rtf diff=astextplain | ||
*.RTF diff=astextplain | ||
# Auto detect text files and perform LF normalization | ||
# * text=auto | ||
|
||
# Custom for Visual Studio | ||
*.cs diff=csharp | ||
*.sln merge=union | ||
*.csproj merge=union | ||
*.vbproj merge=union | ||
*.fsproj merge=union | ||
*.dbproj merge=union | ||
|
||
# Standard to msysgit | ||
*.doc diff=astextplain | ||
*.DOC diff=astextplain | ||
*.docx diff=astextplain | ||
*.DOCX diff=astextplain | ||
*.dot diff=astextplain | ||
*.DOT diff=astextplain | ||
*.pdf diff=astextplain | ||
*.PDF diff=astextplain | ||
*.rtf diff=astextplain | ||
*.RTF diff=astextplain |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
################# | ||
################# | ||
## Eclipse | ||
################# | ||
|
||
|
56 changes: 28 additions & 28 deletions
56
Grabacr07.Desktop.Metro/Converters/StringToVisiblityConverter.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 |
---|---|---|
@@ -1,28 +1,28 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Globalization; | ||
using System.Linq; | ||
using System.Threading.Tasks; | ||
using System.Windows; | ||
using System.Windows.Data; | ||
|
||
namespace Grabacr07.Desktop.Metro.Converters | ||
{ | ||
/// <summary> | ||
/// 文字列が null または空文字のときに Collapsed、それ以外のときに Visible を返すコンバーターを定義します。 | ||
/// </summary> | ||
public class StringToVisiblityConverter : IValueConverter | ||
{ | ||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) | ||
{ | ||
return (value is string) && !string.IsNullOrEmpty((string)value) | ||
? Visibility.Visible | ||
: Visibility.Collapsed; | ||
} | ||
|
||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
} | ||
} | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Globalization; | ||
using System.Linq; | ||
using System.Threading.Tasks; | ||
using System.Windows; | ||
using System.Windows.Data; | ||
|
||
namespace Grabacr07.Desktop.Metro.Converters | ||
{ | ||
/// <summary> | ||
/// 文字列が null または空文字のときに Collapsed、それ以外のときに Visible を返すコンバーターを定義します。 | ||
/// </summary> | ||
public class StringToVisiblityConverter : IValueConverter | ||
{ | ||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) | ||
{ | ||
return (value is string) && !string.IsNullOrEmpty((string)value) | ||
? Visibility.Visible | ||
: Visibility.Collapsed; | ||
} | ||
|
||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
} | ||
} |
124 changes: 62 additions & 62 deletions
124
Grabacr07.Desktop.Metro/Converters/UniversalBooleanToVisibilityConverter.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 |
---|---|---|
@@ -1,62 +1,62 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Globalization; | ||
using System.Linq; | ||
using System.Threading.Tasks; | ||
using System.Windows; | ||
using System.Windows.Data; | ||
using Grabacr07.Portable; | ||
|
||
namespace Grabacr07.Desktop.Metro.Converters | ||
{ | ||
public class UniversalBooleanToVisibilityConverter : IValueConverter | ||
{ | ||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) | ||
{ | ||
Visibility result; | ||
var bValue = false; | ||
if (value is bool) | ||
{ | ||
bValue = (bool)value; | ||
} | ||
|
||
if (bValue) | ||
{ | ||
result = Visibility.Visible; // true に対応する Visibility | ||
var pValue = parameter as string; | ||
if (pValue != null) | ||
{ | ||
var p = pValue.Split(':'); | ||
if (p.Length >= 1) | ||
{ | ||
// 最初のパラメーターに Visible 以外が設定されていたら、true に対応する Visibility を上書き | ||
if (p[0].Compare("Hidden")) result = Visibility.Hidden; | ||
else if (p[0].Compare("Collapsed")) result = Visibility.Collapsed; | ||
} | ||
} | ||
} | ||
else | ||
{ | ||
result = Visibility.Collapsed; // false に対応する Visibility | ||
var pValue = parameter as string; | ||
if (pValue != null) | ||
{ | ||
var p = pValue.Split(':'); | ||
if (p.Length >= 2) | ||
{ | ||
// 2 番目のパラメーターに Collapsed 以外が設定されていたら、false に対応する Visibility を上書き | ||
if (p[1].Compare("Visible")) result = Visibility.Visible; | ||
else if (p[1].Compare("Hidden")) result = Visibility.Hidden; | ||
} | ||
} | ||
} | ||
|
||
return result; | ||
} | ||
|
||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
} | ||
} | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Globalization; | ||
using System.Linq; | ||
using System.Threading.Tasks; | ||
using System.Windows; | ||
using System.Windows.Data; | ||
using Grabacr07.Portable; | ||
|
||
namespace Grabacr07.Desktop.Metro.Converters | ||
{ | ||
public class UniversalBooleanToVisibilityConverter : IValueConverter | ||
{ | ||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) | ||
{ | ||
Visibility result; | ||
var bValue = false; | ||
if (value is bool) | ||
{ | ||
bValue = (bool)value; | ||
} | ||
|
||
if (bValue) | ||
{ | ||
result = Visibility.Visible; // true に対応する Visibility | ||
var pValue = parameter as string; | ||
if (pValue != null) | ||
{ | ||
var p = pValue.Split(':'); | ||
if (p.Length >= 1) | ||
{ | ||
// 最初のパラメーターに Visible 以外が設定されていたら、true に対応する Visibility を上書き | ||
if (p[0].Compare("Hidden")) result = Visibility.Hidden; | ||
else if (p[0].Compare("Collapsed")) result = Visibility.Collapsed; | ||
} | ||
} | ||
} | ||
else | ||
{ | ||
result = Visibility.Collapsed; // false に対応する Visibility | ||
var pValue = parameter as string; | ||
if (pValue != null) | ||
{ | ||
var p = pValue.Split(':'); | ||
if (p.Length >= 2) | ||
{ | ||
// 2 番目のパラメーターに Collapsed 以外が設定されていたら、false に対応する Visibility を上書き | ||
if (p[1].Compare("Visible")) result = Visibility.Visible; | ||
else if (p[1].Compare("Hidden")) result = Visibility.Hidden; | ||
} | ||
} | ||
} | ||
|
||
return result; | ||
} | ||
|
||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<packages> | ||
<package id="LivetCask" version="1.1.0.0" targetFramework="net45" /> | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<packages> | ||
<package id="LivetCask" version="1.1.0.0" targetFramework="net45" /> | ||
</packages> |
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
Oops, something went wrong.