public override Boolean Validate(RenderDevice device) { var portrait = false; var desired = portrait; var available = device.DeviceHeight >= device.DeviceWidth; return desired == available; }
public override Boolean Validate(RenderDevice device) { var hover = HoverAbility.Hover; var desired = hover; //Nothing yet, so we assume we have a headless browser return desired == HoverAbility.None; }
public override Boolean Validate(RenderDevice device) { var interlace = false; var desired = interlace; var available = device.IsInterlaced; return desired == available; }
public override Boolean Validate(RenderDevice device) { var accuracy = PointerAccuracy.Fine; var desired = accuracy; //Nothing yet, so we assume we have a headless browser return desired == PointerAccuracy.None; }
public override Boolean Validate(RenderDevice device) { var grid = false; var desired = grid; var available = device.IsGrid; return desired == available; }
public override Boolean Validate(RenderDevice device) { var state = ScriptingState.None; var options = device.Options; var available = ScriptingState.None; if (options != null && options.IsScripting()) available = device.DeviceType == RenderDevice.Kind.Screen ? ScriptingState.Enabled : ScriptingState.InitialOnly; return state == available; }
public override Boolean Validate(RenderDevice device) { var res = new Resolution(72f, Resolution.Unit.Dpi); var desired = res.To(Resolution.Unit.Dpi); var available = (Single)device.Resolution; if (IsMaximum) return available <= desired; else if (IsMinimum) return available >= desired; return desired == available; }
public override Boolean Validate(RenderDevice device) { var length = Length.Zero; var desired = length.ToPixel(); var available = (Single)device.DeviceWidth; if (IsMaximum) return available <= desired; else if (IsMinimum) return available >= desired; return desired == available; }
public override Boolean Validate(RenderDevice device) { var index = 0; var desired = index; var available = device.ColorBits; if (IsMaximum) return available <= desired; else if (IsMinimum) return available >= desired; return desired == available; }
public override Boolean Validate(RenderDevice device) { var ratio = Tuple.Create(1f, 1f); var desired = ratio.Item1 / ratio.Item2; var available = (Single)device.ViewPortWidth / (Single)device.ViewPortHeight; if (IsMaximum) return available <= desired; else if (IsMinimum) return available >= desired; return desired == available; }
public override Boolean Validate(RenderDevice device) { var frequency = UpdateFrequency.Normal; var desired = frequency; var available = device.Frequency; if (available >= 30) return desired == UpdateFrequency.Normal; else if (available > 0) return desired == UpdateFrequency.Slow; return desired == UpdateFrequency.None; }
public override Boolean Validate(RenderDevice device) { var color = 1; var desired = color; var available = Math.Pow(device.ColorBits, 2); if (IsMaximum) return available <= desired; else if (IsMinimum) return available >= desired; return desired == available; }
public override Boolean Validate(RenderDevice device) { var value = 1f; var desired = value; var available = device.Resolution / 96f; if (IsMaximum) return available <= desired; else if (IsMinimum) return available >= desired; return desired == available; }
public Boolean Validate(RenderDevice device) { if (!String.IsNullOrEmpty(Type) && KnownTypes.Contains(Type) == IsInverse) { return false; } if (IsInvalid(device)) { return false; } return !Features.Any(m => m.Validate(device) == IsInverse); }
public override Boolean Validate(RenderDevice device) { var index = 0; var desired = index; var available = device.MonochromeBits; if (IsMaximum) { return available <= desired; } else if (IsMinimum) { return available >= desired; } return desired == available; }
public override Boolean Validate(RenderDevice device) { var length = Length.Zero; var desired = length.ToPixel(); var available = (Single)device.ViewPortHeight; if (IsMaximum) { return available <= desired; } else if (IsMinimum) { return available >= desired; } return desired == available; }
internal override Boolean IsValid(RenderDevice device) { return Condition.Check(); }
internal override Boolean IsValid(RenderDevice device) { return true; }
public Boolean Validate(RenderDevice device) { return !Media.Any(m => !m.Validate(device)); }
/// <summary> /// Generates the style collection for the given window object. /// </summary> /// <param name="window">The window to host the style collection.</param> /// <returns>The device-bound style collection.</returns> public static StyleCollection GetStyleCollection(this IWindow window) { var device = new RenderDevice(window.OuterWidth, window.OuterHeight); var stylesheets = window.Document.GetStyleSheets().OfType<CssStyleSheet>(); return new StyleCollection(stylesheets, device); }
/// <summary> /// Validates the list of contained media against the provided rendering device. /// </summary> /// <param name="device">The current rendering device.</param> /// <returns>True if the constraints are satisfied, otherwise false.</returns> public Boolean Validate(RenderDevice device) { foreach (var media in _media) { if (media.Validate(device) == false) return false; } return true; }
public override Boolean Validate(RenderDevice device) { return true; }
Boolean IsInvalid(RenderDevice device) { return IsInvalid(device, Keywords.Screen, RenderDevice.Kind.Screen) || IsInvalid(device, Keywords.Speech, RenderDevice.Kind.Speech) || IsInvalid(device, Keywords.Print, RenderDevice.Kind.Printer); }
internal override Boolean IsValid(RenderDevice device) { return Media.Validate(device); }
/// <summary> /// Validates the given feature against the provided rendering device. /// </summary> /// <param name="device">The provided rendering device.</param> /// <returns>True if the constraints are satisfied, otherwise false.</returns> public abstract Boolean Validate(RenderDevice device);
Boolean IsInvalid(RenderDevice device, String keyword, RenderDevice.Kind kind) { return keyword.Is(Type) && (device.DeviceType == kind) == IsInverse; }
internal abstract Boolean IsValid(RenderDevice device);
/// <summary> /// Validates the given feature against the provided rendering device. /// </summary> /// <param name="device">The provided rendering device.</param> /// <returns>True if the constraints are satisfied, otherwise false.</returns> public abstract Boolean Validate(RenderDevice device);