From 146e94dfb497ada8b7b6cb6f31f7c84a7276d087 Mon Sep 17 00:00:00 2001 From: Nain Date: Wed, 28 Feb 2024 00:35:57 -0300 Subject: [PATCH] v1.5.3 --- BackupHelper.sln | 2 ++ BackupHelper/BackupHelper.csproj | 6 +++++- BackupHelper/Forms/FormProfileMenu.cs | 8 ++++++-- BackupHelper/Program/Program.cs | 5 +++-- CHANGELOG.md | 5 +++++ 5 files changed, 21 insertions(+), 5 deletions(-) diff --git a/BackupHelper.sln b/BackupHelper.sln index 17e5035..9237b90 100644 --- a/BackupHelper.sln +++ b/BackupHelper.sln @@ -25,9 +25,11 @@ Global {67E7840B-0306-44EA-BBD6-641E388C3C9D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {67E7840B-0306-44EA-BBD6-641E388C3C9D}.Debug|Any CPU.Build.0 = Debug|Any CPU {67E7840B-0306-44EA-BBD6-641E388C3C9D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {67E7840B-0306-44EA-BBD6-641E388C3C9D}.Release|Any CPU.Build.0 = Release|Any CPU {5645CE62-EFDE-429B-8492-9E4D55F343F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5645CE62-EFDE-429B-8492-9E4D55F343F9}.Debug|Any CPU.Build.0 = Debug|Any CPU {5645CE62-EFDE-429B-8492-9E4D55F343F9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5645CE62-EFDE-429B-8492-9E4D55F343F9}.Release|Any CPU.Build.0 = Release|Any CPU {0BF5D9B5-07B9-4AE9-847D-2A2D6A9CABD3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {0BF5D9B5-07B9-4AE9-847D-2A2D6A9CABD3}.Debug|Any CPU.Build.0 = Debug|Any CPU {0BF5D9B5-07B9-4AE9-847D-2A2D6A9CABD3}.Release|Any CPU.ActiveCfg = Release|Any CPU diff --git a/BackupHelper/BackupHelper.csproj b/BackupHelper/BackupHelper.csproj index c9b79b9..c59f63a 100644 --- a/BackupHelper/BackupHelper.csproj +++ b/BackupHelper/BackupHelper.csproj @@ -9,7 +9,7 @@ Copyright © Nain 2023 Resources\backup_helper_icon.ico - 1.5.2 + 1.5.3 Nain BackupHelper Small .NET 7 app to facilitate backup of files and directories with advanced settings and binary comparison. These settings are saved into profiles. @@ -22,6 +22,10 @@ none + + embedded + + diff --git a/BackupHelper/Forms/FormProfileMenu.cs b/BackupHelper/Forms/FormProfileMenu.cs index 13d2eed..148ba0c 100644 --- a/BackupHelper/Forms/FormProfileMenu.cs +++ b/BackupHelper/Forms/FormProfileMenu.cs @@ -30,7 +30,11 @@ public FormProfileMenu() InitializeComponent(); listViewProfile.Groups.Add("Ungrouped", "Ungrouped"); contextMenuStripProfile.Opening += ContextMenuStripProfile_Opening; - labelVersion.Text = $"Version {System.Windows.Forms.Application.ProductVersion} ©{System.Windows.Forms.Application.CompanyName} 2023"; + + int strToRemove = Application.ProductVersion.IndexOf('+'); + string version = strToRemove < 0 ? Application.ProductVersion : Application.ProductVersion[..strToRemove]; + + labelVersion.Text = $"Version {version} ©{Application.CompanyName} 2024"; KeyPreview = true; ClickTimer.Elapsed += ClickTimer_Elapsed; ClickTimer.AutoReset = false; @@ -577,7 +581,7 @@ private void ToolStripMenuItemGenerateShortcut_Click(object sender, EventArgs e) if (saveFileDialogShortcut.ShowDialog() == DialogResult.OK) { - string content = $"\"{Assembly.GetExecutingAssembly().Location}\" \"{string.Join(";", selectedProfiles.Select(p => p.Name))}\"{Environment.NewLine}pause"; + string content = $"\"{Program.WorkingDirectory}\\{Application.ProductName}.exe\" \"{string.Join(";", selectedProfiles.Select(p => p.Name))}\"{Environment.NewLine}pause"; File.WriteAllText(saveFileDialogShortcut.FileName, content); MessageBox.Show($"File saved as \"{saveFileDialogShortcut.FileName}\""); } diff --git a/BackupHelper/Program/Program.cs b/BackupHelper/Program/Program.cs index f45c74d..de8acb9 100644 --- a/BackupHelper/Program/Program.cs +++ b/BackupHelper/Program/Program.cs @@ -11,8 +11,9 @@ static class Program [DllImport("Kernel32.dll")] static extern bool AttachConsole(int processId); - public static string DBPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\backup_helper.db"; - public static FormProfileMenu ProfileMenu; + internal static string WorkingDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); + internal static string DBPath = WorkingDirectory + "\\backup_helper.db"; + internal static FormProfileMenu ProfileMenu; //public static FileControl FC = new(); //static bool ShowDialogs = true; //--Whether to show dialogs when running paremeter mode diff --git a/CHANGELOG.md b/CHANGELOG.md index da8bc8d..fb46439 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 1.5.3 + +Fixed/altered: +- Profile shortcuts - incorrect assembly name - fix + ## 1.5.2 Fixed/altered: