Пример #1
0
 /// <summary>
 /// Creates an initialized instance using enums for known values.
 /// </summary>
 /// <param name="simVar"></param>
 /// <param name="unit"></param>
 /// <param name="dataType"></param>
 public SimProperty(FsSimVar simVar, FsUnit unit, SIMCONNECT_DATATYPE dataType)
 {
     Name     = FsSimVarFactory.GetSimVarCode(simVar);
     Unit     = UnitFactory.GetUnitCode(unit);
     DataType = dataType;
 }
Пример #2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="unit"></param>
 /// <returns></returns>
 public static string GetUnitCode(FsUnit unit)
 {
     return(_enumToCodeDictionary[unit]);
 }
Пример #3
0
 /// <summary>
 /// Creates an initialized instance of the <see cref="SimVar"/> class.
 /// </summary>
 /// <param name="simVarName"></param>
 /// <param name="unitId"></param>
 /// <param name="dataType"></param>
 public SimVar(string simVarName, FsUnit unitId, SIMCONNECT_DATATYPE dataType)
 {
     Name     = simVarName;
     Unit     = FsUnitFactory.GetUnitName(unitId);
     DataType = dataType;
 }
Пример #4
0
 /// <summary>
 /// Creates an initialized instance using enums for known values.
 /// </summary>
 /// <param name="simVarId"></param>
 /// <param name="unitId"></param>
 /// <param name="dataType"></param>
 public SimVar(FsSimVar simVarId, FsUnit unitId, SIMCONNECT_DATATYPE dataType)
 {
     Name     = FsSimVarFactory.GetSimVarName(simVarId);
     Unit     = FsUnitFactory.GetUnitName(unitId);
     DataType = dataType;
 }
Пример #5
0
 /// <summary>
 /// Gets the unit name used by MSFS.
 /// </summary>
 /// <param name="unit"></param>
 /// <returns></returns>
 public static string GetUnitName(FsUnit unit)
 {
     return(_names[(int)unit]);
 }