/// <summary> /// Return a human readable format describing the desired screenmode /// </summary> /// <returns></returns> public override string ToString() { return(TargetWidth.ToString() + " x " + TargetHeight.ToString() + ", " + TargetBitDepth.ToString() + " bits, " + TargetRefreshRate.ToString() + " Hz" + " (Orientation: " + TargetRotation.ToString() + ")"); }
public IEnumerable <KeyValuePair <string, string> > ToParameters() { if (Mode != default) { yield return(new KeyValuePair <string, string>("mode", Mode.ToString())); } if (Format != null) { yield return(new KeyValuePair <string, string>("format", Format.ToString())); } if (TargetWidth != null) { yield return(new KeyValuePair <string, string>("targetWidth", TargetWidth.ToString())); } if (TargetHeight != null) { yield return(new KeyValuePair <string, string>("targetHeight", TargetHeight.ToString())); } if (Quality != null) { yield return(new KeyValuePair <string, string>("quality", Quality.ToString())); } if (FocusX != null) { yield return(new KeyValuePair <string, string>("focusX", FocusX.ToString())); } if (FocusY != null) { yield return(new KeyValuePair <string, string>("focusY", FocusY.ToString())); } if (Background != null) { yield return(new KeyValuePair <string, string>("background", Background)); } if (ExtraParameters != null) { foreach (var kvp in ExtraParameters) { yield return(kvp); } } }