# HG changeset patch # User StephaneLenclud # Date 1454500968 -3600 # Node ID 60977f2b3ca72585a418f9451a3fef58efef38f9 # Parent bedae992f4ee4916cf2d717b9db03d2171d4f75b Moving our test client around. diff -r bedae992f4ee -r 60977f2b3ca7 Client/App.config --- a/Client/App.config Tue Feb 02 19:50:33 2016 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ - - - - - - diff -r bedae992f4ee -r 60977f2b3ca7 Client/MainForm.Designer.cs --- a/Client/MainForm.Designer.cs Tue Feb 02 19:50:33 2016 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,254 +0,0 @@ -namespace SharpDisplayClient -{ - partial class MainForm - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.buttonSetText = new System.Windows.Forms.Button(); - this.textBoxTop = new System.Windows.Forms.TextBox(); - this.textBoxBottom = new System.Windows.Forms.TextBox(); - this.buttonAlignRight = new System.Windows.Forms.Button(); - this.buttonAlignCenter = new System.Windows.Forms.Button(); - this.buttonAlignLeft = new System.Windows.Forms.Button(); - this.buttonSetTopText = new System.Windows.Forms.Button(); - this.buttonLayoutUpdate = new System.Windows.Forms.Button(); - this.buttonSetBitmap = new System.Windows.Forms.Button(); - this.buttonBitmapLayout = new System.Windows.Forms.Button(); - this.buttonIndicatorsLayout = new System.Windows.Forms.Button(); - this.buttonUpdateTexts = new System.Windows.Forms.Button(); - this.buttonLayoutOneTextField = new System.Windows.Forms.Button(); - this.numericUpDownPriority = new System.Windows.Forms.NumericUpDown(); - this.labelPriority = new System.Windows.Forms.Label(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDownPriority)).BeginInit(); - this.SuspendLayout(); - // - // buttonSetText - // - this.buttonSetText.Location = new System.Drawing.Point(13, 132); - this.buttonSetText.Name = "buttonSetText"; - this.buttonSetText.Size = new System.Drawing.Size(75, 23); - this.buttonSetText.TabIndex = 0; - this.buttonSetText.Text = "Set Text"; - this.buttonSetText.UseVisualStyleBackColor = true; - this.buttonSetText.Click += new System.EventHandler(this.buttonSetText_Click); - // - // textBoxTop - // - this.textBoxTop.Location = new System.Drawing.Point(12, 31); - this.textBoxTop.Name = "textBoxTop"; - this.textBoxTop.Size = new System.Drawing.Size(419, 20); - this.textBoxTop.TabIndex = 1; - // - // textBoxBottom - // - this.textBoxBottom.Location = new System.Drawing.Point(12, 57); - this.textBoxBottom.Name = "textBoxBottom"; - this.textBoxBottom.Size = new System.Drawing.Size(419, 20); - this.textBoxBottom.TabIndex = 2; - // - // buttonAlignRight - // - this.buttonAlignRight.Location = new System.Drawing.Point(176, 160); - this.buttonAlignRight.Name = "buttonAlignRight"; - this.buttonAlignRight.Size = new System.Drawing.Size(75, 23); - this.buttonAlignRight.TabIndex = 23; - this.buttonAlignRight.Text = "Align Right"; - this.buttonAlignRight.UseVisualStyleBackColor = true; - this.buttonAlignRight.Click += new System.EventHandler(this.buttonAlignRight_Click); - // - // buttonAlignCenter - // - this.buttonAlignCenter.Location = new System.Drawing.Point(94, 161); - this.buttonAlignCenter.Name = "buttonAlignCenter"; - this.buttonAlignCenter.Size = new System.Drawing.Size(75, 23); - this.buttonAlignCenter.TabIndex = 22; - this.buttonAlignCenter.Text = "Align Center"; - this.buttonAlignCenter.UseVisualStyleBackColor = true; - this.buttonAlignCenter.Click += new System.EventHandler(this.buttonAlignCenter_Click); - // - // buttonAlignLeft - // - this.buttonAlignLeft.Location = new System.Drawing.Point(12, 161); - this.buttonAlignLeft.Name = "buttonAlignLeft"; - this.buttonAlignLeft.Size = new System.Drawing.Size(75, 23); - this.buttonAlignLeft.TabIndex = 21; - this.buttonAlignLeft.Text = "Align Left"; - this.buttonAlignLeft.UseVisualStyleBackColor = true; - this.buttonAlignLeft.Click += new System.EventHandler(this.buttonAlignLeft_Click); - // - // buttonSetTopText - // - this.buttonSetTopText.Location = new System.Drawing.Point(94, 132); - this.buttonSetTopText.Name = "buttonSetTopText"; - this.buttonSetTopText.Size = new System.Drawing.Size(75, 23); - this.buttonSetTopText.TabIndex = 24; - this.buttonSetTopText.Text = "Set Top Text"; - this.buttonSetTopText.UseVisualStyleBackColor = true; - this.buttonSetTopText.Click += new System.EventHandler(this.buttonSetTopText_Click); - // - // buttonLayoutUpdate - // - this.buttonLayoutUpdate.Location = new System.Drawing.Point(176, 131); - this.buttonLayoutUpdate.Name = "buttonLayoutUpdate"; - this.buttonLayoutUpdate.Size = new System.Drawing.Size(156, 23); - this.buttonLayoutUpdate.TabIndex = 25; - this.buttonLayoutUpdate.Text = "Layout 2x2 and Recording"; - this.buttonLayoutUpdate.UseVisualStyleBackColor = true; - this.buttonLayoutUpdate.Click += new System.EventHandler(this.buttonLayoutUpdate_Click); - // - // buttonSetBitmap - // - this.buttonSetBitmap.Location = new System.Drawing.Point(12, 190); - this.buttonSetBitmap.Name = "buttonSetBitmap"; - this.buttonSetBitmap.Size = new System.Drawing.Size(75, 23); - this.buttonSetBitmap.TabIndex = 26; - this.buttonSetBitmap.Text = "Set Bitmap"; - this.buttonSetBitmap.UseVisualStyleBackColor = true; - this.buttonSetBitmap.Click += new System.EventHandler(this.buttonSetBitmap_Click); - // - // buttonBitmapLayout - // - this.buttonBitmapLayout.Location = new System.Drawing.Point(176, 189); - this.buttonBitmapLayout.Name = "buttonBitmapLayout"; - this.buttonBitmapLayout.Size = new System.Drawing.Size(75, 35); - this.buttonBitmapLayout.TabIndex = 27; - this.buttonBitmapLayout.Text = "Bitmap Layout"; - this.buttonBitmapLayout.UseVisualStyleBackColor = true; - this.buttonBitmapLayout.Click += new System.EventHandler(this.buttonBitmapLayout_Click); - // - // buttonIndicatorsLayout - // - this.buttonIndicatorsLayout.Location = new System.Drawing.Point(94, 189); - this.buttonIndicatorsLayout.Name = "buttonIndicatorsLayout"; - this.buttonIndicatorsLayout.Size = new System.Drawing.Size(75, 35); - this.buttonIndicatorsLayout.TabIndex = 28; - this.buttonIndicatorsLayout.Text = "Indicators Layout "; - this.buttonIndicatorsLayout.UseVisualStyleBackColor = true; - this.buttonIndicatorsLayout.Click += new System.EventHandler(this.buttonIndicatorsLayout_Click); - // - // buttonUpdateTexts - // - this.buttonUpdateTexts.Location = new System.Drawing.Point(257, 189); - this.buttonUpdateTexts.Name = "buttonUpdateTexts"; - this.buttonUpdateTexts.Size = new System.Drawing.Size(75, 35); - this.buttonUpdateTexts.TabIndex = 29; - this.buttonUpdateTexts.Text = "Update Texts"; - this.buttonUpdateTexts.UseVisualStyleBackColor = true; - this.buttonUpdateTexts.Click += new System.EventHandler(this.buttonUpdateTexts_Click); - // - // buttonLayoutOneTextField - // - this.buttonLayoutOneTextField.Location = new System.Drawing.Point(257, 160); - this.buttonLayoutOneTextField.Name = "buttonLayoutOneTextField"; - this.buttonLayoutOneTextField.Size = new System.Drawing.Size(75, 23); - this.buttonLayoutOneTextField.TabIndex = 30; - this.buttonLayoutOneTextField.Text = "Layout 1x1"; - this.buttonLayoutOneTextField.UseVisualStyleBackColor = true; - this.buttonLayoutOneTextField.Click += new System.EventHandler(this.buttonLayoutOneTextField_Click); - // - // numericUpDownPriority - // - this.numericUpDownPriority.Increment = new decimal(new int[] { - 10, - 0, - 0, - 0}); - this.numericUpDownPriority.Location = new System.Drawing.Point(57, 83); - this.numericUpDownPriority.Maximum = new decimal(new int[] { - 1000, - 0, - 0, - 0}); - this.numericUpDownPriority.Name = "numericUpDownPriority"; - this.numericUpDownPriority.Size = new System.Drawing.Size(60, 20); - this.numericUpDownPriority.TabIndex = 31; - this.numericUpDownPriority.Value = new decimal(new int[] { - 500, - 0, - 0, - 0}); - this.numericUpDownPriority.ValueChanged += new System.EventHandler(this.numericUpDownPriority_ValueChanged); - // - // labelPriority - // - this.labelPriority.AutoSize = true; - this.labelPriority.Location = new System.Drawing.Point(12, 85); - this.labelPriority.Name = "labelPriority"; - this.labelPriority.Size = new System.Drawing.Size(41, 13); - this.labelPriority.TabIndex = 32; - this.labelPriority.Text = "Priority:"; - // - // MainForm - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(443, 252); - this.Controls.Add(this.labelPriority); - this.Controls.Add(this.numericUpDownPriority); - this.Controls.Add(this.buttonLayoutOneTextField); - this.Controls.Add(this.buttonUpdateTexts); - this.Controls.Add(this.buttonIndicatorsLayout); - this.Controls.Add(this.buttonBitmapLayout); - this.Controls.Add(this.buttonSetBitmap); - this.Controls.Add(this.buttonLayoutUpdate); - this.Controls.Add(this.buttonSetTopText); - this.Controls.Add(this.buttonAlignRight); - this.Controls.Add(this.buttonAlignCenter); - this.Controls.Add(this.buttonAlignLeft); - this.Controls.Add(this.textBoxBottom); - this.Controls.Add(this.textBoxTop); - this.Controls.Add(this.buttonSetText); - this.Name = "MainForm"; - this.Text = "Client"; - this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainForm_FormClosing); - this.Load += new System.EventHandler(this.MainForm_Load); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDownPriority)).EndInit(); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.Button buttonSetText; - private System.Windows.Forms.TextBox textBoxTop; - private System.Windows.Forms.TextBox textBoxBottom; - private System.Windows.Forms.Button buttonAlignRight; - private System.Windows.Forms.Button buttonAlignCenter; - private System.Windows.Forms.Button buttonAlignLeft; - private System.Windows.Forms.Button buttonSetTopText; - private System.Windows.Forms.Button buttonLayoutUpdate; - private System.Windows.Forms.Button buttonSetBitmap; - private System.Windows.Forms.Button buttonBitmapLayout; - private System.Windows.Forms.Button buttonIndicatorsLayout; - private System.Windows.Forms.Button buttonUpdateTexts; - private System.Windows.Forms.Button buttonLayoutOneTextField; - private System.Windows.Forms.NumericUpDown numericUpDownPriority; - private System.Windows.Forms.Label labelPriority; - } -} - diff -r bedae992f4ee -r 60977f2b3ca7 Client/MainForm.cs --- a/Client/MainForm.cs Tue Feb 02 19:50:33 2016 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,404 +0,0 @@ -// -// Copyright (C) 2014-2015 Stéphane Lenclud. -// -// This file is part of SharpDisplayManager. -// -// SharpDisplayManager is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// SharpDisplayManager is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with SharpDisplayManager. If not, see . -// - -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; -using System.ServiceModel; -using System.ServiceModel.Channels; -using System.Diagnostics; -using SharpLib.Display; - - -namespace SharpDisplayClient -{ - public partial class MainForm : Form - { - public StartParams Params { get; set; } - - // - Client iClient; - // - ContentAlignment Alignment; - TextField iTextFieldTop; - - - /// - /// Constructor - /// - public MainForm() - { - InitializeComponent(); - Alignment = ContentAlignment.MiddleLeft; - iTextFieldTop = new TextField(); - } - - public void OnCloseOrder() - { - CloseThreadSafe(); - } - - /// - /// - /// - /// - /// - private void MainForm_Load(object sender, EventArgs e) - { - iClient = new Client(); - iClient.CloseOrderEvent += OnCloseOrder; - iClient.Open(); - - //Connect using unique name - //string name = DateTime.Now.ToString("MM/dd/yyyy hh:mm:ss.fff tt"); - string name = "Client-" + (iClient.ClientCount() - 1); - iClient.SetName(name); - //Text = Text + ": " + name; - Text = "[[" + name + "]] " + iClient.SessionId; - - // - textBoxTop.Text = iClient.Name; - textBoxBottom.Text = iClient.SessionId; - - if (Params != null) - { - //Parameters where specified use them - if (Params.TopText != "") - { - textBoxTop.Text = Params.TopText; - } - - if (Params.BottomText != "") - { - textBoxBottom.Text = Params.BottomText; - } - - Location = Params.Location; - // - SetBasicLayoutAndText(); - } - - } - - - - public delegate void CloseConnectionDelegate(); - public delegate void CloseDelegate(); - - /// - /// - /// - public void CloseConnectionThreadSafe() - { - if (this.InvokeRequired) - { - //Not in the proper thread, invoke ourselves - CloseConnectionDelegate d = new CloseConnectionDelegate(CloseConnectionThreadSafe); - this.Invoke(d, new object[] { }); - } - else - { - //We are in the proper thread - if (IsClientReady()) - { - string sessionId = iClient.SessionId; - Trace.TraceInformation("Closing client: " + sessionId); - iClient.Close(); - Trace.TraceInformation("Closed client: " + sessionId); - } - - iClient = null; - } - } - - /// - /// - /// - public void CloseThreadSafe() - { - if (this.InvokeRequired) - { - //Not in the proper thread, invoke ourselves - CloseDelegate d = new CloseDelegate(CloseThreadSafe); - this.Invoke(d, new object[] { }); - } - else - { - //We are in the proper thread - Close(); - } - } - - - private void MainForm_FormClosing(object sender, FormClosingEventArgs e) - { - CloseConnectionThreadSafe(); - } - - public bool IsClientReady() - { - return (iClient != null && iClient.IsReady()); - } - - private void buttonAlignLeft_Click(object sender, EventArgs e) - { - Alignment = ContentAlignment.MiddleLeft; - textBoxTop.TextAlign = HorizontalAlignment.Left; - textBoxBottom.TextAlign = HorizontalAlignment.Left; - } - - private void buttonAlignCenter_Click(object sender, EventArgs e) - { - Alignment = ContentAlignment.MiddleCenter; - textBoxTop.TextAlign = HorizontalAlignment.Center; - textBoxBottom.TextAlign = HorizontalAlignment.Center; - } - - private void buttonAlignRight_Click(object sender, EventArgs e) - { - Alignment = ContentAlignment.MiddleRight; - textBoxTop.TextAlign = HorizontalAlignment.Right; - textBoxBottom.TextAlign = HorizontalAlignment.Right; - } - - private void buttonSetTopText_Click(object sender, EventArgs e) - { - //TextField top = new TextField(0, textBoxTop.Text, ContentAlignment.MiddleLeft); - iTextFieldTop.Text = textBoxTop.Text; - iTextFieldTop.Alignment = Alignment; - bool res = iClient.SetField(iTextFieldTop); - - if (!res) - { - MessageBox.Show("Create you fields first", "Field update error", MessageBoxButtons.OK, MessageBoxIcon.Error); - } - - - } - - private void buttonSetText_Click(object sender, EventArgs e) - { - SetBasicLayoutAndText(); - } - - void SetBasicLayoutAndText() - { - //Set one column two lines layout - TableLayout layout = new TableLayout(1, 2); - iClient.SetLayout(layout); - - //Set our fields - iClient.CreateFields(new DataField[] - { - new TextField(textBoxTop.Text, Alignment, 0, 0), - new TextField(textBoxBottom.Text, Alignment, 0, 1) - }); - - } - - private void buttonLayoutUpdate_Click(object sender, EventArgs e) - { - //Define a 2 by 2 layout - TableLayout layout = new TableLayout(2,2); - //Second column only takes up 25% - layout.Columns[1].Width = 25F; - //Send layout to server - iClient.SetLayout(layout); - - // - RecordingField recording = new RecordingField(); - recording.IsActive = true; - recording.Text = "Recording Tame of Gone until 22:05"; - //Set texts - iClient.CreateFields(new DataField[] - { - new TextField(textBoxTop.Text, Alignment, 0, 0), - new TextField(textBoxBottom.Text, Alignment, 0, 1), - new TextField("Third text field", Alignment, 1, 0), - new TextField("Forth text field", Alignment, 1, 1), - recording - }); - - } - - private void buttonSetBitmap_Click(object sender, EventArgs e) - { - int x1 = 0; - int y1 = 0; - int x2 = 256; - int y2 = 32; - - Bitmap bitmap = new Bitmap(x2,y2); - Pen blackPen = new Pen(Color.Black, 3); - - // Draw line to screen. - using (var graphics = Graphics.FromImage(bitmap)) - { - graphics.DrawLine(blackPen, x1, y1, x2, y2); - graphics.DrawLine(blackPen, x1, y2, x2, y1); - } - - DataField field = new BitmapField(bitmap); - //field.ColumnSpan = 2; - iClient.SetField(field); - } - - private void buttonBitmapLayout_Click(object sender, EventArgs e) - { - SetLayoutWithBitmap(); - } - - /// - /// Define a layout with a bitmap field on the left and two lines of text on the right. - /// - private void SetLayoutWithBitmap() - { - //Define a 2 by 2 layout - TableLayout layout = new TableLayout(2, 2); - //First column only takes 25% - layout.Columns[0].Width = 25F; - //Second column takes up 75% - layout.Columns[1].Width = 75F; - //Send layout to server - iClient.SetLayout(layout); - - //Set a bitmap for our first field - int x1 = 0; - int y1 = 0; - int x2 = 64; - int y2 = 64; - - Bitmap bitmap = new Bitmap(x2, y2); - Pen blackPen = new Pen(Color.Black, 3); - - // Draw line to screen. - using (var graphics = Graphics.FromImage(bitmap)) - { - graphics.DrawLine(blackPen, x1, y1, x2, y2); - graphics.DrawLine(blackPen, x1, y2, x2, y1); - } - - //Create a bitmap field from the bitmap we just created - //We want our bitmap field to span across two rows - BitmapField bitmapField = new BitmapField(bitmap, 0, 0, 1, 2); - - //Set texts - iClient.CreateFields(new DataField[] - { - bitmapField, - new TextField(textBoxTop.Text, Alignment, 1, 0), - new TextField(textBoxBottom.Text, Alignment, 1, 1) - }); - - } - - private void buttonIndicatorsLayout_Click(object sender, EventArgs e) - { - //Define a 2 by 4 layout - TableLayout layout = new TableLayout(2, 4); - //First column - layout.Columns[0].Width = 87.5F; - //Second column - layout.Columns[1].Width = 12.5F; - //Send layout to server - iClient.SetLayout(layout); - - //Create a bitmap for our indicators field - int x1 = 0; - int y1 = 0; - int x2 = 32; - int y2 = 16; - - Bitmap bitmap = new Bitmap(x2, y2); - Pen blackPen = new Pen(Color.Black, 3); - - // Draw line to screen. - using (var graphics = Graphics.FromImage(bitmap)) - { - graphics.DrawLine(blackPen, x1, y1, x2, y2); - graphics.DrawLine(blackPen, x1, y2, x2, y1); - } - - //Create a bitmap field from the bitmap we just created - DataField indicator1 = new BitmapField(bitmap, 1, 0); - //Create a bitmap field from the bitmap we just created - DataField indicator2 = new BitmapField(bitmap, 1, 1); - //Create a bitmap field from the bitmap we just created - DataField indicator3 = new BitmapField(bitmap, 1, 2); - //Create a bitmap field from the bitmap we just created - DataField indicator4 = new BitmapField(bitmap, 1, 3); - - // - TextField textFieldTop = new TextField(textBoxTop.Text, Alignment, 0, 0, 1, 2); - TextField textFieldBottom = new TextField(textBoxBottom.Text, Alignment, 0, 2, 1, 2); - - //Set texts - iClient.CreateFields(new DataField[] - { - textFieldTop, - textFieldBottom, - indicator1, - indicator2, - indicator3, - indicator4 - }); - - } - - private void buttonUpdateTexts_Click(object sender, EventArgs e) - { - - bool res = iClient.SetFields(new DataField[] - { - new TextField(textBoxTop.Text, Alignment,0,0), - new TextField(textBoxBottom.Text, Alignment,0,1) - }); - - if (!res) - { - MessageBox.Show("Create you fields first", "Field update error", MessageBoxButtons.OK, MessageBoxIcon.Error); - } - - } - - private void buttonLayoutOneTextField_Click(object sender, EventArgs e) - { - //Set one column one line layout - TableLayout layout = new TableLayout(1, 1); - iClient.SetLayout(layout); - - //Set our fields - iClient.CreateFields(new DataField[] - { - new TextField(textBoxTop.Text, Alignment) - }); - } - - private void numericUpDownPriority_ValueChanged(object sender, EventArgs e) - { - iClient.SetPriority((uint)numericUpDownPriority.Value); - } - } -} diff -r bedae992f4ee -r 60977f2b3ca7 Client/MainForm.resx --- a/Client/MainForm.resx Tue Feb 02 19:50:33 2016 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff -r bedae992f4ee -r 60977f2b3ca7 Client/Program.cs --- a/Client/Program.cs Tue Feb 02 19:50:33 2016 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,73 +0,0 @@ -// -// Copyright (C) 2014-2015 Stéphane Lenclud. -// -// This file is part of SharpDisplayManager. -// -// SharpDisplayManager is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// SharpDisplayManager is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with SharpDisplayManager. If not, see . -// - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using System.Windows.Forms; -using System.Drawing; - -namespace SharpDisplayClient -{ - static public class Program - { - /// - /// The main entry point for the application. - /// - [STAThread] - static public void Main() - { - //Set high priority to our process to avoid lags when rendering to our screen - System.Diagnostics.Process.GetCurrentProcess().PriorityClass = System.Diagnostics.ProcessPriorityClass.AboveNormal; - - Application.EnableVisualStyles(); - Application.SetCompatibleTextRenderingDefault(false); - Application.Run(new MainForm()); - } - - [STAThread] - static public void MainWithParams(object aParams) - { - //Set high priority to our process to avoid lags when rendering to our screen - System.Diagnostics.Process.GetCurrentProcess().PriorityClass = System.Diagnostics.ProcessPriorityClass.AboveNormal; - - Application.EnableVisualStyles(); - Application.SetCompatibleTextRenderingDefault(false); - MainForm mainForm = new MainForm(); - mainForm.Params = (StartParams)aParams; - Application.Run(mainForm); - } - - } - - public class StartParams - { - public StartParams(Point aLocation, string aTopText="", string aBottomText="") - { - TopText = aTopText; - BottomText = aBottomText; - Location = aLocation; - } - - public string TopText { get; set; } - public string BottomText { get; set; } - public Point Location { get; set; } - } -} diff -r bedae992f4ee -r 60977f2b3ca7 Client/Properties/AssemblyInfo.cs --- a/Client/Properties/AssemblyInfo.cs Tue Feb 02 19:50:33 2016 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("SharpDisplayClient")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("SharpDisplayClient")] -[assembly: AssemblyCopyright("Copyright © 2014")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("36255ddc-eb97-4253-8696-3e360b5bc824")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff -r bedae992f4ee -r 60977f2b3ca7 Client/Properties/Resources.Designer.cs --- a/Client/Properties/Resources.Designer.cs Tue Feb 02 19:50:33 2016 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,63 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace SharpDisplayClient.Properties { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SharpDisplayClient.Properties.Resources", typeof(Resources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - } -} diff -r bedae992f4ee -r 60977f2b3ca7 Client/Properties/Resources.resx --- a/Client/Properties/Resources.resx Tue Feb 02 19:50:33 2016 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff -r bedae992f4ee -r 60977f2b3ca7 Client/Properties/Settings.Designer.cs --- a/Client/Properties/Settings.Designer.cs Tue Feb 02 19:50:33 2016 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace SharpDisplayClient.Properties { - - - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { - - private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default { - get { - return defaultInstance; - } - } - } -} diff -r bedae992f4ee -r 60977f2b3ca7 Client/Properties/Settings.settings --- a/Client/Properties/Settings.settings Tue Feb 02 19:50:33 2016 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ - - - - - - - diff -r bedae992f4ee -r 60977f2b3ca7 Client/SharpDisplayClient.csproj --- a/Client/SharpDisplayClient.csproj Tue Feb 02 19:50:33 2016 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,164 +0,0 @@ - - - - - Debug - AnyCPU - {7EE64074-8CDB-4448-B40C-81B75D6B31CD} - WinExe - Properties - SharpDisplayClient - SharpDisplayClient - v4.6 - 512 - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 0.1.0.%2a - false - false - true - - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - false - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - false - - - true - ..\bin\x86\Debug\ - ..\bin\x86\Debug\obj - DEBUG;TRACE - full - x86 - prompt - MinimumRecommendedRules.ruleset - false - - - ..\bin\x86\Release\ - ..\bin\x86\Release\obj - TRACE - true - pdbonly - x86 - prompt - MinimumRecommendedRules.ruleset - false - - - true - - - 70A149AB9F89E507D9411D109553BE22455895D6 - - - SharpDisplayManager_TemporaryKey.pfx - - - true - - - - ..\packages\SharpLibDisplay.0.2.5\lib\net40\SharpLibDisplay.dll - True - - - - - - - - - - - - - - - - Form - - - MainForm.cs - - - - - MainForm.cs - - - ResXFileCodeGenerator - Resources.Designer.cs - Designer - - - True - Resources.resx - True - - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - True - Settings.settings - True - - - - - - - - False - Microsoft .NET Framework 4.5 %28x86 and x64%29 - true - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - false - - - - - \ No newline at end of file diff -r bedae992f4ee -r 60977f2b3ca7 Client/packages.config --- a/Client/packages.config Tue Feb 02 19:50:33 2016 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff -r bedae992f4ee -r 60977f2b3ca7 Clients/Test/App.config --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Clients/Test/App.config Wed Feb 03 13:02:48 2016 +0100 @@ -0,0 +1,6 @@ + + + + + + diff -r bedae992f4ee -r 60977f2b3ca7 Clients/Test/MainForm.Designer.cs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Clients/Test/MainForm.Designer.cs Wed Feb 03 13:02:48 2016 +0100 @@ -0,0 +1,254 @@ +namespace SharpDisplayClient +{ + partial class MainForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.buttonSetText = new System.Windows.Forms.Button(); + this.textBoxTop = new System.Windows.Forms.TextBox(); + this.textBoxBottom = new System.Windows.Forms.TextBox(); + this.buttonAlignRight = new System.Windows.Forms.Button(); + this.buttonAlignCenter = new System.Windows.Forms.Button(); + this.buttonAlignLeft = new System.Windows.Forms.Button(); + this.buttonSetTopText = new System.Windows.Forms.Button(); + this.buttonLayoutUpdate = new System.Windows.Forms.Button(); + this.buttonSetBitmap = new System.Windows.Forms.Button(); + this.buttonBitmapLayout = new System.Windows.Forms.Button(); + this.buttonIndicatorsLayout = new System.Windows.Forms.Button(); + this.buttonUpdateTexts = new System.Windows.Forms.Button(); + this.buttonLayoutOneTextField = new System.Windows.Forms.Button(); + this.numericUpDownPriority = new System.Windows.Forms.NumericUpDown(); + this.labelPriority = new System.Windows.Forms.Label(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownPriority)).BeginInit(); + this.SuspendLayout(); + // + // buttonSetText + // + this.buttonSetText.Location = new System.Drawing.Point(13, 132); + this.buttonSetText.Name = "buttonSetText"; + this.buttonSetText.Size = new System.Drawing.Size(75, 23); + this.buttonSetText.TabIndex = 0; + this.buttonSetText.Text = "Set Text"; + this.buttonSetText.UseVisualStyleBackColor = true; + this.buttonSetText.Click += new System.EventHandler(this.buttonSetText_Click); + // + // textBoxTop + // + this.textBoxTop.Location = new System.Drawing.Point(12, 31); + this.textBoxTop.Name = "textBoxTop"; + this.textBoxTop.Size = new System.Drawing.Size(419, 20); + this.textBoxTop.TabIndex = 1; + // + // textBoxBottom + // + this.textBoxBottom.Location = new System.Drawing.Point(12, 57); + this.textBoxBottom.Name = "textBoxBottom"; + this.textBoxBottom.Size = new System.Drawing.Size(419, 20); + this.textBoxBottom.TabIndex = 2; + // + // buttonAlignRight + // + this.buttonAlignRight.Location = new System.Drawing.Point(176, 160); + this.buttonAlignRight.Name = "buttonAlignRight"; + this.buttonAlignRight.Size = new System.Drawing.Size(75, 23); + this.buttonAlignRight.TabIndex = 23; + this.buttonAlignRight.Text = "Align Right"; + this.buttonAlignRight.UseVisualStyleBackColor = true; + this.buttonAlignRight.Click += new System.EventHandler(this.buttonAlignRight_Click); + // + // buttonAlignCenter + // + this.buttonAlignCenter.Location = new System.Drawing.Point(94, 161); + this.buttonAlignCenter.Name = "buttonAlignCenter"; + this.buttonAlignCenter.Size = new System.Drawing.Size(75, 23); + this.buttonAlignCenter.TabIndex = 22; + this.buttonAlignCenter.Text = "Align Center"; + this.buttonAlignCenter.UseVisualStyleBackColor = true; + this.buttonAlignCenter.Click += new System.EventHandler(this.buttonAlignCenter_Click); + // + // buttonAlignLeft + // + this.buttonAlignLeft.Location = new System.Drawing.Point(12, 161); + this.buttonAlignLeft.Name = "buttonAlignLeft"; + this.buttonAlignLeft.Size = new System.Drawing.Size(75, 23); + this.buttonAlignLeft.TabIndex = 21; + this.buttonAlignLeft.Text = "Align Left"; + this.buttonAlignLeft.UseVisualStyleBackColor = true; + this.buttonAlignLeft.Click += new System.EventHandler(this.buttonAlignLeft_Click); + // + // buttonSetTopText + // + this.buttonSetTopText.Location = new System.Drawing.Point(94, 132); + this.buttonSetTopText.Name = "buttonSetTopText"; + this.buttonSetTopText.Size = new System.Drawing.Size(75, 23); + this.buttonSetTopText.TabIndex = 24; + this.buttonSetTopText.Text = "Set Top Text"; + this.buttonSetTopText.UseVisualStyleBackColor = true; + this.buttonSetTopText.Click += new System.EventHandler(this.buttonSetTopText_Click); + // + // buttonLayoutUpdate + // + this.buttonLayoutUpdate.Location = new System.Drawing.Point(176, 131); + this.buttonLayoutUpdate.Name = "buttonLayoutUpdate"; + this.buttonLayoutUpdate.Size = new System.Drawing.Size(156, 23); + this.buttonLayoutUpdate.TabIndex = 25; + this.buttonLayoutUpdate.Text = "Layout 2x2 and Recording"; + this.buttonLayoutUpdate.UseVisualStyleBackColor = true; + this.buttonLayoutUpdate.Click += new System.EventHandler(this.buttonLayoutUpdate_Click); + // + // buttonSetBitmap + // + this.buttonSetBitmap.Location = new System.Drawing.Point(12, 190); + this.buttonSetBitmap.Name = "buttonSetBitmap"; + this.buttonSetBitmap.Size = new System.Drawing.Size(75, 23); + this.buttonSetBitmap.TabIndex = 26; + this.buttonSetBitmap.Text = "Set Bitmap"; + this.buttonSetBitmap.UseVisualStyleBackColor = true; + this.buttonSetBitmap.Click += new System.EventHandler(this.buttonSetBitmap_Click); + // + // buttonBitmapLayout + // + this.buttonBitmapLayout.Location = new System.Drawing.Point(176, 189); + this.buttonBitmapLayout.Name = "buttonBitmapLayout"; + this.buttonBitmapLayout.Size = new System.Drawing.Size(75, 35); + this.buttonBitmapLayout.TabIndex = 27; + this.buttonBitmapLayout.Text = "Bitmap Layout"; + this.buttonBitmapLayout.UseVisualStyleBackColor = true; + this.buttonBitmapLayout.Click += new System.EventHandler(this.buttonBitmapLayout_Click); + // + // buttonIndicatorsLayout + // + this.buttonIndicatorsLayout.Location = new System.Drawing.Point(94, 189); + this.buttonIndicatorsLayout.Name = "buttonIndicatorsLayout"; + this.buttonIndicatorsLayout.Size = new System.Drawing.Size(75, 35); + this.buttonIndicatorsLayout.TabIndex = 28; + this.buttonIndicatorsLayout.Text = "Indicators Layout "; + this.buttonIndicatorsLayout.UseVisualStyleBackColor = true; + this.buttonIndicatorsLayout.Click += new System.EventHandler(this.buttonIndicatorsLayout_Click); + // + // buttonUpdateTexts + // + this.buttonUpdateTexts.Location = new System.Drawing.Point(257, 189); + this.buttonUpdateTexts.Name = "buttonUpdateTexts"; + this.buttonUpdateTexts.Size = new System.Drawing.Size(75, 35); + this.buttonUpdateTexts.TabIndex = 29; + this.buttonUpdateTexts.Text = "Update Texts"; + this.buttonUpdateTexts.UseVisualStyleBackColor = true; + this.buttonUpdateTexts.Click += new System.EventHandler(this.buttonUpdateTexts_Click); + // + // buttonLayoutOneTextField + // + this.buttonLayoutOneTextField.Location = new System.Drawing.Point(257, 160); + this.buttonLayoutOneTextField.Name = "buttonLayoutOneTextField"; + this.buttonLayoutOneTextField.Size = new System.Drawing.Size(75, 23); + this.buttonLayoutOneTextField.TabIndex = 30; + this.buttonLayoutOneTextField.Text = "Layout 1x1"; + this.buttonLayoutOneTextField.UseVisualStyleBackColor = true; + this.buttonLayoutOneTextField.Click += new System.EventHandler(this.buttonLayoutOneTextField_Click); + // + // numericUpDownPriority + // + this.numericUpDownPriority.Increment = new decimal(new int[] { + 10, + 0, + 0, + 0}); + this.numericUpDownPriority.Location = new System.Drawing.Point(57, 83); + this.numericUpDownPriority.Maximum = new decimal(new int[] { + 1000, + 0, + 0, + 0}); + this.numericUpDownPriority.Name = "numericUpDownPriority"; + this.numericUpDownPriority.Size = new System.Drawing.Size(60, 20); + this.numericUpDownPriority.TabIndex = 31; + this.numericUpDownPriority.Value = new decimal(new int[] { + 500, + 0, + 0, + 0}); + this.numericUpDownPriority.ValueChanged += new System.EventHandler(this.numericUpDownPriority_ValueChanged); + // + // labelPriority + // + this.labelPriority.AutoSize = true; + this.labelPriority.Location = new System.Drawing.Point(12, 85); + this.labelPriority.Name = "labelPriority"; + this.labelPriority.Size = new System.Drawing.Size(41, 13); + this.labelPriority.TabIndex = 32; + this.labelPriority.Text = "Priority:"; + // + // MainForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(443, 252); + this.Controls.Add(this.labelPriority); + this.Controls.Add(this.numericUpDownPriority); + this.Controls.Add(this.buttonLayoutOneTextField); + this.Controls.Add(this.buttonUpdateTexts); + this.Controls.Add(this.buttonIndicatorsLayout); + this.Controls.Add(this.buttonBitmapLayout); + this.Controls.Add(this.buttonSetBitmap); + this.Controls.Add(this.buttonLayoutUpdate); + this.Controls.Add(this.buttonSetTopText); + this.Controls.Add(this.buttonAlignRight); + this.Controls.Add(this.buttonAlignCenter); + this.Controls.Add(this.buttonAlignLeft); + this.Controls.Add(this.textBoxBottom); + this.Controls.Add(this.textBoxTop); + this.Controls.Add(this.buttonSetText); + this.Name = "MainForm"; + this.Text = "Client"; + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainForm_FormClosing); + this.Load += new System.EventHandler(this.MainForm_Load); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownPriority)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Button buttonSetText; + private System.Windows.Forms.TextBox textBoxTop; + private System.Windows.Forms.TextBox textBoxBottom; + private System.Windows.Forms.Button buttonAlignRight; + private System.Windows.Forms.Button buttonAlignCenter; + private System.Windows.Forms.Button buttonAlignLeft; + private System.Windows.Forms.Button buttonSetTopText; + private System.Windows.Forms.Button buttonLayoutUpdate; + private System.Windows.Forms.Button buttonSetBitmap; + private System.Windows.Forms.Button buttonBitmapLayout; + private System.Windows.Forms.Button buttonIndicatorsLayout; + private System.Windows.Forms.Button buttonUpdateTexts; + private System.Windows.Forms.Button buttonLayoutOneTextField; + private System.Windows.Forms.NumericUpDown numericUpDownPriority; + private System.Windows.Forms.Label labelPriority; + } +} + diff -r bedae992f4ee -r 60977f2b3ca7 Clients/Test/MainForm.cs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Clients/Test/MainForm.cs Wed Feb 03 13:02:48 2016 +0100 @@ -0,0 +1,404 @@ +// +// Copyright (C) 2014-2015 Stéphane Lenclud. +// +// This file is part of SharpDisplayManager. +// +// SharpDisplayManager is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// SharpDisplayManager is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with SharpDisplayManager. If not, see . +// + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using System.ServiceModel; +using System.ServiceModel.Channels; +using System.Diagnostics; +using SharpLib.Display; + + +namespace SharpDisplayClient +{ + public partial class MainForm : Form + { + public StartParams Params { get; set; } + + // + Client iClient; + // + ContentAlignment Alignment; + TextField iTextFieldTop; + + + /// + /// Constructor + /// + public MainForm() + { + InitializeComponent(); + Alignment = ContentAlignment.MiddleLeft; + iTextFieldTop = new TextField(); + } + + public void OnCloseOrder() + { + CloseThreadSafe(); + } + + /// + /// + /// + /// + /// + private void MainForm_Load(object sender, EventArgs e) + { + iClient = new Client(); + iClient.CloseOrderEvent += OnCloseOrder; + iClient.Open(); + + //Connect using unique name + //string name = DateTime.Now.ToString("MM/dd/yyyy hh:mm:ss.fff tt"); + string name = "Client-" + (iClient.ClientCount() - 1); + iClient.SetName(name); + //Text = Text + ": " + name; + Text = "[[" + name + "]] " + iClient.SessionId; + + // + textBoxTop.Text = iClient.Name; + textBoxBottom.Text = iClient.SessionId; + + if (Params != null) + { + //Parameters where specified use them + if (Params.TopText != "") + { + textBoxTop.Text = Params.TopText; + } + + if (Params.BottomText != "") + { + textBoxBottom.Text = Params.BottomText; + } + + Location = Params.Location; + // + SetBasicLayoutAndText(); + } + + } + + + + public delegate void CloseConnectionDelegate(); + public delegate void CloseDelegate(); + + /// + /// + /// + public void CloseConnectionThreadSafe() + { + if (this.InvokeRequired) + { + //Not in the proper thread, invoke ourselves + CloseConnectionDelegate d = new CloseConnectionDelegate(CloseConnectionThreadSafe); + this.Invoke(d, new object[] { }); + } + else + { + //We are in the proper thread + if (IsClientReady()) + { + string sessionId = iClient.SessionId; + Trace.TraceInformation("Closing client: " + sessionId); + iClient.Close(); + Trace.TraceInformation("Closed client: " + sessionId); + } + + iClient = null; + } + } + + /// + /// + /// + public void CloseThreadSafe() + { + if (this.InvokeRequired) + { + //Not in the proper thread, invoke ourselves + CloseDelegate d = new CloseDelegate(CloseThreadSafe); + this.Invoke(d, new object[] { }); + } + else + { + //We are in the proper thread + Close(); + } + } + + + private void MainForm_FormClosing(object sender, FormClosingEventArgs e) + { + CloseConnectionThreadSafe(); + } + + public bool IsClientReady() + { + return (iClient != null && iClient.IsReady()); + } + + private void buttonAlignLeft_Click(object sender, EventArgs e) + { + Alignment = ContentAlignment.MiddleLeft; + textBoxTop.TextAlign = HorizontalAlignment.Left; + textBoxBottom.TextAlign = HorizontalAlignment.Left; + } + + private void buttonAlignCenter_Click(object sender, EventArgs e) + { + Alignment = ContentAlignment.MiddleCenter; + textBoxTop.TextAlign = HorizontalAlignment.Center; + textBoxBottom.TextAlign = HorizontalAlignment.Center; + } + + private void buttonAlignRight_Click(object sender, EventArgs e) + { + Alignment = ContentAlignment.MiddleRight; + textBoxTop.TextAlign = HorizontalAlignment.Right; + textBoxBottom.TextAlign = HorizontalAlignment.Right; + } + + private void buttonSetTopText_Click(object sender, EventArgs e) + { + //TextField top = new TextField(0, textBoxTop.Text, ContentAlignment.MiddleLeft); + iTextFieldTop.Text = textBoxTop.Text; + iTextFieldTop.Alignment = Alignment; + bool res = iClient.SetField(iTextFieldTop); + + if (!res) + { + MessageBox.Show("Create you fields first", "Field update error", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + + + } + + private void buttonSetText_Click(object sender, EventArgs e) + { + SetBasicLayoutAndText(); + } + + void SetBasicLayoutAndText() + { + //Set one column two lines layout + TableLayout layout = new TableLayout(1, 2); + iClient.SetLayout(layout); + + //Set our fields + iClient.CreateFields(new DataField[] + { + new TextField(textBoxTop.Text, Alignment, 0, 0), + new TextField(textBoxBottom.Text, Alignment, 0, 1) + }); + + } + + private void buttonLayoutUpdate_Click(object sender, EventArgs e) + { + //Define a 2 by 2 layout + TableLayout layout = new TableLayout(2,2); + //Second column only takes up 25% + layout.Columns[1].Width = 25F; + //Send layout to server + iClient.SetLayout(layout); + + // + RecordingField recording = new RecordingField(); + recording.IsActive = true; + recording.Text = "Recording Tame of Gone until 22:05"; + //Set texts + iClient.CreateFields(new DataField[] + { + new TextField(textBoxTop.Text, Alignment, 0, 0), + new TextField(textBoxBottom.Text, Alignment, 0, 1), + new TextField("Third text field", Alignment, 1, 0), + new TextField("Forth text field", Alignment, 1, 1), + recording + }); + + } + + private void buttonSetBitmap_Click(object sender, EventArgs e) + { + int x1 = 0; + int y1 = 0; + int x2 = 256; + int y2 = 32; + + Bitmap bitmap = new Bitmap(x2,y2); + Pen blackPen = new Pen(Color.Black, 3); + + // Draw line to screen. + using (var graphics = Graphics.FromImage(bitmap)) + { + graphics.DrawLine(blackPen, x1, y1, x2, y2); + graphics.DrawLine(blackPen, x1, y2, x2, y1); + } + + DataField field = new BitmapField(bitmap); + //field.ColumnSpan = 2; + iClient.SetField(field); + } + + private void buttonBitmapLayout_Click(object sender, EventArgs e) + { + SetLayoutWithBitmap(); + } + + /// + /// Define a layout with a bitmap field on the left and two lines of text on the right. + /// + private void SetLayoutWithBitmap() + { + //Define a 2 by 2 layout + TableLayout layout = new TableLayout(2, 2); + //First column only takes 25% + layout.Columns[0].Width = 25F; + //Second column takes up 75% + layout.Columns[1].Width = 75F; + //Send layout to server + iClient.SetLayout(layout); + + //Set a bitmap for our first field + int x1 = 0; + int y1 = 0; + int x2 = 64; + int y2 = 64; + + Bitmap bitmap = new Bitmap(x2, y2); + Pen blackPen = new Pen(Color.Black, 3); + + // Draw line to screen. + using (var graphics = Graphics.FromImage(bitmap)) + { + graphics.DrawLine(blackPen, x1, y1, x2, y2); + graphics.DrawLine(blackPen, x1, y2, x2, y1); + } + + //Create a bitmap field from the bitmap we just created + //We want our bitmap field to span across two rows + BitmapField bitmapField = new BitmapField(bitmap, 0, 0, 1, 2); + + //Set texts + iClient.CreateFields(new DataField[] + { + bitmapField, + new TextField(textBoxTop.Text, Alignment, 1, 0), + new TextField(textBoxBottom.Text, Alignment, 1, 1) + }); + + } + + private void buttonIndicatorsLayout_Click(object sender, EventArgs e) + { + //Define a 2 by 4 layout + TableLayout layout = new TableLayout(2, 4); + //First column + layout.Columns[0].Width = 87.5F; + //Second column + layout.Columns[1].Width = 12.5F; + //Send layout to server + iClient.SetLayout(layout); + + //Create a bitmap for our indicators field + int x1 = 0; + int y1 = 0; + int x2 = 32; + int y2 = 16; + + Bitmap bitmap = new Bitmap(x2, y2); + Pen blackPen = new Pen(Color.Black, 3); + + // Draw line to screen. + using (var graphics = Graphics.FromImage(bitmap)) + { + graphics.DrawLine(blackPen, x1, y1, x2, y2); + graphics.DrawLine(blackPen, x1, y2, x2, y1); + } + + //Create a bitmap field from the bitmap we just created + DataField indicator1 = new BitmapField(bitmap, 1, 0); + //Create a bitmap field from the bitmap we just created + DataField indicator2 = new BitmapField(bitmap, 1, 1); + //Create a bitmap field from the bitmap we just created + DataField indicator3 = new BitmapField(bitmap, 1, 2); + //Create a bitmap field from the bitmap we just created + DataField indicator4 = new BitmapField(bitmap, 1, 3); + + // + TextField textFieldTop = new TextField(textBoxTop.Text, Alignment, 0, 0, 1, 2); + TextField textFieldBottom = new TextField(textBoxBottom.Text, Alignment, 0, 2, 1, 2); + + //Set texts + iClient.CreateFields(new DataField[] + { + textFieldTop, + textFieldBottom, + indicator1, + indicator2, + indicator3, + indicator4 + }); + + } + + private void buttonUpdateTexts_Click(object sender, EventArgs e) + { + + bool res = iClient.SetFields(new DataField[] + { + new TextField(textBoxTop.Text, Alignment,0,0), + new TextField(textBoxBottom.Text, Alignment,0,1) + }); + + if (!res) + { + MessageBox.Show("Create you fields first", "Field update error", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + + } + + private void buttonLayoutOneTextField_Click(object sender, EventArgs e) + { + //Set one column one line layout + TableLayout layout = new TableLayout(1, 1); + iClient.SetLayout(layout); + + //Set our fields + iClient.CreateFields(new DataField[] + { + new TextField(textBoxTop.Text, Alignment) + }); + } + + private void numericUpDownPriority_ValueChanged(object sender, EventArgs e) + { + iClient.SetPriority((uint)numericUpDownPriority.Value); + } + } +} diff -r bedae992f4ee -r 60977f2b3ca7 Clients/Test/MainForm.resx --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Clients/Test/MainForm.resx Wed Feb 03 13:02:48 2016 +0100 @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff -r bedae992f4ee -r 60977f2b3ca7 Clients/Test/Program.cs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Clients/Test/Program.cs Wed Feb 03 13:02:48 2016 +0100 @@ -0,0 +1,73 @@ +// +// Copyright (C) 2014-2015 Stéphane Lenclud. +// +// This file is part of SharpDisplayManager. +// +// SharpDisplayManager is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// SharpDisplayManager is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with SharpDisplayManager. If not, see . +// + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Windows.Forms; +using System.Drawing; + +namespace SharpDisplayClient +{ + static public class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + static public void Main() + { + //Set high priority to our process to avoid lags when rendering to our screen + System.Diagnostics.Process.GetCurrentProcess().PriorityClass = System.Diagnostics.ProcessPriorityClass.AboveNormal; + + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new MainForm()); + } + + [STAThread] + static public void MainWithParams(object aParams) + { + //Set high priority to our process to avoid lags when rendering to our screen + System.Diagnostics.Process.GetCurrentProcess().PriorityClass = System.Diagnostics.ProcessPriorityClass.AboveNormal; + + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + MainForm mainForm = new MainForm(); + mainForm.Params = (StartParams)aParams; + Application.Run(mainForm); + } + + } + + public class StartParams + { + public StartParams(Point aLocation, string aTopText="", string aBottomText="") + { + TopText = aTopText; + BottomText = aBottomText; + Location = aLocation; + } + + public string TopText { get; set; } + public string BottomText { get; set; } + public Point Location { get; set; } + } +} diff -r bedae992f4ee -r 60977f2b3ca7 Clients/Test/Properties/AssemblyInfo.cs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Clients/Test/Properties/AssemblyInfo.cs Wed Feb 03 13:02:48 2016 +0100 @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("SharpDisplayClient")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("SharpDisplayClient")] +[assembly: AssemblyCopyright("Copyright © 2014")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("36255ddc-eb97-4253-8696-3e360b5bc824")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff -r bedae992f4ee -r 60977f2b3ca7 Clients/Test/Properties/Resources.Designer.cs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Clients/Test/Properties/Resources.Designer.cs Wed Feb 03 13:02:48 2016 +0100 @@ -0,0 +1,63 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace SharpDisplayClient.Properties { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SharpDisplayClient.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + } +} diff -r bedae992f4ee -r 60977f2b3ca7 Clients/Test/Properties/Resources.resx --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Clients/Test/Properties/Resources.resx Wed Feb 03 13:02:48 2016 +0100 @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff -r bedae992f4ee -r 60977f2b3ca7 Clients/Test/Properties/Settings.Designer.cs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Clients/Test/Properties/Settings.Designer.cs Wed Feb 03 13:02:48 2016 +0100 @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace SharpDisplayClient.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default { + get { + return defaultInstance; + } + } + } +} diff -r bedae992f4ee -r 60977f2b3ca7 Clients/Test/Properties/Settings.settings --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Clients/Test/Properties/Settings.settings Wed Feb 03 13:02:48 2016 +0100 @@ -0,0 +1,7 @@ + + + + + + + diff -r bedae992f4ee -r 60977f2b3ca7 Clients/Test/SharpDisplayClient.csproj --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Clients/Test/SharpDisplayClient.csproj Wed Feb 03 13:02:48 2016 +0100 @@ -0,0 +1,164 @@ + + + + + Debug + AnyCPU + {7EE64074-8CDB-4448-B40C-81B75D6B31CD} + WinExe + Properties + SharpDisplayClient + SharpDisplayClient + v4.6 + 512 + + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 0.1.0.%2a + false + false + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + false + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + false + + + true + ..\bin\x86\Debug\ + ..\bin\x86\Debug\obj + DEBUG;TRACE + full + x86 + prompt + MinimumRecommendedRules.ruleset + false + + + ..\bin\x86\Release\ + ..\bin\x86\Release\obj + TRACE + true + pdbonly + x86 + prompt + MinimumRecommendedRules.ruleset + false + + + true + + + 70A149AB9F89E507D9411D109553BE22455895D6 + + + SharpDisplayManager_TemporaryKey.pfx + + + true + + + + ..\..\packages\SharpLibDisplay.0.2.5\lib\net40\SharpLibDisplay.dll + True + + + + + + + + + + + + + + + + Form + + + MainForm.cs + + + + + MainForm.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + True + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + + False + Microsoft .NET Framework 4.5 %28x86 and x64%29 + true + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + false + + + + + \ No newline at end of file diff -r bedae992f4ee -r 60977f2b3ca7 Clients/Test/packages.config --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Clients/Test/packages.config Wed Feb 03 13:02:48 2016 +0100 @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff -r bedae992f4ee -r 60977f2b3ca7 Server/SharpDisplayManager.csproj --- a/Server/SharpDisplayManager.csproj Tue Feb 02 19:50:33 2016 +0100 +++ b/Server/SharpDisplayManager.csproj Wed Feb 03 13:02:48 2016 +0100 @@ -222,7 +222,7 @@ {a76579e5-aa8d-45a3-99e1-239a5c030a78} SharpDisplayIdleClient - + {7ee64074-8cdb-4448-b40c-81b75d6b31cd} SharpDisplayClient diff -r bedae992f4ee -r 60977f2b3ca7 Setup/Setup.vdproj --- a/Setup/Setup.vdproj Tue Feb 02 19:50:33 2016 +0100 +++ b/Setup/Setup.vdproj Wed Feb 03 13:02:48 2016 +0100 @@ -15,13 +15,7 @@ { "Entry" { - "MsmKey" = "8:_0BDF79321B394EC0E77BF680C3F40422" - "OwnerKey" = "8:_9A642A9E3FEC4B88888C4B96086D59E8" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_295C95460CE37C9B5A2F236412BA3C46" + "MsmKey" = "8:_099780B8FCF4932D55DA0D38B877DFC8" "OwnerKey" = "8:_9A642A9E3FEC4B88888C4B96086D59E8" "MsmSig" = "8:_UNDEFINED" } @@ -33,8 +27,20 @@ } "Entry" { + "MsmKey" = "8:_30F0A6A7F5B98239D94FA1AA5EACCD2E" + "OwnerKey" = "8:_9A642A9E3FEC4B88888C4B96086D59E8" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_30F0A6A7F5B98239D94FA1AA5EACCD2E" + "OwnerKey" = "8:_AF682C1D0487188ED204D4D959CEB62D" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { "MsmKey" = "8:_334B309CE72870CC620EAB7737749CDB" - "OwnerKey" = "8:_295C95460CE37C9B5A2F236412BA3C46" + "OwnerKey" = "8:_C7F134A916AA74F022E8AE46F8C27961" "MsmSig" = "8:_UNDEFINED" } "Entry" @@ -51,74 +57,92 @@ } "Entry" { + "MsmKey" = "8:_5E56A87ADF2554F4847ED3BEFD1497FC" + "OwnerKey" = "8:_9A642A9E3FEC4B88888C4B96086D59E8" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { "MsmKey" = "8:_63DC5055504D8E8030D07BDDC074A009" "OwnerKey" = "8:_9A642A9E3FEC4B88888C4B96086D59E8" "MsmSig" = "8:_UNDEFINED" } "Entry" { + "MsmKey" = "8:_6F3AF0877F2A0197B2BE03FDE4C25D49" + "OwnerKey" = "8:_9A642A9E3FEC4B88888C4B96086D59E8" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { "MsmKey" = "8:_7010B5ED2C1B4E82D3DBE2B590A4FC8E" "OwnerKey" = "8:_9A642A9E3FEC4B88888C4B96086D59E8" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_8CD29D0F38634408AC33359D27B44035" - "OwnerKey" = "8:_UNDEFINED" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { "MsmKey" = "8:_9A642A9E3FEC4B88888C4B96086D59E8" "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_9F004B0F8506B523869FACB14EFF064D" - "OwnerKey" = "8:_0BDF79321B394EC0E77BF680C3F40422" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_9F004B0F8506B523869FACB14EFF064D" + "MsmKey" = "8:_AF682C1D0487188ED204D4D959CEB62D" "OwnerKey" = "8:_9A642A9E3FEC4B88888C4B96086D59E8" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_9F004B0F8506B523869FACB14EFF064D" - "OwnerKey" = "8:_8CD29D0F38634408AC33359D27B44035" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { "MsmKey" = "8:_C2E6C8EB1D62D3C8FA1D1C243958D2D5" "OwnerKey" = "8:_9A642A9E3FEC4B88888C4B96086D59E8" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_FE5CFB2A37C82C1C9824F67FFE127C01" + "MsmKey" = "8:_C7F134A916AA74F022E8AE46F8C27961" "OwnerKey" = "8:_9A642A9E3FEC4B88888C4B96086D59E8" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_FE5CFB2A37C82C1C9824F67FFE127C01" + "OwnerKey" = "8:_9A642A9E3FEC4B88888C4B96086D59E8" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_9F004B0F8506B523869FACB14EFF064D" + "OwnerKey" = "8:_63DC5055504D8E8030D07BDDC074A009" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_0BDF79321B394EC0E77BF680C3F40422" + "OwnerKey" = "8:_7010B5ED2C1B4E82D3DBE2B590A4FC8E" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_UNDEFINED" + "OwnerKey" = "8:_6F3AF0877F2A0197B2BE03FDE4C25D49" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_UNDEFINED" + "OwnerKey" = "8:_C7F134A916AA74F022E8AE46F8C27961" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_UNDEFINED" + "OwnerKey" = "8:_334B309CE72870CC620EAB7737749CDB" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_UNDEFINED" + "OwnerKey" = "8:_3EF5004CB20A413815D0A2588A19CDD4" "MsmSig" = "8:_UNDEFINED" } "Entry" @@ -130,43 +154,25 @@ "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_3EF5004CB20A413815D0A2588A19CDD4" + "OwnerKey" = "8:_099780B8FCF4932D55DA0D38B877DFC8" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_334B309CE72870CC620EAB7737749CDB" + "OwnerKey" = "8:_AF682C1D0487188ED204D4D959CEB62D" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_295C95460CE37C9B5A2F236412BA3C46" + "OwnerKey" = "8:_5E56A87ADF2554F4847ED3BEFD1497FC" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_7010B5ED2C1B4E82D3DBE2B590A4FC8E" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_63DC5055504D8E8030D07BDDC074A009" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_9A642A9E3FEC4B88888C4B96086D59E8" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_8CD29D0F38634408AC33359D27B44035" + "OwnerKey" = "8:_30F0A6A7F5B98239D94FA1AA5EACCD2E" "MsmSig" = "8:_UNDEFINED" } } @@ -194,6 +200,14 @@ "PrerequisitesLocation" = "2:1" "Url" = "8:" "ComponentsUrl" = "8:" + "Items" + { + "{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:.NETFramework,Version=v4.5" + { + "Name" = "8:Microsoft .NET Framework 4.5 (x86 and x64)" + "ProductCode" = "8:.NETFramework,Version=v4.5" + } + } } } "Release" @@ -218,6 +232,14 @@ "PrerequisitesLocation" = "2:1" "Url" = "8:" "ComponentsUrl" = "8:" + "Items" + { + "{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:.NETFramework,Version=v4.5" + { + "Name" = "8:Microsoft .NET Framework 4.5 (x86 and x64)" + "ProductCode" = "8:.NETFramework,Version=v4.5" + } + } } } } @@ -248,15 +270,20 @@ } "File" { - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_0BDF79321B394EC0E77BF680C3F40422" + "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_099780B8FCF4932D55DA0D38B877DFC8" { "AssemblyRegister" = "3:1" "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:SharpDisplayClient, Version=1.0.0.0, Culture=neutral, processorArchitecture=x86" + "AssemblyAsmDisplayName" = "8:SharpDisplayIdleClient, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL" "ScatterAssemblies" { + "_099780B8FCF4932D55DA0D38B877DFC8" + { + "Name" = "8:SharpDisplayIdleClient.exe" + "Attributes" = "3:512" + } } - "SourcePath" = "8:SharpDisplayClient.exe" + "SourcePath" = "8:SharpDisplayIdleClient.exe" "TargetName" = "8:" "Tag" = "8:" "Folder" = "8:_E283B42AF1634497931184D1A685745A" @@ -274,15 +301,20 @@ "IsDependency" = "11:TRUE" "IsolateTo" = "8:" } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_295C95460CE37C9B5A2F236412BA3C46" + "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_30F0A6A7F5B98239D94FA1AA5EACCD2E" { "AssemblyRegister" = "3:1" "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:SharpLibHid, Version=1.0.0.0, Culture=neutral, processorArchitecture=x86" + "AssemblyAsmDisplayName" = "8:SharpLibDisplay, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL" "ScatterAssemblies" { + "_30F0A6A7F5B98239D94FA1AA5EACCD2E" + { + "Name" = "8:SharpLibDisplay.dll" + "Attributes" = "3:512" + } } - "SourcePath" = "8:SharpLibHid.dll" + "SourcePath" = "8:SharpLibDisplay.dll" "TargetName" = "8:" "Tag" = "8:" "Folder" = "8:_E283B42AF1634497931184D1A685745A" @@ -307,6 +339,11 @@ "AssemblyAsmDisplayName" = "8:SharpLibWin32, Version=1.0.0.0, Culture=neutral, processorArchitecture=x86" "ScatterAssemblies" { + "_334B309CE72870CC620EAB7737749CDB" + { + "Name" = "8:SharpLibWin32.dll" + "Attributes" = "3:512" + } } "SourcePath" = "8:SharpLibWin32.dll" "TargetName" = "8:" @@ -333,6 +370,11 @@ "AssemblyAsmDisplayName" = "8:NAudio, Version=1.7.3.0, Culture=neutral, processorArchitecture=MSIL" "ScatterAssemblies" { + "_3EF5004CB20A413815D0A2588A19CDD4" + { + "Name" = "8:NAudio.dll" + "Attributes" = "3:512" + } } "SourcePath" = "8:NAudio.dll" "TargetName" = "8:" @@ -352,6 +394,37 @@ "IsDependency" = "11:TRUE" "IsolateTo" = "8:" } + "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_5E56A87ADF2554F4847ED3BEFD1497FC" + { + "AssemblyRegister" = "3:1" + "AssemblyIsInGAC" = "11:FALSE" + "AssemblyAsmDisplayName" = "8:PowerManager, Version=1.0.5865.26649, Culture=neutral, processorArchitecture=x86" + "ScatterAssemblies" + { + "_5E56A87ADF2554F4847ED3BEFD1497FC" + { + "Name" = "8:PowerManager.dll" + "Attributes" = "3:512" + } + } + "SourcePath" = "8:PowerManager.dll" + "TargetName" = "8:" + "Tag" = "8:" + "Folder" = "8:_E283B42AF1634497931184D1A685745A" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "Vital" = "11:TRUE" + "ReadOnly" = "11:FALSE" + "Hidden" = "11:FALSE" + "System" = "11:FALSE" + "Permanent" = "11:FALSE" + "SharedLegacy" = "11:FALSE" + "PackageAs" = "3:1" + "Register" = "3:1" + "Exclude" = "11:FALSE" + "IsDependency" = "11:TRUE" + "IsolateTo" = "8:" + } "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_63DC5055504D8E8030D07BDDC074A009" { "AssemblyRegister" = "3:1" @@ -359,6 +432,11 @@ "AssemblyAsmDisplayName" = "8:System.Xml.Serialization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" "ScatterAssemblies" { + "_63DC5055504D8E8030D07BDDC074A009" + { + "Name" = "8:System.Xml.Serialization.dll" + "Attributes" = "3:512" + } } "SourcePath" = "8:System.Xml.Serialization.dll" "TargetName" = "8:" @@ -378,6 +456,37 @@ "IsDependency" = "11:TRUE" "IsolateTo" = "8:" } + "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_6F3AF0877F2A0197B2BE03FDE4C25D49" + { + "AssemblyRegister" = "3:1" + "AssemblyIsInGAC" = "11:FALSE" + "AssemblyAsmDisplayName" = "8:SharpLibNotification, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL" + "ScatterAssemblies" + { + "_6F3AF0877F2A0197B2BE03FDE4C25D49" + { + "Name" = "8:SharpLibNotification.dll" + "Attributes" = "3:512" + } + } + "SourcePath" = "8:SharpLibNotification.dll" + "TargetName" = "8:" + "Tag" = "8:" + "Folder" = "8:_E283B42AF1634497931184D1A685745A" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "Vital" = "11:TRUE" + "ReadOnly" = "11:FALSE" + "Hidden" = "11:FALSE" + "System" = "11:FALSE" + "Permanent" = "11:FALSE" + "SharedLegacy" = "11:FALSE" + "PackageAs" = "3:1" + "Register" = "3:1" + "Exclude" = "11:FALSE" + "IsDependency" = "11:TRUE" + "IsolateTo" = "8:" + } "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_7010B5ED2C1B4E82D3DBE2B590A4FC8E" { "AssemblyRegister" = "3:1" @@ -385,6 +494,11 @@ "AssemblyAsmDisplayName" = "8:LibCecSharp, Version=2.2.0.0, Culture=neutral, processorArchitecture=x86" "ScatterAssemblies" { + "_7010B5ED2C1B4E82D3DBE2B590A4FC8E" + { + "Name" = "8:LibCecSharp.dll" + "Attributes" = "3:512" + } } "SourcePath" = "8:LibCecSharp.dll" "TargetName" = "8:" @@ -404,15 +518,20 @@ "IsDependency" = "11:TRUE" "IsolateTo" = "8:" } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_9F004B0F8506B523869FACB14EFF064D" + "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_AF682C1D0487188ED204D4D959CEB62D" { "AssemblyRegister" = "3:1" "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:SharpDisplayInterface, Version=1.0.0.0, Culture=neutral, processorArchitecture=x86" + "AssemblyAsmDisplayName" = "8:SharpDisplayClient, Version=1.0.0.0, Culture=neutral, processorArchitecture=x86" "ScatterAssemblies" { + "_AF682C1D0487188ED204D4D959CEB62D" + { + "Name" = "8:SharpDisplayClient.exe" + "Attributes" = "3:512" + } } - "SourcePath" = "8:SharpDisplayInterface.dll" + "SourcePath" = "8:SharpDisplayClient.exe" "TargetName" = "8:" "Tag" = "8:" "Folder" = "8:_E283B42AF1634497931184D1A685745A" @@ -437,6 +556,11 @@ "AssemblyAsmDisplayName" = "8:MiniDisplayInterop, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL" "ScatterAssemblies" { + "_C2E6C8EB1D62D3C8FA1D1C243958D2D5" + { + "Name" = "8:MiniDisplayInterop.dll" + "Attributes" = "3:512" + } } "SourcePath" = "8:MiniDisplayInterop.dll" "TargetName" = "8:" @@ -456,15 +580,20 @@ "IsDependency" = "11:TRUE" "IsolateTo" = "8:" } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_FE5CFB2A37C82C1C9824F67FFE127C01" + "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_C7F134A916AA74F022E8AE46F8C27961" { "AssemblyRegister" = "3:1" "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:PowerManager, Version=1.0.5750.26884, Culture=neutral, processorArchitecture=x86" + "AssemblyAsmDisplayName" = "8:SharpLibHid, Version=1.0.0.0, Culture=neutral, processorArchitecture=x86" "ScatterAssemblies" { + "_C7F134A916AA74F022E8AE46F8C27961" + { + "Name" = "8:SharpLibHid.dll" + "Attributes" = "3:512" + } } - "SourcePath" = "8:PowerManager.dll" + "SourcePath" = "8:SharpLibHid.dll" "TargetName" = "8:" "Tag" = "8:" "Folder" = "8:_E283B42AF1634497931184D1A685745A" @@ -1099,7 +1228,7 @@ { "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_308A8F48F8964F139523D844FD3A1B06" { - "SourcePath" = "8:..\\bin\\x86\\Release\\PowerManager.dll" + "SourcePath" = "8:..\\bin\\x86\\Debug\\PowerManager.dll" "TargetName" = "8:" "Tag" = "8:" "Folder" = "8:_E283B42AF1634497931184D1A685745A" @@ -1125,37 +1254,9 @@ { } } - "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_8CD29D0F38634408AC33359D27B44035" - { - "SourcePath" = "8:..\\bin\\x86\\Release\\obj\\x86\\Release\\SharpDisplayClient.exe" - "TargetName" = "8:" - "Tag" = "8:" - "Folder" = "8:_E283B42AF1634497931184D1A685745A" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:FALSE" - "IsDependency" = "11:FALSE" - "IsolateTo" = "8:" - "ProjectOutputGroupRegister" = "3:1" - "OutputConfiguration" = "8:" - "OutputGroupCanonicalName" = "8:Built" - "OutputProjectGuid" = "8:{7EE64074-8CDB-4448-B40C-81B75D6B31CD}" - "ShowKeyOutput" = "11:TRUE" - "ExcludeFilters" - { - } - } "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_9A642A9E3FEC4B88888C4B96086D59E8" { - "SourcePath" = "8:..\\bin\\x86\\Release\\obj\\x86\\Release\\SharpDisplayManager.exe" + "SourcePath" = "8:..\\bin\\x86\\Debug\\obj\\x86\\Debug\\SharpDisplayManager.exe" "TargetName" = "8:" "Tag" = "8:" "Folder" = "8:_E283B42AF1634497931184D1A685745A" diff -r bedae992f4ee -r 60977f2b3ca7 SharpDisplayManager.sln --- a/SharpDisplayManager.sln Tue Feb 02 19:50:33 2016 +0100 +++ b/SharpDisplayManager.sln Wed Feb 03 13:02:48 2016 +0100 @@ -5,14 +5,14 @@ MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpDisplayManager", "Server\SharpDisplayManager.csproj", "{1DA8C1B3-18C5-4E74-BE4E-0B0E15FBAF49}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpDisplayClient", "Client\SharpDisplayClient.csproj", "{7EE64074-8CDB-4448-B40C-81B75D6B31CD}" -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PowerManager", "PowerManager\PowerManager.vcxproj", "{C174F23D-3055-49BC-B6B0-563011AF624D}" EndProject Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "Setup", "Setup\Setup.vdproj", "{22C920A9-2352-4DC9-91E2-035EBD712866}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpDisplayIdleClient", "Clients\Idle\SharpDisplayIdleClient.csproj", "{A76579E5-AA8D-45A3-99E1-239A5C030A78}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpDisplayClient", "Clients\Test\SharpDisplayClient.csproj", "{7EE64074-8CDB-4448-B40C-81B75D6B31CD}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -35,18 +35,6 @@ {1DA8C1B3-18C5-4E74-BE4E-0B0E15FBAF49}.Release|x64.Build.0 = Release|Any CPU {1DA8C1B3-18C5-4E74-BE4E-0B0E15FBAF49}.Release|x86.ActiveCfg = Release|x86 {1DA8C1B3-18C5-4E74-BE4E-0B0E15FBAF49}.Release|x86.Build.0 = Release|x86 - {7EE64074-8CDB-4448-B40C-81B75D6B31CD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7EE64074-8CDB-4448-B40C-81B75D6B31CD}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7EE64074-8CDB-4448-B40C-81B75D6B31CD}.Debug|x64.ActiveCfg = Debug|Any CPU - {7EE64074-8CDB-4448-B40C-81B75D6B31CD}.Debug|x64.Build.0 = Debug|Any CPU - {7EE64074-8CDB-4448-B40C-81B75D6B31CD}.Debug|x86.ActiveCfg = Debug|x86 - {7EE64074-8CDB-4448-B40C-81B75D6B31CD}.Debug|x86.Build.0 = Debug|x86 - {7EE64074-8CDB-4448-B40C-81B75D6B31CD}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7EE64074-8CDB-4448-B40C-81B75D6B31CD}.Release|Any CPU.Build.0 = Release|Any CPU - {7EE64074-8CDB-4448-B40C-81B75D6B31CD}.Release|x64.ActiveCfg = Release|Any CPU - {7EE64074-8CDB-4448-B40C-81B75D6B31CD}.Release|x64.Build.0 = Release|Any CPU - {7EE64074-8CDB-4448-B40C-81B75D6B31CD}.Release|x86.ActiveCfg = Release|x86 - {7EE64074-8CDB-4448-B40C-81B75D6B31CD}.Release|x86.Build.0 = Release|x86 {C174F23D-3055-49BC-B6B0-563011AF624D}.Debug|Any CPU.ActiveCfg = Debug|Win32 {C174F23D-3055-49BC-B6B0-563011AF624D}.Debug|x64.ActiveCfg = Debug|x64 {C174F23D-3055-49BC-B6B0-563011AF624D}.Debug|x64.Build.0 = Debug|x64 @@ -75,6 +63,18 @@ {A76579E5-AA8D-45A3-99E1-239A5C030A78}.Release|x64.Build.0 = Release|Any CPU {A76579E5-AA8D-45A3-99E1-239A5C030A78}.Release|x86.ActiveCfg = Release|Any CPU {A76579E5-AA8D-45A3-99E1-239A5C030A78}.Release|x86.Build.0 = Release|Any CPU + {7EE64074-8CDB-4448-B40C-81B75D6B31CD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7EE64074-8CDB-4448-B40C-81B75D6B31CD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7EE64074-8CDB-4448-B40C-81B75D6B31CD}.Debug|x64.ActiveCfg = Debug|Any CPU + {7EE64074-8CDB-4448-B40C-81B75D6B31CD}.Debug|x64.Build.0 = Debug|Any CPU + {7EE64074-8CDB-4448-B40C-81B75D6B31CD}.Debug|x86.ActiveCfg = Debug|x86 + {7EE64074-8CDB-4448-B40C-81B75D6B31CD}.Debug|x86.Build.0 = Debug|x86 + {7EE64074-8CDB-4448-B40C-81B75D6B31CD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7EE64074-8CDB-4448-B40C-81B75D6B31CD}.Release|Any CPU.Build.0 = Release|Any CPU + {7EE64074-8CDB-4448-B40C-81B75D6B31CD}.Release|x64.ActiveCfg = Release|Any CPU + {7EE64074-8CDB-4448-B40C-81B75D6B31CD}.Release|x64.Build.0 = Release|Any CPU + {7EE64074-8CDB-4448-B40C-81B75D6B31CD}.Release|x86.ActiveCfg = Release|x86 + {7EE64074-8CDB-4448-B40C-81B75D6B31CD}.Release|x86.Build.0 = Release|x86 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE