public bool stop = false; //停止 /// <summary> /// 启动运行 /// </summary> public void ThreadStart() { thread = new Thread(Runtime); thread.Start(); Info?.Invoke("启动运行!!!"); StartCode?.Invoke(); }
/// <summary> /// 启动运行 /// </summary> public void ThreadStart() { timer = new Timer(Runtime, null, Timeout.Infinite, Timeout.Infinite); timer.Change(0, 500); count = 0; Info?.Invoke("启动运行!!!"); StartCode?.Invoke(); }
/// <summary> /// 启动运行 /// </summary> public void ThreadStart() { timer = new System.Timers.Timer(500); timer.Elapsed += Runtime; timer.AutoReset = true; timer.Enabled = true; count = 0; timer.Start(); Info?.Invoke("启动运行!!!"); StartCode?.Invoke(); }