Skip to content

Commit

Permalink
Factorisation
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastienDuruz committed Nov 2, 2022
1 parent 8c67391 commit b5084d4
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 37 deletions.
2 changes: 1 addition & 1 deletion EveIntelChecker/EveIntelChecker/EveIntelChecker.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebView.Wpf" Version="6.0.540" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebView.Wpf" Version="6.0.541" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="h5.ElectronNET.API" Version="21.1.0.33389" />
<PackageReference Include="MudBlazor" Version="6.0.16" />
<PackageReference Include="h5.ElectronNET.API" Version="21.2.0.33598" />
<PackageReference Include="MudBlazor" Version="6.0.17" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\EveIntelCheckerLib\EveIntelCheckerLib.csproj" />
Expand Down
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -31,5 +22,13 @@
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
},
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:64594",
"sslPort": 44397
}
}
}
21 changes: 1 addition & 20 deletions EveIntelChecker/EveIntelCheckerLib/Data/EveStaticDatabase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@ namespace EveIntelCheckerLib.Data
/// </summary>
public class EveStaticDatabase
{
/// <summary>
/// The current operating system specific settings
/// </summary>
private OperatingSystemSelector OperatingSystem { get; set; }

/// <summary>
/// Path of the DB export files
/// </summary>
Expand Down Expand Up @@ -54,21 +49,7 @@ public class EveStaticDatabase
/// <param name="isElectron">True if built with Electron, False if not</param>
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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Hosting.Abstractions" Version="2.2.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="sqlite-net-pcl" Version="1.8.116" />
<PackageReference Include="System.Windows.Extensions" Version="6.0.0" />
<PackageReference Include="NetCoreAudio" Version="1.7.0" />
</ItemGroup>
Expand Down

0 comments on commit b5084d4

Please sign in to comment.