void flushPara() { try { ConfigVO newConfigVO = new ConfigVO(); newConfigVO.grap_width = int.Parse(grap_widthBox.Text); newConfigVO.grap_height = int.Parse(grap_heightBox.Text); newConfigVO.minY = int.Parse(minYBox.Text); newConfigVO.scaleX = float.Parse(scaleXBox.Text); newConfigVO.scaleY = float.Parse(scaleYBox.Text); newConfigVO.channelNum = int.Parse(channelNumBox.Text); newConfigVO.datasize = int.Parse(datasizeBox.Text); newConfigVO.max_min_flag = CB_max_min_flag.Checked; newConfigVO.channel1 = cb_channel1.Checked; newConfigVO.channel2 = cb_channel2.Checked; newConfigVO.channel3 = cb_channel3.Checked; newConfigVO.channel4 = cb_channel4.Checked; lc.grap_update(newConfigVO); pictureBox1.Image = lc.flush(); configVO = newConfigVO; } catch (Exception ex) { grap_widthBox.Text = configVO.grap_width.ToString(); grap_heightBox.Text = configVO.grap_height.ToString(); minYBox.Text = configVO.minY.ToString(); scaleXBox.Text = configVO.scaleX.ToString(); scaleYBox.Text = configVO.scaleY.ToString(); channelNumBox.Text = configVO.channelNum.ToString(); datasizeBox.Text = configVO.datasize.ToString(); } }
public void grap_update(ConfigVO _configVO) { configVO = _configVO; stepX = spaceX / configVO.scaleX; stepY = spaceY / configVO.scaleY; bmap = new Bitmap(configVO.grap_width, configVO.grap_height); gph = Graphics.FromImage(bmap); maxCountX = (configVO.grap_width - 100) / spaceX; maxCountY = (configVO.grap_height - 100) / spaceY; dataArray = new float[configVO.channelNum, configVO.datasize];//数据 }