From 2023dd8503b28bda2314816008b0bada633c2f38 Mon Sep 17 00:00:00 2001 From: lu <123456> Date: 星期一, 11 八月 2025 09:10:32 +0800 Subject: [PATCH] 其它入库 --- DevApp/Gs.DevApp/UserControl/Toast.cs | 25 ++++++++++++++----------- 1 files changed, 14 insertions(+), 11 deletions(-) diff --git a/DevApp/Gs.DevApp/UserControl/Toast.cs b/DevApp/Gs.DevApp/UserControl/Toast.cs index 811814d..b6e37b0 100644 --- a/DevApp/Gs.DevApp/UserControl/Toast.cs +++ b/DevApp/Gs.DevApp/UserControl/Toast.cs @@ -1,13 +1,6 @@ -锘縰sing DevExpress.XtraEditors; -using Gs.DevApp.Properties; -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; +锘縰sing System; +using System.Configuration; using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using System.Windows.Forms; namespace Gs.DevApp @@ -17,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