Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
Triky313 committed Aug 12, 2024
2 parents 16f0044 + 3ee0cc1 commit 000bb4d
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 19 deletions.
2 changes: 1 addition & 1 deletion src/StatisticsAnalysisTool/Dungeon/DungeonController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ public async Task SaveInFileAsync()
DirectoryController.CreateDirectoryWhenNotExists(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, Settings.Default.UserDataDirectoryName));
var toSaveDungeons = _mainWindowViewModel.DungeonBindings.Dungeons.Select(DungeonMapping.Mapping).ToList();
await FileController.SaveAsync(toSaveDungeons, Path.Combine(AppDomain.CurrentDomain.BaseDirectory, Settings.Default.UserDataDirectoryName, Settings.Default.DungeonRunsFileName));
Debug.Print("Dungeons saved");
Log.Information("Dungeons saved");
}

private async Task SaveInFileAfterExceedingLimit(int limit)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using StatisticsAnalysisTool.Common;
using Serilog;
using StatisticsAnalysisTool.Common;
using StatisticsAnalysisTool.Properties;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
Expand All @@ -13,7 +13,7 @@ namespace StatisticsAnalysisTool.EstimatedMarketValue;
public static class EstimatedMarketValueController
{
private static ObservableCollection<EstimatedMarketValueObject> _estimatedMarketValueObjects = new();

public static void Add(int itemId, long estimatedMarketValueInternal, ItemQuality quality = ItemQuality.Unknown)
{
if (itemId <= 0 || estimatedMarketValueInternal <= 0)
Expand Down Expand Up @@ -135,7 +135,7 @@ public static async Task SaveInFileAsync()
DirectoryController.CreateDirectoryWhenNotExists(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, Settings.Default.UserDataDirectoryName));
await FileController.SaveAsync(_estimatedMarketValueObjects.ToList().Select(EstimatesMarketValueMapping.Mapping),
Path.Combine(AppDomain.CurrentDomain.BaseDirectory, Settings.Default.UserDataDirectoryName, Settings.Default.EstimatedMarketValueFileName));
Debug.Print("Estimated market values saved");
Log.Information("Estimated market values saved");
}

#endregion
Expand Down
6 changes: 3 additions & 3 deletions src/StatisticsAnalysisTool/Gathering/GatheringController.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using StatisticsAnalysisTool.Cluster;
using Serilog;
using StatisticsAnalysisTool.Cluster;
using StatisticsAnalysisTool.Common;
using StatisticsAnalysisTool.Common.UserSettings;
using StatisticsAnalysisTool.EstimatedMarketValue;
Expand All @@ -10,7 +11,6 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Threading;
Expand Down Expand Up @@ -276,7 +276,7 @@ public async Task SaveInFileAsync(bool safeMoreThan356Days = false)

await FileController.SaveAsync(gatheredToSave,
Path.Combine(AppDomain.CurrentDomain.BaseDirectory, Settings.Default.UserDataDirectoryName, Settings.Default.GatheringFileName));
Debug.Print("Gathering saved");
Log.Information("Gathering saved");
}

public async Task SaveInFileAfterExceedingLimit(int limit)
Expand Down
8 changes: 4 additions & 4 deletions src/StatisticsAnalysisTool/Guild/GuildController.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using StatisticsAnalysisTool.Common;
using Serilog;
using StatisticsAnalysisTool.Common;
using StatisticsAnalysisTool.Enumerations;
using StatisticsAnalysisTool.Network.Manager;
using StatisticsAnalysisTool.Properties;
using StatisticsAnalysisTool.ViewModels;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
Expand Down Expand Up @@ -83,7 +83,7 @@ public void AddSiphonedEnergyEntries(List<string> usernames, List<FixPoint> quan
Application.Current.Dispatcher.InvokeAsync(() =>
{
_mainWindowViewModel.GuildBindings.SiphonedEnergyLastUpdate = DateTime.UtcNow;
_mainWindowViewModel.GuildBindings.SiphonedEnergyLastUpdateVisibility
_mainWindowViewModel.GuildBindings.SiphonedEnergyLastUpdateVisibility
= _mainWindowViewModel.GuildBindings?.SiphonedEnergyLastUpdate.Ticks <= 1 ? Visibility.Hidden : Visibility.Visible;
});
}
Expand Down Expand Up @@ -166,7 +166,7 @@ await FileController.SaveAsync(new GuildDto()
SiphonedEnergies = _mainWindowViewModel.GuildBindings.SiphonedEnergyList.Select(GuildMapping.Mapping).ToList()
},
Path.Combine(AppDomain.CurrentDomain.BaseDirectory, Settings.Default.UserDataDirectoryName, Settings.Default.GuildFileName));
Debug.Print("Guild data saved");
Log.Information("Guild data saved");
}

