资源简介

超棒的等待特效,可直接添加到项目中使用,简单实用

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Threading;

namespace WaitForm
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender EventArgs e)
        {

        }

        private void button1_Click(object sender EventArgs e)
        {


            Showf(“测试等待,请稍候...“);
            System.Threading.Thread.Sleep(2000);
            Closef();



            label1.Text = “测试完成!“;
        }
        //***********************************

        //等待处理
        private Flash flash;
        private void ShowWaitMess()
        {
            try
            {
                flash.ShowDialog();
            }
            catch (Exception Err)
            {
                throw Err;
            }
        }
        private void DoCloseJob()
        {
            try
            {
                if (!flash.IsDisposed)
                {
                    flash.Close();
                }
            }
            catch (Exception Err)
            {
                throw Err;
            }
        }
        /// 
        /// 显示窗体
        /// 

        /// 
        /// 
        public void Showf(string stx)
        {
            try
            {
                flash = new Flash();
                flash.Tishi = stx;
                Thread upgradeThread = new Thread(new ThreadStart(ShowWaitMess));
                upgradeThread.Start();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        /// 
        /// 关闭窗体
        /// 

        public void Closef()
        {
            if (flash.InvokeRequired)
            {
                flash.Invoke(new Action(DoCloseJob));
            }
            else
            {
                DoCloseJob();
            }
        }





        //***********************************



    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2013-02-01 16:08  WaitForm\
     目录           0  2013-02-05 15:40  WaitForm\WaitForm\
     目录           0  2013-02-05 15:02  WaitForm\WaitForm\FlashShow\
     文件        3014  2013-02-01 16:11  WaitForm\WaitForm\FlashShow\Flash.Designer.cs
     文件         600  2013-02-01 16:11  WaitForm\WaitForm\FlashShow\Flash.cs
     文件        7451  2013-02-01 10:31  WaitForm\WaitForm\FlashShow\Flash.resx
     文件        2730  2013-02-05 15:40  WaitForm\WaitForm\Form1.Designer.cs
     文件        2336  2013-02-05 15:40  WaitForm\WaitForm\Form1.cs
     文件        5814  2013-02-05 15:40  WaitForm\WaitForm\Form1.resx
     文件         489  2013-02-01 16:08  WaitForm\WaitForm\Program.cs
     目录           0  2013-02-01 16:08  WaitForm\WaitForm\Properties\
     文件        1348  2013-02-01 16:08  WaitForm\WaitForm\Properties\AssemblyInfo.cs
     文件        2866  2013-02-01 16:08  WaitForm\WaitForm\Properties\Resources.Designer.cs
     文件        5612  2013-02-01 16:08  WaitForm\WaitForm\Properties\Resources.resx
     文件        1093  2013-02-01 16:08  WaitForm\WaitForm\Properties\Settings.Designer.cs
     文件         249  2013-02-01 16:08  WaitForm\WaitForm\Properties\Settings.settings
     文件        4061  2013-02-05 15:02  WaitForm\WaitForm\WaitForm.csproj
     文件         168  2013-02-01 16:11  WaitForm\WaitForm\WaitForm.csproj.user
     目录           0  2013-02-05 15:02  WaitForm\WaitForm\bin\
     目录           0  2013-02-05 15:40  WaitForm\WaitForm\bin\Debug\
     文件       11776  2013-02-05 15:40  WaitForm\WaitForm\bin\Debug\WaitForm.exe
     文件       32256  2013-02-05 15:40  WaitForm\WaitForm\bin\Debug\WaitForm.pdb
     文件       11592  2013-02-18 14:31  WaitForm\WaitForm\bin\Debug\WaitForm.vshost.exe
     文件         490  2009-06-11 05:14  WaitForm\WaitForm\bin\Debug\WaitForm.vshost.exe.manifest
     目录           0  2013-02-01 16:08  WaitForm\WaitForm\obj\
     目录           0  2013-02-05 15:40  WaitForm\WaitForm\obj\Debug\
     目录           0  2013-10-28 14:45  WaitForm\WaitForm\obj\Debug\TempPE\
     文件        1370  2013-02-05 15:02  WaitForm\WaitForm\obj\Debug\WaitForm.Flash.resources
     文件         180  2013-02-05 15:40  WaitForm\WaitForm\obj\Debug\WaitForm.Form1.resources
     文件         180  2013-02-05 15:02  WaitForm\WaitForm\obj\Debug\WaitForm.Properties.Resources.resources
     文件         869  2013-02-18 14:31  WaitForm\WaitForm\obj\Debug\WaitForm.csproj.FileListAbsolute.txt
............此处省略5个文件信息

评论

共有 条评论