Adding support for Display Messages.
authorStephaneLenclud
Thu, 28 Jul 2016 19:32:40 +0200
changeset 2256ccaa430aa23
parent 224 471cb4c8a09a
child 226 91763ba41c0c
Adding support for Display Messages.
Clients/Idle/FormClientIdle.Designer.cs
Clients/Idle/FormClientIdle.cs
Clients/Idle/Program.cs
Clients/Idle/Properties/Resources.Designer.cs
Clients/Idle/Properties/Settings.Designer.cs
Clients/Message/App.config
Clients/Message/FormClientMessage.Designer.cs
Clients/Message/FormClientMessage.cs
Clients/Message/FormClientMessage.resx
Clients/Message/Program.cs
Clients/Message/Properties/AssemblyInfo.cs
Clients/Message/Properties/Resources.Designer.cs
Clients/Message/Properties/Resources.resx
Clients/Message/Properties/Settings.Designer.cs
Clients/Message/Properties/Settings.settings
Clients/Message/SharpDisplayClientMessage.csproj
Clients/Message/packages.config
Server/Actions/ActionDisplayMessage.cs
Server/FormEditAction.cs
Server/MainForm.cs
Server/SharpDisplayManager.csproj
SharpDisplayManager.sln
     1.1 --- a/Clients/Idle/FormClientIdle.Designer.cs	Wed Jul 27 17:09:10 2016 +0200
     1.2 +++ b/Clients/Idle/FormClientIdle.Designer.cs	Thu Jul 28 19:32:40 2016 +0200
     1.3 @@ -1,5 +1,5 @@
     1.4  
     1.5 -namespace SharpDisplayIdleClient
     1.6 +namespace SharpDisplayClientIdle
     1.7  {
     1.8      partial class FormClientIdle
     1.9      {
     2.1 --- a/Clients/Idle/FormClientIdle.cs	Wed Jul 27 17:09:10 2016 +0200
     2.2 +++ b/Clients/Idle/FormClientIdle.cs	Thu Jul 28 19:32:40 2016 +0200
     2.3 @@ -30,7 +30,7 @@
     2.4  using SharpLib.Display;
     2.5  
     2.6  
     2.7 -namespace SharpDisplayIdleClient
     2.8 +namespace SharpDisplayClientIdle
     2.9  {
    2.10  
    2.11      /// <summary>
     3.1 --- a/Clients/Idle/Program.cs	Wed Jul 27 17:09:10 2016 +0200
     3.2 +++ b/Clients/Idle/Program.cs	Thu Jul 28 19:32:40 2016 +0200
     3.3 @@ -24,9 +24,9 @@
     3.4  using System.Windows.Forms;
     3.5  using System.Drawing;
     3.6  
     3.7 -namespace SharpDisplayIdleClient
     3.8 +namespace SharpDisplayClientIdle
     3.9  {
    3.10 -    static public class Program
    3.11 +    public static class Program
    3.12      {
    3.13          /// <summary>
    3.14          /// The main entry point for the application.
    3.15 @@ -43,7 +43,7 @@
    3.16          }
    3.17  
    3.18          [STAThread]
    3.19 -        static public void MainWithParams(object aParams)
    3.20 +        public static void MainWithParams(object aParams)
    3.21          {
    3.22              //Set high priority to our process to avoid lags when rendering to our screen
    3.23              System.Diagnostics.Process.GetCurrentProcess().PriorityClass = System.Diagnostics.ProcessPriorityClass.AboveNormal;
     4.1 --- a/Clients/Idle/Properties/Resources.Designer.cs	Wed Jul 27 17:09:10 2016 +0200
     4.2 +++ b/Clients/Idle/Properties/Resources.Designer.cs	Thu Jul 28 19:32:40 2016 +0200
     4.3 @@ -8,7 +8,7 @@
     4.4  // </auto-generated>
     4.5  //------------------------------------------------------------------------------
     4.6  
     4.7 -namespace SharpDisplayIdleClient.Properties {
     4.8 +namespace SharpDisplayClientIdle.Properties {
     4.9      using System;
    4.10      
    4.11      
     5.1 --- a/Clients/Idle/Properties/Settings.Designer.cs	Wed Jul 27 17:09:10 2016 +0200
     5.2 +++ b/Clients/Idle/Properties/Settings.Designer.cs	Thu Jul 28 19:32:40 2016 +0200
     5.3 @@ -8,7 +8,7 @@
     5.4  // </auto-generated>
     5.5  //------------------------------------------------------------------------------
     5.6  
     5.7 -namespace SharpDisplayIdleClient.Properties {
     5.8 +namespace SharpDisplayClientIdle.Properties {
     5.9      
    5.10      
    5.11      [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/Clients/Message/App.config	Thu Jul 28 19:32:40 2016 +0200
     6.3 @@ -0,0 +1,6 @@
     6.4 +<?xml version="1.0" encoding="utf-8" ?>
     6.5 +<configuration>
     6.6 +    <startup> 
     6.7 +        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
     6.8 +    </startup>
     6.9 +</configuration>
    6.10 \ No newline at end of file
     7.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.2 +++ b/Clients/Message/FormClientMessage.Designer.cs	Thu Jul 28 19:32:40 2016 +0200
     7.3 @@ -0,0 +1,58 @@
     7.4 +namespace SharpDisplayClientMessage
     7.5 +{
     7.6 +    partial class FormClientMessage
     7.7 +    {
     7.8 +        /// <summary>
     7.9 +        /// Required designer variable.
    7.10 +        /// </summary>
    7.11 +        private System.ComponentModel.IContainer components = null;
    7.12 +
    7.13 +        /// <summary>
    7.14 +        /// Clean up any resources being used.
    7.15 +        /// </summary>
    7.16 +        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
    7.17 +        protected override void Dispose(bool disposing)
    7.18 +        {
    7.19 +            if (disposing && (components != null))
    7.20 +            {
    7.21 +                components.Dispose();
    7.22 +            }
    7.23 +            base.Dispose(disposing);
    7.24 +        }
    7.25 +
    7.26 +        #region Windows Form Designer generated code
    7.27 +
    7.28 +        /// <summary>
    7.29 +        /// Required method for Designer support - do not modify
    7.30 +        /// the contents of this method with the code editor.
    7.31 +        /// </summary>
    7.32 +        private void InitializeComponent()
    7.33 +        {
    7.34 +            this.components = new System.ComponentModel.Container();
    7.35 +            this.iTimer = new System.Windows.Forms.Timer(this.components);
    7.36 +            this.SuspendLayout();
    7.37 +            // 
    7.38 +            // iTimer
    7.39 +            // 
    7.40 +            this.iTimer.Tick += new System.EventHandler(this.iTimer_Tick);
    7.41 +            // 
    7.42 +            // FormClientMessage
    7.43 +            // 
    7.44 +            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    7.45 +            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    7.46 +            this.ClientSize = new System.Drawing.Size(284, 261);
    7.47 +            this.Name = "FormClientMessage";
    7.48 +            this.Text = "Form1";
    7.49 +            this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FormClientMessage_FormClosing);
    7.50 +            this.Load += new System.EventHandler(this.FormClientMessage_Load);
    7.51 +            this.Shown += new System.EventHandler(this.FormClientMessage_Shown);
    7.52 +            this.ResumeLayout(false);
    7.53 +
    7.54 +        }
    7.55 +
    7.56 +        #endregion
    7.57 +
    7.58 +        private System.Windows.Forms.Timer iTimer;
    7.59 +    }
    7.60 +}
    7.61 +
     8.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.2 +++ b/Clients/Message/FormClientMessage.cs	Thu Jul 28 19:32:40 2016 +0200
     8.3 @@ -0,0 +1,215 @@
     8.4 +//
     8.5 +// Copyright (C) 2014-2016 Stéphane Lenclud.
     8.6 +//
     8.7 +// This file is part of SharpDisplayManager.
     8.8 +//
     8.9 +// SharpDisplayManager is free software: you can redistribute it and/or modify
    8.10 +// it under the terms of the GNU General Public License as published by
    8.11 +// the Free Software Foundation, either version 3 of the License, or
    8.12 +// (at your option) any later version.
    8.13 +//
    8.14 +// SharpDisplayManager is distributed in the hope that it will be useful,
    8.15 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
    8.16 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    8.17 +// GNU General Public License for more details.
    8.18 +//
    8.19 +// You should have received a copy of the GNU General Public License
    8.20 +// along with SharpDisplayManager.  If not, see <http://www.gnu.org/licenses/>.
    8.21 +//
    8.22 +
    8.23 +using System;
    8.24 +using System.Collections.Generic;
    8.25 +using System.ComponentModel;
    8.26 +using System.Data;
    8.27 +using System.Drawing;
    8.28 +using System.Linq;
    8.29 +using System.Text;
    8.30 +using System.Threading.Tasks;
    8.31 +using System.Windows.Forms;
    8.32 +using System.Diagnostics;
    8.33 +using SharpLib.Display;
    8.34 +
    8.35 +
    8.36 +namespace SharpDisplayClientMessage
    8.37 +{
    8.38 +
    8.39 +    /// <summary>
    8.40 +    /// Sharp Display Client designed to act as an idle client.
    8.41 +    /// It should take care of screen saving and other such concerns.
    8.42 +    /// </summary>
    8.43 +    public partial class FormClientMessage : Form
    8.44 +    {
    8.45 +        public StartParams Params { get; set; }
    8.46 +
    8.47 +        Client iClient;
    8.48 +        ContentAlignment iAlignment;
    8.49 +        TextField iPrimaryTextField;
    8.50 +        TextField iSecondaryTextField;
    8.51 +
    8.52 +
    8.53 +        public delegate void CloseDelegate();
    8.54 +        public delegate void CloseConnectionDelegate();
    8.55 +
    8.56 +
    8.57 +        public FormClientMessage()
    8.58 +        {
    8.59 +            InitializeComponent();
    8.60 +        }
    8.61 +
    8.62 +        /// <summary>
    8.63 +        /// 
    8.64 +        /// </summary>
    8.65 +        /// <param name="sender"></param>
    8.66 +        /// <param name="e"></param>
    8.67 +        private void FormClientMessage_Load(object sender, EventArgs e)
    8.68 +        {
    8.69 +            //Prevents showing in the Open Task view (Windows Key + Tab)
    8.70 +            Visible = false;
    8.71 +
    8.72 +            //Display client
    8.73 +            iClient = new Client();
    8.74 +            iClient.CloseOrderEvent += OnCloseOrder;
    8.75 +            iClient.Open();
    8.76 +            iClient.SetName("Message");
    8.77 +            iClient.SetPriority(Params.Priority);
    8.78 +            SetupDisplayClient();
    8.79 +
    8.80 +            //Timer
    8.81 +            iTimer.Interval = Params.DurationInMs;
    8.82 +            iTimer.Start();
    8.83 +        }
    8.84 +
    8.85 +
    8.86 +        /// <summary>
    8.87 +        /// 
    8.88 +        /// </summary>
    8.89 +        /// <returns></returns>
    8.90 +        public bool IsClientReady()
    8.91 +        {
    8.92 +            return (iClient != null && iClient.IsReady());
    8.93 +        }
    8.94 +
    8.95 +        /// <summary>
    8.96 +        /// 
    8.97 +        /// </summary>
    8.98 +        public void SetupDisplayClient()
    8.99 +        {
   8.100 +            //Setup our layout
   8.101 +
   8.102 +            //Set one column one line layout
   8.103 +
   8.104 +            //Setup our fields
   8.105 +            iAlignment = ContentAlignment.MiddleCenter;
   8.106 +            iPrimaryTextField = new TextField(Params.PrimaryText, iAlignment, 0, 0);
   8.107 +            iSecondaryTextField = new TextField(Params.SecondaryText, iAlignment, 0, 1);
   8.108 +
   8.109 +            //Set our fields
   8.110 +            if (string.IsNullOrEmpty(Params.SecondaryText))
   8.111 +            {
   8.112 +                //One field layout
   8.113 +                TableLayout layout = new TableLayout(1, 1);
   8.114 +                iClient.SetLayout(layout);
   8.115 +
   8.116 +                iClient.CreateFields(new DataField[]
   8.117 +                {
   8.118 +                iPrimaryTextField
   8.119 +                });
   8.120 +            }
   8.121 +            else
   8.122 +            {
   8.123 +                //Two fields layout
   8.124 +                TableLayout layout = new TableLayout(1, 2);
   8.125 +                iClient.SetLayout(layout);
   8.126 +
   8.127 +                iClient.CreateFields(new DataField[]
   8.128 +                {
   8.129 +                iPrimaryTextField,
   8.130 +                iSecondaryTextField
   8.131 +                });
   8.132 +            }
   8.133 +        }
   8.134 +
   8.135 +        public void OnCloseOrder()
   8.136 +        {
   8.137 +            CloseThreadSafe();
   8.138 +        }
   8.139 +
   8.140 +        /// <summary>
   8.141 +        ///
   8.142 +        /// </summary>
   8.143 +        public void CloseThreadSafe()
   8.144 +        {
   8.145 +            if (this.InvokeRequired)
   8.146 +            {
   8.147 +                //Not in the proper thread, invoke ourselves
   8.148 +                CloseDelegate d = new CloseDelegate(CloseThreadSafe);
   8.149 +                this.Invoke(d, new object[] { });
   8.150 +            }
   8.151 +            else
   8.152 +            {
   8.153 +                //We are in the proper thread
   8.154 +                Close();
   8.155 +            }
   8.156 +        }
   8.157 +
   8.158 +        /// <summary>
   8.159 +        ///
   8.160 +        /// </summary>
   8.161 +        public void CloseConnectionThreadSafe()
   8.162 +        {
   8.163 +            if (this.InvokeRequired)
   8.164 +            {
   8.165 +                //Not in the proper thread, invoke ourselves
   8.166 +                CloseConnectionDelegate d = new CloseConnectionDelegate(CloseConnectionThreadSafe);
   8.167 +                this.Invoke(d, new object[] { });
   8.168 +            }
   8.169 +            else
   8.170 +            {
   8.171 +                //We are in the proper thread
   8.172 +                if (IsClientReady())
   8.173 +                {
   8.174 +                    string sessionId = iClient.SessionId;
   8.175 +                    Trace.TraceInformation("Closing client: " + sessionId);
   8.176 +                    iClient.Close();
   8.177 +                    Trace.TraceInformation("Closed client: " + sessionId);
   8.178 +                }
   8.179 +
   8.180 +                iClient = null;
   8.181 +            }
   8.182 +        }
   8.183 +
   8.184 +        /// <summary>
   8.185 +        /// 
   8.186 +        /// </summary>
   8.187 +        /// <param name="sender"></param>
   8.188 +        /// <param name="e"></param>
   8.189 +        private void FormClientMessage_FormClosing(object sender, FormClosingEventArgs e)
   8.190 +        {
   8.191 +            CloseConnectionThreadSafe();
   8.192 +        }
   8.193 +
   8.194 +
   8.195 +        /// <summary>
   8.196 +        /// 
   8.197 +        /// </summary>
   8.198 +        /// <param name="sender"></param>
   8.199 +        /// <param name="e"></param>
   8.200 +        private void iTimer_Tick(object sender, EventArgs e)
   8.201 +        {
   8.202 +            Close();
   8.203 +        }
   8.204 +
   8.205 +
   8.206 +        /// <summary>
   8.207 +        /// 
   8.208 +        /// </summary>
   8.209 +        /// <param name="sender"></param>
   8.210 +        /// <param name="e"></param>
   8.211 +        private void FormClientMessage_Shown(object sender, EventArgs e)
   8.212 +        {
   8.213 +            //Visible = false;
   8.214 +        }
   8.215 +
   8.216 +    }
   8.217 +
   8.218 +}
     9.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.2 +++ b/Clients/Message/FormClientMessage.resx	Thu Jul 28 19:32:40 2016 +0200
     9.3 @@ -0,0 +1,123 @@
     9.4 +<?xml version="1.0" encoding="utf-8"?>
     9.5 +<root>
     9.6 +  <!-- 
     9.7 +    Microsoft ResX Schema 
     9.8 +    
     9.9 +    Version 2.0
    9.10 +    
    9.11 +    The primary goals of this format is to allow a simple XML format 
    9.12 +    that is mostly human readable. The generation and parsing of the 
    9.13 +    various data types are done through the TypeConverter classes 
    9.14 +    associated with the data types.
    9.15 +    
    9.16 +    Example:
    9.17 +    
    9.18 +    ... ado.net/XML headers & schema ...
    9.19 +    <resheader name="resmimetype">text/microsoft-resx</resheader>
    9.20 +    <resheader name="version">2.0</resheader>
    9.21 +    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
    9.22 +    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
    9.23 +    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
    9.24 +    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
    9.25 +    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
    9.26 +        <value>[base64 mime encoded serialized .NET Framework object]</value>
    9.27 +    </data>
    9.28 +    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
    9.29 +        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
    9.30 +        <comment>This is a comment</comment>
    9.31 +    </data>
    9.32 +                
    9.33 +    There are any number of "resheader" rows that contain simple 
    9.34 +    name/value pairs.
    9.35 +    
    9.36 +    Each data row contains a name, and value. The row also contains a 
    9.37 +    type or mimetype. Type corresponds to a .NET class that support 
    9.38 +    text/value conversion through the TypeConverter architecture. 
    9.39 +    Classes that don't support this are serialized and stored with the 
    9.40 +    mimetype set.
    9.41 +    
    9.42 +    The mimetype is used for serialized objects, and tells the 
    9.43 +    ResXResourceReader how to depersist the object. This is currently not 
    9.44 +    extensible. For a given mimetype the value must be set accordingly:
    9.45 +    
    9.46 +    Note - application/x-microsoft.net.object.binary.base64 is the format 
    9.47 +    that the ResXResourceWriter will generate, however the reader can 
    9.48 +    read any of the formats listed below.
    9.49 +    
    9.50 +    mimetype: application/x-microsoft.net.object.binary.base64
    9.51 +    value   : The object must be serialized with 
    9.52 +            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
    9.53 +            : and then encoded with base64 encoding.
    9.54 +    
    9.55 +    mimetype: application/x-microsoft.net.object.soap.base64
    9.56 +    value   : The object must be serialized with 
    9.57 +            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
    9.58 +            : and then encoded with base64 encoding.
    9.59 +
    9.60 +    mimetype: application/x-microsoft.net.object.bytearray.base64
    9.61 +    value   : The object must be serialized into a byte array 
    9.62 +            : using a System.ComponentModel.TypeConverter
    9.63 +            : and then encoded with base64 encoding.
    9.64 +    -->
    9.65 +  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
    9.66 +    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
    9.67 +    <xsd:element name="root" msdata:IsDataSet="true">
    9.68 +      <xsd:complexType>
    9.69 +        <xsd:choice maxOccurs="unbounded">
    9.70 +          <xsd:element name="metadata">
    9.71 +            <xsd:complexType>
    9.72 +              <xsd:sequence>
    9.73 +                <xsd:element name="value" type="xsd:string" minOccurs="0" />
    9.74 +              </xsd:sequence>
    9.75 +              <xsd:attribute name="name" use="required" type="xsd:string" />
    9.76 +              <xsd:attribute name="type" type="xsd:string" />
    9.77 +              <xsd:attribute name="mimetype" type="xsd:string" />
    9.78 +              <xsd:attribute ref="xml:space" />
    9.79 +            </xsd:complexType>
    9.80 +          </xsd:element>
    9.81 +          <xsd:element name="assembly">
    9.82 +            <xsd:complexType>
    9.83 +              <xsd:attribute name="alias" type="xsd:string" />
    9.84 +              <xsd:attribute name="name" type="xsd:string" />
    9.85 +            </xsd:complexType>
    9.86 +          </xsd:element>
    9.87 +          <xsd:element name="data">
    9.88 +            <xsd:complexType>
    9.89 +              <xsd:sequence>
    9.90 +                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
    9.91 +                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
    9.92 +              </xsd:sequence>
    9.93 +              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
    9.94 +              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
    9.95 +              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
    9.96 +              <xsd:attribute ref="xml:space" />
    9.97 +            </xsd:complexType>
    9.98 +          </xsd:element>
    9.99 +          <xsd:element name="resheader">
   9.100 +            <xsd:complexType>
   9.101 +              <xsd:sequence>
   9.102 +                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
   9.103 +              </xsd:sequence>
   9.104 +              <xsd:attribute name="name" type="xsd:string" use="required" />
   9.105 +            </xsd:complexType>
   9.106 +          </xsd:element>
   9.107 +        </xsd:choice>
   9.108 +      </xsd:complexType>
   9.109 +    </xsd:element>
   9.110 +  </xsd:schema>
   9.111 +  <resheader name="resmimetype">
   9.112 +    <value>text/microsoft-resx</value>
   9.113 +  </resheader>
   9.114 +  <resheader name="version">
   9.115 +    <value>2.0</value>
   9.116 +  </resheader>
   9.117 +  <resheader name="reader">
   9.118 +    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   9.119 +  </resheader>
   9.120 +  <resheader name="writer">
   9.121 +    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   9.122 +  </resheader>
   9.123 +  <metadata name="iTimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
   9.124 +    <value>17, 17</value>
   9.125 +  </metadata>
   9.126 +</root>
   9.127 \ No newline at end of file
    10.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.2 +++ b/Clients/Message/Program.cs	Thu Jul 28 19:32:40 2016 +0200
    10.3 @@ -0,0 +1,77 @@
    10.4 +//
    10.5 +// Copyright (C) 2014-2016 Stéphane Lenclud.
    10.6 +//
    10.7 +// This file is part of SharpDisplayManager.
    10.8 +//
    10.9 +// SharpDisplayManager is free software: you can redistribute it and/or modify
   10.10 +// it under the terms of the GNU General Public License as published by
   10.11 +// the Free Software Foundation, either version 3 of the License, or
   10.12 +// (at your option) any later version.
   10.13 +//
   10.14 +// SharpDisplayManager is distributed in the hope that it will be useful,
   10.15 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
   10.16 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   10.17 +// GNU General Public License for more details.
   10.18 +//
   10.19 +// You should have received a copy of the GNU General Public License
   10.20 +// along with SharpDisplayManager.  If not, see <http://www.gnu.org/licenses/>.
   10.21 +//
   10.22 +
   10.23 +using System;
   10.24 +using System.Collections.Generic;
   10.25 +using System.Linq;
   10.26 +using System.Threading.Tasks;
   10.27 +using System.Windows.Forms;
   10.28 +using System.Drawing;
   10.29 +
   10.30 +namespace SharpDisplayClientMessage
   10.31 +{
   10.32 +    static public class Program
   10.33 +    {
   10.34 +        /// <summary>
   10.35 +        /// The main entry point for the application.
   10.36 +        /// </summary>
   10.37 +        [STAThread]
   10.38 +        public static void Main()
   10.39 +        {
   10.40 +            //Set high priority to our process to avoid lags when rendering to our screen
   10.41 +            //System.Diagnostics.Process.GetCurrentProcess().PriorityClass = System.Diagnostics.ProcessPriorityClass.AboveNormal;
   10.42 +
   10.43 +            Application.EnableVisualStyles();
   10.44 +            Application.SetCompatibleTextRenderingDefault(false);
   10.45 +            Application.Run(new FormClientMessage());
   10.46 +        }
   10.47 +
   10.48 +        [STAThread]
   10.49 +        public static void MainWithParams(object aParams)
   10.50 +        {
   10.51 +            //Set high priority to our process to avoid lags when rendering to our screen
   10.52 +            //System.Diagnostics.Process.GetCurrentProcess().PriorityClass = System.Diagnostics.ProcessPriorityClass.AboveNormal;
   10.53 +
   10.54 +            Application.EnableVisualStyles();
   10.55 +            Application.SetCompatibleTextRenderingDefault(false);
   10.56 +            FormClientMessage form = new FormClientMessage();
   10.57 +            form.Params = (StartParams)aParams;
   10.58 +            form.WindowState = FormWindowState.Minimized;
   10.59 +            form.ShowInTaskbar = false;
   10.60 +            Application.Run(form);
   10.61 +        }
   10.62 +
   10.63 +    }
   10.64 +
   10.65 +    public class StartParams
   10.66 +    {
   10.67 +        public StartParams(string aPrimaryText, string aSecondaryText ="", int aDurationInMs = 5000, uint aClientPriority = SharpLib.Display.Priorities.Foreground)
   10.68 +        {
   10.69 +            PrimaryText = aPrimaryText;
   10.70 +            SecondaryText = aSecondaryText;
   10.71 +            Priority = aClientPriority;
   10.72 +            DurationInMs = aDurationInMs;
   10.73 +        }
   10.74 +
   10.75 +        public string PrimaryText { get; set; }
   10.76 +        public string SecondaryText { get; set; }
   10.77 +        public uint Priority { get; set; }
   10.78 +        public int DurationInMs { get; set; }
   10.79 +    }
   10.80 +}
    11.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    11.2 +++ b/Clients/Message/Properties/AssemblyInfo.cs	Thu Jul 28 19:32:40 2016 +0200
    11.3 @@ -0,0 +1,36 @@
    11.4 +using System.Reflection;
    11.5 +using System.Runtime.CompilerServices;
    11.6 +using System.Runtime.InteropServices;
    11.7 +
    11.8 +// General Information about an assembly is controlled through the following 
    11.9 +// set of attributes. Change these attribute values to modify the information
   11.10 +// associated with an assembly.
   11.11 +[assembly: AssemblyTitle("SharpDisplayClientMessage")]
   11.12 +[assembly: AssemblyDescription("")]
   11.13 +[assembly: AssemblyConfiguration("")]
   11.14 +[assembly: AssemblyCompany("")]
   11.15 +[assembly: AssemblyProduct("SharpDisplayClientMessage")]
   11.16 +[assembly: AssemblyCopyright("Copyright ©  2016")]
   11.17 +[assembly: AssemblyTrademark("")]
   11.18 +[assembly: AssemblyCulture("")]
   11.19 +
   11.20 +// Setting ComVisible to false makes the types in this assembly not visible 
   11.21 +// to COM components.  If you need to access a type in this assembly from 
   11.22 +// COM, set the ComVisible attribute to true on that type.
   11.23 +[assembly: ComVisible(false)]
   11.24 +
   11.25 +// The following GUID is for the ID of the typelib if this project is exposed to COM
   11.26 +[assembly: Guid("d9aad299-e97f-47e0-8e92-110f49f2b89c")]
   11.27 +
   11.28 +// Version information for an assembly consists of the following four values:
   11.29 +//
   11.30 +//      Major Version
   11.31 +//      Minor Version 
   11.32 +//      Build Number
   11.33 +//      Revision
   11.34 +//
   11.35 +// You can specify all the values or you can default the Build and Revision Numbers 
   11.36 +// by using the '*' as shown below:
   11.37 +// [assembly: AssemblyVersion("1.0.*")]
   11.38 +[assembly: AssemblyVersion("1.0.0.0")]
   11.39 +[assembly: AssemblyFileVersion("1.0.0.0")]
    12.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    12.2 +++ b/Clients/Message/Properties/Resources.Designer.cs	Thu Jul 28 19:32:40 2016 +0200
    12.3 @@ -0,0 +1,71 @@
    12.4 +//------------------------------------------------------------------------------
    12.5 +// <auto-generated>
    12.6 +//     This code was generated by a tool.
    12.7 +//     Runtime Version:4.0.30319.42000
    12.8 +//
    12.9 +//     Changes to this file may cause incorrect behavior and will be lost if
   12.10 +//     the code is regenerated.
   12.11 +// </auto-generated>
   12.12 +//------------------------------------------------------------------------------
   12.13 +
   12.14 +namespace SharpDisplayClientMessage.Properties
   12.15 +{
   12.16 +
   12.17 +
   12.18 +    /// <summary>
   12.19 +    ///   A strongly-typed resource class, for looking up localized strings, etc.
   12.20 +    /// </summary>
   12.21 +    // This class was auto-generated by the StronglyTypedResourceBuilder
   12.22 +    // class via a tool like ResGen or Visual Studio.
   12.23 +    // To add or remove a member, edit your .ResX file then rerun ResGen
   12.24 +    // with the /str option, or rebuild your VS project.
   12.25 +    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
   12.26 +    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
   12.27 +    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
   12.28 +    internal class Resources
   12.29 +    {
   12.30 +
   12.31 +        private static global::System.Resources.ResourceManager resourceMan;
   12.32 +
   12.33 +        private static global::System.Globalization.CultureInfo resourceCulture;
   12.34 +
   12.35 +        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
   12.36 +        internal Resources()
   12.37 +        {
   12.38 +        }
   12.39 +
   12.40 +        /// <summary>
   12.41 +        ///   Returns the cached ResourceManager instance used by this class.
   12.42 +        /// </summary>
   12.43 +        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
   12.44 +        internal static global::System.Resources.ResourceManager ResourceManager
   12.45 +        {
   12.46 +            get
   12.47 +            {
   12.48 +                if ((resourceMan == null))
   12.49 +                {
   12.50 +                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SharpDisplayClientMessage.Properties.Resources", typeof(Resources).Assembly);
   12.51 +                    resourceMan = temp;
   12.52 +                }
   12.53 +                return resourceMan;
   12.54 +            }
   12.55 +        }
   12.56 +
   12.57 +        /// <summary>
   12.58 +        ///   Overrides the current thread's CurrentUICulture property for all
   12.59 +        ///   resource lookups using this strongly typed resource class.
   12.60 +        /// </summary>
   12.61 +        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
   12.62 +        internal static global::System.Globalization.CultureInfo Culture
   12.63 +        {
   12.64 +            get
   12.65 +            {
   12.66 +                return resourceCulture;
   12.67 +            }
   12.68 +            set
   12.69 +            {
   12.70 +                resourceCulture = value;
   12.71 +            }
   12.72 +        }
   12.73 +    }
   12.74 +}
    13.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    13.2 +++ b/Clients/Message/Properties/Resources.resx	Thu Jul 28 19:32:40 2016 +0200
    13.3 @@ -0,0 +1,117 @@
    13.4 +<?xml version="1.0" encoding="utf-8"?>
    13.5 +<root>
    13.6 +  <!-- 
    13.7 +    Microsoft ResX Schema 
    13.8 +    
    13.9 +    Version 2.0
   13.10 +    
   13.11 +    The primary goals of this format is to allow a simple XML format 
   13.12 +    that is mostly human readable. The generation and parsing of the 
   13.13 +    various data types are done through the TypeConverter classes 
   13.14 +    associated with the data types.
   13.15 +    
   13.16 +    Example:
   13.17 +    
   13.18 +    ... ado.net/XML headers & schema ...
   13.19 +    <resheader name="resmimetype">text/microsoft-resx</resheader>
   13.20 +    <resheader name="version">2.0</resheader>
   13.21 +    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
   13.22 +    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
   13.23 +    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
   13.24 +    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
   13.25 +    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
   13.26 +        <value>[base64 mime encoded serialized .NET Framework object]</value>
   13.27 +    </data>
   13.28 +    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
   13.29 +        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
   13.30 +        <comment>This is a comment</comment>
   13.31 +    </data>
   13.32 +                
   13.33 +    There are any number of "resheader" rows that contain simple 
   13.34 +    name/value pairs.
   13.35 +    
   13.36 +    Each data row contains a name, and value. The row also contains a 
   13.37 +    type or mimetype. Type corresponds to a .NET class that support 
   13.38 +    text/value conversion through the TypeConverter architecture. 
   13.39 +    Classes that don't support this are serialized and stored with the 
   13.40 +    mimetype set.
   13.41 +    
   13.42 +    The mimetype is used for serialized objects, and tells the 
   13.43 +    ResXResourceReader how to depersist the object. This is currently not 
   13.44 +    extensible. For a given mimetype the value must be set accordingly:
   13.45 +    
   13.46 +    Note - application/x-microsoft.net.object.binary.base64 is the format 
   13.47 +    that the ResXResourceWriter will generate, however the reader can 
   13.48 +    read any of the formats listed below.
   13.49 +    
   13.50 +    mimetype: application/x-microsoft.net.object.binary.base64
   13.51 +    value   : The object must be serialized with 
   13.52 +            : System.Serialization.Formatters.Binary.BinaryFormatter
   13.53 +            : and then encoded with base64 encoding.
   13.54 +    
   13.55 +    mimetype: application/x-microsoft.net.object.soap.base64
   13.56 +    value   : The object must be serialized with 
   13.57 +            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
   13.58 +            : and then encoded with base64 encoding.
   13.59 +
   13.60 +    mimetype: application/x-microsoft.net.object.bytearray.base64
   13.61 +    value   : The object must be serialized into a byte array 
   13.62 +            : using a System.ComponentModel.TypeConverter
   13.63 +            : and then encoded with base64 encoding.
   13.64 +    -->
   13.65 +  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
   13.66 +    <xsd:element name="root" msdata:IsDataSet="true">
   13.67 +      <xsd:complexType>
   13.68 +        <xsd:choice maxOccurs="unbounded">
   13.69 +          <xsd:element name="metadata">
   13.70 +            <xsd:complexType>
   13.71 +              <xsd:sequence>
   13.72 +                <xsd:element name="value" type="xsd:string" minOccurs="0" />
   13.73 +              </xsd:sequence>
   13.74 +              <xsd:attribute name="name" type="xsd:string" />
   13.75 +              <xsd:attribute name="type" type="xsd:string" />
   13.76 +              <xsd:attribute name="mimetype" type="xsd:string" />
   13.77 +            </xsd:complexType>
   13.78 +          </xsd:element>
   13.79 +          <xsd:element name="assembly">
   13.80 +            <xsd:complexType>
   13.81 +              <xsd:attribute name="alias" type="xsd:string" />
   13.82 +              <xsd:attribute name="name" type="xsd:string" />
   13.83 +            </xsd:complexType>
   13.84 +          </xsd:element>
   13.85 +          <xsd:element name="data">
   13.86 +            <xsd:complexType>
   13.87 +              <xsd:sequence>
   13.88 +                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
   13.89 +                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
   13.90 +              </xsd:sequence>
   13.91 +              <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
   13.92 +              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
   13.93 +              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
   13.94 +            </xsd:complexType>
   13.95 +          </xsd:element>
   13.96 +          <xsd:element name="resheader">
   13.97 +            <xsd:complexType>
   13.98 +              <xsd:sequence>
   13.99 +                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
  13.100 +              </xsd:sequence>
  13.101 +              <xsd:attribute name="name" type="xsd:string" use="required" />
  13.102 +            </xsd:complexType>
  13.103 +          </xsd:element>
  13.104 +        </xsd:choice>
  13.105 +      </xsd:complexType>
  13.106 +    </xsd:element>
  13.107 +  </xsd:schema>
  13.108 +  <resheader name="resmimetype">
  13.109 +    <value>text/microsoft-resx</value>
  13.110 +  </resheader>
  13.111 +  <resheader name="version">
  13.112 +    <value>2.0</value>
  13.113 +  </resheader>
  13.114 +  <resheader name="reader">
  13.115 +    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  13.116 +  </resheader>
  13.117 +  <resheader name="writer">
  13.118 +    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  13.119 +  </resheader>
  13.120 +</root>
  13.121 \ No newline at end of file
    14.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    14.2 +++ b/Clients/Message/Properties/Settings.Designer.cs	Thu Jul 28 19:32:40 2016 +0200
    14.3 @@ -0,0 +1,30 @@
    14.4 +//------------------------------------------------------------------------------
    14.5 +// <auto-generated>
    14.6 +//     This code was generated by a tool.
    14.7 +//     Runtime Version:4.0.30319.42000
    14.8 +//
    14.9 +//     Changes to this file may cause incorrect behavior and will be lost if
   14.10 +//     the code is regenerated.
   14.11 +// </auto-generated>
   14.12 +//------------------------------------------------------------------------------
   14.13 +
   14.14 +namespace SharpDisplayClientMessage.Properties
   14.15 +{
   14.16 +
   14.17 +
   14.18 +    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
   14.19 +    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
   14.20 +    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
   14.21 +    {
   14.22 +
   14.23 +        private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
   14.24 +
   14.25 +        public static Settings Default
   14.26 +        {
   14.27 +            get
   14.28 +            {
   14.29 +                return defaultInstance;
   14.30 +            }
   14.31 +        }
   14.32 +    }
   14.33 +}
    15.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    15.2 +++ b/Clients/Message/Properties/Settings.settings	Thu Jul 28 19:32:40 2016 +0200
    15.3 @@ -0,0 +1,7 @@
    15.4 +<?xml version='1.0' encoding='utf-8'?>
    15.5 +<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
    15.6 +  <Profiles>
    15.7 +    <Profile Name="(Default)" />
    15.8 +  </Profiles>
    15.9 +  <Settings />
   15.10 +</SettingsFile>
    16.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    16.2 +++ b/Clients/Message/SharpDisplayClientMessage.csproj	Thu Jul 28 19:32:40 2016 +0200
    16.3 @@ -0,0 +1,95 @@
    16.4 +<?xml version="1.0" encoding="utf-8"?>
    16.5 +<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    16.6 +  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
    16.7 +  <PropertyGroup>
    16.8 +    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    16.9 +    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
   16.10 +    <ProjectGuid>{D9AAD299-E97F-47E0-8E92-110F49F2B89C}</ProjectGuid>
   16.11 +    <OutputType>WinExe</OutputType>
   16.12 +    <AppDesignerFolder>Properties</AppDesignerFolder>
   16.13 +    <RootNamespace>SharpDisplayClientMessage</RootNamespace>
   16.14 +    <AssemblyName>SharpDisplayClientMessage</AssemblyName>
   16.15 +    <TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
   16.16 +    <FileAlignment>512</FileAlignment>
   16.17 +    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
   16.18 +  </PropertyGroup>
   16.19 +  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
   16.20 +    <PlatformTarget>AnyCPU</PlatformTarget>
   16.21 +    <DebugSymbols>true</DebugSymbols>
   16.22 +    <DebugType>full</DebugType>
   16.23 +    <Optimize>false</Optimize>
   16.24 +    <OutputPath>bin\Debug\</OutputPath>
   16.25 +    <DefineConstants>DEBUG;TRACE</DefineConstants>
   16.26 +    <ErrorReport>prompt</ErrorReport>
   16.27 +    <WarningLevel>4</WarningLevel>
   16.28 +  </PropertyGroup>
   16.29 +  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
   16.30 +    <PlatformTarget>AnyCPU</PlatformTarget>
   16.31 +    <DebugType>pdbonly</DebugType>
   16.32 +    <Optimize>true</Optimize>
   16.33 +    <OutputPath>bin\Release\</OutputPath>
   16.34 +    <DefineConstants>TRACE</DefineConstants>
   16.35 +    <ErrorReport>prompt</ErrorReport>
   16.36 +    <WarningLevel>4</WarningLevel>
   16.37 +  </PropertyGroup>
   16.38 +  <ItemGroup>
   16.39 +    <Reference Include="SharpLibDisplay, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
   16.40 +      <HintPath>..\..\packages\SharpLibDisplay.0.2.5\lib\net40\SharpLibDisplay.dll</HintPath>
   16.41 +      <Private>True</Private>
   16.42 +    </Reference>
   16.43 +    <Reference Include="System" />
   16.44 +    <Reference Include="System.Core" />
   16.45 +    <Reference Include="System.Xml.Linq" />
   16.46 +    <Reference Include="System.Data.DataSetExtensions" />
   16.47 +    <Reference Include="Microsoft.CSharp" />
   16.48 +    <Reference Include="System.Data" />
   16.49 +    <Reference Include="System.Deployment" />
   16.50 +    <Reference Include="System.Drawing" />
   16.51 +    <Reference Include="System.Net.Http" />
   16.52 +    <Reference Include="System.Windows.Forms" />
   16.53 +    <Reference Include="System.Xml" />
   16.54 +  </ItemGroup>
   16.55 +  <ItemGroup>
   16.56 +    <Compile Include="FormClientMessage.cs">
   16.57 +      <SubType>Form</SubType>
   16.58 +    </Compile>
   16.59 +    <Compile Include="FormClientMessage.Designer.cs">
   16.60 +      <DependentUpon>FormClientMessage.cs</DependentUpon>
   16.61 +    </Compile>
   16.62 +    <Compile Include="Program.cs" />
   16.63 +    <Compile Include="Properties\AssemblyInfo.cs" />
   16.64 +    <EmbeddedResource Include="FormClientMessage.resx">
   16.65 +      <DependentUpon>FormClientMessage.cs</DependentUpon>
   16.66 +    </EmbeddedResource>
   16.67 +    <EmbeddedResource Include="Properties\Resources.resx">
   16.68 +      <Generator>ResXFileCodeGenerator</Generator>
   16.69 +      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
   16.70 +      <SubType>Designer</SubType>
   16.71 +    </EmbeddedResource>
   16.72 +    <Compile Include="Properties\Resources.Designer.cs">
   16.73 +      <AutoGen>True</AutoGen>
   16.74 +      <DependentUpon>Resources.resx</DependentUpon>
   16.75 +    </Compile>
   16.76 +    <None Include="packages.config" />
   16.77 +    <None Include="Properties\Settings.settings">
   16.78 +      <Generator>SettingsSingleFileGenerator</Generator>
   16.79 +      <LastGenOutput>Settings.Designer.cs</LastGenOutput>
   16.80 +    </None>
   16.81 +    <Compile Include="Properties\Settings.Designer.cs">
   16.82 +      <AutoGen>True</AutoGen>
   16.83 +      <DependentUpon>Settings.settings</DependentUpon>
   16.84 +      <DesignTimeSharedInput>True</DesignTimeSharedInput>
   16.85 +    </Compile>
   16.86 +  </ItemGroup>
   16.87 +  <ItemGroup>
   16.88 +    <None Include="App.config" />
   16.89 +  </ItemGroup>
   16.90 +  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   16.91 +  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
   16.92 +       Other similar extension points exist, see Microsoft.Common.targets.
   16.93 +  <Target Name="BeforeBuild">
   16.94 +  </Target>
   16.95 +  <Target Name="AfterBuild">
   16.96 +  </Target>
   16.97 +  -->
   16.98 +</Project>
   16.99 \ No newline at end of file
    17.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    17.2 +++ b/Clients/Message/packages.config	Thu Jul 28 19:32:40 2016 +0200
    17.3 @@ -0,0 +1,4 @@
    17.4 +<?xml version="1.0" encoding="utf-8"?>
    17.5 +<packages>
    17.6 +  <package id="SharpLibDisplay" version="0.2.5" targetFramework="net452" />
    17.7 +</packages>
    17.8 \ No newline at end of file
    18.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    18.2 +++ b/Server/Actions/ActionDisplayMessage.cs	Thu Jul 28 19:32:40 2016 +0200
    18.3 @@ -0,0 +1,87 @@
    18.4 +using SharpLib.Ear;
    18.5 +using System;
    18.6 +using System.Collections.Generic;
    18.7 +using System.Drawing;
    18.8 +using System.Linq;
    18.9 +using System.Runtime.Serialization;
   18.10 +using System.Text;
   18.11 +using System.Threading;
   18.12 +using System.Threading.Tasks;
   18.13 +
   18.14 +namespace SharpDisplayManager
   18.15 +{
   18.16 +
   18.17 +
   18.18 +    [DataContract]
   18.19 +    [AttributeAction(Id = "Display.Message", Name = "Display Message", Description = "Shows a message on your internal display.")]
   18.20 +    class ActionDisplayMessage : SharpLib.Ear.Action
   18.21 +    {
   18.22 +        [DataMember]
   18.23 +        [AttributeActionProperty(
   18.24 +            Id = "Display.Message.Duration",
   18.25 +            Name = "Duration (ms)",
   18.26 +            Description = "Specifies the number of milliseconds this message should be displayed.",
   18.27 +            Minimum = "1", //Otherwise time throws an exception
   18.28 +            Maximum = "30000",
   18.29 +            Increment = "1000"
   18.30 +            )]
   18.31 +        public int DurationInMilliseconds { get; set; } = 5000;
   18.32 +
   18.33 +
   18.34 +        [DataMember]
   18.35 +        [AttributeActionProperty(
   18.36 +            Id = "Display.Message.PrimaryText",
   18.37 +            Name = "Primary Text",
   18.38 +            Description = "The primary text of this message."
   18.39 +            )]
   18.40 +        public string PrimaryText { get; set; } = "Your message";
   18.41 +
   18.42 +        [DataMember]
   18.43 +        [AttributeActionProperty(
   18.44 +            Id = "Display.Message.SecondaryText",
   18.45 +            Name = "Secondary Text",
   18.46 +            Description = "The secondary text of this message."
   18.47 +            )]
   18.48 +        public string SecondaryText { get; set; } = "";
   18.49 +
   18.50 +
   18.51 +        /// <summary>
   18.52 +        /// 
   18.53 +        /// </summary>
   18.54 +        /// <returns></returns>
   18.55 +        public override string Brief()
   18.56 +        {
   18.57 +            string brief = Name + ": " + PrimaryText;
   18.58 +            if (!string.IsNullOrEmpty(SecondaryText))
   18.59 +            {
   18.60 +                brief += " - " + SecondaryText;
   18.61 +            }
   18.62 +
   18.63 +            brief += " ( " + DurationInMilliseconds.ToString() + " ms )";
   18.64 +
   18.65 +            return brief;
   18.66 +        }
   18.67 +
   18.68 +        /// <summary>
   18.69 +        /// 
   18.70 +        /// </summary>
   18.71 +        public override void DoExecute()
   18.72 +        {
   18.73 +            StartMessageClient();
   18.74 +        }
   18.75 +
   18.76 +        /// <summary>
   18.77 +        /// Just launch our idle client.
   18.78 +        /// </summary>
   18.79 +        private void StartMessageClient()
   18.80 +        {
   18.81 +            Thread clientThread = new Thread(SharpDisplayClientMessage.Program.MainWithParams);
   18.82 +            SharpDisplayClientMessage.StartParams myParams =
   18.83 +                new SharpDisplayClientMessage.StartParams(PrimaryText, SecondaryText, DurationInMilliseconds);
   18.84 +            clientThread.Start(myParams);
   18.85 +        }
   18.86 +
   18.87 +
   18.88 +    }
   18.89 +
   18.90 +}
    19.1 --- a/Server/FormEditAction.cs	Wed Jul 27 17:09:10 2016 +0200
    19.2 +++ b/Server/FormEditAction.cs	Thu Jul 28 19:32:40 2016 +0200
    19.3 @@ -112,6 +112,12 @@
    19.4                  CheckBox ctrl = (CheckBox)aControl;
    19.5                  aInfo.SetValue(aAction, ctrl.Checked);
    19.6              }
    19.7 +            else if (aInfo.PropertyType == typeof(string))
    19.8 +            {
    19.9 +                TextBox ctrl = (TextBox)aControl;
   19.10 +                aInfo.SetValue(aAction, ctrl.Text);
   19.11 +            }
   19.12 +            //TODO: add support for other types here
   19.13          }
   19.14  
   19.15          /// <summary>
   19.16 @@ -173,6 +179,14 @@
   19.17                  ctrl.Checked = (bool)aInfo.GetValue(aAction);                
   19.18                  return ctrl;
   19.19              }
   19.20 +            else if (aInfo.PropertyType == typeof(string))
   19.21 +            {
   19.22 +                TextBox ctrl = new TextBox();
   19.23 +                ctrl.AutoSize = true;
   19.24 +                ctrl.Text = (string)aInfo.GetValue(aAction);
   19.25 +                return ctrl;
   19.26 +            }
   19.27 +            //TODO: add support for other control type here
   19.28  
   19.29              return null;
   19.30          }
   19.31 @@ -195,6 +209,11 @@
   19.32              {
   19.33                  return true;
   19.34              }
   19.35 +            else if (aInfo.PropertyType == typeof(string))
   19.36 +            {
   19.37 +                return true;
   19.38 +            }
   19.39 +            //TODO: add support for other type here
   19.40  
   19.41              return false;
   19.42          }
    20.1 --- a/Server/MainForm.cs	Wed Jul 27 17:09:10 2016 +0200
    20.2 +++ b/Server/MainForm.cs	Thu Jul 28 19:32:40 2016 +0200
    20.3 @@ -1575,9 +1575,9 @@
    20.4          /// </summary>
    20.5          private void StartIdleClient(string aTopText = "", string aBottomText = "")
    20.6          {
    20.7 -            Thread clientThread = new Thread(SharpDisplayIdleClient.Program.MainWithParams);
    20.8 -            SharpDisplayIdleClient.StartParams myParams =
    20.9 -                new SharpDisplayIdleClient.StartParams(new Point(this.Right, this.Top), aTopText, aBottomText);
   20.10 +            Thread clientThread = new Thread(SharpDisplayClientIdle.Program.MainWithParams);
   20.11 +            SharpDisplayClientIdle.StartParams myParams =
   20.12 +                new SharpDisplayClientIdle.StartParams(new Point(this.Right, this.Top), aTopText, aBottomText);
   20.13              clientThread.Start(myParams);
   20.14              BringToFront();
   20.15          }
    21.1 --- a/Server/SharpDisplayManager.csproj	Wed Jul 27 17:09:10 2016 +0200
    21.2 +++ b/Server/SharpDisplayManager.csproj	Thu Jul 28 19:32:40 2016 +0200
    21.3 @@ -164,6 +164,7 @@
    21.4      <Compile Include="Actions\ActionCecUserControlPressed.cs" />
    21.5      <Compile Include="Actions\ActionCecDeviceStandby.cs" />
    21.6      <Compile Include="Actions\ActionCecUserControlReleased.cs" />
    21.7 +    <Compile Include="Actions\ActionDisplayMessage.cs" />
    21.8      <Compile Include="CbtHook.cs" />
    21.9      <Compile Include="CecClient.cs" />
   21.10      <Compile Include="ConsumerElectronicControl.cs" />
   21.11 @@ -255,6 +256,10 @@
   21.12        <Project>{a76579e5-aa8d-45a3-99e1-239a5c030a78}</Project>
   21.13        <Name>SharpDisplayClientIdle</Name>
   21.14      </ProjectReference>
   21.15 +    <ProjectReference Include="..\Clients\Message\SharpDisplayClientMessage.csproj">
   21.16 +      <Project>{d9aad299-e97f-47e0-8e92-110f49f2b89c}</Project>
   21.17 +      <Name>SharpDisplayClientMessage</Name>
   21.18 +    </ProjectReference>
   21.19      <ProjectReference Include="..\Clients\Test\SharpDisplayClientTest.csproj">
   21.20        <Project>{7ee64074-8cdb-4448-b40c-81b75d6b31cd}</Project>
   21.21        <Name>SharpDisplayClientTest</Name>
    22.1 --- a/SharpDisplayManager.sln	Wed Jul 27 17:09:10 2016 +0200
    22.2 +++ b/SharpDisplayManager.sln	Thu Jul 28 19:32:40 2016 +0200
    22.3 @@ -1,7 +1,7 @@
    22.4  
    22.5  Microsoft Visual Studio Solution File, Format Version 12.00
    22.6  # Visual Studio 14
    22.7 -VisualStudioVersion = 14.0.24720.0
    22.8 +VisualStudioVersion = 14.0.25123.0
    22.9  MinimumVisualStudioVersion = 10.0.40219.1
   22.10  Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpDisplayManager", "Server\SharpDisplayManager.csproj", "{1DA8C1B3-18C5-4E74-BE4E-0B0E15FBAF49}"
   22.11  EndProject
   22.12 @@ -17,6 +17,8 @@
   22.13  EndProject
   22.14  Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpLibEar", "SharpLibEar\SharpLibEar.csproj", "{84A9ED37-E6EA-4CBD-B995-B713F46EAAB0}"
   22.15  EndProject
   22.16 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpDisplayClientMessage", "Clients\Message\SharpDisplayClientMessage.csproj", "{D9AAD299-E97F-47E0-8E92-110F49F2B89C}"
   22.17 +EndProject
   22.18  Global
   22.19  	GlobalSection(SolutionConfigurationPlatforms) = preSolution
   22.20  		Debug|Any CPU = Debug|Any CPU
   22.21 @@ -103,6 +105,18 @@
   22.22  		{84A9ED37-E6EA-4CBD-B995-B713F46EAAB0}.Release|x64.Build.0 = Release|Any CPU
   22.23  		{84A9ED37-E6EA-4CBD-B995-B713F46EAAB0}.Release|x86.ActiveCfg = Release|Any CPU
   22.24  		{84A9ED37-E6EA-4CBD-B995-B713F46EAAB0}.Release|x86.Build.0 = Release|Any CPU
   22.25 +		{D9AAD299-E97F-47E0-8E92-110F49F2B89C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
   22.26 +		{D9AAD299-E97F-47E0-8E92-110F49F2B89C}.Debug|Any CPU.Build.0 = Debug|Any CPU
   22.27 +		{D9AAD299-E97F-47E0-8E92-110F49F2B89C}.Debug|x64.ActiveCfg = Debug|Any CPU
   22.28 +		{D9AAD299-E97F-47E0-8E92-110F49F2B89C}.Debug|x64.Build.0 = Debug|Any CPU
   22.29 +		{D9AAD299-E97F-47E0-8E92-110F49F2B89C}.Debug|x86.ActiveCfg = Debug|Any CPU
   22.30 +		{D9AAD299-E97F-47E0-8E92-110F49F2B89C}.Debug|x86.Build.0 = Debug|Any CPU
   22.31 +		{D9AAD299-E97F-47E0-8E92-110F49F2B89C}.Release|Any CPU.ActiveCfg = Release|Any CPU
   22.32 +		{D9AAD299-E97F-47E0-8E92-110F49F2B89C}.Release|Any CPU.Build.0 = Release|Any CPU
   22.33 +		{D9AAD299-E97F-47E0-8E92-110F49F2B89C}.Release|x64.ActiveCfg = Release|Any CPU
   22.34 +		{D9AAD299-E97F-47E0-8E92-110F49F2B89C}.Release|x64.Build.0 = Release|Any CPU
   22.35 +		{D9AAD299-E97F-47E0-8E92-110F49F2B89C}.Release|x86.ActiveCfg = Release|Any CPU
   22.36 +		{D9AAD299-E97F-47E0-8E92-110F49F2B89C}.Release|x86.Build.0 = Release|Any CPU
   22.37  	EndGlobalSection
   22.38  	GlobalSection(SolutionProperties) = preSolution
   22.39  		HideSolutionNode = FALSE