From 2a547f5c737dcbdd795b60ece6b47de5ee5026e9 Mon Sep 17 00:00:00 2001
From: lu <123456>
Date: 星期五, 07 十一月 2025 08:40:09 +0800
Subject: [PATCH] 修改提示
---
DevApp/Gs.DevApp/UserControl/Toast.cs | 14 +++++---------
1 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/DevApp/Gs.DevApp/UserControl/Toast.cs b/DevApp/Gs.DevApp/UserControl/Toast.cs
index 9bc7254..690d21b 100644
--- a/DevApp/Gs.DevApp/UserControl/Toast.cs
+++ b/DevApp/Gs.DevApp/UserControl/Toast.cs
@@ -17,9 +17,12 @@
/// <param name="it">1鎴愬姛锛�-1澶辫触</param>
/// <param name="messageText"></param>
/// <param name="vanishingSeconds">鍔ㄧ敾寤堕暱鏃堕棿</param>
- public Toast(int it, string messageText, int vanishingSeconds = 3)
+ public Toast(int it, string messageText, int vanishingSeconds = 5)
{
InitializeComponent();
+ this.testo.Appearance.BackColor = System.Drawing.Color.Firebrick;
+ this.testo.Appearance.Font = new System.Drawing.Font("Tahoma", 38F);
+ this.testo.Appearance.ForeColor = System.Drawing.Color.White;
try
{
string _vanishingSeconds = ConfigurationManager.AppSettings["ToastSeconds"];
@@ -28,27 +31,20 @@
}
catch (Exception)
{
+
}
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Toast));
if (it > 0)
{
- 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.error10;
this.testo.Appearance.BackColor = System.Drawing.Color.Firebrick;
}
double elapsedTime = 0;
testo.Text = messageText;
double vanishingMilliSeconds = vanishingSeconds * 1000;
- // message dimensions
- //this.Width = testo.Width + 50;
- //this.Height = testo.Height + 50;
- //text position
- // testo.Location = new Point((this.Width / 2) - (testo.Width / 2), (this.Height / 2) - (testo.Height / 2));
- //first timer
tmr = new System.Windows.Forms.Timer();
tmr.Tick += delegate
{
--
Gitblit v1.9.3