bug
lu
9 天以前 fd94e95ef93cc6608e9c6ecfe8552d3f8dd9b880
DevApp/Gs.DevApp/UserControl/Toast.cs
@@ -1,4 +1,5 @@
using System;
using System.Configuration;
using System.Drawing;
using System.Windows.Forms;
@@ -9,20 +10,36 @@
        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;
            {
                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;