private int digits; // 数据分辨率 #endregion #region constructor /// <summary> /// Constructor /// </summary> /// <param name="height">Height of chart</param> /// <param name="width">width of chart</param> /// <param name="colNum">Column number of chart</param> /// <param name="rowNum">Row number of chart</param> public DrawChart(Device.TempDevice dev, int height, int width, int colNum, int rowNum) { tpDevice = dev; this.height = height; this.width = width; this.colNum = colNum; this.rowNum = rowNum; CalcSize(); PutOnColor(); mBmp = new Bitmap(this.width, this.height); mGhp = Graphics.FromImage(mBmp); if (tpDevice.tpDeviceName == "主槽控温设备") { digits = 4; } else if (tpDevice.tpDeviceName == "辅槽控温设备") { digits = 3; } else { digits = 4; // 默认 4 位有效数字 } }
public FormChart(Device.Devices devAll, Device.TempDevice dev) { InitializeComponent(); tpDevice = dev; deviceAll = devAll; mDrawChart = new DrawChart(dev, TempPic.Height, TempPic.Width, 10, 7); timer1.Interval = 200; timer1.Tick += Timer1_Tick; timer1.Start(); }
// 窗体构造函数 public FormSetting(Device.TempDevice dev, Device.Devices devAll) { InitializeComponent(); // 温控设备对象 tpDev = dev; devicesAll = devAll; // 温控设备参数控件 tpParam[0] = TxtTempSet; tpParam[1] = TxtTempCorrect; tpParam[2] = TxtLeadAdjust; tpParam[3] = TxtFuzzy; tpParam[4] = TxtRatio; tpParam[5] = TxtIntegral; tpParam[6] = TxtPower; }