Changeset 8 for Common/Registry.cs


Ignore:
Timestamp:
Aug 12, 2019, 12:33:47 PM (5 years ago)
Author:
chronos
Message:
  • Modified: Updated files.
  • Added: ExtTools class for external program and compare tool execution.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Common/Registry.cs

    r2 r8  
    3535        }
    3636
     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
    3746        public static void SetValueBool(this RegistryKey regKey, string name, bool value)
    3847        {
     
    5059            regKey.SetValue(name, value);
    5160        }
     61
     62        public static void SetValueFloat(this RegistryKey regKey, string name, float value)
     63        {
     64            regKey.SetValue(name, value);
     65        }
    5266    }
    5367}
Note: See TracChangeset for help on using the changeset viewer.