From f4dd498d22b9cf2ee7cf16006c01569e533330cc Mon Sep 17 00:00:00 2001 From: Michael Babienco Date: Fri, 13 Mar 2026 08:14:50 +0900 Subject: [PATCH] Shortcut to view settings dir --- src/ViewModels/SettingsViewModel.cs | 13 +++++++++++++ src/Views/SettingsView.axaml | 5 +++++ 2 files changed, 18 insertions(+) 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) +