Changeset 8 for Common/Registry.cs
- Timestamp:
- Aug 12, 2019, 12:33:47 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Common/Registry.cs
r2 r8 35 35 } 36 36 37 public static float GetValueFloat(this RegistryKey regKey, string name, float defaultValue) 38 { 39 object value = regKey.GetValue(name, defaultValue); 40 float num; 41 if (float.TryParse((string)value, out num)) 42 return num; 43 else return defaultValue; 44 } 45 37 46 public static void SetValueBool(this RegistryKey regKey, string name, bool value) 38 47 { … … 50 59 regKey.SetValue(name, value); 51 60 } 61 62 public static void SetValueFloat(this RegistryKey regKey, string name, float value) 63 { 64 regKey.SetValue(name, value); 65 } 52 66 } 53 67 }
Note:
See TracChangeset
for help on using the changeset viewer.