Skip to content

Commit

Permalink
Merge pull request #21 from tobitege/master
Browse files Browse the repository at this point in the history
v0.8.1 Fix DLL version conflict
  • Loading branch information
Dimencia authored Sep 13, 2022
2 parents de7eb07 + 4d61f6c commit f974d7b
Show file tree
Hide file tree
Showing 13 changed files with 385 additions and 352 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
directory: DU-Industry-Tool/bin/Release/
type: 'zip'
filename: DU-Industry-Tool-v${{ steps.getversion.outputs.version }}.zip
exclusions: '*.git* /*node_modules/* *.exe.config *.xml *.pdb *.vs* *.user .editorconfig'
exclusions: '*.git* /*node_modules/* *.xml *.pdb *.vs* *.user .editorconfig'

- name: Create Github Release
if: ${{ (github.ref == 'refs/heads/master') }} # ONLY ON MASTER
Expand Down
3 changes: 3 additions & 0 deletions DU-Industry-Tool/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,7 @@
</setting>
</DU_Industry_Tool.Properties.Settings>
</userSettings>
<System.Windows.Forms.ApplicationConfigurationSection>
<add key="DpiAwareness" value="PerMonitorV2" />
</System.Windows.Forms.ApplicationConfigurationSection>
</configuration>
18 changes: 5 additions & 13 deletions DU-Industry-Tool/Classes/CalculatorClass.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
using Newtonsoft.Json;
using System;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace DU_Industry_Tool
{
Expand Down Expand Up @@ -67,17 +59,17 @@ public static void AddSchema(string schemaKey, int qty, double amount)
SumSchemClass.Add(schemaKey, new Tuple<int, double>(qty, amount));
}

public static void Add(SummationType sumType, string ingKey, double quantity)
public static void Add(SummationType sumType, string key, double quantity)
{
if (!_sums.ContainsKey(sumType))
{
_sums.Add(sumType, new SortedDictionary<string, double>());
}

if (_sums[sumType].ContainsKey(ingKey))
_sums[sumType][ingKey] += quantity;
if (_sums[sumType].ContainsKey(key))
_sums[sumType][key] += quantity;
else
_sums[sumType].Add(ingKey, quantity);
_sums[sumType].Add(key, quantity);
}

public static SortedDictionary<string, double> Get(SummationType sumType)
Expand Down
21 changes: 21 additions & 0 deletions DU-Industry-Tool/Classes/Consts.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;

namespace DU_Industry_Tool
{
/// <summary>
/// Summary description for Class1
/// </summary>
public static class Consts
{
public static readonly List<string> SizeList = new List<string> { "XS", "S", "M", "L", "XL" };
public static readonly List<string> TierNames = new List<string> { "", "Basic", "Uncommon", "Advanced", "Rare", "Exotic" };

static Consts()
{
//
// TODO: Add constructor logic here
//
}
}
}
547 changes: 269 additions & 278 deletions DU-Industry-Tool/Classes/IndustryManager.cs

Large diffs are not rendered by default.

19 changes: 19 additions & 0 deletions DU-Industry-Tool/Classes/Utils.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;

namespace DU_Industry_Tool
{
/// <summary>
/// Summary description for Utils
/// </summary>
public static class Utils
{
public static SortedDictionary<string, DuLuaItem> LuaItems; // List of items from du-lua.dev
public static SortedDictionary<string, DuLuaRecipe> LuaRecipes; // List of recipes from du-lua.dev

static Utils()
{
//
}
}
}
2 changes: 2 additions & 0 deletions DU-Industry-Tool/DU-Industry-Tool.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@
</ItemGroup>
<ItemGroup>
<Compile Include="Classes\CalculatorClass.cs" />
<Compile Include="Classes\Consts.cs" />
<Compile Include="Classes\Utils.cs" />
<Compile Include="Forms\AboutForm.cs">
<SubType>Form</SubType>
</Compile>
Expand Down
106 changes: 52 additions & 54 deletions DU-Industry-Tool/Forms/MainForm.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 DU-Industry-Tool/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ static class Program
[STAThread]
static void Main()
{
PortableJsonSettingsProvider.SettingsFileName = "DU-Industry-Tool.usersettings.json";
PortableJsonSettingsProvider.SettingsDirectory = Path.GetDirectoryName(Application.ExecutablePath);
PortableJsonSettingsProvider.ApplyProvider(Properties.Settings.Default);
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
//Application.SetHighDpiMode(HighDpiMode.SystemAware);
PortableJsonSettingsProvider.SettingsFileName = "DU-Industry-Tool.usersettings.json";
PortableSettingsProviderBase.SettingsDirectory = Application.StartupPath;
PortableJsonSettingsProvider.ApplyProvider(Properties.Settings.Default);
Application.Run(new MainForm(new IndustryManager()));
}
}
Expand Down
4 changes: 2 additions & 2 deletions DU-Industry-Tool/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.8.0.0")]
[assembly: AssemblyFileVersion("0.8.0.0")]
[assembly: AssemblyVersion("0.8.1.0")]
[assembly: AssemblyFileVersion("0.8.1.0")]
2 changes: 1 addition & 1 deletion DU-Industry-Tool/Version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.8.0
0.8.1
3 changes: 3 additions & 0 deletions DU-Industry-Tool/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## v0.8.1
- Fix in DLL version mismatch at startup since 0.8.0

## v0.8.0
- New feature: in new "Tools" menu you can find a new "Production List" item:
in a special dialogue build a list of craftable recipes to be calculated in one bulk operation.
Expand Down
3 changes: 3 additions & 0 deletions latestchanges.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Latest Changes

## v0.8.1
- Fix in DLL version mismatch at startup since 0.8.0

## v0.8.0
- New feature: in new "Tools" menu you can find a new "Production List" item:
in a special dialogue build a list of craftable recipes to be calculated in one bulk operation.
Expand Down

0 comments on commit f974d7b

Please sign in to comment.