diff --git a/Business/Menus.cs b/Business/Menus.cs index 7771e23..f2003e6 100644 --- a/Business/Menus.cs +++ b/Business/Menus.cs @@ -414,7 +414,7 @@ namespace SystemTrayMenu.Business { string directory = Path.Combine( networkLocationRootPath, - line.Substring(0, indexOfFirstSpace)); + line[..indexOfFirstSpace]); directories.Add(directory); resolvedSomething = true; diff --git a/Business/Program.cs b/Business/Program.cs index 7273e4b..1b91416 100644 --- a/Business/Program.cs +++ b/Business/Program.cs @@ -26,7 +26,7 @@ namespace SystemTrayMenu Config.LoadOrSetByUser(); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); - Application.ThreadException += (s, t) => AskUserSendError(t.Exception); + Application.ThreadException += (sender, e) => AskUserSendError(e.Exception); Scaling.Initialize(); FolderOptions.Initialize(); diff --git a/Helpers/Fading.cs b/Helpers/Fading.cs index ba88ff1..278b6d3 100644 --- a/Helpers/Fading.cs +++ b/Helpers/Fading.cs @@ -28,11 +28,7 @@ namespace SystemTrayMenu.Helper internal Fading() { timer.Interval = Interval100FPS; - timer.Tick += Tick; - void Tick(object sender, EventArgs e) - { - FadeStep(); - } + timer.Tick += (sender, e) => FadeStep(); } internal event EventHandlerEmpty Hide; diff --git a/Helpers/KeyboardHook.cs b/Helpers/KeyboardHook.cs index c9da369..3d7d87a 100644 --- a/Helpers/KeyboardHook.cs +++ b/Helpers/KeyboardHook.cs @@ -30,10 +30,7 @@ namespace SystemTrayMenu.Helper public KeyboardHook() { // register the event of the inner native window. - window.KeyPressed += (sender, args) => - { - KeyPressed?.Invoke(this, args); - }; + window.KeyPressed += (sender, e) => KeyPressed?.Invoke(this, e); } /// diff --git a/LICENSE b/LICENSE index e81098a..2332cf4 100644 --- a/LICENSE +++ b/LICENSE @@ -632,7 +632,7 @@ state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. TAMAHO SystemTrayMenu - browse and open your files easily - Copyright (C) 2021 Markus Hofknecht + Copyright (C) 2022 Markus Hofknecht This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -652,7 +652,7 @@ You can contact me by mail Markus@Hofknecht.eu If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: - TAMAHO SystemTrayMenu Copyright (C) 2021 Markus Hofknecht + TAMAHO SystemTrayMenu Copyright (C) 2022 Markus Hofknecht This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index 9c0834f..347f730 100644 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -14,7 +14,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("TAMAHO")] [assembly: AssemblyProduct("TAMAHO SystemTrayMenu")] -[assembly: AssemblyCopyright("Copyright © 2021, TAMAHO SystemTrayMenu")] +[assembly: AssemblyCopyright("Copyright © 2022, TAMAHO SystemTrayMenu")] [assembly: AssemblyTrademark("TAMAHO")] [assembly: AssemblyCulture("")] @@ -39,5 +39,5 @@ using System.Runtime.InteropServices; // 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.1.2.5")] -[assembly: AssemblyFileVersion("1.1.2.5")] +[assembly: AssemblyVersion("1.1.2.6")] +[assembly: AssemblyFileVersion("1.1.2.6")] diff --git a/Properties/Settings.Designer.cs b/Properties/Settings.Designer.cs index 0733530..bd46645 100644 --- a/Properties/Settings.Designer.cs +++ b/Properties/Settings.Designer.cs @@ -142,7 +142,7 @@ namespace SystemTrayMenu.Properties [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] + [global::System.Configuration.DefaultSettingValueAttribute("True")] public bool ShowInTaskbar { get @@ -158,7 +158,7 @@ namespace SystemTrayMenu.Properties [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] + [global::System.Configuration.DefaultSettingValueAttribute("True")] public bool AppearAtTheBottomLeft { get @@ -222,7 +222,7 @@ namespace SystemTrayMenu.Properties [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] + [global::System.Configuration.DefaultSettingValueAttribute("True")] public bool IsDarkModeAlwaysOn { get @@ -254,7 +254,7 @@ namespace SystemTrayMenu.Properties [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("100")] + [global::System.Configuration.DefaultSettingValueAttribute("125")] public int SizeInPercentage { get @@ -318,7 +318,7 @@ namespace SystemTrayMenu.Properties [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("300")] + [global::System.Configuration.DefaultSettingValueAttribute("400")] public int MaximumMenuWidth { get @@ -446,7 +446,7 @@ namespace SystemTrayMenu.Properties [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("500")] + [global::System.Configuration.DefaultSettingValueAttribute("400")] public int TimeUntilCloses { get diff --git a/Resources/lang.Designer.cs b/Resources/lang.Designer.cs index 357bf22..9d6c221 100644 --- a/Resources/lang.Designer.cs +++ b/Resources/lang.Designer.cs @@ -240,6 +240,15 @@ namespace SystemTrayMenu.Resources { } } + /// + /// Looks up a localized string similar to Cache. + /// + internal static string Cache { + get { + return ResourceManager.GetString("Cache", resourceCulture); + } + } + /// /// Looks up a localized string similar to Cache main menu. /// diff --git a/Resources/lang.cs-CZ.resx b/Resources/lang.cs-CZ.resx index e4bdbbb..91f6c27 100644 --- a/Resources/lang.cs-CZ.resx +++ b/Resources/lang.cs-CZ.resx @@ -420,4 +420,7 @@ Vygenerujte zástupce jednotek + + Mezipaměti + \ No newline at end of file diff --git a/Resources/lang.de-DE.resx b/Resources/lang.de-DE.resx index dbc104c..7af972e 100644 --- a/Resources/lang.de-DE.resx +++ b/Resources/lang.de-DE.resx @@ -420,4 +420,7 @@ Verknüpfungen zu Laufwerken erstellen + + Zwischenspeicher + \ No newline at end of file diff --git a/Resources/lang.es-ES.resx b/Resources/lang.es-ES.resx index 6d36efd..a8e7154 100644 --- a/Resources/lang.es-ES.resx +++ b/Resources/lang.es-ES.resx @@ -420,4 +420,7 @@ Generar accesos directos a las unidades + + Cache + \ No newline at end of file diff --git a/Resources/lang.fa-IR.resx b/Resources/lang.fa-IR.resx index ffbb43c..dc0ee43 100644 --- a/Resources/lang.fa-IR.resx +++ b/Resources/lang.fa-IR.resx @@ -420,4 +420,7 @@ ایجاد میانبر برای درایوها + + حافظه پنهان + \ No newline at end of file diff --git a/Resources/lang.fr-FR.resx b/Resources/lang.fr-FR.resx index 6a91f53..20d19f8 100644 --- a/Resources/lang.fr-FR.resx +++ b/Resources/lang.fr-FR.resx @@ -420,4 +420,7 @@ Générer des raccourcis vers les lecteurs + + Cacher + \ No newline at end of file diff --git a/Resources/lang.it-IT.resx b/Resources/lang.it-IT.resx index 2a7c56a..92f390a 100644 --- a/Resources/lang.it-IT.resx +++ b/Resources/lang.it-IT.resx @@ -420,4 +420,7 @@ Genera collegamenti alle unità + + Cache + \ No newline at end of file diff --git a/Resources/lang.ja-JP.resx b/Resources/lang.ja-JP.resx index e6d1145..ca10553 100644 --- a/Resources/lang.ja-JP.resx +++ b/Resources/lang.ja-JP.resx @@ -420,4 +420,7 @@ ドライブへのショートカットを生成する + + キャッシュ + \ No newline at end of file diff --git a/Resources/lang.ko-KR.resx b/Resources/lang.ko-KR.resx index 63a255d..80560e5 100644 --- a/Resources/lang.ko-KR.resx +++ b/Resources/lang.ko-KR.resx @@ -420,4 +420,7 @@ 드라이브에 대한 바로 가기 생성 + + 은닉처 + \ No newline at end of file diff --git a/Resources/lang.nl-NL.resx b/Resources/lang.nl-NL.resx index f67d723..9dfe896 100644 --- a/Resources/lang.nl-NL.resx +++ b/Resources/lang.nl-NL.resx @@ -420,4 +420,7 @@ Genereer snelkoppelingen naar stations + + Cache + \ No newline at end of file diff --git a/Resources/lang.pt-BR.resx b/Resources/lang.pt-BR.resx index 2aad87a..ea9f3e3 100644 --- a/Resources/lang.pt-BR.resx +++ b/Resources/lang.pt-BR.resx @@ -420,4 +420,7 @@ Gerar atalhos para drives + + Cache + \ No newline at end of file diff --git a/Resources/lang.resx b/Resources/lang.resx index 53f7140..7b638ec 100644 --- a/Resources/lang.resx +++ b/Resources/lang.resx @@ -420,4 +420,7 @@ Generate shortcuts to drives + + Cache + \ No newline at end of file diff --git a/Resources/lang.ru-RU.resx b/Resources/lang.ru-RU.resx index 79a11dc..07277c9 100644 --- a/Resources/lang.ru-RU.resx +++ b/Resources/lang.ru-RU.resx @@ -420,4 +420,7 @@ Создавайте ярлыки для дисков + + Кеш + \ No newline at end of file diff --git a/Resources/lang.tr-TR.resx b/Resources/lang.tr-TR.resx index a8b9248..5c25f7c 100644 --- a/Resources/lang.tr-TR.resx +++ b/Resources/lang.tr-TR.resx @@ -420,4 +420,7 @@ Sürücüler için kısayollar oluşturun + + Önbellek + \ No newline at end of file diff --git a/Resources/lang.vi-VN.resx b/Resources/lang.vi-VN.resx index b999cd8..9c5ad66 100644 --- a/Resources/lang.vi-VN.resx +++ b/Resources/lang.vi-VN.resx @@ -420,4 +420,7 @@ Tạo lối tắt cho ổ đĩa + + Bộ nhớ đệm + \ No newline at end of file diff --git a/Resources/lang.zh-CN.resx b/Resources/lang.zh-CN.resx index eff7b21..f76bf30 100644 --- a/Resources/lang.zh-CN.resx +++ b/Resources/lang.zh-CN.resx @@ -420,4 +420,7 @@ 生成驱动器的快捷方式 + + 缓存 + \ No newline at end of file diff --git a/UserInterface/Menu.cs b/UserInterface/Menu.cs index cf33b38..46e4083 100644 --- a/UserInterface/Menu.cs +++ b/UserInterface/Menu.cs @@ -332,7 +332,7 @@ namespace SystemTrayMenu.UserInterface { if (title.Length > MenuDefines.LengthMax) { - title = $"{title.Substring(0, MenuDefines.LengthMax)}..."; + title = $"{title[..MenuDefines.LengthMax]}..."; } labelTitle.Text = title; diff --git a/UserInterface/SettingsForm.Designer.cs b/UserInterface/SettingsForm.Designer.cs index 57909d3..c1e54c3 100644 --- a/UserInterface/SettingsForm.Designer.cs +++ b/UserInterface/SettingsForm.Designer.cs @@ -77,7 +77,6 @@ namespace SystemTrayMenu.UserInterface this.tableLayoutPanelClearCacheIfMoreThanThisNumberOfItems = new System.Windows.Forms.TableLayoutPanel(); this.labelClearCacheIfMoreThanThisNumberOfItems = new System.Windows.Forms.Label(); this.numericUpDownClearCacheIfMoreThanThisNumberOfItems = new System.Windows.Forms.NumericUpDown(); - this.checkBoxCacheMainMenu = new System.Windows.Forms.CheckBox(); this.checkBoxGenerateShortcutsToDrives = new System.Windows.Forms.CheckBox(); this.tabPageAdvanced = new System.Windows.Forms.TabPage(); this.tableLayoutPanelAdvanced = new System.Windows.Forms.TableLayoutPanel(); @@ -288,6 +287,9 @@ namespace SystemTrayMenu.UserInterface this.buttonOk = new System.Windows.Forms.Button(); this.buttonCancel = new System.Windows.Forms.Button(); this.colorDialog = new System.Windows.Forms.ColorDialog(); + this.groupBoxCache = new System.Windows.Forms.GroupBox(); + this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); + this.checkBoxCacheMainMenu = new System.Windows.Forms.CheckBox(); this.tableLayoutPanelMain.SuspendLayout(); this.tabControl.SuspendLayout(); this.tabPageGeneral.SuspendLayout(); @@ -421,6 +423,8 @@ namespace SystemTrayMenu.UserInterface this.groupBoxAppearance.SuspendLayout(); this.tableLayoutPanelAppearance.SuspendLayout(); this.tableLayoutPanelBottom.SuspendLayout(); + this.groupBoxCache.SuspendLayout(); + this.tableLayoutPanel1.SuspendLayout(); this.SuspendLayout(); // // tableLayoutPanelMain @@ -873,20 +877,14 @@ namespace SystemTrayMenu.UserInterface this.tableLayoutPanelFoldersInRootFolder.ColumnCount = 1; this.tableLayoutPanelFoldersInRootFolder.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tableLayoutPanelFoldersInRootFolder.Controls.Add(this.groupBoxFoldersInRootFolder, 0, 0); - this.tableLayoutPanelFoldersInRootFolder.Controls.Add(this.buttonDefaultFolders, 0, 4); - this.tableLayoutPanelFoldersInRootFolder.Controls.Add(this.tableLayoutPanelClearCacheIfMoreThanThisNumberOfItems, 0, 3); - this.tableLayoutPanelFoldersInRootFolder.Controls.Add(this.checkBoxCacheMainMenu, 0, 2); - this.tableLayoutPanelFoldersInRootFolder.Controls.Add(this.checkBoxGenerateShortcutsToDrives, 0, 1); + this.tableLayoutPanelFoldersInRootFolder.Controls.Add(this.buttonDefaultFolders, 0, 1); this.tableLayoutPanelFoldersInRootFolder.Dock = System.Windows.Forms.DockStyle.Fill; this.tableLayoutPanelFoldersInRootFolder.Location = new System.Drawing.Point(3, 3); this.tableLayoutPanelFoldersInRootFolder.Name = "tableLayoutPanelFoldersInRootFolder"; - this.tableLayoutPanelFoldersInRootFolder.RowCount = 6; - this.tableLayoutPanelFoldersInRootFolder.RowStyles.Add(new System.Windows.Forms.RowStyle()); - this.tableLayoutPanelFoldersInRootFolder.RowStyles.Add(new System.Windows.Forms.RowStyle()); - this.tableLayoutPanelFoldersInRootFolder.RowStyles.Add(new System.Windows.Forms.RowStyle()); - this.tableLayoutPanelFoldersInRootFolder.RowStyles.Add(new System.Windows.Forms.RowStyle()); + this.tableLayoutPanelFoldersInRootFolder.RowCount = 2; this.tableLayoutPanelFoldersInRootFolder.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanelFoldersInRootFolder.RowStyles.Add(new System.Windows.Forms.RowStyle()); + this.tableLayoutPanelFoldersInRootFolder.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); this.tableLayoutPanelFoldersInRootFolder.Size = new System.Drawing.Size(408, 407); this.tableLayoutPanelFoldersInRootFolder.TabIndex = 1; // @@ -899,7 +897,7 @@ namespace SystemTrayMenu.UserInterface this.groupBoxFoldersInRootFolder.MaximumSize = new System.Drawing.Size(400, 0); this.groupBoxFoldersInRootFolder.MinimumSize = new System.Drawing.Size(400, 0); this.groupBoxFoldersInRootFolder.Name = "groupBoxFoldersInRootFolder"; - this.groupBoxFoldersInRootFolder.Size = new System.Drawing.Size(400, 274); + this.groupBoxFoldersInRootFolder.Size = new System.Drawing.Size(400, 299); this.groupBoxFoldersInRootFolder.TabIndex = 0; this.groupBoxFoldersInRootFolder.TabStop = false; this.groupBoxFoldersInRootFolder.Text = "groupBox1"; @@ -913,15 +911,17 @@ namespace SystemTrayMenu.UserInterface this.tableLayoutPanelFolderToRootFoldersList7.Controls.Add(this.tableLayoutPanelFolderToRootFolder, 0, 1); this.tableLayoutPanelFolderToRootFoldersList7.Controls.Add(this.dataGridViewFolders, 0, 2); this.tableLayoutPanelFolderToRootFoldersList7.Controls.Add(this.tableLayoutPanelAddSampleStartMenuFolder, 0, 3); + this.tableLayoutPanelFolderToRootFoldersList7.Controls.Add(this.checkBoxGenerateShortcutsToDrives, 0, 4); this.tableLayoutPanelFolderToRootFoldersList7.Dock = System.Windows.Forms.DockStyle.Fill; this.tableLayoutPanelFolderToRootFoldersList7.Location = new System.Drawing.Point(3, 19); this.tableLayoutPanelFolderToRootFoldersList7.Name = "tableLayoutPanelFolderToRootFoldersList7"; - this.tableLayoutPanelFolderToRootFoldersList7.RowCount = 4; + this.tableLayoutPanelFolderToRootFoldersList7.RowCount = 5; this.tableLayoutPanelFolderToRootFoldersList7.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanelFolderToRootFoldersList7.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanelFolderToRootFoldersList7.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 190F)); this.tableLayoutPanelFolderToRootFoldersList7.RowStyles.Add(new System.Windows.Forms.RowStyle()); - this.tableLayoutPanelFolderToRootFoldersList7.Size = new System.Drawing.Size(394, 252); + this.tableLayoutPanelFolderToRootFoldersList7.RowStyles.Add(new System.Windows.Forms.RowStyle()); + this.tableLayoutPanelFolderToRootFoldersList7.Size = new System.Drawing.Size(394, 277); this.tableLayoutPanelFolderToRootFoldersList7.TabIndex = 0; // // tableLayoutPanelFolderToRootFolder @@ -1058,7 +1058,7 @@ namespace SystemTrayMenu.UserInterface // this.buttonDefaultFolders.AutoSize = true; this.buttonDefaultFolders.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.buttonDefaultFolders.Location = new System.Drawing.Point(9, 368); + this.buttonDefaultFolders.Location = new System.Drawing.Point(9, 314); this.buttonDefaultFolders.Margin = new System.Windows.Forms.Padding(9, 9, 3, 9); this.buttonDefaultFolders.MinimumSize = new System.Drawing.Size(75, 25); this.buttonDefaultFolders.Name = "buttonDefaultFolders"; @@ -1078,12 +1078,12 @@ namespace SystemTrayMenu.UserInterface this.tableLayoutPanelClearCacheIfMoreThanThisNumberOfItems.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tableLayoutPanelClearCacheIfMoreThanThisNumberOfItems.Controls.Add(this.labelClearCacheIfMoreThanThisNumberOfItems, 1, 0); this.tableLayoutPanelClearCacheIfMoreThanThisNumberOfItems.Controls.Add(this.numericUpDownClearCacheIfMoreThanThisNumberOfItems, 0, 0); - this.tableLayoutPanelClearCacheIfMoreThanThisNumberOfItems.Location = new System.Drawing.Point(0, 330); + this.tableLayoutPanelClearCacheIfMoreThanThisNumberOfItems.Location = new System.Drawing.Point(0, 25); this.tableLayoutPanelClearCacheIfMoreThanThisNumberOfItems.Margin = new System.Windows.Forms.Padding(0); this.tableLayoutPanelClearCacheIfMoreThanThisNumberOfItems.Name = "tableLayoutPanelClearCacheIfMoreThanThisNumberOfItems"; this.tableLayoutPanelClearCacheIfMoreThanThisNumberOfItems.RowCount = 1; this.tableLayoutPanelClearCacheIfMoreThanThisNumberOfItems.RowStyles.Add(new System.Windows.Forms.RowStyle()); - this.tableLayoutPanelClearCacheIfMoreThanThisNumberOfItems.Size = new System.Drawing.Size(408, 29); + this.tableLayoutPanelClearCacheIfMoreThanThisNumberOfItems.Size = new System.Drawing.Size(394, 29); this.tableLayoutPanelClearCacheIfMoreThanThisNumberOfItems.TabIndex = 3; // // labelClearCacheIfMoreThanThisNumberOfItems @@ -1119,22 +1119,12 @@ namespace SystemTrayMenu.UserInterface 0, 0}); // - // checkBoxCacheMainMenu - // - this.checkBoxCacheMainMenu.AutoSize = true; - this.checkBoxCacheMainMenu.Location = new System.Drawing.Point(3, 308); - this.checkBoxCacheMainMenu.Name = "checkBoxCacheMainMenu"; - this.checkBoxCacheMainMenu.Size = new System.Drawing.Size(168, 19); - this.checkBoxCacheMainMenu.TabIndex = 3; - this.checkBoxCacheMainMenu.Text = "checkBoxCacheMainMenu"; - this.checkBoxCacheMainMenu.UseVisualStyleBackColor = true; - // // checkBoxGenerateShortcutsToDrives // this.checkBoxGenerateShortcutsToDrives.AutoSize = true; - this.checkBoxGenerateShortcutsToDrives.Location = new System.Drawing.Point(3, 283); + this.checkBoxGenerateShortcutsToDrives.Location = new System.Drawing.Point(3, 255); this.checkBoxGenerateShortcutsToDrives.Name = "checkBoxGenerateShortcutsToDrives"; - this.checkBoxGenerateShortcutsToDrives.Size = new System.Drawing.Size(195, 19); + this.checkBoxGenerateShortcutsToDrives.Size = new System.Drawing.Size(218, 19); this.checkBoxGenerateShortcutsToDrives.TabIndex = 7; this.checkBoxGenerateShortcutsToDrives.Text = "checkBoxGenerateShortcutsToDrives"; this.checkBoxGenerateShortcutsToDrives.UseVisualStyleBackColor = true; @@ -1528,16 +1518,18 @@ namespace SystemTrayMenu.UserInterface this.tableLayoutPanelExpert.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.tableLayoutPanelExpert.ColumnCount = 1; this.tableLayoutPanelExpert.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); - this.tableLayoutPanelExpert.Controls.Add(this.buttonExpertDefault, 0, 2); + this.tableLayoutPanelExpert.Controls.Add(this.groupBoxCache, 0, 2); this.tableLayoutPanelExpert.Controls.Add(this.groupBoxStaysOpen, 0, 1); this.tableLayoutPanelExpert.Controls.Add(this.groupBoxOpenSubmenus, 0, 0); + this.tableLayoutPanelExpert.Controls.Add(this.buttonExpertDefault, 0, 3); this.tableLayoutPanelExpert.Dock = System.Windows.Forms.DockStyle.Fill; this.tableLayoutPanelExpert.Location = new System.Drawing.Point(3, 3); this.tableLayoutPanelExpert.Name = "tableLayoutPanelExpert"; - this.tableLayoutPanelExpert.RowCount = 3; + this.tableLayoutPanelExpert.RowCount = 4; this.tableLayoutPanelExpert.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanelExpert.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanelExpert.RowStyles.Add(new System.Windows.Forms.RowStyle()); + this.tableLayoutPanelExpert.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); this.tableLayoutPanelExpert.Size = new System.Drawing.Size(408, 407); this.tableLayoutPanelExpert.TabIndex = 1; // @@ -1545,7 +1537,7 @@ namespace SystemTrayMenu.UserInterface // this.buttonExpertDefault.AutoSize = true; this.buttonExpertDefault.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.buttonExpertDefault.Location = new System.Drawing.Point(9, 233); + this.buttonExpertDefault.Location = new System.Drawing.Point(9, 318); this.buttonExpertDefault.Margin = new System.Windows.Forms.Padding(9, 9, 3, 9); this.buttonExpertDefault.MinimumSize = new System.Drawing.Size(75, 25); this.buttonExpertDefault.Name = "buttonExpertDefault"; @@ -4038,6 +4030,48 @@ namespace SystemTrayMenu.UserInterface this.buttonCancel.UseVisualStyleBackColor = true; this.buttonCancel.Click += new System.EventHandler(this.ButtonCancel_Click); // + // groupBoxCache + // + this.groupBoxCache.AutoSize = true; + this.groupBoxCache.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.groupBoxCache.Controls.Add(this.tableLayoutPanel1); + this.groupBoxCache.Location = new System.Drawing.Point(3, 227); + this.groupBoxCache.MaximumSize = new System.Drawing.Size(400, 0); + this.groupBoxCache.MinimumSize = new System.Drawing.Size(400, 0); + this.groupBoxCache.Name = "groupBoxCache"; + this.groupBoxCache.Padding = new System.Windows.Forms.Padding(3, 3, 3, 6); + this.groupBoxCache.Size = new System.Drawing.Size(400, 79); + this.groupBoxCache.TabIndex = 1; + this.groupBoxCache.TabStop = false; + this.groupBoxCache.Text = "groupBoxCache"; + // + // tableLayoutPanel1 + // + this.tableLayoutPanel1.AutoSize = true; + this.tableLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.tableLayoutPanel1.ColumnCount = 1; + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel1.Controls.Add(this.checkBoxCacheMainMenu, 0, 0); + this.tableLayoutPanel1.Controls.Add(this.tableLayoutPanelClearCacheIfMoreThanThisNumberOfItems, 0, 1); + this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel1.Location = new System.Drawing.Point(3, 19); + this.tableLayoutPanel1.Name = "tableLayoutPanel1"; + this.tableLayoutPanel1.RowCount = 2; + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); + this.tableLayoutPanel1.Size = new System.Drawing.Size(394, 54); + this.tableLayoutPanel1.TabIndex = 0; + // + // checkBoxCacheMainMenu + // + this.checkBoxCacheMainMenu.AutoSize = true; + this.checkBoxCacheMainMenu.Location = new System.Drawing.Point(3, 3); + this.checkBoxCacheMainMenu.Name = "checkBoxCacheMainMenu"; + this.checkBoxCacheMainMenu.Size = new System.Drawing.Size(168, 19); + this.checkBoxCacheMainMenu.TabIndex = 3; + this.checkBoxCacheMainMenu.Text = "checkBoxCacheMainMenu"; + this.checkBoxCacheMainMenu.UseVisualStyleBackColor = true; + // // SettingsForm // this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); @@ -4272,6 +4306,10 @@ namespace SystemTrayMenu.UserInterface this.tableLayoutPanelAppearance.PerformLayout(); this.tableLayoutPanelBottom.ResumeLayout(false); this.tableLayoutPanelBottom.PerformLayout(); + this.groupBoxCache.ResumeLayout(false); + this.groupBoxCache.PerformLayout(); + this.tableLayoutPanel1.ResumeLayout(false); + this.tableLayoutPanel1.PerformLayout(); this.ResumeLayout(false); this.PerformLayout(); @@ -4523,7 +4561,6 @@ namespace SystemTrayMenu.UserInterface private System.Windows.Forms.TableLayoutPanel tableLayoutPanelClearCacheIfMoreThanThisNumberOfItems; private System.Windows.Forms.NumericUpDown numericUpDownClearCacheIfMoreThanThisNumberOfItems; private System.Windows.Forms.Label labelClearCacheIfMoreThanThisNumberOfItems; - private System.Windows.Forms.CheckBox checkBoxCacheMainMenu; private System.Windows.Forms.TableLayoutPanel tableLayoutPanelAddSampleStartMenuFolder; private System.Windows.Forms.Button buttonAddSampleStartMenuFolder; private System.Windows.Forms.TableLayoutPanel tableLayoutPanelRowHeighteInPercentage; @@ -4539,5 +4576,8 @@ namespace SystemTrayMenu.UserInterface private System.Windows.Forms.RadioButton radioButtonAppearAtMouseLocation; private System.Windows.Forms.RadioButton radioButtonUseCustomLocation; private System.Windows.Forms.CheckBox checkBoxGenerateShortcutsToDrives; + private System.Windows.Forms.GroupBox groupBoxCache; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; + private System.Windows.Forms.CheckBox checkBoxCacheMainMenu; } } \ No newline at end of file diff --git a/UserInterface/SettingsForm.cs b/UserInterface/SettingsForm.cs index 98b1e37..bde2f48 100644 --- a/UserInterface/SettingsForm.cs +++ b/UserInterface/SettingsForm.cs @@ -136,8 +136,6 @@ namespace SystemTrayMenu.UserInterface buttonAddSampleStartMenuFolder.Text = Translator.GetText("Add sample 'Start Menu' folder"); buttonDefaultFolders.Text = Translator.GetText("Default"); checkBoxGenerateShortcutsToDrives.Text = Translator.GetText("Generate shortcuts to drives"); - checkBoxCacheMainMenu.Text = Translator.GetText("Cache main menu"); - labelClearCacheIfMoreThanThisNumberOfItems.Text = Translator.GetText("Clear cache if more than this number of items"); groupBoxClick.Text = Translator.GetText("Click"); checkBoxShowInTaskbar.Text = Translator.GetText("Show in Taskbar"); checkBoxOpenItemWithOneClick.Text = Translator.GetText("Single click to start item"); @@ -160,6 +158,9 @@ namespace SystemTrayMenu.UserInterface labelTimeUntilOpen.Text = Translator.GetText("Milliseconds until a menu opens when the mouse is on it"); checkBoxStayOpenWhenFocusLostAfterEnterPressed.Text = Translator.GetText("If the focus is lost and the Enter key was pressed"); labelTimeUntilClosesAfterEnterPressed.Text = Translator.GetText("Milliseconds until the menu closes if in this case the menu is not reactivated"); + groupBoxCache.Text = Translator.GetText("Cache"); + checkBoxCacheMainMenu.Text = Translator.GetText("Cache main menu"); + labelClearCacheIfMoreThanThisNumberOfItems.Text = Translator.GetText("Clear cache if more than this number of items"); buttonExpertDefault.Text = Translator.GetText("Default"); groupBoxAppearance.Text = Translator.GetText("Appearance"); checkBoxRoundCorners.Text = Translator.GetText("Round corners"); @@ -300,8 +301,6 @@ namespace SystemTrayMenu.UserInterface } checkBoxGenerateShortcutsToDrives.Checked = Settings.Default.GenerateShortcutsToDrives; - checkBoxCacheMainMenu.Checked = Settings.Default.CacheMainMenu; - numericUpDownClearCacheIfMoreThanThisNumberOfItems.Value = Settings.Default.ClearCacheIfMoreThanThisNumberOfItems; checkBoxShowInTaskbar.Checked = Settings.Default.ShowInTaskbar; checkBoxOpenItemWithOneClick.Checked = Settings.Default.OpenItemWithOneClick; @@ -382,7 +381,7 @@ namespace SystemTrayMenu.UserInterface numericUpDownTimeUntilClose.Minimum = 200; numericUpDownTimeUntilClose.Maximum = 5000; - numericUpDownTimeUntilClose.Increment = 100; + numericUpDownTimeUntilClose.Increment = 10; numericUpDownTimeUntilClose.Value = Settings.Default.TimeUntilCloses; numericUpDownTimeUntilOpens.Minimum = 20; @@ -397,6 +396,9 @@ namespace SystemTrayMenu.UserInterface numericUpDownTimeUntilClosesAfterEnterPressed.Increment = 10; numericUpDownTimeUntilClosesAfterEnterPressed.Value = Settings.Default.TimeUntilClosesAfterEnterPressed; + checkBoxCacheMainMenu.Checked = Settings.Default.CacheMainMenu; + numericUpDownClearCacheIfMoreThanThisNumberOfItems.Value = Settings.Default.ClearCacheIfMoreThanThisNumberOfItems; + checkBoxRoundCorners.Checked = Settings.Default.RoundCorners; checkBoxDarkModeAlwaysOn.Checked = Settings.Default.IsDarkModeAlwaysOn; @@ -913,8 +915,6 @@ namespace SystemTrayMenu.UserInterface { dataGridViewFolders.Rows.Clear(); checkBoxGenerateShortcutsToDrives.Checked = false; - checkBoxCacheMainMenu.Checked = true; - numericUpDownClearCacheIfMoreThanThisNumberOfItems.Value = 200; } private void ButtonAddFolderToRootFolder_Click(object sender, EventArgs e) @@ -1004,13 +1004,13 @@ namespace SystemTrayMenu.UserInterface { checkBoxOpenItemWithOneClick.Checked = true; radioButtonAppearAtMouseLocation.Checked = false; - numericUpDownSizeInPercentage.Value = 100; + numericUpDownSizeInPercentage.Value = 125; numericUpDownRowHeighteInPercentage.Value = 100; - numericUpDownMenuWidth.Value = 300; + numericUpDownMenuWidth.Value = 400; numericUpDownMenuHeight.Value = 600; - checkBoxShowInTaskbar.Checked = false; + checkBoxShowInTaskbar.Checked = true; radioButtonAppearAtTheBottomRight.Checked = true; - radioButtonAppearAtTheBottomLeft.Checked = false; + radioButtonAppearAtTheBottomLeft.Checked = true; radioButtonUseCustomLocation.Checked = false; radioButtonAppearAtMouseLocation.Checked = false; } @@ -1029,10 +1029,12 @@ namespace SystemTrayMenu.UserInterface { checkBoxStayOpenWhenItemClicked.Checked = true; checkBoxStayOpenWhenFocusLost.Checked = true; - numericUpDownTimeUntilClose.Value = 500; + numericUpDownTimeUntilClose.Value = 400; numericUpDownTimeUntilOpens.Value = 100; checkBoxStayOpenWhenFocusLostAfterEnterPressed.Checked = true; numericUpDownTimeUntilClosesAfterEnterPressed.Value = 200; + checkBoxCacheMainMenu.Checked = true; + numericUpDownClearCacheIfMoreThanThisNumberOfItems.Value = 200; } private void TextBoxColorsChanged(object sender, EventArgs e) diff --git a/UserInterface/SettingsForm.resx b/UserInterface/SettingsForm.resx index 4bd7aa9..ccfb013 100644 --- a/UserInterface/SettingsForm.resx +++ b/UserInterface/SettingsForm.resx @@ -66,6 +66,15 @@ True + + True + + + True + + + True + 17, 17