Skip to content

Commit

Permalink
game path is removed and how to use will be added
Browse files Browse the repository at this point in the history
  • Loading branch information
HenryQuan committed Mar 9, 2020
1 parent 4f46bdd commit f2f96f2
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 57 deletions.
27 changes: 9 additions & 18 deletions RS/RS/Properties/strings.Designer.cs

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

9 changes: 3 additions & 6 deletions RS/RS/Properties/strings.ja.resx
Original file line number Diff line number Diff line change
Expand Up @@ -120,15 +120,15 @@
<data name="about" xml:space="preserve">
<value>RSについて</value>
</data>
<data name="about_path" xml:space="preserve">
<value>ゲームパスについて</value>
</data>
<data name="check_for_update" xml:space="preserve">
<value>アップデートをチェック</value>
</data>
<data name="error_title" xml:space="preserve">
<value>エラー</value>
</data>
<data name="how_to_use" xml:space="preserve">
<value>使い方</value>
</data>
<data name="invalid_path" xml:space="preserve">
<value>パスは有効じゃない</value>
</data>
Expand All @@ -138,9 +138,6 @@
<data name="path" xml:space="preserve">
<value>ゲームパス</value>
</data>
<data name="path_example" xml:space="preserve">
<value>ゲームパスの例</value>
</data>
<data name="start" xml:space="preserve">
<value>スタート</value>
</data>
Expand Down
9 changes: 3 additions & 6 deletions RS/RS/Properties/strings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -120,15 +120,15 @@
<data name="about" xml:space="preserve">
<value>About</value>
</data>
<data name="about_path" xml:space="preserve">
<value>About game path</value>
</data>
<data name="check_for_update" xml:space="preserve">
<value>Check for Update</value>
</data>
<data name="error_title" xml:space="preserve">
<value>Error</value>
</data>
<data name="how_to_use" xml:space="preserve">
<value>How to use</value>
</data>
<data name="invalid_path" xml:space="preserve">
<value>Path is not valid</value>
</data>
Expand All @@ -138,9 +138,6 @@
<data name="path" xml:space="preserve">
<value>Game Path:</value>
</data>
<data name="path_example" xml:space="preserve">
<value>Game path looks like:</value>
</data>
<data name="start" xml:space="preserve">
<value>Start</value>
</data>
Expand Down
9 changes: 3 additions & 6 deletions RS/RS/Properties/strings.zh.resx
Original file line number Diff line number Diff line change
Expand Up @@ -120,15 +120,15 @@
<data name="about" xml:space="preserve">
<value>关于</value>
</data>
<data name="about_path" xml:space="preserve">
<value>关于游戏路径</value>
</data>
<data name="check_for_update" xml:space="preserve">
<value>检查更新</value>
</data>
<data name="error_title" xml:space="preserve">
<value>错误</value>
</data>
<data name="how_to_use" xml:space="preserve">
<value>使用教程</value>
</data>
<data name="invalid_path" xml:space="preserve">
<value>游戏路径无效</value>
</data>
Expand All @@ -138,9 +138,6 @@
<data name="path" xml:space="preserve">
<value>游戏路径</value>
</data>
<data name="path_example" xml:space="preserve">
<value>游戏路径的格式例如:</value>
</data>
<data name="start" xml:space="preserve">
<value>开始</value>
</data>
Expand Down
35 changes: 17 additions & 18 deletions RS/RS/RS.Designer.cs

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

7 changes: 4 additions & 3 deletions RS/RS/RS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public RS()
aboutMenu.Text = Properties.strings.about;
checkForUpdateToolStripMenuItem.Text = Properties.strings.check_for_update;
languageToolStripMenuItem.Text = Properties.strings.language;
aboutGamePathToolStripMenuItem.Text = Properties.strings.about_path;
howToUseToolStripMenuItem.Text = Properties.strings.how_to_use;

pathBox.Text = Properties.Settings.Default.path;

Expand Down Expand Up @@ -144,7 +144,8 @@ private bool ValidatePath()
// Check if we have a game path
gamePath = pathBox.Text;
Console.WriteLine("-> " + gamePath);
if (File.Exists(gamePath + @"\WorldOfWarships.exe") || (gamePath.Contains("steamapps") && Directory.Exists(gamePath + @"\replays")))
// Only check for perferences.xml (it should work for both steam and normal version)
if (File.Exists(gamePath + @"\preferences.xml"))
{
// Support steam or non steam
Properties.Settings.Default.path = gamePath;
Expand Down Expand Up @@ -243,7 +244,7 @@ private void RS_FormClosing(object sender, FormClosingEventArgs e)

private void AboutGamePathToolStripMenuItem_Click(object sender, EventArgs e)
{
string content = Properties.strings.path_example;
string content = Properties.strings.how_to_use;
content += "\nD:\\Games\\World_of_Warships\n";
content += "D:\\Games\\Steam\\steamapps\\common\\World_of_Warships";
MessageBox.Show(content, Properties.strings.about_path);
Expand Down

0 comments on commit f2f96f2

Please sign in to comment.