From bfd078c1d269d6fb837d9c0af9cffdb8481c39c7 Mon Sep 17 00:00:00 2001 From: cdk <2441919651@qq.com> Date: 星期日, 17 八月 2025 17:37:51 +0800 Subject: [PATCH] 异常工时bug修改 --- DevApp/Gs.DevApp/UserControl/Toast.cs | 15 +++++++++++++-- 1 files changed, 13 insertions(+), 2 deletions(-) diff --git a/DevApp/Gs.DevApp/UserControl/Toast.cs b/DevApp/Gs.DevApp/UserControl/Toast.cs index f33d494..b6e37b0 100644 --- a/DevApp/Gs.DevApp/UserControl/Toast.cs +++ b/DevApp/Gs.DevApp/UserControl/Toast.cs @@ -1,4 +1,5 @@ 锘縰sing System; +using System.Configuration; using System.Drawing; using System.Windows.Forms; @@ -9,15 +10,25 @@ private System.Windows.Forms.Timer tmr; private System.Windows.Forms.Timer tmr2; + /// <summary> /// /// </summary> /// <param name="it">1鎴愬姛锛�-1澶辫触</param> /// <param name="messageText"></param> - /// <param name="vanishingSeconds"></param> - public Toast(int it, string messageText, int vanishingSeconds = 2) + /// <param name="vanishingSeconds">鍔ㄧ敾寤堕暱鏃堕棿</param> + public Toast(int it, string messageText, int vanishingSeconds = 3) { InitializeComponent(); + try + { + string _vanishingSeconds = ConfigurationManager.AppSettings["ToastSeconds"]; + if (!string.IsNullOrEmpty(_vanishingSeconds)) + vanishingSeconds = int.Parse(_vanishingSeconds); + } + catch (Exception) + { + } System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Toast)); if (it > 0) this.panel1.BackgroundImage = global::Gs.DevApp.Properties.Resources.ok123; -- Gitblit v1.9.3