#endregion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ private static async Task AddDamageMeterFragmentAsync(ICollection<DamageMeterFra

Spells = spells
};

await Application.Current.Dispatcher.InvokeAsync(() =>
{
damageMeter.Add(damageMeterFragment);
Expand Down Expand Up @@ -681,7 +681,7 @@ public async Task SaveInFileAsync()
DirectoryController.CreateDirectoryWhenNotExists(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, Settings.Default.UserDataDirectoryName));
await FileController.SaveAsync(_mainWindowViewModel.DamageMeterBindings?.DamageMeterSnapshots?.Select(SnapshotMapping.Mapping),
Path.Combine(AppDomain.CurrentDomain.BaseDirectory, Settings.Default.UserDataDirectoryName, Settings.Default.DamageMeterSnapshotsFileName));
Debug.Print("Damage Meter snapshots saved");
Log.Information("Damage Meter snapshots saved");
}

#endregion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Media;
using Serilog;
using ValueType = StatisticsAnalysisTool.Enumerations.ValueType;

namespace StatisticsAnalysisTool.Network.Manager;
Expand Down Expand Up @@ -275,7 +276,7 @@ public async Task SaveInFileAsync()
{
DirectoryController.CreateDirectoryWhenNotExists(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, Settings.Default.UserDataDirectoryName));
await FileController.SaveAsync(_dashboardStatistics, Path.Combine(AppDomain.CurrentDomain.BaseDirectory, Settings.Default.UserDataDirectoryName, Settings.Default.StatsFileName));
Debug.Print("Statistics saved");
Log.Information("Statistics saved");
}

#endregion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
using System.Linq;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using Serilog;

namespace StatisticsAnalysisTool.Network.Manager;

Expand Down Expand Up @@ -311,7 +312,7 @@ public async Task SaveInFileAsync()
{
DirectoryController.CreateDirectoryWhenNotExists(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, Settings.Default.UserDataDirectoryName));
await FileController.SaveAsync(_treasures, Path.Combine(AppDomain.CurrentDomain.BaseDirectory, Settings.Default.UserDataDirectoryName, Settings.Default.TreasureStatsFileName));
Debug.Print("Treasure saved");
Log.Information("Treasure saved");
}

#endregion
Expand Down
4 changes: 2 additions & 2 deletions src/StatisticsAnalysisTool/StorageHistory/VaultController.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using Serilog;
using StatisticsAnalysisTool.Cluster;
using StatisticsAnalysisTool.Common;
using StatisticsAnalysisTool.Localization;
Expand All @@ -8,7 +9,6 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
Expand Down Expand Up @@ -367,7 +367,7 @@ public async Task SaveInFileAsync()

await FileController.SaveAsync(vaultDtosToSave,
Path.Combine(AppDomain.CurrentDomain.BaseDirectory, Settings.Default.UserDataDirectoryName, Settings.Default.VaultsFileName));
Debug.Print("Vault saved");
Log.Information("Vault saved");
}

#endregion
Expand Down
2 changes: 1 addition & 1 deletion src/StatisticsAnalysisTool/Trade/TradeController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ public async Task SaveInFileAsync()
DirectoryController.CreateDirectoryWhenNotExists(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, Settings.Default.UserDataDirectoryName));
await FileController.SaveAsync(_mainWindowViewModel.TradeMonitoringBindings?.Trades?.Select(TradeMapping.Mapping),
Path.Combine(AppDomain.CurrentDomain.BaseDirectory, Settings.Default.UserDataDirectoryName, Settings.Default.TradesFileName));
Debug.Print("Trades saved");
Log.Information("Trades saved");
}

public async Task SaveInFileAfterExceedingLimit(int limit)
Expand Down

0 comments on commit 000bb4d

Please sign in to comment.