diff --git a/LittleWarGameClient/GameForm.cs b/LittleWarGameClient/GameForm.cs index ae2225f..611a6a5 100644 --- a/LittleWarGameClient/GameForm.cs +++ b/LittleWarGameClient/GameForm.cs @@ -22,8 +22,8 @@ internal static GameForm Instance internal const string baseUrl = @"https://littlewargame.com/play"; private readonly SettingsHandler settings; private readonly KeyboardHandler kbHandler; - private readonly VersionHandler vHandler; - private readonly AudioHandler audioMngr; + private readonly VersionHandler versionHandler; + private readonly AudioHandler audioHandler; private FormWindowState PreviousWindowState; internal int requestCallCounter = 0; @@ -38,9 +38,9 @@ internal GameForm() InitializeComponent(); loadingText.Font = new Font(FontHandler.lwgFont, 48F, FontStyle.Regular, GraphicsUnit.Point); settings = new SettingsHandler(); - audioMngr = new AudioHandler(Text); + audioHandler = new AudioHandler(Text); kbHandler = new KeyboardHandler(settings); - vHandler = new VersionHandler(settings); + versionHandler = new VersionHandler(settings); InitScreen(); InitWebView(); } @@ -224,7 +224,7 @@ private void GameForm_FormClosing(object sender, FormClosingEventArgs e) e.Cancel = true; break; case CloseReason.UserClosing: - audioMngr.DestroySession(); + audioHandler.DestroySession(); webBrowser.Dispose(); Application.Exit(); break; @@ -264,12 +264,12 @@ internal void AddonsLoadedPostLogic() internal void ChangeVolume(float value) { - audioMngr.ChangeVolume(value); + audioHandler.ChangeVolume(value); } internal async void VolumeChangePostLogic(float value) { - audioMngr.ChangeVolume(value); + audioHandler.ChangeVolume(value); settings.SetVolume(value); await settings.SaveAsync(); } @@ -295,7 +295,7 @@ private void webView_LoadingStateChanged(object sender, LoadingStateChangedEvent requestCallWhereLoadingFinished = requestCallCounter; var addonJS = System.IO.File.ReadAllText("js/addons.js"); webBrowser.ExecuteScriptAsync(addonJS); - ElementMessage.CallJSFunc(webBrowser, "init.function", $"\"{vHandler.CurrentVersion}\", {settings.GetMouseLock().ToString().ToLower()}, {settings.GetVolume()}"); + ElementMessage.CallJSFunc(webBrowser, "init.function", $"\"{versionHandler.CurrentVersion}\", {settings.GetMouseLock().ToString().ToLower()}, {settings.GetVolume()}"); kbHandler.InitHotkeyNames((ChromiumWebBrowser)sender, settings); } } diff --git a/LittleWarGameClient/Handlers/AudioHandler.cs b/LittleWarGameClient/Handlers/AudioHandler.cs index b5dd75d..38038ae 100644 --- a/LittleWarGameClient/Handlers/AudioHandler.cs +++ b/LittleWarGameClient/Handlers/AudioHandler.cs @@ -1,12 +1,7 @@ using NAudio.CoreAudioApi; using NAudio.CoreAudioApi.Interfaces; -using System; -using System.Collections.Generic; using System.Diagnostics; -using System.Linq; using System.Management; -using System.Text; -using System.Threading.Tasks; namespace LittleWarGameClient.Handlers { diff --git a/LittleWarGameClient/Handlers/FontHandler.cs b/LittleWarGameClient/Handlers/FontHandler.cs index 95be50a..f3074ae 100644 --- a/LittleWarGameClient/Handlers/FontHandler.cs +++ b/LittleWarGameClient/Handlers/FontHandler.cs @@ -1,11 +1,5 @@ using LittleWarGameClient.Properties; -using System; -using System.Collections.Generic; using System.Drawing.Text; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using static nud2dlib.Windows.Forms.Win32; namespace LittleWarGameClient.Handlers { diff --git a/LittleWarGameClient/Handlers/KeyboardHandler.cs b/LittleWarGameClient/Handlers/KeyboardHandler.cs index a9cd9ba..8ae260d 100644 --- a/LittleWarGameClient/Handlers/KeyboardHandler.cs +++ b/LittleWarGameClient/Handlers/KeyboardHandler.cs @@ -1,6 +1,4 @@ -using System; -using System.Reflection.Metadata; -using System.Reflection; +using System.Reflection; using CefSharp.WinForms; using CefSharp; using LittleWarGameClient.Helpers; diff --git a/LittleWarGameClient/Handlers/SettingsHandler.cs b/LittleWarGameClient/Handlers/SettingsHandler.cs index d23671f..eb5c8d7 100644 --- a/LittleWarGameClient/Handlers/SettingsHandler.cs +++ b/LittleWarGameClient/Handlers/SettingsHandler.cs @@ -1,11 +1,5 @@ using IniFile; using LittleWarGameClient.Helpers; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Reflection.Metadata; -using System.Text; -using System.Threading.Tasks; namespace LittleWarGameClient.Handlers { diff --git a/LittleWarGameClient/Handlers/VersionHandler.cs b/LittleWarGameClient/Handlers/VersionHandler.cs index 6a11352..b464678 100644 --- a/LittleWarGameClient/Handlers/VersionHandler.cs +++ b/LittleWarGameClient/Handlers/VersionHandler.cs @@ -1,15 +1,5 @@ -using CefSharp; -using Octokit; -using System; -using System.Collections.Generic; +using Octokit; using System.Diagnostics; -using System.Linq; -using System.Linq.Expressions; -using System.Net.Http; -using System.Reflection; -using System.Security.Policy; -using System.Text; -using System.Threading.Tasks; namespace LittleWarGameClient.Handlers { diff --git a/LittleWarGameClient/Helpers/PanelHelper.cs b/LittleWarGameClient/Helpers/PanelHelper.cs index 264f13d..58ddb6e 100644 --- a/LittleWarGameClient/Helpers/PanelHelper.cs +++ b/LittleWarGameClient/Helpers/PanelHelper.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Reflection; -using System.Text; -using System.Threading.Tasks; +using System.Reflection; namespace LittleWarGameClient.Helpers { diff --git a/LittleWarGameClient/Helpers/SettingsHelper.cs b/LittleWarGameClient/Helpers/SettingsHelper.cs index 6621fac..052eb5e 100644 --- a/LittleWarGameClient/Helpers/SettingsHelper.cs +++ b/LittleWarGameClient/Helpers/SettingsHelper.cs @@ -1,9 +1,4 @@ using IniFile; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace LittleWarGameClient.Helpers { diff --git a/LittleWarGameClient/Properties/Resources.Designer.cs b/LittleWarGameClient/Properties/Resources.Designer.cs index e23eea8..6de68e0 100644 --- a/LittleWarGameClient/Properties/Resources.Designer.cs +++ b/LittleWarGameClient/Properties/Resources.Designer.cs @@ -59,19 +59,17 @@ internal Resources() { resourceCulture = value; } } - + /// /// Looks up a localized resource of type System.Byte[]. /// - internal static byte[] LcdSolidFont - { - get - { + internal static byte[] LcdSolidFont { + get { object obj = ResourceManager.GetObject("LcdSolidFont", resourceCulture); return ((byte[])(obj)); } } - + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// diff --git a/LittleWarGameClient/Properties/Resources.resx b/LittleWarGameClient/Properties/Resources.resx index f227103..b2b1977 100644 --- a/LittleWarGameClient/Properties/Resources.resx +++ b/LittleWarGameClient/Properties/Resources.resx @@ -119,12 +119,12 @@ - ..\Resources\LcdSolid-VPzB.ttf;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8 + ..\Assets\LcdSolid-VPzB.ttf;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8 - ..\Resources\soldier.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Assets\soldier.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\wolfRunning.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Assets\wolfRunning.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a \ No newline at end of file diff --git a/LittleWarGameClient/Resources/LcdSolid-VPzB.ttf b/LittleWarGameClient/Resources/LcdSolid-VPzB.ttf deleted file mode 100644 index 808f3ee..0000000 Binary files a/LittleWarGameClient/Resources/LcdSolid-VPzB.ttf and /dev/null differ diff --git a/LittleWarGameClient/Resources/soldier.png b/LittleWarGameClient/Resources/soldier.png deleted file mode 100644 index a0f16d8..0000000 Binary files a/LittleWarGameClient/Resources/soldier.png and /dev/null differ diff --git a/LittleWarGameClient/Resources/wolfRunning.gif b/LittleWarGameClient/Resources/wolfRunning.gif deleted file mode 100644 index b9e5377..0000000 Binary files a/LittleWarGameClient/Resources/wolfRunning.gif and /dev/null differ diff --git a/LittleWarGameClient/SplashScreen.cs b/LittleWarGameClient/SplashScreen.cs index b97cd48..149bac0 100644 --- a/LittleWarGameClient/SplashScreen.cs +++ b/LittleWarGameClient/SplashScreen.cs @@ -1,13 +1,4 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; -using LittleWarGameClient.Handlers; +using LittleWarGameClient.Handlers; namespace LittleWarGameClient {