# HG changeset patch # User StephaneLenclud # Date 1454439033 -3600 # Node ID bedae992f4ee4916cf2d717b9db03d2171d4f75b # Parent 12372d6d7a47d03f72889b8f93a29cadaabf3192 Creating Idle Client project. diff -r 12372d6d7a47 -r bedae992f4ee Clients/Idle/App.config --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Clients/Idle/App.config Tue Feb 02 19:50:33 2016 +0100 @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff -r 12372d6d7a47 -r bedae992f4ee Clients/Idle/FormIdleClient.Designer.cs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Clients/Idle/FormIdleClient.Designer.cs Tue Feb 02 19:50:33 2016 +0100 @@ -0,0 +1,47 @@ +namespace SharpDisplayIdleClient +{ + partial class FormIdleClient + { + /// + /// 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.SuspendLayout(); + // + // FormIdleClient + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(531, 303); + this.Name = "FormIdleClient"; + this.Text = "Sharp Display Idle Client"; + this.ResumeLayout(false); + + } + + #endregion + } +} + diff -r 12372d6d7a47 -r bedae992f4ee Clients/Idle/FormIdleClient.cs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Clients/Idle/FormIdleClient.cs Tue Feb 02 19:50:33 2016 +0100 @@ -0,0 +1,22 @@ +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; + +namespace SharpDisplayIdleClient +{ + public partial class FormIdleClient : Form + { + public StartParams Params { get; set; } + + public FormIdleClient() + { + InitializeComponent(); + } + } +} diff -r 12372d6d7a47 -r bedae992f4ee Clients/Idle/FormIdleClient.resx --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Clients/Idle/FormIdleClient.resx Tue Feb 02 19:50:33 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 12372d6d7a47 -r bedae992f4ee Clients/Idle/Program.cs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Clients/Idle/Program.cs Tue Feb 02 19:50:33 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 SharpDisplayIdleClient +{ + 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 FormIdleClient()); + } + + [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); + FormIdleClient form = new FormIdleClient(); + form.Params = (StartParams)aParams; + Application.Run(form); + } + + } + + 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 12372d6d7a47 -r bedae992f4ee Clients/Idle/Properties/AssemblyInfo.cs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Clients/Idle/Properties/AssemblyInfo.cs Tue Feb 02 19:50:33 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("SharpDisplayIdleClient")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("SharpDisplayIdleClient")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[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("a76579e5-aa8d-45a3-99e1-239a5c030a78")] + +// 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 12372d6d7a47 -r bedae992f4ee Clients/Idle/Properties/Resources.Designer.cs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Clients/Idle/Properties/Resources.Designer.cs Tue Feb 02 19:50:33 2016 +0100 @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// 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 SharpDisplayIdleClient.Properties +{ + + + /// + /// 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 ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SharpDisplayIdleClient.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 12372d6d7a47 -r bedae992f4ee Clients/Idle/Properties/Resources.resx --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Clients/Idle/Properties/Resources.resx Tue Feb 02 19:50:33 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 12372d6d7a47 -r bedae992f4ee Clients/Idle/Properties/Settings.Designer.cs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Clients/Idle/Properties/Settings.Designer.cs Tue Feb 02 19:50:33 2016 +0100 @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// 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 SharpDisplayIdleClient.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.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 12372d6d7a47 -r bedae992f4ee Clients/Idle/Properties/Settings.settings --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Clients/Idle/Properties/Settings.settings Tue Feb 02 19:50:33 2016 +0100 @@ -0,0 +1,7 @@ + + + + + + + diff -r 12372d6d7a47 -r bedae992f4ee Clients/Idle/SharpDisplayIdleClient.csproj --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Clients/Idle/SharpDisplayIdleClient.csproj Tue Feb 02 19:50:33 2016 +0100 @@ -0,0 +1,90 @@ + + + + + Debug + AnyCPU + {A76579E5-AA8D-45A3-99E1-239A5C030A78} + WinExe + Properties + SharpDisplayIdleClient + SharpDisplayIdleClient + v4.5.2 + 512 + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + Form + + + FormIdleClient.cs + + + + + FormIdleClient.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + + \ No newline at end of file diff -r 12372d6d7a47 -r bedae992f4ee Server/MainForm.Designer.cs --- a/Server/MainForm.Designer.cs Tue Feb 02 18:59:45 2016 +0100 +++ b/Server/MainForm.Designer.cs Tue Feb 02 19:50:33 2016 +0100 @@ -111,6 +111,7 @@ this.labelFontHeight = new System.Windows.Forms.Label(); this.toolTip = new System.Windows.Forms.ToolTip(this.components); this.openFileDialog = new System.Windows.Forms.OpenFileDialog(); + this.iButtonStartIdleClient = new System.Windows.Forms.Button(); this.panelDisplay.SuspendLayout(); this.iTableLayoutPanel.SuspendLayout(); this.statusStrip.SuspendLayout(); @@ -244,6 +245,7 @@ // // tabPageClients // + this.tabPageClients.Controls.Add(this.iButtonStartIdleClient); this.tabPageClients.Controls.Add(this.buttonCloseClients); this.tabPageClients.Controls.Add(this.buttonStartClient); this.tabPageClients.Controls.Add(this.iTreeViewClients); @@ -257,9 +259,9 @@ // // buttonCloseClients // - this.buttonCloseClients.Location = new System.Drawing.Point(6, 35); + this.buttonCloseClients.Location = new System.Drawing.Point(6, 213); this.buttonCloseClients.Name = "buttonCloseClients"; - this.buttonCloseClients.Size = new System.Drawing.Size(75, 23); + this.buttonCloseClients.Size = new System.Drawing.Size(96, 23); this.buttonCloseClients.TabIndex = 20; this.buttonCloseClients.Text = "Close Clients"; this.buttonCloseClients.UseVisualStyleBackColor = true; @@ -269,7 +271,7 @@ // this.buttonStartClient.Location = new System.Drawing.Point(6, 6); this.buttonStartClient.Name = "buttonStartClient"; - this.buttonStartClient.Size = new System.Drawing.Size(75, 23); + this.buttonStartClient.Size = new System.Drawing.Size(96, 23); this.buttonStartClient.TabIndex = 19; this.buttonStartClient.Text = "Start Client"; this.buttonStartClient.UseVisualStyleBackColor = true; @@ -280,9 +282,9 @@ this.iTreeViewClients.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.iTreeViewClients.Location = new System.Drawing.Point(87, 6); + this.iTreeViewClients.Location = new System.Drawing.Point(108, 6); this.iTreeViewClients.Name = "iTreeViewClients"; - this.iTreeViewClients.Size = new System.Drawing.Size(499, 233); + this.iTreeViewClients.Size = new System.Drawing.Size(478, 233); this.iTreeViewClients.TabIndex = 0; this.iTreeViewClients.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeViewClients_AfterSelect); // @@ -933,6 +935,16 @@ // this.openFileDialog.Filter = "EXE files (*.exe)|*.exe|All files (*.*)|*.*"; // + // iButtonStartIdleClient + // + this.iButtonStartIdleClient.Location = new System.Drawing.Point(6, 35); + this.iButtonStartIdleClient.Name = "iButtonStartIdleClient"; + this.iButtonStartIdleClient.Size = new System.Drawing.Size(96, 23); + this.iButtonStartIdleClient.TabIndex = 21; + this.iButtonStartIdleClient.Text = "Start Idle Client"; + this.iButtonStartIdleClient.UseVisualStyleBackColor = true; + this.iButtonStartIdleClient.Click += new System.EventHandler(this.ButtonStartIdleClient_Click); + // // MainForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -1053,6 +1065,7 @@ private System.Windows.Forms.ComboBox comboBoxHdmiPort; private System.Windows.Forms.CheckBox checkBoxCecMonitorOn; private System.Windows.Forms.CheckBox checkBoxCecMonitorOff; + private System.Windows.Forms.Button iButtonStartIdleClient; } } diff -r 12372d6d7a47 -r bedae992f4ee Server/MainForm.cs --- a/Server/MainForm.cs Tue Feb 02 18:59:45 2016 +0100 +++ b/Server/MainForm.cs Tue Feb 02 19:50:33 2016 +0100 @@ -1435,6 +1435,18 @@ BringToFront(); } + /// + /// Just launch our idle client. + /// + private void StartIdleClient(string aTopText = "", string aBottomText = "") + { + Thread clientThread = new Thread(SharpDisplayIdleClient.Program.MainWithParams); + SharpDisplayIdleClient.StartParams myParams = new SharpDisplayIdleClient.StartParams(new Point(this.Right, this.Top), aTopText, aBottomText); + clientThread.Start(myParams); + BringToFront(); + } + + private void buttonStartClient_Click(object sender, EventArgs e) { StartNewClient(); @@ -2514,5 +2526,10 @@ Properties.Settings.Default.CecMonitorOff); } } + + private void ButtonStartIdleClient_Click(object sender, EventArgs e) + { + StartIdleClient(); + } } } diff -r 12372d6d7a47 -r bedae992f4ee Server/MainForm.resx --- a/Server/MainForm.resx Tue Feb 02 18:59:45 2016 +0100 +++ b/Server/MainForm.resx Tue Feb 02 19:50:33 2016 +0100 @@ -185,6 +185,9 @@ WSC3/b/CbwiR/gNzbuWksIMBOAAAAABJRU5ErkJggg== + + 315, 17 + 405, 17 diff -r 12372d6d7a47 -r bedae992f4ee Server/SharpDisplayManager.csproj --- a/Server/SharpDisplayManager.csproj Tue Feb 02 18:59:45 2016 +0100 +++ b/Server/SharpDisplayManager.csproj Tue Feb 02 19:50:33 2016 +0100 @@ -218,6 +218,10 @@ + + {a76579e5-aa8d-45a3-99e1-239a5c030a78} + SharpDisplayIdleClient + {7ee64074-8cdb-4448-b40c-81b75d6b31cd} SharpDisplayClient diff -r 12372d6d7a47 -r bedae992f4ee SharpDisplayManager.sln --- a/SharpDisplayManager.sln Tue Feb 02 18:59:45 2016 +0100 +++ b/SharpDisplayManager.sln Tue Feb 02 19:50:33 2016 +0100 @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 14 -VisualStudioVersion = 14.0.23107.0 +VisualStudioVersion = 14.0.24720.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpDisplayManager", "Server\SharpDisplayManager.csproj", "{1DA8C1B3-18C5-4E74-BE4E-0B0E15FBAF49}" EndProject @@ -11,6 +11,8 @@ 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 Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -61,6 +63,18 @@ {22C920A9-2352-4DC9-91E2-035EBD712866}.Release|Any CPU.ActiveCfg = Release {22C920A9-2352-4DC9-91E2-035EBD712866}.Release|x64.ActiveCfg = Release {22C920A9-2352-4DC9-91E2-035EBD712866}.Release|x86.ActiveCfg = Release + {A76579E5-AA8D-45A3-99E1-239A5C030A78}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A76579E5-AA8D-45A3-99E1-239A5C030A78}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A76579E5-AA8D-45A3-99E1-239A5C030A78}.Debug|x64.ActiveCfg = Debug|Any CPU + {A76579E5-AA8D-45A3-99E1-239A5C030A78}.Debug|x64.Build.0 = Debug|Any CPU + {A76579E5-AA8D-45A3-99E1-239A5C030A78}.Debug|x86.ActiveCfg = Debug|Any CPU + {A76579E5-AA8D-45A3-99E1-239A5C030A78}.Debug|x86.Build.0 = Debug|Any CPU + {A76579E5-AA8D-45A3-99E1-239A5C030A78}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A76579E5-AA8D-45A3-99E1-239A5C030A78}.Release|Any CPU.Build.0 = Release|Any CPU + {A76579E5-AA8D-45A3-99E1-239A5C030A78}.Release|x64.ActiveCfg = Release|Any CPU + {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 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE