/// <summary> /// 分析字符串 /// </summary> /// <param name="para"></param> private void AnalyseString(String para) { String[] data = para.Split(NAME_VALUE_LINK); switch (data[0]) { case "SRS": S_RotateSpeed = int.Parse(data[1]); break; case "SIT": S_InjectionTime = int.Parse(data[1]); break; case "RIQ": R_InjectionQuantity = new RangeValue(data[1]); break; case "RRT": R_RackTravel = new RangeValue(data[1]); break; case "RA": R_Asymmetry = float.Parse(data[1]); break; } }
private void AnalyseData(string data) { string[] message = data.Split(Connect); switch (message[0]) { case "ID": this.Id = int.Parse(message[1]); break; case "SW": this.StartWork = new ParaModel(message[1]); break; case "IW": this.IdlingWork = new ParaModel(message[1]); break; case "IB": this.IdlingBreak = new ParaModel(message[1]); break; case "RB": this.ReviseBegin = new ParaModel(message[1]); break; case "RW": this.ReviseWork = new ParaModel(message[1]); break; case "RE": this.ReviseEnd = new ParaModel(message[1]); break; case "DW": this.DemWork = new ParaModel(message[1]); break; case "AW": this.AdjWork = new ParaModel(message[1]); break; case "HB": this.HighBreak = new ParaModel(message[1]); break; case "T": this.Tem = new RangeValue(message[1]); break; case "EC": this.EquCode = message[1]; break; case "ET": this.EquType = message[1]; break; } }
/// <summary> /// 是否在范围之内 /// </summary> /// <param name="value"></param> /// <returns></returns> public bool IsInRange(RangeValue value) { if (value.GetMin() >= _Min && value.GetMax() <= _Max) { return(true); } else { return(false); } }