/// <summary>
        /// Reset sleep delay value and screensaver mode value (this function will delete keys from the registry)
        /// </summary>
        public void ResetSleepModeValues()
        {
            HololensRegKey.DeleteValue(SleepDelayRegkeyName);
            HololensRegKey.DeleteValue(ScreensaverModeRegkeyName);

            UpdateUiValues();
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Set new status for Virtual Screens option.
 /// </summary>
 /// <param name="newStatus">Turn on/off virtual screens</param>
 public void SetVirtualScreensStatus(bool newStatus)
 {
     HololensRegKey.SetValue(VirtualScreensRegkey, newStatus.ConvertBoolToInt());
 }
Ejemplo n.º 3
0
 private bool GetCurrentVirtualScreensStatusFromRegistry()
 {
     return(HololensRegKey.IsExists(VirtualScreensRegkey) && ((int)HololensRegKey.GetValue(VirtualScreensRegkey)).ConvertIntToBool());
 }
        /// <summary>
        /// Set new value for screensaver regkey.
        /// </summary>
        /// <param name="newStatus">New status (on/off)</param>
        public void SetScreensaverModeStatus(bool newStatus)
        {
            HololensRegKey.SetValue(ScreensaverModeRegkeyName, newStatus.ConvertBoolToInt());

            SetCurrentScreensaverModeStatus();
        }
        /// <summary>
        /// Set new value to regkey of sleep delay for WMR.
        /// </summary>
        /// <param name="newDelayInMinutes">New value of the sleep delay in minutes.</param>
        public void SetNewSleepDelay(int newDelayInMinutes)
        {
            HololensRegKey.SetValue(SleepDelayRegkeyName, TimeConverter.ConvertMinutesIntoMilliseconds(newDelayInMinutes));

            SetCurrentSleepDelayValue();
        }
 private bool GetCurrentScreensaverModeStatusFromRegistry()
 {
     return(HololensRegKey.IsExists(ScreensaverModeRegkeyName) && ((int)HololensRegKey.GetValue(ScreensaverModeRegkeyName)).ConvertIntToBool());
 }
 private void SetCurrentSleepDelayValue()
 {
     _sleepDelayValueLabel.Content = $"{(HololensRegKey.IsExists(SleepDelayRegkeyName) ? TimeConverter.ConvertMillisecondsIntoMinutes((int) HololensRegKey.GetValue(SleepDelayRegkeyName)) : DefaultSleepDelay).ToString()} minutes";
 }