private void TestEmptyStringTheme() { var highContrast = new HighContrast(); highContrast.Theme = HighContrast.ColorSchemes.HighContrastBlack; highContrast.Apply(); Assert(new HighContrast().Theme == HighContrast.ColorSchemes.HighContrastBlack); highContrast.Theme = HighContrast.ColorSchemes.HighContrastWhite; highContrast.Apply(); Assert(new HighContrast().Theme == HighContrast.ColorSchemes.HighContrastWhite); highContrast.Theme = HighContrast.ColorSchemes.Default; // value of Default is empty string highContrast.Apply(); Assert(new HighContrast().Theme != HighContrast.ColorSchemes.Default); // This will NOT equal because the Theme value is still HighContrastWhite. }
public async Task <object> TurnOffHighContrast(dynamic input) { var highContrast = new HighContrast(); highContrast.IsHighContrastOn = false; highContrast.Apply(); return(true); }
public async Task <object> TurnOnHighContrast(dynamic input) { var highContrast = new HighContrast(); highContrast.IsHighContrastOn = true; highContrast.Theme = HighContrast.ColorSchemes.HighContrastBlack; highContrast.Apply(); return(true); }
/* * private static void TurnOnDefaultHighContrast() * { * var highContrast = new HighContrast(); * highContrast.IsHighContrastOn = true; * highContrast.Theme = HighContrast.ColorSchemes.HighContrastBlack; * highContrast.Apply(); * } */ private void ToggleHighContrast() { Logger.Debug("Entering ToggleHighContrast"); HighContrast highContrast = new HighContrast(); highContrast.IsHighContrastOn = true; highContrast.Theme = HighContrast.ColorSchemes.HighContrastBlack; highContrast.Apply(); Logger.Debug("High contrast should be ON: HighContrastBlack"); Assert(new HighContrast().IsHighContrastOn == true); PollHighConttrastUntilSettingIs(true); WaitForContrastChange(); highContrast.IsHighContrastOn = false; highContrast.Apply(); PollHighConttrastUntilSettingIs(false); Assert(new HighContrast().IsHighContrastOn == false); Logger.Debug("High contrast should be OFF"); WaitForContrastChange(); highContrast.IsHighContrastOn = true; highContrast.Theme = HighContrast.ColorSchemes.HighContrastWhite; highContrast.Apply(); PollHighConttrastUntilSettingIs(true); Assert(new HighContrast().IsHighContrastOn); Logger.Debug("High contrast should be ON: HighContrastWhite"); WaitForContrastChange(); highContrast.IsHighContrastOn = false; highContrast.Apply(); PollHighConttrastUntilSettingIs(false); Assert(new HighContrast().IsHighContrastOn == false); Logger.Debug("High contrast should be OFF"); WaitForContrastChange(); }