From b5084d4b7464e37f0dfcd89f3ef39c735327b4b2 Mon Sep 17 00:00:00 2001 From: Seb-Dz Date: Wed, 2 Nov 2022 18:42:16 +0100 Subject: [PATCH] Factorisation --- .../EveIntelChecker/EveIntelChecker.csproj | 2 +- .../EveIntelCheckerElectron.csproj | 4 +-- .../Properties/launchSettings.json | 25 +++++++++---------- .../Data/EveStaticDatabase.cs | 21 +--------------- .../EveIntelCheckerLib.csproj | 1 - 5 files changed, 16 insertions(+), 37 deletions(-) diff --git a/EveIntelChecker/EveIntelChecker/EveIntelChecker.csproj b/EveIntelChecker/EveIntelChecker/EveIntelChecker.csproj index f6ee821..ecc3757 100644 --- a/EveIntelChecker/EveIntelChecker/EveIntelChecker.csproj +++ b/EveIntelChecker/EveIntelChecker/EveIntelChecker.csproj @@ -20,7 +20,7 @@ - + diff --git a/EveIntelChecker/EveIntelCheckerElectron/EveIntelCheckerElectron.csproj b/EveIntelChecker/EveIntelCheckerElectron/EveIntelCheckerElectron.csproj index fe34cd0..679c196 100644 --- a/EveIntelChecker/EveIntelCheckerElectron/EveIntelCheckerElectron.csproj +++ b/EveIntelChecker/EveIntelCheckerElectron/EveIntelCheckerElectron.csproj @@ -5,8 +5,8 @@ enable - - + + diff --git a/EveIntelChecker/EveIntelCheckerElectron/Properties/launchSettings.json b/EveIntelChecker/EveIntelCheckerElectron/Properties/launchSettings.json index 2ca5ed3..6760d38 100644 --- a/EveIntelChecker/EveIntelCheckerElectron/Properties/launchSettings.json +++ b/EveIntelChecker/EveIntelCheckerElectron/Properties/launchSettings.json @@ -1,28 +1,19 @@ { - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://localhost:64594", - "sslPort": 44397 - } - }, "profiles": { "Electron.NET App": { "commandName": "Executable", - "executablePath": "electronize-h5", + "executablePath": "electronize", "commandLineArgs": "start", - "workingDirectory": ".", - "environmentVariables": {} + "workingDirectory": "." }, "EveIntelCheckerElectron": { "commandName": "Project", "commandLineArgs": "electronize-h5 start", "launchBrowser": true, - "applicationUrl": "https://localhost:7295;http://localhost:5295", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" - } + }, + "applicationUrl": "https://localhost:7295;http://localhost:5295" }, "IIS Express": { "commandName": "IISExpress", @@ -31,5 +22,13 @@ "ASPNETCORE_ENVIRONMENT": "Development" } } + }, + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:64594", + "sslPort": 44397 + } } } \ No newline at end of file diff --git a/EveIntelChecker/EveIntelCheckerLib/Data/EveStaticDatabase.cs b/EveIntelChecker/EveIntelCheckerLib/Data/EveStaticDatabase.cs index 598885d..a1c5517 100644 --- a/EveIntelChecker/EveIntelCheckerLib/Data/EveStaticDatabase.cs +++ b/EveIntelChecker/EveIntelCheckerLib/Data/EveStaticDatabase.cs @@ -18,11 +18,6 @@ namespace EveIntelCheckerLib.Data /// public class EveStaticDatabase { - /// - /// The current operating system specific settings - /// - private OperatingSystemSelector OperatingSystem { get; set; } - /// /// Path of the DB export files /// @@ -54,21 +49,7 @@ public class EveStaticDatabase /// True if built with Electron, False if not public EveStaticDatabase(bool isElectron = false) { - OperatingSystem = new OperatingSystemSelector(); - - // Select the correct filepath for SQLite DB - switch(OperatingSystem.CurrentOS) - { - case OperatingSystemSelector.OperatingSystemType.Windows: - if (isElectron) - FolderPath = Process.GetCurrentProcess().MainModule.FileName.Replace("EveIntelCheckerElectron.exe", "Data/Export"); - else - FolderPath = Process.GetCurrentProcess().MainModule.FileName.Replace("EveIntelChecker.exe", "Data/Export"); - break; - case OperatingSystemSelector.OperatingSystemType.Mac: - FolderPath = Path.Combine(Directory.GetCurrentDirectory(), "Data/Export"); - break; - } + FolderPath = Path.Combine(Directory.GetCurrentDirectory(), "Data/Export"); SolarSystems = ReadSolarSystems(); SolarSystemJumps = ReadSolarSystemJumps(); diff --git a/EveIntelChecker/EveIntelCheckerLib/EveIntelCheckerLib.csproj b/EveIntelChecker/EveIntelCheckerLib/EveIntelCheckerLib.csproj index c2508a7..7af7dc6 100644 --- a/EveIntelChecker/EveIntelCheckerLib/EveIntelCheckerLib.csproj +++ b/EveIntelChecker/EveIntelCheckerLib/EveIntelCheckerLib.csproj @@ -35,7 +35,6 @@ -