ReadAsString() public method

public ReadAsString ( ) : string
return string
Exemplo n.º 1
0
        public void ApplyParameter(IniValueObject obj)
        {
            switch (obj.Key)
            {
                case "Frame":
                    var thr = obj.ReadAsFloat(0);
                    var clt = obj.ReadAsFloat(1);
                    var thrAbs = obj.ReadAsString(2);
                    var gear = obj.ReadAsString(3);

                    var useNewGear = gear == "new";
                    var useOldGear = gear == "old";
                    var absoluteThrottle = thrAbs == "abs";

                    var frame = new ShiftPatternFrame(clt, thr, absoluteThrottle, useOldGear, useNewGear);

                    Frames.Add(frame);
                    break;
            }
        }
Exemplo n.º 2
0
        public void ApplyParameter(IniValueObject obj)
        {
            switch(obj.Key)
            {
                case "ShiftDeadSpeed":
                    ShiftDeadSpeed = obj.ReadAsInteger();
                    break;
                case "ShiftDeadTime":
                    ShiftDeadTime = obj.ReadAsInteger();
                    break;

                case "GenerateSpeedHoldoff":
                    speedHoldoff = obj.ReadAsInteger();
                    break;

                case "EnableSportShiftdown":
                    EnableSportShiftdown = obj.ReadAsInteger() == 1;
                    break;

                case "KickdownEnable":
                    KickdownEnable = obj.ReadAsString() == "1";
                    break;
                case "KickdownTimeout":
                    KickdownTimeout = obj.ReadAsDouble();
                    break;
                case "KickdownSpeedReset":
                    KickdownSpeedReset = obj.ReadAsDouble();
                    break;
                case "KickdownPowerReset":
                    KickdownPowerReset = obj.ReadAsDouble();
                    break;
                case "KickdownRpmReset":
                    KickdownRpmReset = obj.ReadAsDouble();
                    break;

                case "PowerShift":
                    PowerShift = obj.ReadAsInteger() == 1;
                    break;

                case "Generate":
                    var def = ShifterTableConfigurationDefault.PeakRpm;
                    GeneratedShiftTable = obj.ReadAsString();
                    switch (GeneratedShiftTable)
                    {
                        case "Economy":
                            def = ShifterTableConfigurationDefault.Economy;
                            break;
                        case "Efficiency":
                            def = ShifterTableConfigurationDefault.Efficiency;
                            break;
                        case "Efficiency2":
                            def = ShifterTableConfigurationDefault.PowerEfficiency;
                            break;
                        case "Opa":
                            def = ShifterTableConfigurationDefault.AlsEenOpa;
                            break;
                        case "PeakRpm":
                            def = ShifterTableConfigurationDefault.PeakRpm;
                            break;
                        case "Performance":
                            def = ShifterTableConfigurationDefault.Performance;
                            break;
                        case "Henk":
                            def = ShifterTableConfigurationDefault.Henk;
                            break;
                    }

                    configuration = new ShifterTableConfiguration(def, Main.Drivetrain, speedHoldoff, StaticMass);
                    break;
            }
        }
Exemplo n.º 3
0
 public void ApplyParameter(IniValueObject obj)
 {
     switch(obj.Key)
     {
         case "Antistall":
             Antistall = obj.ReadAsString();
             break;
         case "CruiseControl":
             CruiseControl= obj.ReadAsString();
             break;
         case "ShiftCurve":
             ShiftCurve = obj.ReadAsString();
             break;
         case "SpeedLimiter":
             SpeedLimiter = obj.ReadAsString();
             break;
         case "TractionControl":
             TractionControl = obj.ReadAsString();
             break;
         case "ShiftPattern":
             var file = obj.ReadAsString(2);
             var region = obj.ReadAsString(0).ToLower() + "_" + obj.ReadAsString(1) + "thr";
             ShiftPattern.Add(new ConfigurableShiftPattern(region, file));
             break;
     }
 }
Exemplo n.º 4
0
        public void ApplyParameter(IniValueObject obj)
        {
            switch (obj.Key)
            {
                case "Load":
                    var p = new Profile(this, obj.ReadAsString());
                    if(p.Loaded==false)
                    {
                        Unloaded.Add(obj.ReadAsString());
                    }
                    else
                    {
                        Loaded.Add(p);
                    }
                    break;

                case "Unload":
                    Unloaded.Add(obj.ReadAsString());
                    break;
            }
        }