MdWinForm/Form1.cs

(开头部分) 2KB

这里只显示每个文件的开头 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 MdWinForm
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();

            Labels = new Label[] { LabJd1, LabJd2, LabJd3, LabJd4, LabJd5, LabJd6 };
            LabelsDown = new Label[] { LabJs1, LabJs2, LabJs3, LabJs4, Labjs5, LabJs6 };
            LabelMaxNum = new Label[] { LabM1, LabM2, LabM3, LabM4, LabM5, LabM6 };
            foreach (var item in Labels)
            {
                item.Text = "未开始";
            }
        }

        static int[] step = { 3000, 4000, 5000, 6000, 7000, 1000 };//耗时 -毫秒
        static int[] MaxNum = new int[6];

        static Label[] Labels;
        static Label[] LabelsDown;
        static Label[] LabelMaxNum;
        static DateTime startTime = DateTime.Now;//开始时间
        private async void button1_Click(object sender, EventArgs e)
        {
            for (int i = 0; i < step.Length; i++)
            {
                Labels[i].Text = "进行中";

                await Task.Factory.StartNew(new Action(() =>
                {
                    startTime = DateTime.Now;
                    while (true)
                    {
                        var sTime = (DateTime.Now - startTime).TotalMilliseconds;
                        if (step[i] - sTime <= 50000)
                        {
                            //最后10秒
                            int g = Guid.NewGuid().GetHashCode() % 100;
                            if (g > MaxNum[i])
                            {
                                MaxNum[i] = g;
                                LabelMaxNum[i].Text = g.ToString();
                            }
                        }
                        LabelsDown[i].Text = sTime.ToString();
                        if (sTime >= step[i])
                        {
后面还有 20 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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