public void GetGaugeList() { string[] files = Directory.GetFiles(CommonFunction.DefaultConfigPath, "Gauge*.xml"); for (int i = 0; i < files.Length; i++) { int start = files[i].LastIndexOf("\\"); int end = files[i].LastIndexOf("."); int offset = "Gauge".Length; string GaugeName = files[i].Substring(start + 1 + offset, end - start - 1 - offset); ClassGaugeParameter table = new ClassGaugeParameter(GaugeName); table.LoadParameter(); _Gauges.Add(table.TableName, table); } }
public void SetGaugeValue(ClassGaugeParameter gauge) { CellDataSpec.CellThickness.SetGaugeValue(gauge[GaugeParaName.厚度]); CellDataSpec.CellWidth.SetGaugeValue(gauge[GaugeParaName.宽度]); CellDataSpec.CellLength.SetGaugeValue(gauge[GaugeParaName.长度]); CellDataSpec.NiTabDistance.SetGaugeValue(gauge[GaugeParaName.NiTab边距]); CellDataSpec.AlTabDistance.SetGaugeValue(gauge[GaugeParaName.AlTab边距]); CellDataSpec.NiTabDistanceMax.SetGaugeValue(gauge[GaugeParaName.NiTab边距]); CellDataSpec.AlTabDistanceMax.SetGaugeValue(gauge[GaugeParaName.AlTab边距]); CellDataSpec.NiTabLength.SetGaugeValue(gauge[GaugeParaName.NiTab长度]); CellDataSpec.AlTabLength.SetGaugeValue(gauge[GaugeParaName.AlTab长度]); CellDataSpec.NiSealantHeight.SetGaugeValue(gauge[GaugeParaName.NiSealant高度]); CellDataSpec.AlSealantHeight.SetGaugeValue(gauge[GaugeParaName.AlSealatnt高度]); CellDataSpec.TabDistance.SetGaugeValue(gauge[GaugeParaName.Tab间距]); CellDataSpec.ShoulderWidth.SetGaugeValue(gauge[GaugeParaName.肩宽]); }