Renaming some of our new display settings classes.
authorsl
Sun, 31 Aug 2014 16:21:50 +0200
changeset 50ba4cad33db58
parent 49 eab73d41c9e6
child 51 ae2052cc89ef
Renaming some of our new display settings classes.
Server/DisplaySettings.cs
Server/MainForm.cs
Server/Properties/Settings.Designer.cs
     1.1 --- a/Server/DisplaySettings.cs	Sun Aug 31 16:14:10 2014 +0200
     1.2 +++ b/Server/DisplaySettings.cs	Sun Aug 31 16:21:50 2014 +0200
     1.3 @@ -13,12 +13,12 @@
     1.4  namespace SharpDisplayManager
     1.5  {
     1.6      /// <summary>
     1.7 -    /// Display settings a the specified hardware type
     1.8 +    /// Display settings for the specified hardware type
     1.9      /// </summary>
    1.10      [DataContract]
    1.11 -    public class DisplaySettingsEntry
    1.12 +    public class DisplaySettings
    1.13      {
    1.14 -        public DisplaySettingsEntry()
    1.15 +        public DisplaySettings()
    1.16          {
    1.17              Brightness = 1;
    1.18              DisplayType = 0;
    1.19 @@ -31,6 +31,9 @@
    1.20          [DataMember]
    1.21          public int Brightness { get; set; }
    1.22  
    1.23 +        /// <summary>
    1.24 +        /// See Display.TMiniDisplayType
    1.25 +        /// </summary>
    1.26          [DataMember]
    1.27          public int DisplayType { get; set; }
    1.28  
    1.29 @@ -64,11 +67,14 @@
    1.30      };
    1.31  
    1.32  
    1.33 +    /// <summary>
    1.34 +    /// Contain settings for each of our display type. 
    1.35 +    /// </summary>
    1.36      [TypeConverter(typeof(DisplaySettingsConverter))]
    1.37      [DataContract]
    1.38 -    public class DisplaySettings
    1.39 +    public class DisplaysSettings
    1.40      {
    1.41 -        public DisplaySettings()
    1.42 +        public DisplaysSettings()
    1.43          {
    1.44              Init();
    1.45          }
    1.46 @@ -77,7 +83,7 @@
    1.47          {
    1.48              if (Displays == null)
    1.49              {
    1.50 -                Displays = new List<DisplaySettingsEntry>();
    1.51 +                Displays = new List<DisplaySettings>();
    1.52              }
    1.53          }
    1.54  
    1.55 @@ -85,13 +91,13 @@
    1.56          //public int CurrentSettingsIndex { get; set; }
    1.57  
    1.58          [DataMember]
    1.59 -        public List<DisplaySettingsEntry> Displays { get; set; }
    1.60 +        public List<DisplaySettings> Displays { get; set; }
    1.61  
    1.62          public override string ToString()
    1.63          {
    1.64              //Save settings into JSON string
    1.65              MemoryStream stream = new MemoryStream();
    1.66 -            DataContractJsonSerializer ser = new DataContractJsonSerializer(typeof(DisplaySettings));
    1.67 +            DataContractJsonSerializer ser = new DataContractJsonSerializer(typeof(DisplaysSettings));
    1.68              ser.WriteObject(stream, this);
    1.69              // convert stream to string
    1.70              stream.Position = 0;
    1.71 @@ -119,8 +125,8 @@
    1.72                  //Load settings form JSON string
    1.73                  byte[] byteArray = Encoding.UTF8.GetBytes(stringValue);
    1.74                  MemoryStream stream = new MemoryStream(byteArray);
    1.75 -                DataContractJsonSerializer ser = new DataContractJsonSerializer(typeof(DisplaySettings));
    1.76 -                DisplaySettings settings = (DisplaySettings)ser.ReadObject(stream);
    1.77 +                DataContractJsonSerializer ser = new DataContractJsonSerializer(typeof(DisplaysSettings));
    1.78 +                DisplaysSettings settings = (DisplaysSettings)ser.ReadObject(stream);
    1.79                  settings.Init();
    1.80                  return settings;
    1.81              }
     2.1 --- a/Server/MainForm.cs	Sun Aug 31 16:14:10 2014 +0200
     2.2 +++ b/Server/MainForm.cs	Sun Aug 31 16:21:50 2014 +0200
     2.3 @@ -319,19 +319,19 @@
     2.4          /// <summary>
     2.5          /// CDS stands for Current Display Settings
     2.6          /// </summary>
     2.7 -        private DisplaySettingsEntry cds
     2.8 +        private DisplaySettings cds
     2.9          {
    2.10              get
    2.11              {
    2.12 -                DisplaySettings settings = Properties.Settings.Default.DisplaySettings;
    2.13 +                DisplaysSettings settings = Properties.Settings.Default.DisplaySettings;
    2.14  
    2.15                  //Make sure all our settings have been created
    2.16                  while (settings.Displays.Count <= Properties.Settings.Default.CurrentDisplayIndex)
    2.17                  {
    2.18 -                    settings.Displays.Add(new DisplaySettingsEntry());
    2.19 +                    settings.Displays.Add(new DisplaySettings());
    2.20                  }
    2.21  
    2.22 -                DisplaySettingsEntry displaySettings = settings.Displays[Properties.Settings.Default.CurrentDisplayIndex];
    2.23 +                DisplaySettings displaySettings = settings.Displays[Properties.Settings.Default.CurrentDisplayIndex];
    2.24                  return displaySettings;
    2.25              }
    2.26          }
     3.1 --- a/Server/Properties/Settings.Designer.cs	Sun Aug 31 16:14:10 2014 +0200
     3.2 +++ b/Server/Properties/Settings.Designer.cs	Sun Aug 31 16:21:50 2014 +0200
     3.3 @@ -37,9 +37,9 @@
     3.4          
     3.5          [global::System.Configuration.UserScopedSettingAttribute()]
     3.6          [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     3.7 -        public global::SharpDisplayManager.DisplaySettings DisplaySettings {
     3.8 +        public global::SharpDisplayManager.DisplaysSettings DisplaySettings {
     3.9              get {
    3.10 -                return ((global::SharpDisplayManager.DisplaySettings)(this["DisplaySettings"]));
    3.11 +                return ((global::SharpDisplayManager.DisplaysSettings)(this["DisplaySettings"]));
    3.12              }
    3.13              set {
    3.14                  this["DisplaySettings"] = value;