From 3b5e7bea9ef940163d782ec3e38f3b024e47e370 Mon Sep 17 00:00:00 2001
From: lu <123456>
Date: 星期六, 11 十月 2025 15:24:43 +0800
Subject: [PATCH] 更新采集提示
---
DevApp/Gs.DevApp/UserControl/Toast.cs | 26 ++++++++++++++++++++++----
1 files changed, 22 insertions(+), 4 deletions(-)
diff --git a/DevApp/Gs.DevApp/UserControl/Toast.cs b/DevApp/Gs.DevApp/UserControl/Toast.cs
index f33d494..ef9e5c4 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,20 +10,37 @@
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 = 5)
{
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;
+ {
+ this.panel1.BackgroundImage = global::Gs.DevApp.Properties.Resources.ok10;
+ this.testo.Appearance.BackColor = System.Drawing.Color.SeaGreen;
+ }
else
- this.panel1.BackgroundImage = global::Gs.DevApp.Properties.Resources.error123;
+ {
+ this.panel1.BackgroundImage = global::Gs.DevApp.Properties.Resources.error10;
+ this.testo.Appearance.BackColor = System.Drawing.Color.Firebrick;
+ }
double elapsedTime = 0;
testo.Text = messageText;
double vanishingMilliSeconds = vanishingSeconds * 1000;
--
Gitblit v1.9.3