From 86a794f83dd15a950056145d360830e22b9b44cd Mon Sep 17 00:00:00 2001 From: jie65535 Date: Mon, 29 Apr 2024 20:42:23 +0800 Subject: [PATCH] =?UTF-8?q?1.=20=E5=8D=87=E7=BA=A7=E5=88=B0.NET=20Framewor?= =?UTF-8?q?k=204.8=202.=20=E5=A2=9E=E5=8A=A0=E7=BB=9F=E8=AE=A1=E8=A7=A6?= =?UTF-8?q?=E5=8F=91=E6=AC=A1=E6=95=B0=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- KeyGo/App.config | 6 +++--- KeyGo/FormMain.Designer.cs | 11 +++++++++- KeyGo/FormMain.cs | 6 ++++++ KeyGo/KeyGo.csproj | 3 ++- KeyGo/Properties/Resources.Designer.cs | 2 +- KeyGo/Properties/Settings.Designer.cs | 29 ++++++++++++-------------- 6 files changed, 35 insertions(+), 22 deletions(-) diff --git a/KeyGo/App.config b/KeyGo/App.config index 2ae8254..a86c646 100644 --- a/KeyGo/App.config +++ b/KeyGo/App.config @@ -1,6 +1,6 @@ - + - + - \ No newline at end of file + diff --git a/KeyGo/FormMain.Designer.cs b/KeyGo/FormMain.Designer.cs index 65b134d..25c7fe5 100644 --- a/KeyGo/FormMain.Designer.cs +++ b/KeyGo/FormMain.Designer.cs @@ -38,6 +38,7 @@ namespace KeyGo this.TSMICloseToHide = new System.Windows.Forms.ToolStripMenuItem(); this.TSMIPowerBoot = new System.Windows.Forms.ToolStripMenuItem(); this.TSMIExit = new System.Windows.Forms.ToolStripMenuItem(); + this.TSMITriggerCountStatistics = new System.Windows.Forms.ToolStripMenuItem(); this.TSMIConfigFile = new System.Windows.Forms.ToolStripMenuItem(); this.TSMIExportConfig = new System.Windows.Forms.ToolStripMenuItem(); this.TSMIImportConfig = new System.Windows.Forms.ToolStripMenuItem(); @@ -84,11 +85,12 @@ namespace KeyGo // this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.TSMIConfigFile, + this.TSMITriggerCountStatistics, this.TSMICloseToHide, this.TSMIPowerBoot, this.TSMIExit}); this.contextMenuStrip1.Name = "contextMenuStrip1"; - this.contextMenuStrip1.Size = new System.Drawing.Size(181, 114); + this.contextMenuStrip1.Size = new System.Drawing.Size(181, 136); // // TSMICloseToHide // @@ -151,6 +153,12 @@ namespace KeyGo this.TSMIPasteConfig.Size = new System.Drawing.Size(180, 22); this.TSMIPasteConfig.Text = "从剪切板读入"; this.TSMIPasteConfig.Click += new System.EventHandler(this.TSMIPasteConfig_Click); + // TSMITriggerCountStatistics + // + this.TSMITriggerCountStatistics.Name = "TSMITriggerCountStatistics"; + this.TSMITriggerCountStatistics.Size = new System.Drawing.Size(180, 22); + this.TSMITriggerCountStatistics.Text = "触发次数统计"; + this.TSMITriggerCountStatistics.Click += new System.EventHandler(this.TSMITriggerCountStatistics_Click); // // FormMain // @@ -190,6 +198,7 @@ namespace KeyGo private System.Windows.Forms.ToolStripMenuItem TSMIImportConfig; private System.Windows.Forms.ToolStripMenuItem TSMICopyConfig; private System.Windows.Forms.ToolStripMenuItem TSMIPasteConfig; + private System.Windows.Forms.ToolStripMenuItem TSMITriggerCountStatistics; } } diff --git a/KeyGo/FormMain.cs b/KeyGo/FormMain.cs index 0c5fe12..ca8137a 100644 --- a/KeyGo/FormMain.cs +++ b/KeyGo/FormMain.cs @@ -305,6 +305,11 @@ namespace KeyGo SaveAppConfig(_AppConfig); } + private void TSMITriggerCountStatistics_Click(object sender, EventArgs e) + { + MessageBox.Show(string.Join(Environment.NewLine, _KeyGo.Items.Select(k => $"[{k.HotKey}]\t[{k.ProcessName}]\t触发了 {k.TriggerCounter} 次")), "统计结果"); + } + #endregion 托盘图标管理 #region 开机自启动 @@ -460,5 +465,6 @@ namespace KeyGo } #endregion + } } \ No newline at end of file diff --git a/KeyGo/KeyGo.csproj b/KeyGo/KeyGo.csproj index 6bef67c..5fa715c 100644 --- a/KeyGo/KeyGo.csproj +++ b/KeyGo/KeyGo.csproj @@ -8,10 +8,11 @@ WinExe KeyGo KeyGo - v4.5.2 + v4.8 512 true true + AnyCPU diff --git a/KeyGo/Properties/Resources.Designer.cs b/KeyGo/Properties/Resources.Designer.cs index d7af1bc..a959c49 100644 --- a/KeyGo/Properties/Resources.Designer.cs +++ b/KeyGo/Properties/Resources.Designer.cs @@ -19,7 +19,7 @@ namespace KeyGo.Properties { // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen // (以 /str 作为命令选项),或重新生成 VS 项目。 - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Resources { diff --git a/KeyGo/Properties/Settings.Designer.cs b/KeyGo/Properties/Settings.Designer.cs index 702b2e7..0faf372 100644 --- a/KeyGo/Properties/Settings.Designer.cs +++ b/KeyGo/Properties/Settings.Designer.cs @@ -1,27 +1,24 @@ //------------------------------------------------------------------------------ // -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 +// 此代码由工具生成。 +// 运行时版本:4.0.30319.42000 // -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// 对此文件的更改可能会导致不正确的行为,并且如果 +// 重新生成代码,这些更改将会丢失。 // //------------------------------------------------------------------------------ - -namespace KeyGo.Properties -{ +namespace KeyGo.Properties { + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase - { - + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.9.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default - { - get - { + + public static Settings Default { + get { return defaultInstance; } }