29Wx状态初始化

This commit is contained in:
wule committed 2026-06-11 15:17:50 +08:00
1 parent 9fd5579fcd
commit 40c702883c
322 files changed
+155553

No files matched your search

+49
View File
@@ -0,0 +1,49 @@
using System;
using System.Threading;
namespace AllBase
{
public class ThreadTime
{
public Thread t;
public DateTime StartTime;
public bool IsAlive
{
get
{
try
{
return (t == null ? false : t.IsAlive);
}
catch
{
return false;
}
}
}
public ThreadTime(Thread _t)
{
t = _t;
}
public void Start()
{
t.Priority = ThreadPriority.BelowNormal;
t.Start();
StartTime = DateTime.Now;
}
public void Abort()
{
try
{
if(t.IsAlive)
t.Abort();
}
catch
{
}
}
}
}