From 7aa96c99a3de49dfd10c30227433c4cd5d64f77d Mon Sep 17 00:00:00 2001 From: PointStar Date: Sun, 24 May 2026 19:43:24 +0300 Subject: [PATCH] feat(about): logs + settings paths open the folder in Explorer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The two %APPDATA% / %LOCALAPPDATA% paths in Settings → אודות are now hyperlinks. Click to open the folder (creates it lazily if it's not there yet, so the link works before the first log is written). Co-Authored-By: Claude Opus 4.7 (1M context) --- .../Dialogs/SettingsDialog.xaml | 20 ++++++++++++++---- .../Dialogs/SettingsDialog.xaml.cs | 21 +++++++++++++++++++ src/OutlookAddin/OutlookAddin.csproj | 2 +- src/OutlookAddin/Properties/AssemblyInfo.cs | 4 ++-- 4 files changed, 40 insertions(+), 7 deletions(-) diff --git a/src/OutlookAddin.UI/Dialogs/SettingsDialog.xaml b/src/OutlookAddin.UI/Dialogs/SettingsDialog.xaml index 6bc6482..19a094d 100644 --- a/src/OutlookAddin.UI/Dialogs/SettingsDialog.xaml +++ b/src/OutlookAddin.UI/Dialogs/SettingsDialog.xaml @@ -123,10 +123,22 @@ Foreground="{Binding UpdateStatusBrush}" TextWrapping="Wrap" Margin="0,4,0,0" /> - - + + + + + + + + + + + + diff --git a/src/OutlookAddin.UI/Dialogs/SettingsDialog.xaml.cs b/src/OutlookAddin.UI/Dialogs/SettingsDialog.xaml.cs index 4886d9b..483a546 100644 --- a/src/OutlookAddin.UI/Dialogs/SettingsDialog.xaml.cs +++ b/src/OutlookAddin.UI/Dialogs/SettingsDialog.xaml.cs @@ -1,5 +1,8 @@ using System; +using System.Diagnostics; +using System.IO; using System.Windows; +using System.Windows.Documents; using MarcusLaw.OutlookAddin.UI.ViewModels; namespace MarcusLaw.OutlookAddin.UI.Dialogs @@ -40,5 +43,23 @@ namespace MarcusLaw.OutlookAddin.UI.Dialogs DialogResult = _viewModel?.DialogResult; Close(); } + + private void OnOpenFolderHyperlink(object sender, RoutedEventArgs e) + { + if (!(sender is Hyperlink h) || !(h.Tag is string raw)) return; + try + { + var path = Environment.ExpandEnvironmentVariables(raw); + // Create the folder lazily so the link works even on the very + // first run, before any log has been written. + if (!Directory.Exists(path)) Directory.CreateDirectory(path); + Process.Start(new ProcessStartInfo("explorer.exe", "\"" + path + "\"") { UseShellExecute = true }); + } + catch (Exception ex) + { + MessageBox.Show("פתיחת התיקייה נכשלה: " + ex.Message, "Klear", + MessageBoxButton.OK, MessageBoxImage.Warning); + } + } } } diff --git a/src/OutlookAddin/OutlookAddin.csproj b/src/OutlookAddin/OutlookAddin.csproj index e3ebe47..eae9a6d 100644 --- a/src/OutlookAddin/OutlookAddin.csproj +++ b/src/OutlookAddin/OutlookAddin.csproj @@ -36,7 +36,7 @@ C:\Users\Chaim\source\repos\OutlookAddin\Publish\ https://gitea.dev.marcus-law.co.il/espocrm-extensions/OutlookAddin/raw/branch/main/Publish/ en - 1.2.0.0 + 1.2.1.0 false true 7 diff --git a/src/OutlookAddin/Properties/AssemblyInfo.cs b/src/OutlookAddin/Properties/AssemblyInfo.cs index 4806ed3..9f677af 100644 --- a/src/OutlookAddin/Properties/AssemblyInfo.cs +++ b/src/OutlookAddin/Properties/AssemblyInfo.cs @@ -33,6 +33,6 @@ using System.Security; // 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("1.2.0.0")] -[assembly: AssemblyFileVersion("1.2.0.0")] +[assembly: AssemblyVersion("1.2.1.0")] +[assembly: AssemblyFileVersion("1.2.1.0")]