Commit 4d23569a authored by wangwanxh@sina.com's avatar wangwanxh@sina.com

修改自动校准逻辑,周期完重绘等

parent 6a292f85
......@@ -42,7 +42,7 @@
this.userCtl1.Location = new System.Drawing.Point(0, 16);
this.userCtl1.Name = "userCtl1";
this.userCtl1.Size = new System.Drawing.Size(758, 468);
this.userCtl1.Systemtype = 0;
this.userCtl1.Systemtype = 2;
this.userCtl1.TabIndex = 0;
//
// buttonFID
......
......@@ -8,7 +8,7 @@ using GcDevicePc.Common;
using System.Threading;
using GcDevicePc.CK_UI;
using Ini.Net;
using System.Runtime.InteropServices;
namespace GcDevicePc
{
......@@ -231,17 +231,58 @@ namespace GcDevicePc
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
/// 1.0.2.3 添加了周期完成后,重新绘图功能
private void timer1_Tick(object sender, EventArgs e)
{
this.Text = String.Format("VOCs在线监测-1.0.2.2 {0}",Formstr);
this.Text = String.Format("VOCs在线监测-1.0.2.3 {0}",Formstr);
HmiStatus.Text = String.Format("状态:{0}", statestr);
// toolStripStatusLabeSystme.Text = String.Format("状态:{0}", statestr);
timespan = System.DateTime.Now - startTime;
toolStripStatusLabelusertime.Text = String.Format("运行时间:{0}",
timespan.Days.ToString() + "天" + timespan.Hours.ToString() + "时" + timespan.Minutes.ToString() + "分" + timespan.Seconds.ToString() + "秒");
//监视界面活动
if (getIdleTick()/1000>1000*60*30 && LandIn.Island)
{
if (_userForm != null)
{
Formstr = "用户窗口";
_userForm.Activate();
//userForm.Show();
}
LandIn.Island = false;
SetMenu(LandIn.Island);
}
}
[StructLayout(LayoutKind.Sequential)]
public struct LASTINPUTINFO
{
[MarshalAs(UnmanagedType.U4)]
public int cbSize;
[MarshalAs(UnmanagedType.U4)]
public uint dwTime;
}
[DllImport("user32.dll")]
public static extern bool GetLastInputInfo(ref LASTINPUTINFO plii);
/// <summary>
/// 返回持续时间 ms
/// </summary>
/// <returns></returns>
public long getIdleTick()
{
LASTINPUTINFO vLastInputInfo = new LASTINPUTINFO();
vLastInputInfo.cbSize = Marshal.SizeOf(vLastInputInfo);
if (!GetLastInputInfo(ref vLastInputInfo)) return 0;
return Environment.TickCount - (long)vLastInputInfo.dwTime;
}
public void SendPCCMD(bool flag)
{
if (flag) //打开运行
......@@ -1737,15 +1778,17 @@ namespace GcDevicePc
RunTableOptWithCount(SharedSpace.MControl.path, SharedSpace.MControl.Name, (ushort)SharedSpace.MControl.runcount);
Thread.Sleep(60 * 1000);
SharedSpace.MControl.SetRun = true;//仪器进入校准环境
Trace.WriteLine("开始校准","sys");
}
//等待校准结束
if (globaldata.m_hmibuffer.gcinfo.batruncount >= SharedSpace.MControl.runcount - 1)
if (globaldata.m_hmibuffer.gcinfo.batruncount >= SharedSpace.MControl.runcount - 1 && SharedSpace.MControl.SetOut && SharedSpace.MControl.SetRun)
{
SharedSpace.MControl.IsEnd = true;
Thread.Sleep(60 * 1000);
RunTableOpt(SharedSpace.MControl.defaultPath, SharedSpace.MControl.defaultName);
SharedSpace.MControl.SetOut = false;
SharedSpace.MControl.SetRun = false;
Trace.WriteLine("校准结束", "sys");
}
}
......
......@@ -200,7 +200,7 @@ namespace GcDevicePc.ProThread
drbool = false;
//时间判断终点
// if ((globaldata.MethodRun_Statue == 4 || globaldata.MethodRun_Statue == 5))
if (globaldata.m_hmibuffer.gcinfo.methodstatus == 0 || globaldata.m_hmibuffer.gcinfo.methodstatus > 5)
if (globaldata.m_hmibuffer.gcinfo.methodstatus <4 || globaldata.m_hmibuffer.gcinfo.methodstatus > 5)
{
if ((globaldata.m_hmibuffer.gcinfo.NowStartTime<=globaldata.m_hmibuffer.gcinfo.NowEndTime)&&(globaldata.m_hmibuffer.gcinfo.NowEndTime <= ((SignalBuffer.Channel_XY)globaldata.m_signalbuffer.Draw_Port[i]).ctimer)&&isstart==2)
......@@ -235,7 +235,13 @@ namespace GcDevicePc.ProThread
#endif
CurveDisPlay.curdisp.addDataRaw(listRaw); //记录原始数据
CurveDisPlay.curdisp.addPoint(listPoint, drbool); //更新绘画区域
//绘制完,重新画图
if (drbool)
{
time = 0;
CurveDisPlay.curdisp.cleardata();
}
......
No preview for this file type
2018-5-24 版本:1.0.2.2
1.登录界面的密码输入框,点击确定销毁;
2、修复历史查看功能中的树形选择,历史数据反复出现问题;
3、增加了历史查看功能,选中后,对应文件名背景颜色改变;
4.王工更新文件传输库,解决开机容易传文件崩的
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment