Commit 2d7428e5 LN

进入IO界面需要一直读取测高值。

1 个父辈 5c6eebc1
......@@ -49,11 +49,15 @@
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.txtAIResult4 = new System.Windows.Forms.TextBox();
this.txtAI4 = new System.Windows.Forms.TextBox();
this.label11 = new System.Windows.Forms.Label();
this.txtSize = new System.Windows.Forms.TextBox();
this.label10 = new System.Windows.Forms.Label();
this.txtHeight = new System.Windows.Forms.TextBox();
this.label9 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.txtAIResult3 = new System.Windows.Forms.TextBox();
this.txtAIResult2 = new System.Windows.Forms.TextBox();
this.txtAIResult1 = new System.Windows.Forms.TextBox();
this.txtAI3 = new System.Windows.Forms.TextBox();
......@@ -62,10 +66,6 @@
this.label4 = new System.Windows.Forms.Label();
this.txtAI1 = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.txtAIResult4 = new System.Windows.Forms.TextBox();
this.txtAI4 = new System.Windows.Forms.TextBox();
this.label11 = new System.Windows.Forms.Label();
this.txtAIResult3 = new System.Windows.Forms.TextBox();
this.groupBox1.SuspendLayout();
this.groupBox4.SuspendLayout();
this.groupBox3.SuspendLayout();
......@@ -74,7 +74,6 @@
//
// timer1
//
this.timer1.Enabled = true;
this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
//
......@@ -403,6 +402,8 @@
//
this.chbAutoRead.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.chbAutoRead.AutoSize = true;
this.chbAutoRead.Checked = true;
this.chbAutoRead.CheckState = System.Windows.Forms.CheckState.Checked;
this.chbAutoRead.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chbAutoRead.Location = new System.Drawing.Point(499, 568);
this.chbAutoRead.Name = "chbAutoRead";
......@@ -491,6 +492,40 @@
this.groupBox2.TabStop = false;
this.groupBox2.Text = "高度传感器";
//
// txtAIResult4
//
this.txtAIResult4.Enabled = false;
this.txtAIResult4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtAIResult4.Location = new System.Drawing.Point(203, 112);
this.txtAIResult4.MaxLength = 10;
this.txtAIResult4.Name = "txtAIResult4";
this.txtAIResult4.Size = new System.Drawing.Size(121, 23);
this.txtAIResult4.TabIndex = 259;
this.txtAIResult4.Text = "0";
//
// txtAI4
//
this.txtAI4.Enabled = false;
this.txtAI4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtAI4.Location = new System.Drawing.Point(39, 112);
this.txtAI4.MaxLength = 10;
this.txtAI4.Name = "txtAI4";
this.txtAI4.Size = new System.Drawing.Size(121, 23);
this.txtAI4.TabIndex = 258;
this.txtAI4.Text = "0";
//
// label11
//
this.label11.AutoSize = true;
this.label11.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label11.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label11.Location = new System.Drawing.Point(15, 115);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(27, 17);
this.label11.TabIndex = 257;
this.label11.Text = "4:";
this.label11.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtSize
//
this.txtSize.Enabled = false;
......@@ -549,6 +584,17 @@
this.label8.Text = "->";
this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtAIResult3
//
this.txtAIResult3.Enabled = false;
this.txtAIResult3.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtAIResult3.Location = new System.Drawing.Point(203, 82);
this.txtAIResult3.MaxLength = 10;
this.txtAIResult3.Name = "txtAIResult3";
this.txtAIResult3.Size = new System.Drawing.Size(121, 23);
this.txtAIResult3.TabIndex = 251;
this.txtAIResult3.Text = "0";
//
// txtAIResult2
//
this.txtAIResult2.Enabled = false;
......@@ -640,51 +686,6 @@
this.label1.Text = "1:";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtAIResult4
//
this.txtAIResult4.Enabled = false;
this.txtAIResult4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtAIResult4.Location = new System.Drawing.Point(203, 112);
this.txtAIResult4.MaxLength = 10;
this.txtAIResult4.Name = "txtAIResult4";
this.txtAIResult4.Size = new System.Drawing.Size(121, 23);
this.txtAIResult4.TabIndex = 259;
this.txtAIResult4.Text = "0";
//
// txtAI4
//
this.txtAI4.Enabled = false;
this.txtAI4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtAI4.Location = new System.Drawing.Point(39, 112);
this.txtAI4.MaxLength = 10;
this.txtAI4.Name = "txtAI4";
this.txtAI4.Size = new System.Drawing.Size(121, 23);
this.txtAI4.TabIndex = 258;
this.txtAI4.Text = "0";
//
// label11
//
this.label11.AutoSize = true;
this.label11.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label11.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label11.Location = new System.Drawing.Point(15, 115);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(27, 17);
this.label11.TabIndex = 257;
this.label11.Text = "4:";
this.label11.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtAIResult3
//
this.txtAIResult3.Enabled = false;
this.txtAIResult3.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtAIResult3.Location = new System.Drawing.Point(203, 82);
this.txtAIResult3.MaxLength = 10;
this.txtAIResult3.Name = "txtAIResult3";
this.txtAIResult3.Size = new System.Drawing.Size(121, 23);
this.txtAIResult3.TabIndex = 251;
this.txtAIResult3.Text = "0";
//
// FrmIOStatus
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
......
......@@ -89,12 +89,16 @@ namespace OnlineStore.ACSingleStore
}
private void timer1_Tick(object sender, EventArgs e)
{
ReadIOList();
{
if (chbAutoRead.Checked)
{
ReadIOList();
}
}
private void FrmTest_FormClosing(object sender, FormClosingEventArgs e)
{
KNDAIManager.NeedShow = false;
try
{
if (this.timer1.Enabled)
......@@ -155,6 +159,7 @@ namespace OnlineStore.ACSingleStore
private void FrmStoreIOStatus_Load(object sender, EventArgs e)
{
KNDAIManager.NeedShow = true;
}
private void cmbWriteIO_DrawItem(object sender, DrawItemEventArgs e)
......@@ -278,6 +283,7 @@ namespace OnlineStore.ACSingleStore
private void FrmIOStatus_Shown(object sender, EventArgs e)
{
SetSkin(this);
timer1.Start();
}
private void btnOpenAxisBreak_Click(object sender, EventArgs e)
......
......@@ -116,6 +116,7 @@ namespace OnlineStore.DeviceLibrary
}
private static DateTime PreCheckTime = DateTime.Now;
private static bool isProcess = false;
public static bool NeedShow = false;
private static void timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
if (isProcess)
......@@ -125,7 +126,7 @@ namespace OnlineStore.DeviceLibrary
try
{
isProcess = true;
bool IsNeedReadAI = StoreManager.Store.KNDIOValue(IO_Type.TrayCheck_Door).Equals(IO_VALUE.HIGH);
bool IsNeedReadAI = StoreManager.Store.KNDIOValue(IO_Type.TrayCheck_Door).Equals(IO_VALUE.HIGH) || NeedShow;
TimeSpan span = DateTime.Now - PreCheckTime;
List<string> list = new List<string>(mastMap.Keys);
foreach (string IP in list)
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!