FrmLoading.cs

(开头部分) 1KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

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

namespace PortManage
{
    public partial class FrmLoading : Form
    {
        public FrmLoading()
        {
            InitializeComponent();
        }

        private void BtnTips_Click(object sender, EventArgs e)
        {
            if(CheckFrmLoading.IsLoad)
            {
                this.DialogResult = DialogResult.OK;
            }
            else
            {
                MessageBox.Show("仍在加载中请稍候片刻!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information);
            }
        }

        private void CheckLoadState()
        {
            bool IsLoop = true;

            while (IsLoop)
            {
                if (CheckFrmLoading.IsLoad)
                {
                    this.DialogResult = DialogResult.OK;
                }
                Thread.Sleep(1000);
            }
        }

        private void FrmLoading_Load(object sender, EventArgs e)
        {
            Task taskCheckLoadState = new Task(() => CheckLoadState());
            taskCheckLoadState.Start();
        }
    }

    public static class CheckFrmLoading
    {
        public static bool IsLoad { get; set; }
        public static DataTable FrmMainCacheDT { get; set; }
        public static void setIsLoad(bool value)
        {
            IsLoad = value;
后面还有 3 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。