public static bool FirstRunThisDay() { DateTime lastRun = Convert.ToDateTime(ParentalControlsRegistry.GetRegistryKey().GetValue("LastStart")); DateTime now = DateTime.Now; return(lastRun.Month != now.Month || lastRun.Day != now.Day); }
public static decimal RestZeit(Span range, decimal uptime) { return(Math.Round( Convert.ToDecimal(ParentalControlsRegistry.GetValue(range.ToString() + "Quota")) - Convert.ToDecimal(ParentalControlsRegistry.GetValue(range.ToString() + "Sum")) - uptime, 2)); }
public static void IncrementKey(string key, Decimal incrementBy = 1) { ParentalControlsRegistry.GetRegistryKey().SetValue(key, Convert.ToDecimal(ParentalControlsRegistry.GetRegistryKey().GetValue(key)) + incrementBy); }