Exemplo n.º 1
0
 public ConfigBoolAttribute(BoolParseType type)
 {
     Type = type;
 }
Exemplo n.º 2
0
 /// <summary>Parses the specified boolean and turns it into a Petroglyph boolean type as used in the xml files for Petroglyph games.</summary>
 /// <param name="boolean">The boolean to parse.</param>
 /// <param name="petroglyphBoolType">The type the boolean should be parsed as.
 /// Defaults to the <see cref="BoolParseType.YesNo"/> type.</param>
 /// <returns>Returns a string that can be used as boolean for xml attributes in Petroglyph games.</returns>
 public static string Parse(bool boolean, BoolParseType petroglyphBoolType = BoolParseType.YesNo)
 {
     return(boolean
             ? PETROGLYPH_TRUE_STRING_TYPES[(int)petroglyphBoolType]
             : PETROGLYPH_FALSE_STRING_TYPES[(int)petroglyphBoolType]);
 }