Skip to content

Commit

Permalink
add icon
Browse files Browse the repository at this point in the history
  • Loading branch information
jarvisniu committed Feb 27, 2016
1 parent 9c7ae3d commit c94d291
Show file tree
Hide file tree
Showing 12 changed files with 102 additions and 25 deletions.
13 changes: 8 additions & 5 deletions Niv.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@
<PropertyGroup>
<StartupObject>Niv.App</StartupObject>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>res\Niv.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
Expand Down Expand Up @@ -101,10 +104,10 @@
<Compile Include="prop\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="resx\Languages.en-US.Designer.cs">
<Compile Include="resx\Languages.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Languages.en-US.resx</DependentUpon>
<DependentUpon>Languages.resx</DependentUpon>
</Compile>
<Compile Include="prop\Settings.Designer.cs">
<AutoGen>True</AutoGen>
Expand All @@ -123,9 +126,9 @@
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Languages.zh-CN.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="resx\Languages.en-US.resx">
<EmbeddedResource Include="resx\Languages.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Languages.en-US.Designer.cs</LastGenOutput>
<LastGenOutput>Languages.Designer.cs</LastGenOutput>
</EmbeddedResource>
<None Include="prop\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
Expand All @@ -142,7 +145,7 @@
</ItemGroup>
<ItemGroup />
<ItemGroup>
<Resource Include="res\Niv.png" />
<Resource Include="res\Niv.ico" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
Binary file added exe/Niv.exe
Binary file not shown.
4 changes: 2 additions & 2 deletions prop/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
[assembly: AssemblyDescription("A fast compact image viewer on Windows")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Jarvis Niu")]
[assembly: AssemblyProduct("Niv")]
[assembly: AssemblyProduct("Niv - Niu Image Viewer")]
[assembly: AssemblyCopyright("Copyright © 2016")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyTrademark("Niv")]
[assembly: AssemblyCulture("")]

[assembly: ComVisible(false)]
Expand Down
Binary file added res/Niv.ico
Binary file not shown.
Binary file removed res/Niv.png
Binary file not shown.
81 changes: 81 additions & 0 deletions resx/Languages.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file removed resx/Languages.en-US.Designer.cs
Empty file.
2 changes: 1 addition & 1 deletion resx/Languages.en-US.resx → resx/Languages.resx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="appName" xml:space="preserve">
<value>Niv Image Viewer</value>
<value>Niv</value>
</data>
<data name="_missing" xml:space="preserve">
<value>[DATA MISSING]</value>
Expand Down
10 changes: 0 additions & 10 deletions resx/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions resx/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,4 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="Niv" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\res\Niv.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>
11 changes: 9 additions & 2 deletions src/I18N.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,15 @@ static I18N()
currLang = Thread.CurrentThread.CurrentCulture.Name;
if (currLang != "zh-CN" && currLang != "zh-TW") currLang = "en-US";
// currLang = "zh-TW";

cultureInfo = new CultureInfo(currLang, true);
try
{
cultureInfo = new CultureInfo(currLang, true);
}
catch (Exception ex)
{
currLang = "en-US";
cultureInfo = new CultureInfo(currLang, true);
}
resManager = new ResourceManager("Niv.resx.Languages", Assembly.GetExecutingAssembly());
}

Expand Down
2 changes: 1 addition & 1 deletion win/Niv.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:Niv"
mc:Ignorable="d"
Title="MainWindow" Height="350" Width="525" Loaded="window_Loaded" WindowStartupLocation="CenterScreen" WindowState="Maximized">
Title="MainWindow" Height="350" Width="525" Loaded="window_Loaded" WindowStartupLocation="CenterScreen" WindowState="Maximized" Icon="/Niv;component/res/Niv.ico">
<Grid/>
</Window>

0 comments on commit c94d291

Please sign in to comment.