From f7b19ae43e4d703f65b54aa75710391e5b0dbb35 Mon Sep 17 00:00:00 2001 From: Andrew Savinykh <658865+AndrewSav@users.noreply.github.com> Date: Sat, 11 May 2024 14:57:01 +1200 Subject: [PATCH] add settings path tooltip --- CHANGELOG.md | 3 ++- Remnant2SaveAnalyzer/Views/Pages/SettingsPage.xaml | 5 +++-- .../Views/Pages/SettingsPage.xaml.cs | 12 +++++++++++- Remnant2SaveAnalyzer/locales/Strings.Designer.cs | 9 +++++++++ Remnant2SaveAnalyzer/locales/Strings.resx | 3 +++ 5 files changed, 28 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 727c098..a04f69a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,9 @@ # Changelog -## 0.0.10 (unreleased) +## 0.0.10 (11 May 2023) - Add ability to display in italic items that cannot be obtained in the current save, because they depend on something else not avialable in the current save that the character does not currently have - Changed to file-scoped namespaces +- Add setings path tooltip to the settings page about button ## 0.0.9 (10 May 2023) - Small fix for adventure panel not updating diff --git a/Remnant2SaveAnalyzer/Views/Pages/SettingsPage.xaml b/Remnant2SaveAnalyzer/Views/Pages/SettingsPage.xaml index 7d264b1..6d5d2c4 100644 --- a/Remnant2SaveAnalyzer/Views/Pages/SettingsPage.xaml +++ b/Remnant2SaveAnalyzer/Views/Pages/SettingsPage.xaml @@ -8,6 +8,7 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml" Title="SettingsPage" + Name="settings" d:DataContext="{d:DesignInstance local:SettingsPage, IsDesignTimeCreatable=False}" d:DesignHeight="800" @@ -101,7 +102,7 @@ - + @@ -341,6 +342,6 @@ - + diff --git a/Remnant2SaveAnalyzer/Views/Pages/SettingsPage.xaml.cs b/Remnant2SaveAnalyzer/Views/Pages/SettingsPage.xaml.cs index 25fc812..e322e8d 100644 --- a/Remnant2SaveAnalyzer/Views/Pages/SettingsPage.xaml.cs +++ b/Remnant2SaveAnalyzer/Views/Pages/SettingsPage.xaml.cs @@ -12,6 +12,8 @@ using Wpf.Ui.Appearance; using MessageBox = Wpf.Ui.Controls.MessageBox; using Remnant2SaveAnalyzer.Logging; +using System.Configuration; +using System.Windows.Input; namespace Remnant2SaveAnalyzer.Views.Pages; @@ -415,5 +417,13 @@ private void СmbNoPrerequisiteItemColor_SelectionChanged(object sender, Selecti { Properties.Settings.Default.NoPrerequisiteItemStyle = ((ComboBoxItem)cmbNoPrerequisiteItemColor.SelectedItem).Tag.ToString(); } + + private void LinkToRepo_OnPreviewMouseRightButtonDown(object sender, MouseButtonEventArgs e) + { + Clipboard.SetDataObject(SettingsPath); + } + // ReSharper disable UnusedMember.Global + public string SettingsPath => ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.PerUserRoamingAndLocal).FilePath; + public string SettingsPathText => Loc.T("Settings path (right click to copy)") + ": " + SettingsPath; + } -//string debug = System.Configuration.ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.PerUserRoamingAndLocal).FilePath; \ No newline at end of file diff --git a/Remnant2SaveAnalyzer/locales/Strings.Designer.cs b/Remnant2SaveAnalyzer/locales/Strings.Designer.cs index de5569a..0090750 100644 --- a/Remnant2SaveAnalyzer/locales/Strings.Designer.cs +++ b/Remnant2SaveAnalyzer/locales/Strings.Designer.cs @@ -1311,6 +1311,15 @@ public static string Settings { } } + /// + /// Looks up a localized string similar to Settings path (right click to copy). + /// + public static string Settings_path__right_click_to_copy_ { + get { + return ResourceManager.GetString("Settings path (right click to copy)", resourceCulture); + } + } + /// /// Looks up a localized string similar to Survival. /// diff --git a/Remnant2SaveAnalyzer/locales/Strings.resx b/Remnant2SaveAnalyzer/locales/Strings.resx index 404acd2..4386659 100644 --- a/Remnant2SaveAnalyzer/locales/Strings.resx +++ b/Remnant2SaveAnalyzer/locales/Strings.resx @@ -597,4 +597,7 @@ Italic + + Settings path (right click to copy) + \ No newline at end of file