Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/Grabacr07/KanColleViewer
Browse files Browse the repository at this point in the history
…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
Zharay committed Mar 21, 2014
2 parents 135c54b + cfbb9e1 commit e87acb0
Show file tree
Hide file tree
Showing 60 changed files with 2,980 additions and 2,451 deletions.
44 changes: 22 additions & 22 deletions .gitattributes
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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#################
#################
## Eclipse
#################

Expand Down
56 changes: 28 additions & 28 deletions Grabacr07.Desktop.Metro/Converters/StringToVisiblityConverter.cs
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();
}
}
}
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();
}
}
}
6 changes: 3 additions & 3 deletions Grabacr07.Desktop.Metro/packages.config
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>
37 changes: 19 additions & 18 deletions Grabacr07.KanColleViewer/KanColleViewer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@
<Compile Include="Models\Toast.cs" />
<Compile Include="Models\Internal\Windows8Notifier.cs" />
<Compile Include="Models\Volume.cs" />
<Compile Include="ViewModels\Catalogs\ShipCatalogFilter.cs" />
<Compile Include="ViewModels\Catalogs\ShipViewModel.cs" />
<Compile Include="ViewModels\Catalogs\SlotItemCatalogViewModel.cs" />
<Compile Include="ViewModels\Catalogs\SlotItemViewModel.cs" />
<Compile Include="ViewModels\Catalogs\SortableColumnViewModel.cs" />
Expand Down Expand Up @@ -243,8 +245,6 @@
<Compile Include="Views\Contents\QuestViewSource.cs" />
<Compile Include="Views\Controls\AppIcon.cs" />
<Compile Include="Views\Controls\BuildingDock.cs" />
<Compile Include="Views\Controls\MuteButton.cs" />
<Compile Include="Views\Controls\NavigationButton.cs" />
<Compile Include="Views\Controls\Quest.cs" />
<Compile Include="Views\Controls\SlotItemIcon.cs" />
<Compile Include="Views\Contents\Dockyard.xaml.cs">
Expand Down Expand Up @@ -307,6 +307,11 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Styles\Controls.HorizontalFlatListBox.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
<DependentUpon>Controls.xaml</DependentUpon>
</Page>
<Page Include="Styles\Controls.ListView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
Expand Down Expand Up @@ -360,16 +365,6 @@
<Generator>MSBuild:Compile</Generator>
<DependentUpon>Generic.xaml</DependentUpon>
</Page>
<Page Include="Themes\Generic.MuteButton.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
<DependentUpon>Generic.xaml</DependentUpon>
</Page>
<Page Include="Themes\Generic.NavigationButton.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
<DependentUpon>Generic.xaml</DependentUpon>
</Page>
<Page Include="Themes\Generic.Quest.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
Expand Down Expand Up @@ -484,7 +479,7 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Views\Fleets.xaml">
<Page Include="Views\Contents\Fleets.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
Expand All @@ -511,7 +506,7 @@
<Compile Include="ViewModels\WindowViewModel.cs" />
<Compile Include="Views\Controls\ColorIndicator.cs" />
<Compile Include="Views\Controls\ConditionIcon.cs" />
<Compile Include="Views\Fleets.xaml.cs">
<Compile Include="Views\Contents\Fleets.xaml.cs">
<DependentUpon>Fleets.xaml</DependentUpon>
</Compile>
<Compile Include="Views\MainContent.xaml.cs">
Expand Down Expand Up @@ -540,13 +535,19 @@
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<EmbeddedResource Include="Properties\Resources.en.resx">
<DependentUpon>Resources.resx</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.ko-KR.resx">
<DependentUpon>Resources.resx</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.ja-JP.resx" />
<EmbeddedResource Include="Properties\Resources.zh-CN.resx" />
<EmbeddedResource Include="Properties\Resources.ko-KR.resx" />
<EmbeddedResource Include="Properties\Resources.zh-CN.resx">
<DependentUpon>Resources.resx</DependentUpon>
</EmbeddedResource>
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
Expand Down Expand Up @@ -625,7 +626,7 @@
<PostBuildEvent>xcopy /Y "$(TargetDir)KanColleViewer.exe" "$(SolutionDir)KanColleViewer-Compiled"
xcopy /Y "$(TargetDir)KanColleViewer.exe.config" "$(SolutionDir)KanColleViewer-Compiled"
xcopy /Y "$(TargetDir)*.dll" "$(SolutionDir)KanColleViewer-Compiled\lib"
xcopy /Y /E /I "$(TargetDir)ja-JP" "$(SolutionDir)KanColleViewer-Compiled\lib\ja-JP"
xcopy /Y /E /I "$(TargetDir)en" "$(SolutionDir)KanColleViewer-Compiled\lib\en"
xcopy /Y /E /I "$(TargetDir)zh-CN" "$(SolutionDir)KanColleViewer-Compiled\lib\zh-CN"
xcopy /Y /E /I "$(TargetDir)ko-KR" "$(SolutionDir)KanColleViewer-Compiled\lib\ko-KR"
xcopy /Y /E /I "$(SolutionDir)resources\Translations" "$(SolutionDir)KanColleViewer-Compiled\Translations"
Expand Down
20 changes: 10 additions & 10 deletions Grabacr07.KanColleViewer/Models/ResourceService.cs
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
using Grabacr07.KanColleViewer.Properties;
using Livet;
using System;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Grabacr07.KanColleViewer.Properties;
using Livet;

namespace Grabacr07.KanColleViewer.Models
{
/// <summary>
/// リソースを提供します
/// 多言語化されたリソースへのアクセスを提供します
/// </summary>
public class ResourceService : NotificationObject
{
#region static members

private static readonly ResourceService current = new ResourceService();

public static ResourceService Current
{
get { return current; }
Expand All @@ -28,18 +28,18 @@ public static ResourceService Current
/// サポートされているカルチャの名前。
/// </summary>
private readonly string[] supportedCultureNames =
{
"en-US",
"ja-JP",
{
"ja", // Resources.resx
"en",
"zh-CN",
"ko-KR"
"ko-KR",
};

private readonly Resources _Resources = new Resources();
private readonly IReadOnlyCollection<CultureInfo> _SupportedCultures;

/// <summary>
/// リソースを取得します
/// 多言語化されたリソースを取得します
/// </summary>
public Resources Resources
{
Expand Down
2 changes: 1 addition & 1 deletion Grabacr07.KanColleViewer/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@
// すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を
// 既定値にすることができます:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.3.0.352")]
[assembly: AssemblyVersion("2.4.0.352")]
Loading

0 comments on commit e87acb0

Please sign in to comment.