1 Star 0 Fork 70

凤翼天翔/ActiveReports

forked from 葡萄城/ActiveReports 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Splasher.cs 1.39 KB
一键复制 编辑 原始数据 按行查看 历史
葡萄城控件 提交于 2014-09-17 14:54 . add SplashForm
using System;
using System.Threading;
using System.Windows.Forms;
namespace AppLoadingMT
{
public class Splasher
{
static SplashForm MySplashForm = null;
static Thread MySplashThread = null;
// internally used as a thread function - showing the form and
// starting the messageloop for it
static void ShowThread()
{
MySplashForm = new SplashForm();
Application.Run(MySplashForm);
}
// public Method to show the SplashForm
static public void Show()
{
if (MySplashThread != null)
return;
MySplashThread = new Thread(new ThreadStart(Splasher.ShowThread));
MySplashThread.IsBackground = true;
MySplashThread.ApartmentState = ApartmentState.STA;
MySplashThread.Start();
}
// public Method to hide the SplashForm
static public void Close()
{
if (MySplashThread == null) return;
if (MySplashForm == null) return;
try
{
MySplashForm.Invoke(new MethodInvoker(MySplashForm.Close));
}
catch (Exception)
{
}
MySplashThread = null;
MySplashForm = null;
}
// public Method to set or get the loading Status
static public string Status
{
set
{
if (MySplashForm == null)
{
return;
}
MySplashForm.StatusInfo = value;
}
get
{
if (MySplashForm == null)
{
throw new InvalidOperationException("Splash Form not on screen");
}
return MySplashForm.StatusInfo;
}
}
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C#
1
https://gitee.com/feitianyiren_admin/ActiveReports.git
git@gitee.com:feitianyiren_admin/ActiveReports.git
feitianyiren_admin
ActiveReports
ActiveReports
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385