コード例 #1
0
 private void Init(string[] values)
 {
     _name  = values[0];
     _frame = values[1];
     if (!Int32.TryParse(values[2],
                         System.Globalization.NumberStyles.Any,
                         CultureInfo.InvariantCulture, out _displacement))
     {
         _displacement = 0;
     }
     _boreStroke = new BoreStroke(values[3]);
     if (!float.TryParse(values[4],
                         System.Globalization.NumberStyles.Any,
                         CultureInfo.InvariantCulture, out _compression))
     {
         _compression = 0;
     }
     _chamberVol = new ChamberVol(values[5]);
     if (!float.TryParse(values[6],
                         System.Globalization.NumberStyles.Any,
                         CultureInfo.InvariantCulture, out _pistonCrown))
     {
         _pistonCrown = 0;
     }
     if (!Int32.TryParse(values[7],
                         System.Globalization.NumberStyles.Any,
                         CultureInfo.InvariantCulture, out _cylindersCount))
     {
         _cylindersCount = CheckStroke(_name);
     }
 }
コード例 #2
0
 private void Init(string name, string frame, int displacement, BoreStroke bs, float compression, ChamberVol cv, float pistoncrown, int cyl)
 {
     _name           = name;
     _frame          = frame;
     _displacement   = displacement;
     _boreStroke     = bs;
     _compression    = compression;
     _chamberVol     = cv;
     _pistonCrown    = pistoncrown;
     _cylindersCount = cyl;
 }
コード例 #3
0
ファイル: EngineInfo.cs プロジェクト: vc/from-editor
 private void Init(string name, string frame, int displacement, BoreStroke bs, float compression, ChamberVol cv, float pistoncrown, int cyl)
 {
     _name = name;
     _frame = frame;
     _displacement = displacement;
     _boreStroke = bs;
     _compression = compression;
     _chamberVol = cv;
     _pistonCrown = pistoncrown;
     _cylindersCount = cyl;
 }
コード例 #4
0
ファイル: EngineInfo.cs プロジェクト: vc/from-editor
 private void Init(string[] values)
 {
     _name = values[0];
     _frame = values[1];
     if (!Int32.TryParse(values[2],
         System.Globalization.NumberStyles.Any,
         CultureInfo.InvariantCulture, out _displacement))
         _displacement = 0;
     _boreStroke = new BoreStroke(values[3]);
     if (!float.TryParse(values[4],
         System.Globalization.NumberStyles.Any,
         CultureInfo.InvariantCulture, out _compression))
         _compression = 0;
     _chamberVol = new ChamberVol(values[5]);
     if (!float.TryParse(values[6],
         System.Globalization.NumberStyles.Any,
         CultureInfo.InvariantCulture, out _pistonCrown))
         _pistonCrown = 0;
     if (!Int32.TryParse(values[7],
         System.Globalization.NumberStyles.Any,
         CultureInfo.InvariantCulture, out _cylindersCount))
         _cylindersCount = CheckStroke(_name);
 }