StephaneLenclud@123: //
StephaneLenclud@123: // Copyright (C) 2014-2015 Stéphane Lenclud.
StephaneLenclud@123: //
StephaneLenclud@123: // This file is part of SharpDisplayManager.
StephaneLenclud@123: //
StephaneLenclud@123: // SharpDisplayManager is free software: you can redistribute it and/or modify
StephaneLenclud@123: // it under the terms of the GNU General Public License as published by
StephaneLenclud@123: // the Free Software Foundation, either version 3 of the License, or
StephaneLenclud@123: // (at your option) any later version.
StephaneLenclud@123: //
StephaneLenclud@123: // SharpDisplayManager is distributed in the hope that it will be useful,
StephaneLenclud@123: // but WITHOUT ANY WARRANTY; without even the implied warranty of
StephaneLenclud@123: // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
StephaneLenclud@123: // GNU General Public License for more details.
StephaneLenclud@123: //
StephaneLenclud@123: // You should have received a copy of the GNU General Public License
StephaneLenclud@123: // along with SharpDisplayManager. If not, see .
StephaneLenclud@123: //
StephaneLenclud@123:
StephaneLenclud@123: using System;
sl@49: using System.Collections;
sl@49: using System.Collections.Generic;
sl@49: using System.Text;
sl@49: using System.Configuration;
sl@49: using System.Xml;
sl@49: using System.ComponentModel;
sl@49: using System.Runtime.Serialization;
sl@49: using System.Runtime.Serialization.Json;
sl@49: using System.IO;
sl@49: using System.Drawing;
Stephane@212: using SharpLib.Utils;
sl@49:
sl@49: namespace SharpDisplayManager
sl@49: {
sl@49: ///
sl@50: /// Display settings for the specified hardware type
sl@49: ///
sl@49: [DataContract]
sl@50: public class DisplaySettings
sl@49: {
sl@50: public DisplaySettings()
sl@49: {
sl@49: Brightness = 1;
sl@49: DisplayType = 0;
sl@49: TimerInterval = 150;
sl@49: ReverseScreen = false;
sl@57: InverseColors = true;
sl@49: ShowBorders = false;
StephaneLenclud@115: ShowVolumeLabel = false;
sl@49: FontName = "Microsoft Sans Serif, 9.75pt";
sl@100: ScaleToFit = true;
sl@100: MinFontSize = 15.0f;
StephaneLenclud@106: Separator = " ";
StephaneLenclud@106: ScrollingSpeedInPixelsPerSecond = 64;
sl@49: }
sl@49:
StephaneLenclud@115:
StephaneLenclud@115: [DataMember]
StephaneLenclud@115: public bool ShowVolumeLabel { get; set; }
StephaneLenclud@115:
sl@49: [DataMember]
sl@49: public int Brightness { get; set; }
sl@49:
sl@50: ///
sl@50: /// See Display.TMiniDisplayType
sl@50: ///
sl@49: [DataMember]
sl@49: public int DisplayType { get; set; }
sl@49:
sl@49: [DataMember]
sl@49: public int TimerInterval { get; set; }
sl@49:
StephaneLenclud@106: [DataMember]
StephaneLenclud@106: public int ScrollingSpeedInPixelsPerSecond { get; set; }
StephaneLenclud@106:
sl@49: [DataMember]
sl@49: public bool ReverseScreen { get; set; }
sl@49:
sl@49: [DataMember]
sl@57: public bool InverseColors { get; set; }
sl@57:
sl@57: [DataMember]
sl@49: public bool ShowBorders { get; set; }
sl@49:
sl@49: [DataMember]
sl@100: public bool ScaleToFit { get; set; }
sl@100:
sl@100: [DataMember]
sl@100: public float MinFontSize { get; set; }
sl@100:
sl@100: [DataMember]
sl@100: public string Separator { get; set; }
sl@100:
sl@100: [DataMember]
sl@49: public string FontName { get; set; }
sl@49:
sl@49: public Font Font
sl@49: {
sl@49: get
sl@49: {
sl@49: FontConverter cvt = new FontConverter();
sl@49: Font font = cvt.ConvertFromInvariantString(FontName) as Font;
sl@49: return font;
sl@49: }
sl@49:
sl@49: set
sl@49: {
sl@49: FontConverter cvt = new FontConverter();
sl@49: FontName = cvt.ConvertToInvariantString(value);
sl@49: }
sl@49: }
sl@49: };
sl@49:
sl@49:
sl@50: ///
sl@100: /// Contain settings for each of our display type.
sl@50: ///
Stephane@212: [TypeConverter(typeof(TypeConverterJson))]
sl@49: [DataContract]
sl@50: public class DisplaysSettings
sl@49: {
Stephane@212: private List iDisplays;
Stephane@212:
sl@50: public DisplaysSettings()
sl@49: {
sl@49: Init();
sl@49: }
sl@49:
sl@49: public void Init()
sl@49: {
Stephane@212: if (iDisplays == null)
sl@49: {
Stephane@212: iDisplays = new List();
sl@49: }
sl@49: }
sl@49:
sl@49: //[DataMember]
sl@49: //public int CurrentSettingsIndex { get; set; }
sl@49:
sl@49: [DataMember]
Stephane@212: public List Displays { get { Init(); return iDisplays; } private set { iDisplays = value; } }
sl@49:
Stephane@212:
sl@49: }
sl@49: }
sl@49: