public static SchemaDictionaryUsr DefaultSchemaUsr(int itemNumber) { SchemaDictionaryUsr def = SchemaUnitUsr.SchemaUnitUsrDefault.Clone(); def[SchemaUsrKey.STYLE_NAME].Value = string.Format(SchemaUnitUsr.SchemaUnitUsrDefault[SchemaUsrKey.STYLE_NAME].Value, itemNumber); def[SchemaUsrKey.UNIT_SYSTEM].Value = (int)UnitSystem.Imperial; def[SchemaUsrKey.UNIT_TYPE].Value = (int)UnitType.UT_Length; def[SchemaUsrKey.ACCURACY].Value = (1.0 / 12.0) / 16.0; def[SchemaUsrKey.DUT].Value = (int)DisplayUnitType.DUT_FEET_FRACTIONAL_INCHES; def[SchemaUsrKey.UST].Value = (int)UnitSymbolType.UST_NONE; return(def); }
public static void MakeDefaultUnitStyles() { RsuUsr.Clear(); for (int i = 0; i < DEFAULT_COUNT_USER; i++) { for (int j = 0; j < DEFAULT_COUNT_STYLES; j++) { SchemaDictionaryUsr unitStyle = DefaultSchemaUsr((i * 10) + j); unitStyle[SchemaUsrKey.USER_NAME].Value = UserNames[i]; RsuUsrSetg.Add(unitStyle); } } }