60 lines
1.9 KiB
C#
60 lines
1.9 KiB
C#
namespace MesWork
|
|
{
|
|
using System.Threading;
|
|
using System.Windows.Forms;
|
|
|
|
public partial class MesWorkForm
|
|
{
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public MesWorkForm()
|
|
{
|
|
InitializeComponent();
|
|
|
|
CheckForIllegalCrossThreadCalls = false;
|
|
//this.WindowState = FormWindowState.Minimized;
|
|
|
|
panel_Auto.BackColor = color_Yellow;
|
|
panel_Running.BackColor = color_Green;
|
|
panel_Manual.BackColor = color_Faw;
|
|
panel_Alarm.BackColor = color_Red;
|
|
panel_OffLine.BackColor = color_Bad;
|
|
|
|
if (NotHandlerSignal == "1")
|
|
{
|
|
MessageBox.Show("程序不处理信号!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
|
|
}
|
|
|
|
}
|
|
|
|
private void MesWorkForm_FormClosing(object sender, System.Windows.Forms.FormClosingEventArgs e)
|
|
{
|
|
e.Cancel = true;
|
|
}
|
|
|
|
private void timer_ThreadPool_Tick(object sender, System.EventArgs e)
|
|
{
|
|
timer_ThreadPool.Enabled = false;
|
|
ThreadPool.GetAvailableThreads(out int WorkThreadCount, out int CompletionThreadcCont);//获取剩余的可用线程
|
|
label_01.Text = $"Work = {WorkThreadCount} / {workerThreads}\r\nCompl = {CompletionThreadcCont} / {completionPortThreads}";
|
|
timer_ThreadPool.Enabled = true;
|
|
}
|
|
|
|
private void MesWorkForm_Load(object sender, System.EventArgs e)
|
|
{
|
|
string Id_TagCf = "41236";
|
|
MesWork_QC_upload.SyncTask_UploadMeasureData(Id_TagCf);
|
|
|
|
}
|
|
|
|
private void timer_ShowCount_Tick(object sender, System.EventArgs e)
|
|
{
|
|
timer_ShowCount.Enabled = false;
|
|
label_Count.Text = MesWorkForm.taskSql.Count.ToString();
|
|
timer_ShowCount.Enabled = true;
|
|
}
|
|
}
|
|
}
|
|
|