private void Init(string[] val) { if (val.Length != _cCountOfParams) { throw new ArgumentException(_cCountOfParamsErrorString + _cCountOfParams); } try { _frame = val[0]; _engine = base.EngineCollection[val[1]]; val[2] = val[2].ToLower(); if (val[2].Contains("top")) { _injType = InjectorType.TopFeed; } else if (val[2].Contains("side")) { _injType = InjectorType.SideFeed; } else { _injType = InjectorType.NotSpecified; } _injCC = Int32.Parse(val[3]); _fuelPump = Int32.Parse(val[4]); } catch (Exception ex) { throw new ArgumentException("Invalid prams", ex); } }
public override bool Equals(object obj) { EngineInfo e = obj as EngineInfo; if (e != null && e._name == this._name) { return(true); } return(false); }
private void Init(string[] values) { if (values.Length != _cCountOfParams) { throw new ArgumentException(_cCountOfParamsErrorString + _cCountOfParams); } _engine = base.EngineCollection[values[0]]; _frame = values[1]; _partNumber = values[2]; _power = values[3]; _color = values[4]; _pin = values[5]; _size = values[6]; }
private void Init(string[] val) { if (val.Length != _cCountOfParams) throw new ArgumentException(_cCountOfParamsErrorString + _cCountOfParams); _model = val[0]; _frame = val[1]; _transmission = val[2]; _romId = val[3]; _boxNumber = val[4]; _date = val[5]; _engine = base.EngineCollection[val[6]]; Int32.TryParse(val[7], out _engineValCC); Int32.TryParse(val[8], out _injCC); _comment = val[9]; }
public EngineInfo this[string eng] { get { EngineInfo e; try { e = _engines[eng]; } catch (KeyNotFoundException) { e = new EngineInfo(eng); _engines.Add(e); } return e; } }
public EngineInfo this[string eng] { get { EngineInfo e; try { e = _engines[eng]; } catch (KeyNotFoundException) { e = new EngineInfo(eng); _engines.Add(e); } return(e); } }
private void Init(string[] val) { if (val.Length != _cCountOfParams) { throw new ArgumentException(_cCountOfParamsErrorString + _cCountOfParams); } _model = val[0]; _frame = val[1]; _transmission = val[2]; _romId = val[3]; _boxNumber = val[4]; _date = val[5]; _engine = base.EngineCollection[val[6]]; Int32.TryParse(val[7], out _engineValCC); Int32.TryParse(val[8], out _injCC); _comment = val[9]; }
private void Init(string[] val) { if (val.Length != _cCountOfParams) throw new ArgumentException(_cCountOfParamsErrorString + _cCountOfParams); try { _frame = val[0]; _engine = base.EngineCollection[val[1]]; val[2] = val[2].ToLower(); if (val[2].Contains("top")) _injType = InjectorType.TopFeed; else if (val[2].Contains("side")) _injType = InjectorType.SideFeed; else _injType = InjectorType.NotSpecified; _injCC = Int32.Parse(val[3]); _fuelPump = Int32.Parse(val[4]); } catch (Exception ex) { throw new ArgumentException("Invalid prams", ex); } }
private void Init(string[] values) { if (values.Length != _cCountOfParams) throw new ArgumentException(_cCountOfParamsErrorString + _cCountOfParams); _engine = base.EngineCollection[values[0]]; _frame = values[1]; _partNumber = values[2]; _power = values[3]; _color = values[4]; _pin = values[5]; _size = values[6]; }