diff --git a/src/ViewModels/SettingsViewModel.cs b/src/ViewModels/SettingsViewModel.cs index 4b11678..06663c2 100644 --- a/src/ViewModels/SettingsViewModel.cs +++ b/src/ViewModels/SettingsViewModel.cs @@ -18,6 +18,7 @@ using PdfSharp.Snippets.Font; using MayShow.Interfaces; using MayShow.Models; using MayShow.Helpers; +using MayShows.Helpers; namespace MayShow.ViewModels; @@ -126,6 +127,18 @@ class SettingsViewModel: ChangeNotifier } } + public void OpenSettingsDir() + { + var topLevel = _topLevelGrabber?.GetTopLevel(); + Console.WriteLine(Utilities.GetInternalDataPath()); + var dirName = Utilities.GetInternalDataPath(); + if (topLevel is not null && dirName != null) + { + var launcher = topLevel.Launcher; + launcher.LaunchUriAsync(new Uri(dirName)); + } + } + public void Cancel() { DialogHost.Close("DialogHost", null); diff --git a/src/Views/SettingsView.axaml b/src/Views/SettingsView.axaml index 9187843..efa30b9 100644 --- a/src/Views/SettingsView.axaml +++ b/src/Views/SettingsView.axaml @@ -47,6 +47,11 @@ VerticalAlignment="Top"/> Save report data (names, notes, etc.) in MayShow settings directory (saves in working directory by default) +