From d9fb8d28d72b342f9f0bd8217385583d609122a5 Mon Sep 17 00:00:00 2001 From: Alexander Date: Sun, 24 Nov 2019 09:33:10 +0200 Subject: [PATCH] Notifications replaced with tooltip --- Crypto Notepad/AboutFrom.Designer.cs | 18 +----------------- Crypto Notepad/AboutFrom.cs | 3 +-- 2 files changed, 2 insertions(+), 19 deletions(-) diff --git a/Crypto Notepad/AboutFrom.Designer.cs b/Crypto Notepad/AboutFrom.Designer.cs index 7776026..beb50f3 100644 --- a/Crypto Notepad/AboutFrom.Designer.cs +++ b/Crypto Notepad/AboutFrom.Designer.cs @@ -32,7 +32,6 @@ private void InitializeComponent() System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AboutFrom)); this.appVersionLabel = new System.Windows.Forms.Label(); this.randomColorTimer = new System.Windows.Forms.Timer(this.components); - this.copyToClipboardLabel = new System.Windows.Forms.Label(); this.aboutToolTip = new System.Windows.Forms.ToolTip(this.components); this.appInfoRichTextBox = new Crypto_Notepad.HideCaretRichTextBox(); this.SuspendLayout(); @@ -57,19 +56,6 @@ private void InitializeComponent() this.randomColorTimer.Interval = 200; this.randomColorTimer.Tick += new System.EventHandler(this.RandomColorTimer_Tick); // - // copyToClipboardLabel - // - this.copyToClipboardLabel.AutoSize = true; - this.copyToClipboardLabel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.copyToClipboardLabel.Font = new System.Drawing.Font("Segoe UI Semibold", 6.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204))); - this.copyToClipboardLabel.ForeColor = System.Drawing.SystemColors.ControlDark; - this.copyToClipboardLabel.Location = new System.Drawing.Point(214, 15); - this.copyToClipboardLabel.Name = "copyToClipboardLabel"; - this.copyToClipboardLabel.Size = new System.Drawing.Size(33, 14); - this.copyToClipboardLabel.TabIndex = 3; - this.copyToClipboardLabel.Text = "copied"; - this.copyToClipboardLabel.Visible = false; - // // appInfoRichTextBox // this.appInfoRichTextBox.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(50))))); @@ -83,7 +69,7 @@ private void InitializeComponent() this.appInfoRichTextBox.RightMargin = 700; this.appInfoRichTextBox.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.None; this.appInfoRichTextBox.ShowSelectionMargin = true; - this.appInfoRichTextBox.Size = new System.Drawing.Size(439, 303); + this.appInfoRichTextBox.Size = new System.Drawing.Size(439, 285); this.appInfoRichTextBox.TabIndex = 2; this.appInfoRichTextBox.TabStop = false; this.appInfoRichTextBox.Text = resources.GetString("appInfoRichTextBox.Text"); @@ -96,7 +82,6 @@ private void InitializeComponent() this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(50))))); this.ClientSize = new System.Drawing.Size(435, 323); - this.Controls.Add(this.copyToClipboardLabel); this.Controls.Add(this.appInfoRichTextBox); this.Controls.Add(this.appVersionLabel); this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); @@ -119,7 +104,6 @@ private void InitializeComponent() private System.Windows.Forms.Label appVersionLabel; private HideCaretRichTextBox appInfoRichTextBox; private System.Windows.Forms.Timer randomColorTimer; - private System.Windows.Forms.Label copyToClipboardLabel; private System.Windows.Forms.ToolTip aboutToolTip; } } \ No newline at end of file diff --git a/Crypto Notepad/AboutFrom.cs b/Crypto Notepad/AboutFrom.cs index 0c05c25..20d97ad 100644 --- a/Crypto Notepad/AboutFrom.cs +++ b/Crypto Notepad/AboutFrom.cs @@ -26,8 +26,7 @@ private void GetDebugInfo() sb.AppendLine(string.Format("OS version = {0}", OSVersionInfo.VersionString)); sb.AppendLine(".Net Framework = " + Methods.GetDotNetVersion()); Clipboard.SetText(sb.ToString()); - await Task.Delay(3000); - copyToClipboardLabel.Visible = false; + aboutToolTip.Show("Copied", appVersionLabel, 210, 1, 1000); } #endregion