private void InitPumpType() { cbPumpType.Items.Clear(); cbPumpType.Items.AddRange(ProductIDConvertor.GetAllPumpIDString().ToArray()); cbPumpType.SelectedIndex = 0; m_LocalPid = ProductIDConvertor.String2PumpID(cbPumpType.Items[cbPumpType.SelectedIndex].ToString()); SyncProductID(); }
private void cbPumpType_SelectedIndexChanged(object sender, EventArgs e) { m_LocalPid = ProductIDConvertor.String2PumpID(cbPumpType.Items[cbPumpType.SelectedIndex].ToString()); SyncProductID(); if (m_LocalPid == PumpID.GrasebyF8 || m_LocalPid == PumpID.GrasebyF8_2 || m_LocalPid == PumpID.GrasebyF6 || m_LocalPid == PumpID.WZS50F6 || m_LocalPid == PumpID.GrasebyF6_2 || m_LocalPid == PumpID.WZS50F6_2) { chart1.Enabled = true; chart2.Enabled = true; } else { chart1.Enabled = true; chart2.Enabled = false; } chart2.SetPid(m_LocalPid); chart1.SetPid(m_LocalPid); //chart2.SetChannel(2); //chart1.SetChannel(1); SyringBrandProcess.InitializeBrands(m_SyringeBrands, m_ProductModel, "zh"); SyringBrandProcess.GetBrandNames(m_SyringeBrands, m_ProductModel, "zh"); chart2.InitBrandList(m_SyringeBrands); chart1.InitBrandList(m_SyringeBrands); }
public void IsPass(float n, float l, float c, float h) { ProductID pid = ProductIDConvertor.PumpID2ProductID(m_LocalPid); PressureConfig cfg = PressureManager.Instance().Get(pid); if (cfg == null) { lbNValue.ForeColor = Color.Red; lbLValue.ForeColor = Color.Red; lbCValue.ForeColor = Color.Red; lbHValue.ForeColor = Color.Red; return; } var parameter = cfg.Find(Misc.OcclusionLevel.N); if (parameter != null && n > 0) { if (n >= parameter.Item2 && n <= parameter.Item3) { lbNValue.ForeColor = Color.White; } else { lbNValue.ForeColor = Color.Red; } } parameter = cfg.Find(Misc.OcclusionLevel.L); if (parameter != null && l > 0) { if (l >= parameter.Item2 && l <= parameter.Item3) { lbLValue.ForeColor = Color.White; } else { lbLValue.ForeColor = Color.Red; } } parameter = cfg.Find(Misc.OcclusionLevel.C); if (parameter != null && c > 0) { if (c >= parameter.Item2 && c <= parameter.Item3) { lbCValue.ForeColor = Color.White; } else { lbCValue.ForeColor = Color.Red; } } parameter = cfg.Find(Misc.OcclusionLevel.H); if (parameter != null && h > 0) { if (h >= parameter.Item2 && h <= parameter.Item3) { lbHValue.ForeColor = Color.White; } else { lbHValue.ForeColor = Color.Red; } } }