From cf92efc198f7b6d3a299c98921fe1797b8a23109 Mon Sep 17 00:00:00 2001 From: Ray Date: Sun, 3 Mar 2024 18:39:57 +0000 Subject: [PATCH] Added bring-to-front on capture Added line count on app title --- ClipboardWatcher.csproj | 2 +- MainForm.cs | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/ClipboardWatcher.csproj b/ClipboardWatcher.csproj index 6882bf4..0842249 100644 --- a/ClipboardWatcher.csproj +++ b/ClipboardWatcher.csproj @@ -11,7 +11,7 @@ Ray Lam favicon.ico true - 0.1.0.009 + 0.1.1.003 Clipboard Watcher diff --git a/MainForm.cs b/MainForm.cs index a248c81..9042752 100644 --- a/MainForm.cs +++ b/MainForm.cs @@ -2,6 +2,7 @@ using System.Diagnostics; using System.Runtime.InteropServices; using System.Windows.Forms; +using RyzStudio.Windows.Forms; using RyzStudio.Windows.ThemedForms; namespace ClipboardWatcher @@ -15,6 +16,7 @@ namespace ClipboardWatcher protected IntPtr _clipboardViewer; protected bool isMonitoring = false; + protected int lineCount = 0; public MainForm() @@ -142,6 +144,7 @@ namespace ClipboardWatcher Clipboard.Clear(); memoBox1.Text = string.Empty; + lineCount = 0; } /// @@ -190,6 +193,9 @@ namespace ClipboardWatcher foreach (string item in fileList) { memoBox1.Text += item + Environment.NewLine; + lineCount++; + + UIControl.SetText(this, $"Clipboard Monitor ({lineCount.ToString()})"); } } @@ -208,6 +214,14 @@ namespace ClipboardWatcher } memoBox1.Text += clipboardText.Trim() + Environment.NewLine; + lineCount++; + + UIControl.SetText(this, $"Clipboard Monitor ({lineCount.ToString()})"); + + this.TopMost = true; + this.BringToFront(); + this.Focus(); + this.TopMost = false; } } -- 2.45.2