switcher dataset explorer

lat lon -> geopoint
correct location for gps if small keypoints number
This commit is contained in:
Alex Bezdieniezhnykh
2025-06-23 20:47:28 +03:00
parent c5e72669c5
commit 253f811125
31 changed files with 469 additions and 192 deletions
-16
View File
@@ -25,7 +25,6 @@ public partial class MainSuite
private readonly Dictionary<WindowEnum, Window> _openedWindows = new();
private readonly IInferenceClient _inferenceClient;
private readonly IGpsMatcherClient _gpsMatcherClient;
private static readonly Guid SaveConfigTaskId = Guid.NewGuid();
public MainSuite(IOptions<AppConfig> appConfig,
IConfigUpdater configUpdater,
@@ -48,10 +47,6 @@ public partial class MainSuite
InitializeComponent();
Loaded += OnLoaded;
Closed += OnFormClosed;
SizeChanged += (_, _) => SaveUserSettings();
LocationChanged += (_, _) => SaveUserSettings();
StateChanged += (_, _) => SaveUserSettings();
Left = (SystemParameters.WorkArea.Width - Width) / 2;
}
@@ -125,19 +120,8 @@ public partial class MainSuite
}
}
private void SaveUserSettings()
{
ThrottleExt.Throttle(() =>
{
_configUpdater.Save(_appConfig);
return Task.CompletedTask;
}, SaveConfigTaskId, TimeSpan.FromSeconds(2));
}
private void OnFormClosed(object? sender, EventArgs e)
{
_configUpdater.Save(_appConfig);
foreach (var window in _openedWindows)
window.Value.Close();