Merge branch 'CMS_Client' into develop

This commit is contained in:
CMS3762\carminatini
2017-12-01 16:55:30 +01:00
36 changed files with 5703 additions and 549 deletions
+18
View File
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" />
</startup>
<appSettings>
<!-- CMS Configuration -->
<add key="Url" value="http://localhost:9000/index.html" />
<add key="TranspColor" value="#00ff00" />
<add key="OpenNcHMI" value="true" /><!-- True|False: Open Nc HMI -->
<add key="NCType" value="0" /><!-- 0: Demo - 1: Fanuc - 2: Siemens - 3: Osai -->
<add key="IDClient" value="1" /><!-- 1.. N Client Identification -->
<!-- ... -->
</appSettings>
</configuration>
@@ -0,0 +1,130 @@
using CefSharp;
using CMS_Client.Config;
using CMS_Client.View;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace CMS_Client.Browser_Tools
{
public class BrowserJSObject
{
//The first letter of All PUBLIC Variables and Methods must be Lower-Case (CEF Settings)
private MainForm mainForm;
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#region CONSTRUCTOR_METHOD
//Constructor Method
public BrowserJSObject(MainForm f)
{
mainForm = f;
}
#endregion
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#region FORM_BEHAVIOUR_METHODS
//Minimize Main Window
public void minimizeForm()
{
//Invoke method if is needed or call the method in STD mode
if (mainForm.InvokeRequired)
mainForm.Invoke((MethodInvoker)delegate () {
mainForm.WindowState = FormWindowState.Minimized;
});
else
{
mainForm.WindowState = FormWindowState.Minimized;
}
}
//Maximize Main Window
public void maximizeForm()
{
//Invoke method if is needed or call the method in STD mode
if (mainForm.InvokeRequired)
mainForm.Invoke((MethodInvoker)delegate () {
mainForm.WindowState = FormWindowState.Maximized;
});
else
{
mainForm.WindowState = FormWindowState.Maximized;
}
}
//Close Main Window
public void closeForm()
{
//If the mainform is disposed do nothing
if (mainForm.IsDisposed)
return;
//Invoke method if is needed or call the method in STD mode
if (mainForm.InvokeRequired)
mainForm.Invoke((MethodInvoker)delegate () {
mainForm.Close();
});
else
{
mainForm.Close();
}
}
#endregion
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#region NC_BEHAVIOUR_METHODS
//Move NC Window
public void moveNcWindow(int X,int Y)
{
if (CMSConfiguration.HMINcPresent)
NcWindow.MoveNcWindow(X, Y);
}
#endregion
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#region CHROMIUM_METHODS
//Get the Version of Chromium
public String getChromiumVersion()
{
return Cef.ChromiumVersion;
}
#endregion
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#region STEP_METHODS
//Get the ID of STEP Client
public ushort getClientID()
{
return CMSConfiguration.IDClient;
}
public void forceStepFocus()
{
NcWindow.ForceStepFocus();
}
#endregion
}
}
@@ -0,0 +1,118 @@
using CefSharp;
using System.Windows.Forms;
namespace CMS_Client.Browser_Tools
{
class CefBrowserKeyHandler : IKeyboardHandler
{
//Const value of F1..F12 Keys
const int KeyF1 = 112;
const int KeyF2 = 113;
const int KeyF3 = 114;
const int KeyF4 = 115;
const int KeyF5 = 116;
const int KeyF6 = 117;
const int KeyF7 = 118;
const int KeyF8 = 119;
const int KeyF9 = 120;
const int KeyF10= 121;
const int KeyF11= 122;
const int KeyF12= 123;
const int KeyShift = 16;
const int KeyCtrl = 17;
const int KeyAlt = 18;
//Check Hotkey Pressed
bool AltPressed = false;
bool ShiftPressed = false;
bool CtrlPressed = false;
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#region GLOBAL_METHODS
//Metod called by Browser when a key is pressed
public bool OnKeyEvent(IWebBrowser browserControl, IBrowser browser, KeyType type, int windowsKeyCode, int nativeKeyCode, CefEventFlags modifiers, bool isSystemKey)
{
//Check only if it a Key-Down event
if(type == KeyType.KeyDown || type == KeyType.RawKeyDown)
{
//Elaborates Hotkeys
KeyDwHotkeys(windowsKeyCode);
//Filter the FKey only if is with ALT key
if(AltPressed)
{
//Do things different by F Keys
switch (windowsKeyCode)
{
//F1 -> Go to Back page
case KeyF1: browser.GoBack(); break;
//F2 -> Go to Next page
case KeyF2: browser.GoForward(); break;
//F5 -> Reload this page
case KeyF5: browser.Reload(true); break;
//F12 -> Show Dev Tools
case KeyF12: browser.ShowDevTools(); break;
//F4 -> Exit application
case KeyF4: Application.Exit(); break;
}
return true;
}
}
//Check only if it a Key-Up event
else if (type == KeyType.KeyUp)
//Elaborates Hotkeys
KeyUpHotkeys(windowsKeyCode);
return false;
}
//Metod called by Browser when a key is pre-pressed
public bool OnPreKeyEvent(IWebBrowser browserControl, IBrowser browser, KeyType type, int windowsKeyCode, int nativeKeyCode, CefEventFlags modifiers, bool isSystemKey, ref bool isKeyboardShortcut)
{
return false;
}
#endregion
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#region PRIVATE_CUSTOM_METHODS
private void KeyDwHotkeys(int windowsKeyCode)
{
if (windowsKeyCode == KeyShift)
ShiftPressed = true;
else if(windowsKeyCode == KeyCtrl)
CtrlPressed = true;
else if (windowsKeyCode == KeyAlt)
AltPressed = true;
}
private void KeyUpHotkeys(int windowsKeyCode)
{
if (windowsKeyCode == KeyShift)
ShiftPressed = false;
else if (windowsKeyCode == KeyCtrl)
CtrlPressed = false;
else if (windowsKeyCode == KeyAlt)
AltPressed = false;
}
#endregion
}
}
@@ -0,0 +1,26 @@
using CefSharp;
using System.Diagnostics;
namespace CMS_Client.Browser_Tools
{
internal class CefBrowserMenuHandler : IContextMenuHandler
{
public void OnBeforeContextMenu(IWebBrowser browserControl, IBrowser browser, IFrame frame, IContextMenuParams parameters, IMenuModel model)
{
}
public bool OnContextMenuCommand(IWebBrowser browserControl, IBrowser browser, IFrame frame, IContextMenuParams parameters, CefMenuCommand commandId, CefEventFlags eventFlags)
{
return true;
}
public void OnContextMenuDismissed(IWebBrowser browserControl, IBrowser browser, IFrame frame)
{
}
public bool RunContextMenu(IWebBrowser browserControl, IBrowser browser, IFrame frame, IContextMenuParams parameters, IMenuModel model, IRunContextMenuCallback callback)
{
return true;
}
}
}
+13
View File
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PublishUrlHistory>publish\</PublishUrlHistory>
<InstallUrlHistory />
<SupportUrlHistory />
<UpdateUrlHistory />
<BootstrapperUrlHistory />
<ErrorReportUrlHistory />
<FallbackCulture>it-IT</FallbackCulture>
<VerifyUploadedFiles>false</VerifyUploadedFiles>
</PropertyGroup>
</Project>
+216
View File
@@ -0,0 +1,216 @@
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CMS_Client.Config
{
public static class CMSConfiguration
{
public static String CustomUrl = "";
public static String FirstUrl = "http://google.it";
public static ushort NCType = 0; /* 0: Demo - 1: Fanuc - 2: Siemens - 3: Osai */
public static ushort IDClient = 0; /* 0: Demo - 1: Fanuc - 2: Siemens - 3: Osai */
public static Color TransparencyKey = Color.Fuchsia;
public static bool HMINcPresent = false;
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//Read All setup Variables
public static String InitializeSettings()
{
//Setup the first URL
if (String.IsNullOrEmpty(CustomUrl))
{
if (!readFirstUrl(out FirstUrl))
return @"Configuration Error: ""Url"" is not a valid URL";
}
else
FirstUrl = CustomUrl;
//Setup NC Type
if (!readNcPresent(out HMINcPresent))
return @"Configuration Error: ""OpenNcHMI"" is not a valid Boolean Type";
//Setup NC Type
if (!readNCType(out NCType))
return @"Configuration Error: ""NCType"" is not a valid NC Type";
//Setup ID Client
if (!readIdClient(out IDClient))
return @"Configuration Error: ""IDClient"" is not a valid Id of CMS-Client";
//Setup the Transparency Key
if (!readTransparencyKey(out TransparencyKey))
return @"Configuration Error: ""TranspColor"" is not a valid Hex Color";
return "";
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#region SINGLE_PROPERTY_READS
//Setup the first URL
public static bool readFirstUrl(out String Url)
{
Url = "http://localhost:8080";
//Read the Key
String UrlNew = ConfigurationManager.AppSettings["Url"];
//Check if it's NULL
if (String.IsNullOrWhiteSpace(UrlNew))
return false;
//Check if it a valid URL
try
{
new Uri(UrlNew);
}
catch (Exception)
{
return false;
}
//Returns
Url = UrlNew;
return true;
}
//Setup the Transparency Key
public static bool readTransparencyKey(out Color color)
{
//Default Value
color = Color.Fuchsia;
//Read the Key
String TranspKey = ConfigurationManager.AppSettings["TranspColor"];
//Check if it's NULL
if (String.IsNullOrWhiteSpace(TranspKey))
return false;
//Check if it a valid Color
try
{
color = ColorTranslator.FromHtml(TranspKey);
}
catch (Exception)
{
return false;
}
//Returns
return true;
}
//Setup the Transparency Key
public static bool readNCType(out ushort Type)
{
//Default Value
Type = 0;
//Read the Key
String Stype = ConfigurationManager.AppSettings["NCType"];
//Check if it's NULL
if (String.IsNullOrWhiteSpace(Stype))
return false;
//Check if it a valid NC
try
{
Type = ushort.Parse(Stype);
//Check if it is not valid
if(Type > 3)
return false;
}
catch (Exception)
{
return false;
}
//Returns
return true;
}
//Setup the Transparency Key
public static bool readIdClient(out ushort IdClient)
{
//Default Value
IdClient = 1;
//Read the Key
String Sid = ConfigurationManager.AppSettings["IDClient"];
//Check if it's NULL
if (String.IsNullOrWhiteSpace(Sid))
return false;
//Check if it a valid NC
try
{
IdClient = ushort.Parse(Sid);
//Check if it is not valid
if (IdClient == 0)
return false;
}
catch (Exception)
{
return false;
}
//Returns
return true;
}
//Setup the Transparency Key
public static bool readNcPresent(out bool NcHmiPresent)
{
//Default Value
NcHmiPresent = false;
//Read the Key
String Sid = ConfigurationManager.AppSettings["OpenNcHMI"];
//Check if it's NULL
if (String.IsNullOrWhiteSpace(Sid))
return false;
//Check if it a valid NC
try
{
NcHmiPresent = Boolean.Parse(Sid);
}
catch (Exception)
{
return false;
}
//Returns
return true;
}
#endregion
}
}
+56
View File
@@ -0,0 +1,56 @@
using CefSharp;
using CMS_Client.Config;
using CMS_Client.View;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace CMS_Client
{
public static class Program
{
//Set the Mutef of GUID
static Mutex CmsStepMutex = new Mutex(true, "{66fa29db-925a-402b-a4c7-d3d780fb1bc3}");
[STAThread]
static void Main(string[] args)
{
//Check the first argument -> Url
if(args.Count() > 0)
{
Uri UrlResArg;
if(Uri.TryCreate(args[0], UriKind.Absolute, out UrlResArg) && (UrlResArg.Scheme == Uri.UriSchemeHttp || UrlResArg.Scheme == Uri.UriSchemeHttps))
CMSConfiguration.CustomUrl = args[0];
}
//Check if is already running an instance of this application
if (!CmsStepMutex.WaitOne(TimeSpan.Zero, true))
{
MessageBox.Show("Only one istance of " + Application.ProductName + " can be executed!",
Application.ProductName,
MessageBoxButtons.OK,
MessageBoxIcon.Error,
MessageBoxDefaultButton.Button1
);
Environment.Exit(0);
}
//Run the Loading Form
Application.Run(new LoadingForm());
//Run the Main-Browser Form
Application.Run(new MainForm());
NcWindow.ShowTaskBar();
}
}
}
+36
View File
@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// Le informazioni generali relative a un assembly sono controllate dal seguente
// set di attributi. Modificare i valori di questi attributi per modificare le informazioni
// associate a un assembly.
[assembly: AssemblyTitle("CMS-STEP Client")]
[assembly: AssemblyDescription("STEP Client For CMS Machines")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("CMS Spa")]
[assembly: AssemblyProduct("CMS-STEP Client")]
[assembly: AssemblyCopyright("Copyright © 2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Se si imposta ComVisible su false, i tipi in questo assembly non saranno visibili
// ai componenti COM. Se è necessario accedere a un tipo in questo assembly da
// COM, impostare su true l'attributo ComVisible per tale tipo.
[assembly: ComVisible(false)]
// Se il progetto viene esposto a COM, il GUID seguente verrà utilizzato come ID della libreria dei tipi
[assembly: Guid("66fa29db-925a-402b-a4c7-d3d780fb1bc3")]
// Le informazioni sulla versione di un assembly sono costituite dai seguenti quattro valori:
//
// Versione principale
// Versione secondaria
// Numero di build
// Revisione
//
// È possibile specificare tutti i valori oppure impostare valori predefiniti per i numeri relativi alla revisione e alla build
// usando l'asterisco '*' come illustrato di seguito:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.0.0.0")]
[assembly: AssemblyFileVersion("0.1.0.0")]
+93
View File
@@ -0,0 +1,93 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Il codice è stato generato da uno strumento.
// Versione runtime:4.0.30319.42000
//
// Le modifiche apportate a questo file possono provocare un comportamento non corretto e andranno perse se
// il codice viene rigenerato.
// </auto-generated>
//------------------------------------------------------------------------------
namespace CMS_Client.Properties {
using System;
/// <summary>
/// Classe di risorse fortemente tipizzata per la ricerca di stringhe localizzate e così via.
/// </summary>
// Questa classe è stata generata automaticamente dalla classe StronglyTypedResourceBuilder.
// tramite uno strumento quale ResGen o Visual Studio.
// Per aggiungere o rimuovere un membro, modificare il file con estensione ResX ed eseguire nuovamente ResGen
// con l'opzione /str oppure ricompilare il progetto VS.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.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() {
}
/// <summary>
/// Restituisce l'istanza di ResourceManager nella cache utilizzata da questa classe.
/// </summary>
[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("CMS_Client.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Esegue l'override della proprietà CurrentUICulture del thread corrente per tutte le
/// ricerche di risorse eseguite utilizzando questa classe di risorse fortemente tipizzata.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Cerca una risorsa localizzata di tipo System.Drawing.Icon simile a (Icona).
/// </summary>
internal static System.Drawing.Icon CMS_Icon {
get {
object obj = ResourceManager.GetObject("CMS_Icon", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
/// <summary>
/// Cerca una risorsa localizzata di tipo System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap CMS_LOGO {
get {
object obj = ResourceManager.GetObject("CMS_LOGO", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Cerca una risorsa localizzata di tipo System.Drawing.Icon simile a (Icona).
/// </summary>
internal static System.Drawing.Icon SinumerikHmi {
get {
object obj = ResourceManager.GetObject("SinumerikHmi", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
}
}
+130
View File
@@ -0,0 +1,130 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="CMS_Icon" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\CMS_Icon.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="CMS_LOGO" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\CMS_LOGO.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="SinumerikHmi" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\SinumerikHmi.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>
+26
View File
@@ -0,0 +1,26 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Il codice è stato generato da uno strumento.
// Versione runtime:4.0.30319.42000
//
// Le modifiche apportate a questo file possono provocare un comportamento non corretto e andranno perse se
// il codice viene rigenerato.
// </auto-generated>
//------------------------------------------------------------------------------
namespace CMS_Client.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.3.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;
}
}
}
}
+7
View File
@@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>
Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

+227
View File
@@ -0,0 +1,227 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\CefSharp.WinForms.57.0.0\build\CefSharp.WinForms.props" Condition="Exists('..\packages\CefSharp.WinForms.57.0.0\build\CefSharp.WinForms.props')" />
<Import Project="..\packages\CefSharp.Common.57.0.0\build\CefSharp.Common.props" Condition="Exists('..\packages\CefSharp.Common.57.0.0\build\CefSharp.Common.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{66FA29DB-925A-402B-A4C7-D3D780FB1BC3}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>CMS_Client</RootNamespace>
<AssemblyName>CMS_Client</AssemblyName>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<TargetFrameworkProfile />
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>x86</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>..\Step\bin\Client\x86\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
<UseVSHostingProcess>true</UseVSHostingProcess>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>bin\x86\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>Resources\CMS_Icon.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<StartupObject />
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.WindowsAPICodePack, Version=1.1.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.WindowsAPICodePack-Core.1.1.0.2\lib\Microsoft.WindowsAPICodePack.dll</HintPath>
</Reference>
<Reference Include="Microsoft.WindowsAPICodePack.Shell, Version=1.1.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.WindowsAPICodePack-Shell.1.1.0.0\lib\Microsoft.WindowsAPICodePack.Shell.dll</HintPath>
</Reference>
<Reference Include="Microsoft.WindowsAPICodePack.ShellExtensions, Version=1.1.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.WindowsAPICodePack-Shell.1.1.0.0\lib\Microsoft.WindowsAPICodePack.ShellExtensions.dll</HintPath>
</Reference>
<Reference Include="PresentationFramework" />
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Browser_Tools\BrowserJSObject.cs" />
<Compile Include="Browser_Tools\CefBrowserKeyHandler.cs" />
<Compile Include="Config\CMSConfiguration.cs" />
<Compile Include="Browser_Tools\CefBrowserMenuHandler.cs" />
<Compile Include="View\LoadingForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="View\LoadingForm.Designer.cs">
<DependentUpon>LoadingForm.cs</DependentUpon>
</Compile>
<Compile Include="View\MainForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="View\MainForm.Designer.cs">
<DependentUpon>MainForm.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="View\NcForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="View\NcForm.Designer.cs">
<DependentUpon>NcForm.cs</DependentUpon>
</Compile>
<Compile Include="View\NcWindow.cs" />
<EmbeddedResource Include="View\LoadingForm.resx">
<DependentUpon>LoadingForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="View\MainForm.resx">
<DependentUpon>MainForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<EmbeddedResource Include="View\NcForm.resx">
<DependentUpon>NcForm.cs</DependentUpon>
</EmbeddedResource>
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="App.config">
<SubType>Designer</SubType>
</None>
</ItemGroup>
<ItemGroup>
<None Include="Resources\CMS_LOGO.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\SIEMENS_ICON.bmp" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\SinumerikHmi.ico" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\CMS_Icon.ico" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.6.2">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4.6.2 %28x86 e x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\cef.redist.x64.3.2987.1601\build\cef.redist.x64.targets" Condition="Exists('..\packages\cef.redist.x64.3.2987.1601\build\cef.redist.x64.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>Questo progetto fa riferimento a uno o più pacchetti NuGet che non sono presenti in questo computer. Usare lo strumento di ripristino dei pacchetti NuGet per scaricarli. Per altre informazioni, vedere http://go.microsoft.com/fwlink/?LinkID=322105. Il file mancante è {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\cef.redist.x64.3.2987.1601\build\cef.redist.x64.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\cef.redist.x64.3.2987.1601\build\cef.redist.x64.targets'))" />
<Error Condition="!Exists('..\packages\cef.redist.x86.3.2987.1601\build\cef.redist.x86.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\cef.redist.x86.3.2987.1601\build\cef.redist.x86.targets'))" />
<Error Condition="!Exists('..\packages\CefSharp.Common.57.0.0\build\CefSharp.Common.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\CefSharp.Common.57.0.0\build\CefSharp.Common.props'))" />
<Error Condition="!Exists('..\packages\CefSharp.Common.57.0.0\build\CefSharp.Common.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\CefSharp.Common.57.0.0\build\CefSharp.Common.targets'))" />
<Error Condition="!Exists('..\packages\CefSharp.WinForms.57.0.0\build\CefSharp.WinForms.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\CefSharp.WinForms.57.0.0\build\CefSharp.WinForms.props'))" />
<Error Condition="!Exists('..\packages\CefSharp.WinForms.57.0.0\build\CefSharp.WinForms.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\CefSharp.WinForms.57.0.0\build\CefSharp.WinForms.targets'))" />
</Target>
<Import Project="..\packages\cef.redist.x86.3.2987.1601\build\cef.redist.x86.targets" Condition="Exists('..\packages\cef.redist.x86.3.2987.1601\build\cef.redist.x86.targets')" />
<Import Project="..\packages\CefSharp.Common.57.0.0\build\CefSharp.Common.targets" Condition="Exists('..\packages\CefSharp.Common.57.0.0\build\CefSharp.Common.targets')" />
<Import Project="..\packages\CefSharp.WinForms.57.0.0\build\CefSharp.WinForms.targets" Condition="Exists('..\packages\CefSharp.WinForms.57.0.0\build\CefSharp.WinForms.targets')" />
</Project>
+158
View File
@@ -0,0 +1,158 @@
namespace CMS_Client.View
{
partial class LoadingForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.StatusLBL = new System.Windows.Forms.TextBox();
this.ErrorLBL = new System.Windows.Forms.TextBox();
this.CloseLabel = new System.Windows.Forms.Label();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.VersionLBL = new System.Windows.Forms.TextBox();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
//
// StatusLBL
//
this.StatusLBL.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.StatusLBL.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(101)))), ((int)(((byte)(113)))), ((int)(((byte)(120)))));
this.StatusLBL.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.StatusLBL.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.StatusLBL.ForeColor = System.Drawing.Color.White;
this.StatusLBL.HideSelection = false;
this.StatusLBL.Location = new System.Drawing.Point(12, 135);
this.StatusLBL.Name = "StatusLBL";
this.StatusLBL.ReadOnly = true;
this.StatusLBL.ShortcutsEnabled = false;
this.StatusLBL.Size = new System.Drawing.Size(309, 13);
this.StatusLBL.TabIndex = 1;
this.StatusLBL.TabStop = false;
this.StatusLBL.UseWaitCursor = true;
//
// ErrorLBL
//
this.ErrorLBL.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.ErrorLBL.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(101)))), ((int)(((byte)(113)))), ((int)(((byte)(120)))));
this.ErrorLBL.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.ErrorLBL.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.ErrorLBL.ForeColor = System.Drawing.Color.Maroon;
this.ErrorLBL.HideSelection = false;
this.ErrorLBL.Location = new System.Drawing.Point(12, 154);
this.ErrorLBL.Name = "ErrorLBL";
this.ErrorLBL.ReadOnly = true;
this.ErrorLBL.ShortcutsEnabled = false;
this.ErrorLBL.Size = new System.Drawing.Size(309, 13);
this.ErrorLBL.TabIndex = 4;
this.ErrorLBL.TabStop = false;
this.ErrorLBL.UseWaitCursor = true;
//
// CloseLabel
//
this.CloseLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.CloseLabel.AutoSize = true;
this.CloseLabel.Cursor = System.Windows.Forms.Cursors.WaitCursor;
this.CloseLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.CloseLabel.ForeColor = System.Drawing.Color.White;
this.CloseLabel.Location = new System.Drawing.Point(304, 9);
this.CloseLabel.Name = "CloseLabel";
this.CloseLabel.Size = new System.Drawing.Size(21, 20);
this.CloseLabel.TabIndex = 5;
this.CloseLabel.Text = "X";
this.CloseLabel.UseWaitCursor = true;
this.CloseLabel.Click += new System.EventHandler(this.CloseLabel_Click);
this.CloseLabel.MouseEnter += new System.EventHandler(this.CloseLabel_MouseEnter);
this.CloseLabel.MouseLeave += new System.EventHandler(this.CloseLabel_MouseLeave);
//
// pictureBox1
//
this.pictureBox1.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.pictureBox1.Image = global::CMS_Client.Properties.Resources.CMS_LOGO;
this.pictureBox1.ImageLocation = "";
this.pictureBox1.InitialImage = global::CMS_Client.Properties.Resources.CMS_LOGO;
this.pictureBox1.Location = new System.Drawing.Point(12, 12);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(309, 98);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox1.TabIndex = 3;
this.pictureBox1.TabStop = false;
this.pictureBox1.UseWaitCursor = true;
//
// VersionLBL
//
this.VersionLBL.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.VersionLBL.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(101)))), ((int)(((byte)(113)))), ((int)(((byte)(120)))));
this.VersionLBL.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.VersionLBL.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.VersionLBL.ForeColor = System.Drawing.Color.Navy;
this.VersionLBL.HideSelection = false;
this.VersionLBL.Location = new System.Drawing.Point(12, 116);
this.VersionLBL.Name = "VersionLBL";
this.VersionLBL.ReadOnly = true;
this.VersionLBL.ShortcutsEnabled = false;
this.VersionLBL.Size = new System.Drawing.Size(309, 13);
this.VersionLBL.TabIndex = 6;
this.VersionLBL.TabStop = false;
this.VersionLBL.UseWaitCursor = true;
//
// LoadingForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(101)))), ((int)(((byte)(113)))), ((int)(((byte)(120)))));
this.ClientSize = new System.Drawing.Size(333, 179);
this.Controls.Add(this.VersionLBL);
this.Controls.Add(this.CloseLabel);
this.Controls.Add(this.ErrorLBL);
this.Controls.Add(this.StatusLBL);
this.Controls.Add(this.pictureBox1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Icon = global::CMS_Client.Properties.Resources.CMS_Icon;
this.Name = "LoadingForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Loading CMS Client";
this.TopMost = true;
this.Load += new System.EventHandler(this.LoadingForm_Load);
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.TextBox StatusLBL;
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.TextBox ErrorLBL;
private System.Windows.Forms.Label CloseLabel;
private System.Windows.Forms.TextBox VersionLBL;
}
}
+236
View File
@@ -0,0 +1,236 @@
using CMS_Client.Config;
using Microsoft.WindowsAPICodePack.Taskbar;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace CMS_Client.View
{
public partial class LoadingForm : Form
{
public const int TimerTest = 2000;
private HttpWebRequest ConnTestRequest;
private HttpWebResponse ConnTestResponse;
private String ConnTestError;
private Task ConnTask;
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#region WINDOW_START_&_BEHAVIOUR_METHOD
//Constructor
public LoadingForm()
{
InitializeComponent();
}
//OnLoad Method
private void LoadingForm_Load(object sender, EventArgs e)
{
//Force on Desktop 1
this.DesktopLocation = new Point((Screen.PrimaryScreen.Bounds.Width / 2) - (this.Width / 2), (Screen.PrimaryScreen.Bounds.Height / 2) - (this.Height / 2));
//Start Backgroud Task
ConnTask = Task.Run(() => BagroundWorker());
//Setup product label
VersionLBL.Text = Application.ProductName + " V" + Application.ProductVersion;
}
//Set the status & Messages Labels
private void setStatus(String status, String Error)
{
//Invoke method if is needed or call the method in STD mode
if (this.InvokeRequired)
{
this.Invoke((MethodInvoker)delegate () { StatusLBL.Text = status; });
this.Invoke((MethodInvoker)delegate () { ErrorLBL.Text = Error; });
}
else
{
StatusLBL.Text = status;
ErrorLBL.Text = Error;
}
}
//Close the Window
private void closeWindow()
{
//Invoke method if is needed or call the method in STD mode
if (this.InvokeRequired)
this.Invoke((MethodInvoker)delegate () { this.Close(); });
else
this.Close();
}
//Method used to add the shadow to the Window
protected override CreateParams CreateParams
{
get
{
const int CS_DROPSHADOW = 0x20000;
CreateParams cp = base.CreateParams;
cp.ClassStyle |= CS_DROPSHADOW;
return cp;
}
}
#endregion
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#region CONNECTING_TASK_METHOD
//Main Void of the background Task
private void BagroundWorker()
{
//Show the loading state on the app ICON
this.Invoke((MethodInvoker)delegate () {TaskbarManager.Instance.SetProgressState(TaskbarProgressBarState.Indeterminate, this.Handle); });
//Read the Configuration
if (!readConfiguration())
return;
//try to Request
setStatus("Connecting to " + CMSConfiguration.FirstUrl + "...", "");
do { } while (!testConnection(new Uri(CMSConfiguration.FirstUrl))) ;
//Open Nc Window
setStatus("Opening the NC Window... ", "");
if (CMSConfiguration.HMINcPresent)
if (!OpenNcWindow())
return;
//Close the Window
closeWindow();
}
//Sub-Method used to read the configuration
private bool readConfiguration()
{
//Set the Status Variable
setStatus("Reading Configuration...", "");
//Read the Config
String Message = CMSConfiguration.InitializeSettings();
//Check the readed Config
if (String.IsNullOrEmpty(Message))
{
setStatus("Configuration ok!", "");
return true;
}
else
{
setStatus("Close the application!", Message);
return false;
}
}
//Sub-Method used to test the connection
private bool testConnection(Uri url)
{
Boolean Connected = false;
//Try to connect
ConnTestRequest = (HttpWebRequest)WebRequest.Create(url);
ConnTestRequest.Timeout = (int)(TimerTest);
ConnTestRequest.KeepAlive = false;
try
{
ConnTestResponse = (HttpWebResponse)ConnTestRequest.GetResponse();
ConnTestError = ConnTestResponse.StatusCode.ToString();
Connected = (ConnTestResponse.StatusCode == HttpStatusCode.OK) ? true : false;
}
catch (WebException ex)
{
Connected = false;
ConnTestError = ex.Status.ToString();
}
//Check if it's connected
if (Connected)
{
setStatus("Connected!", "");
return true;
}
else
{
setStatus("Retry connection to: " + CMSConfiguration.FirstUrl, "Server not found (Error:" + ConnTestError + ")");
return false;
}
}
//Sub-Method used to open the NC Window
private bool OpenNcWindow()
{
switch(NcWindow.StartNcWindow())
{
case 0: return true;
case 1: {
setStatus("Close the application!", "NC Path not found: " + NcWindow.ProcessPath);
return false;
};
case 2:
{
setStatus("Close the application!", "Unable to start the NC application: ");
return false;
};
}
return false;
}
#endregion
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#region CLOSE_BUTTON_BEHAVIUR
//On click Method
private void CloseLabel_Click(object sender, EventArgs e)
{
Environment.Exit(0);
}
//On Mouse Enter
private void CloseLabel_MouseEnter(object sender, EventArgs e)
{
CloseLabel.ForeColor = Color.DarkRed;
}
//On Mouse Leave
private void CloseLabel_MouseLeave(object sender, EventArgs e)
{
CloseLabel.ForeColor = Color.White;
}
#endregion
}
}
+120
View File
@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
+63
View File
@@ -0,0 +1,63 @@
using CefSharp.WinForms;
namespace CMS_Client.View
{
partial class MainForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.SuspendLayout();
//
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.Gray;
this.ClientSize = new System.Drawing.Size(1920, 1080);
this.DoubleBuffered = true;
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Icon = global::CMS_Client.Properties.Resources.CMS_Icon;
this.MaximizeBox = false;
this.MaximumSize = new System.Drawing.Size(1920, 1080);
this.MinimizeBox = false;
this.MinimumSize = new System.Drawing.Size(1844, 1078);
this.Name = "MainForm";
this.Opacity = 0D;
this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
this.Text = "CMS-STEP Client";
this.TransparencyKey = System.Drawing.Color.Green;
this.UseWaitCursor = true;
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainForm_FormClosing);
this.Load += new System.EventHandler(this.MainForm_Load);
this.Resize += new System.EventHandler(this.MainForm_Resize);
this.ResumeLayout(false);
}
#endregion
}
}
+342
View File
@@ -0,0 +1,342 @@
using CefSharp;
using CefSharp.WinForms;
using CMS_Client.Browser_Tools;
using CMS_Client.Config;
using Microsoft.WindowsAPICodePack.Taskbar;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Net;
using System.Net.NetworkInformation;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace CMS_Client.View
{
public partial class MainForm : Form
{
//Struct of PageError
private struct PageError
{
public Boolean Error;
public String ErrorInfo;
}
//The first letter must be Lower-Case (CEF Settings)
private const String JSCmsObjName = "cmsClient";
private const String CacheFolder = "LocalStorage";
//Internal Variables
private ChromiumWebBrowser CefBrowser;
private CefSettings CefBrowserSettings;
private PageError LoadingError;
private NcForm NcFrm;
private static IntPtr MainHandle;
private static IntPtr NcHandle;
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#region WINDOW_START_&_BEHAVIOUR_METHOD
//Instance Method
public MainForm()
{
//Start Chromium Settings
InitializeCefSettings();
//Initialize the Windows
InitializeComponent();
//Start Client Setting
InitializeClientSettings();
//Initialize the Browser-Components
InitializeBrowser();
//Set the client property
this.Text = AssemblyInfo.AssemblyProduct + " " + AssemblyInfo.AssemblyVersion;
this.Opacity = 0.0;
//Initialize the Nc-Form
if (CMSConfiguration.HMINcPresent)
InitializeNcForm();
//Setup Wait Cursor
Cursor.Current = Cursors.WaitCursor;
//Load the page
CefBrowser.Load(CMSConfiguration.FirstUrl);
}
//On windows-Load Method
private void MainForm_Load(object sender, EventArgs e)
{
//Force to use on Screen 1
this.DesktopLocation = new Point(0, 0);
}
//On Resize Form
private void MainForm_Resize(object sender, EventArgs e)
{
if (CMSConfiguration.HMINcPresent)
{
if (this.WindowState == FormWindowState.Minimized)
{
NcFrm.Hide();
NcWindow.HideNcWindow();
NcWindow.ShowTaskBar();
}
else
{
NcWindow.ShowNcWindow();
NcFrm.Show();
}
}
}
//Before closing the Window -> Remove the Browser (Increase the speed of closing window)
private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
{
//Invoke method if is needed or call the method in STD mode
if (this.InvokeRequired)
this.Invoke((MethodInvoker)delegate () {
if (!CefBrowser.IsDisposed)
this.Controls.Remove(CefBrowser);
});
else
{
if (!CefBrowser.IsDisposed)
this.Controls.Remove(CefBrowser);
}
//Close the NC HMI && Stop Following Nc
if (CMSConfiguration.HMINcPresent)
{
NcWindow.ShowTaskBar();
NcWindow.StopNcFollowing();
NcWindow.CloseNcWindow();
}
}
#endregion
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#region SETUP_METHODS
//Initialize CMS-Client Settings
private void InitializeClientSettings()
{
//Set the Transparency Key
TransparencyKey = CMSConfiguration.TransparencyKey;
}
//Initialize CMS-Client Settings
private void InitializeNcForm()
{
//Create the Nc-Form
NcFrm = new NcForm();
NcFrm.Show();
this.Owner = NcFrm;
this.TopLevel = true;
//Steup the Static variables
MainHandle = this.Handle;
NcHandle = NcFrm.Handle;
}
//Start Chromium Settings
private void InitializeCefSettings()
{
//Create the Instance
CefBrowserSettings = new CefSettings();
CefBrowserSettings.CachePath = CacheFolder;
//Setup best rendering performances | Must DISABLE GPU for transparent method! -> inside SetOffScreenRenderingBestPerformanceArgs method
CefBrowserSettings.SetOffScreenRenderingBestPerformanceArgs();
CefBrowserSettings.CefCommandLineArgs.Add("disable-pinch", "1");
CefBrowserSettings.CefCommandLineArgs.Add("enable-transparent-visuals", "1");
//allow windowless rendering
CefBrowserSettings.WindowlessRenderingEnabled = true;
//Initialize CEF
Cef.Initialize(CefBrowserSettings);
}
//Initialize the Browser-Component
private void InitializeBrowser()
{
//Create the Instance
CefBrowser = new ChromiumWebBrowser("");
//Set the Dock Property
CefBrowser.Dock = DockStyle.Fill;
//Add the Event-Handlers
CefBrowser.LoadingStateChanged += new EventHandler<LoadingStateChangedEventArgs>(BrowserLoadsChanged);
CefBrowser.TitleChanged += new EventHandler<TitleChangedEventArgs>(BrowserTitleChanged);
CefBrowser.LoadError += new EventHandler<LoadErrorEventArgs>(BrowserLoadsError);
CefBrowser.KeyboardHandler = new CefBrowserKeyHandler();
CefBrowser.MenuHandler = new CefBrowserMenuHandler();
//Register JS Object
CefBrowser.RegisterJsObject(JSCmsObjName, new BrowserJSObject(this));
//Insert into Form
this.Controls.Add(CefBrowser);
}
#endregion
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#region BROWSER_EVENT_HANDLERS_METHODS
//On browser Load-Error. Event Handler called by Browser
private void BrowserLoadsError(object sender, LoadErrorEventArgs e)
{
//Set the Load-Error global variable to TRUE
LoadingError.Error = true;
LoadingError.ErrorInfo = e.ErrorCode.GetTypeCode() + " - " + e.ErrorText;
//write the error in the Title Bar
SetWindowTitle(LoadingError.ErrorInfo);
}
//On browser Load-Changed. Event Handler called by Browser
private void BrowserLoadsChanged(object sender, LoadingStateChangedEventArgs e)
{
//if the State is NOT "loading"
if (!e.IsLoading)
{
//Set cursor
Application.UseWaitCursor = true;
if(NcFrm != null)
NcFrm.UseWaitCursor = true;
//Show the Main Window, when the page is loaded
ShowWindow();
//Start following NC Window
if (CMSConfiguration.HMINcPresent)
NcWindow.StartNcFollowing(MainHandle, NcHandle, NcFrm.Width, NcFrm.Height);
//If is an Error Show the Error page TODO-> Erorr Page in HTML, nel browser!
if (LoadingError.Error)
MessageBox.Show("Error While Loading the Page: " + LoadingError.ErrorInfo + "\nPress:\n - F5: reload the Page\n - F1: Back to last Page");
//Set focus on the page
BrowserFocus();
}
//if the State is NOT "loading"
else
{
//Set cursor
Application.UseWaitCursor = false;
if (NcFrm != null)
NcFrm.UseWaitCursor = false;
//Set the Load-Error global variable to FALSE
LoadingError.Error = false;
//Set the title of the window in "Loading"
SetWindowTitle("Loading...");
//Show the loading state on the app ICON
//TaskbarManager.Instance.SetProgressState(TaskbarProgressBarState.Indeterminate);
}
}
//On browser Title-Changed. Event Handler called by Browser
private void BrowserTitleChanged(object sender, TitleChangedEventArgs e)
{
if (!LoadingError.Error)
SetWindowTitle(e.Title);
}
#endregion
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#region INVOKES_&_OTHER_METHODS
//Show MainWindow Method
private void ShowWindow()
{
//Invoke method if is needed or call the method in STD mode
if (this.InvokeRequired)
this.Invoke((MethodInvoker)delegate () {
this.WindowState = FormWindowState.Maximized;
this.Opacity = 1.0;
});
else
{
this.WindowState = FormWindowState.Maximized;
this.Opacity = 1.0;
}
}
//Show MainWindow Method
private void BrowserFocus()
{
//Invoke method if is needed or call the method in STD mode
if (CefBrowser.InvokeRequired)
CefBrowser.Invoke((MethodInvoker)delegate () { CefBrowser.Focus(); });
else
CefBrowser.Focus();
}
//Set Window Title
private void SetWindowTitle(String Title)
{
Title = Application.ProductName + " | " + Title;
//Invoke method if is needed or call the method in STD mode
if (this.InvokeRequired)
this.Invoke((MethodInvoker)delegate () { this.Text = Title; });
else
this.Text = Title;
}
#endregion
}
}
+120
View File
@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
+52
View File
@@ -0,0 +1,52 @@
namespace CMS_Client.View
{
partial class NcForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.SuspendLayout();
//
// NcForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(101)))), ((int)(((byte)(113)))), ((int)(((byte)(120)))));
this.ClientSize = new System.Drawing.Size(1920, 1080);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Name = "NcForm";
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
this.Text = "NcForm";
this.UseWaitCursor = true;
this.ResumeLayout(false);
}
#endregion
}
}
+24
View File
@@ -0,0 +1,24 @@
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 CMS_Client.View
{
public partial class NcForm : Form
{
public NcForm()
{
InitializeComponent();
//Force to use on Screen 1
this.DesktopLocation = new Point(0, 0);
}
}
}
+120
View File
@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
+779
View File
@@ -0,0 +1,779 @@
using CMS_Client.Config;
using CMS_Client.Properties;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
using System.Windows.Forms;
namespace CMS_Client.View
{
static class NcWindow
{
//Const value used for open the Process/Application
const String FanucPath = @"\CNCScreenE\CNCScrnE.exe";
const String OsaiPath = @"\OSAI\WinNBI\ProVideo.exe";
const String SiemensPath = @"\Siemens\MotionControl\siemens\sinumerik\hmi\autostart\run_hmi.exe";
const String DemoPath = @"\Nc_Demo_Application.exe";
const String FanucName = "CNCScrnE";
const String OsaiName = "provideo";
const String SiemensName = "slsmhmihost";
const String DemoName = "Nc_Demo_Application";
const String Win7TaskBar = "Shell_TrayWnd";
const String Win7StartBtnCL = "Button";
const String Win7StartBtnTxt= "Start";
const String SiemensTool1Name = "run_hmi";
const String SiemensTool2Name = "slsmsystemmanager";
const int WaitingMs = 500;
const int TimesToTryKill = 10;
const int TimesToTryOpen = 120; // 120 * 500ms = 60000ms => 1min
//Public variables
public static bool WindowStarted { get { return windowstarted; } }
private static bool windowstarted = false;
public static String ProcessName { get { return processname; } }
private static String processname = "";
public static String ProcessPath { get { return processpath; } }
private static String processpath = "";
public static Process NcProcess { get { return ncprocess; } }
private static Process ncprocess;
private static int LastX, LastY;
private static int LastWidth = 1024, LastHeight = 768;
private static IntPtr hhook;
private static IntPtr MainViewHandle;
private static IntPtr TaskBarHandle;
private static IntPtr StartBtnHandle;
private static IntPtr PopupHandle;
private static uint MainProcessPID;
private static uint NcProcessPID;
private static uint ActualPID;
private static WinEventDelegate procDelegate;
private static uint LastdwmsEventTime;
private static uint LastHookedPID;
private static int TriedTimes;
private static bool ProcKilled;
private static bool IsNcSiemens;
private static IntPtr ActualHND;
private static IntPtr LastHookedHND;
private static IntPtr NcHND;
private static Thread FocusTask;
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#region PUBLIC_CUSTOM_METHODS
// Start/Open the NC Window
public static int StartNcWindow()
{
Process[] processes;
int style;
//Setup the variables
ProcKilled = false;
//Set Window Started = false
windowstarted = false;
//Setup the Path/Name of the process
SetupNcProcess();
//Read if exists a Process with correct name
processes = Process.GetProcessesByName(processname);
//Save the Taskbar Windows Handle
TaskBarHandle = FindWindow(Win7TaskBar, "");
StartBtnHandle = FindWindow(Win7StartBtnCL, Win7StartBtnTxt);
//Kill tool processes if they had been started whitout HMI (Only Siemens)
if (IsNcSiemens && processes.Length <= 0)
{
//Kill All Windows
KillAllProcessWithName(SiemensTool2Name);
}
//If exists the Process
if (processes.Length > 0)
{
//Set the first founded process
ncprocess = processes[0];
ncprocess.WaitForInputIdle();
//Wait until the process is started
TriedTimes = 1;
while (processes[0].MainWindowHandle == IntPtr.Zero && TriedTimes < TimesToTryKill)
{
processes = Process.GetProcessesByName(processname);
if (processes[0].MainWindowHandle == IntPtr.Zero)
{
Thread.Sleep(WaitingMs);
TriedTimes++;
}
}
//Kill the process if needed
if(TriedTimes == TimesToTryKill)
{
//Kill the Process
CloseNcWindow();
//Setup the Variable
ProcKilled = true;
}
}
if (processes.Length <= 0 || ProcKilled)
{
ncprocess = new Process();
// Check if exists the Nc Path
if (!File.Exists(processpath))
return 1;
//Setup the Process path
ncprocess.StartInfo.FileName = processpath;
//Start the Process
ncprocess.Start();
ncprocess.WaitForInputIdle();
//Wait until the process is started
TriedTimes = 1;
while ((processes.Length <= 0 || (processes[0].MainWindowHandle == IntPtr.Zero)) && TriedTimes < TimesToTryOpen)
{
processes = Process.GetProcessesByName(processname);
if(processes.Length <= 0 || (processes[0].MainWindowHandle == IntPtr.Zero))
{
Thread.Sleep(WaitingMs);
TriedTimes++;
}
}
if (TriedTimes == TimesToTryOpen)
return 2;
//Set the first founded process
ncprocess = processes[0];
}
//Set Window Started => true
windowstarted = true;
//Show the Main Window & Hide the Others (Only Siemens)
ShowWindow(ncprocess.MainWindowHandle, WS_SHOW);
if(IsNcSiemens)
{
//Wait 500 ms of Siemens software
Thread.Sleep(500);
//Hide Second Window
hideAllProcWindows(SiemensTool1Name);
//Hide first Window
hideAllProcWindows(SiemensTool2Name);
SetNcIcon(Resources.SinumerikHmi);
}
//Remove the Frame Border
style = GetWindowLong(ncprocess.MainWindowHandle, GWL_STYLE);
SetWindowLong(ncprocess.MainWindowHandle, GWL_STYLE, (style & ~WS_CAPTION & ~WS_THICKFRAME));
//Resize the Window
ResizeAndMoveNcWindow((Screen.PrimaryScreen.Bounds.Width / 2) - (LastWidth / 2), (Screen.PrimaryScreen.Bounds.Height / 2) - (LastHeight / 2), LastWidth, LastHeight);
return 0;
}
//Kill/Close the NC Window
public static void CloseNcWindow()
{
Process[] processes;
//Stop Following Nc
StopNcFollowing();
//If the NC is Siemens Exit from Function and let the HMI continue his life (To Be validated)
if (IsNcSiemens)
{
HideNcWindow();
return;
}
//Kill the Process
if (ncprocess != null && !ncprocess.HasExited)
ncprocess.Kill();
//Read if exists a Process with correct name
processes = Process.GetProcessesByName(processname);
//Wait until the process is killed
TriedTimes = 1;
while (processes.Length > 0 && TriedTimes < TimesToTryKill)
{
processes = Process.GetProcessesByName(processname);
if (processes.Length > 0)
{
Thread.Sleep(WaitingMs);
TriedTimes++;
}
}
//Kill Tool Process
if (IsNcSiemens)
KillAllProcessWithName(SiemensTool2Name);
}
//Show Nc Window
public static void ShowNcWindow()
{
if (windowstarted)
ShowWindow(ncprocess.MainWindowHandle, SW_SHOWNOACTIVATE);
}
//Hide Nc Window
public static void HideNcWindow()
{
if (windowstarted)
ShowWindow(ncprocess.MainWindowHandle, WS_MINIMIZE);
}
//Show Windows Taskbar
public static void ShowTaskBar()
{
if (windowstarted)
{
ShowWindow(TaskBarHandle, WS_SHOW);
ShowWindow(StartBtnHandle, WS_SHOW);
}
}
//Hide Windows Taskbar
public static void HideTaskBar()
{
if (windowstarted)
{
ShowWindow(TaskBarHandle, WS_HIDE);
ShowWindow(StartBtnHandle, WS_HIDE);
}
}
//Resize NC Window
public static void ResizeNcWindow(int width, int height)
{
LastWidth = width;
LastHeight = height;
//Win32 Method
if (ncprocess != null && windowstarted)
{
MoveWindow(ncprocess.MainWindowHandle, LastX, LastY, LastWidth, LastHeight, true);
}
}
//Move NC Window
public static void MoveNcWindow(int X, int Y)
{
LastX = X;
LastY = Y;
//Win32 Method
if (ncprocess != null && windowstarted)
{
MoveWindow(ncprocess.MainWindowHandle, LastX, LastY, LastWidth, LastHeight, true);
}
}
//Resize & Move NC Window
public static void ResizeAndMoveNcWindow(int X, int Y, int width, int height)
{
LastX = X;
LastY = Y;
LastWidth = width;
LastHeight = height;
//Win32 Method
if (ncprocess != null && windowstarted)
{
MoveWindow(ncprocess.MainWindowHandle, LastX, LastY, LastWidth, LastHeight, true);
}
}
//Set NC Icon
public static void SetNcIcon(Icon icon)
{
if (windowstarted)
SendMessage(ncprocess.MainWindowHandle, WM_SETICON, ICON_BIG, icon.Handle);
}
//Force NC Focus
public static void ForceNcFocus()
{
if (windowstarted)
ForceFocus(ncprocess.MainWindowHandle);
}
//Force NC Focus
public static void ForceStepFocus()
{
if (MainViewHandle != IntPtr.Zero)
ForceFocus(MainViewHandle);
}
//Start following Nc Window (bring-to-font the main window)
public static void StartNcFollowing(IntPtr Handle, IntPtr NcHandle, int Width, int Height)
{
//Setup the Handle-variable
MainViewHandle = Handle;
NcHND = NcHandle;
//Set the parent of the window
SetParent(ncprocess.MainWindowHandle, NcHandle);
MoveWindow(ncprocess.MainWindowHandle, LastX, LastY, LastWidth, LastHeight, true);
//Get the Process-Id
GetWindowThreadProcessId(MainViewHandle, out MainProcessPID);
GetWindowThreadProcessId(ncprocess.MainWindowHandle, out NcProcessPID);
//Start the Hook
if (MainViewHandle != IntPtr.Zero && ncprocess.MainWindowHandle != IntPtr.Zero && MainProcessPID != 0 && NcProcessPID != 0 && windowstarted)
{
procDelegate = new WinEventDelegate(WinEventProc);
hhook = SetWinEventHook(EVENT_OBJECT_FOCUS, EVENT_OBJECT_FOCUS, IntPtr.Zero, procDelegate, 0, 0, WINEVENT_OUTOFCONTEXT);
}
}
//Stop following Nc Window (bring-to-font the main window) -> ONLY FOR OSAI System!
public static void StopNcFollowing()
{
//Un-parent the window
SetParent(ncprocess.MainWindowHandle, IntPtr.Zero);
//Detach the hook
if (hhook != IntPtr.Zero)
UnhookWinEvent(hhook);
}
#endregion
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#region WINDOWS_EVENT_OVERRIDE
//Following Nc Window Method
private static void WinEventProc(IntPtr hWinEventHook, uint eventType, IntPtr hwnd, int idObject, int idChild, uint dwEventThread, uint dwmsEventTime)
{
//Read the actual ID of the Process
GetWindowThreadProcessId(hwnd, out ActualPID);
ActualHND = hwnd;
//Filter if comes multiple event at the same time
if (ActualHND != LastHookedHND || dwmsEventTime != LastdwmsEventTime)
{
//If the PID is the STEP-HMI Process
if (ActualPID == MainProcessPID)
{
//Hide the TaskBar
HideTaskBar();
//Resize the Popup opened on Nc Window
if (ActualPID != LastHookedPID)
{
//get the Handle of the Popup
PopupHandle = GetLastActivePopup(ncprocess.MainWindowHandle);
if (PopupHandle != ncprocess.MainWindowHandle)
{
ResizeOutofBoundWindow(ncprocess.MainWindowHandle, PopupHandle);
}
}
}
else if(ActualPID == NcProcessPID)
{
//Hide the TaskBar
HideTaskBar();
//Disable main manu if is present
IntPtr Menu = GetSystemMenu(ActualHND, false);
if (Menu != IntPtr.Zero)
{
DeleteMenu(Menu, SC_MINIMIZE, MF_BYCOMMAND);
DeleteMenu(Menu, SC_MAXIMIZE, MF_BYCOMMAND);
}
}
//If the PID is OTHER Process
else
{
//Show the TaskBar
ShowTaskBar();
}
}
//Save the Last Hooked PID
LastHookedHND = ActualHND;
LastHookedPID = ActualPID;
//Save the Last TimeStamp
LastdwmsEventTime = dwmsEventTime;
}
#endregion
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#region PRIVATE_CUSTOM_METHODS
//Resize out of Bound window
private static void ResizeOutofBoundWindow(IntPtr ParentHandle,IntPtr WindowHandle)
{
RECT MainRct;
RECT ParentRct;
int width;
int height;
int width2;
int height2;
int newX;
int newY;
bool move = false;
bool resize = false;
if (GetWindowRect(WindowHandle, out MainRct) && GetWindowRect(ParentHandle, out ParentRct))
{
//Setup resize and move variables
width = (MainRct.Right - MainRct.Left + 1);
height = (MainRct.Bottom - MainRct.Top + 1);
width2 = (ParentRct.Right - ParentRct.Left + 1);
height2 = (ParentRct.Bottom - ParentRct.Top + 1);
newX = width2 / 2 - width / 2 + ParentRct.Left;
newY = height2 / 2 - height / 2 + ParentRct.Top;
//Check if i need to resize
if (width > width2 || height > height2)
resize = true;
//Check if i need to move
if (MainRct.Left < ParentRct.Left || MainRct.Top < ParentRct.Top || MainRct.Right > ParentRct.Right || MainRct.Bottom > ParentRct.Bottom)
move = true;
//Move or Resize the Window
if (move & !resize)
MoveWindow(WindowHandle, newX, newY, width, height, true);
else if (resize)
MoveWindow(WindowHandle, ParentRct.Left, ParentRct.Top, LastWidth, LastHeight, true);
}
}
//Setup the Path/Name of the process Method
private static void SetupNcProcess()
{
IsNcSiemens = false;
switch (CMSConfiguration.NCType)
{
// 0: Demo
case 0:
{
processname = DemoName;
processpath = @"C:\CMS\STEP\DEMO" + DemoPath;
};break;
// 1: Fanuc
case 1:
{
processname = FanucName;
processpath = getProgramFilesx86Path() + FanucPath;
}; break;
// 2: Siemens
case 2:
{
IsNcSiemens = true;
processname = SiemensName;
processpath = getProgramFilesx86Path() + SiemensPath;
}; break;
// 3: Osai
case 3:
{
processname = OsaiName;
processpath = getProgramFilesx86Path() + OsaiPath;
}; break;
}
}
//Get X86 Program folder
private static string getProgramFilesx86Path()
{
if (8 == IntPtr.Size || (!String.IsNullOrEmpty(Environment.GetEnvironmentVariable("PROCESSOR_ARCHITEW6432"))))
{
return Environment.GetEnvironmentVariable("ProgramFiles(x86)");
}
return Environment.GetEnvironmentVariable("ProgramFiles");
}
//Hide All windows Process
private static void hideAllProcWindows(String ProcessName)
{
Process [] processes = Process.GetProcessesByName(ProcessName);
foreach(Process proc in processes)
{
if(proc.MainWindowHandle != IntPtr.Zero)
ShowWindow(proc.MainWindowHandle, WS_HIDE);
}
}
//Kill All Process Name
private static void KillAllProcessWithName(String ProcessName)
{
Process[] procTool = Process.GetProcessesByName(ProcessName);
foreach (Process proc in procTool)
{
proc.Kill();
//Read if exists a Process with correct name
procTool = Process.GetProcessesByName(proc.ProcessName);
//Wait until the process is killed
TriedTimes = 1;
while (procTool.Length > 0 && TriedTimes < TimesToTryKill)
{
procTool = Process.GetProcessesByName(processname);
if (procTool.Length > 0)
{
Thread.Sleep(500);
TriedTimes++;
}
}
}
}
private static void ForceFocus(IntPtr Handle)
{
//If is not already handled
if (GetForegroundWindow() != Handle)
{
//If is minimized -> Show it
if (IsIconic(Handle))
ShowWindow(Handle, SW_SHOWDEFAULT);
//Set as foreground
SetForegroundWindow(Handle);
}
}
#endregion
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#region WIN32_METHODS
private const int GWL_STYLE = -16;
private const int GWL_EXSTYLE = -20;
private const int LWA_ALPHA = 0x00000002;
private const int LWA_COLORKEY = 0x00000001;
private const int WS_EX_LAYERED = 0x00080000;
private const int WS_EX_TOOLWINDOW = 0x00000080;
private const int WS_CHILD = 0x40000000;
private const int WS_BORDER = 0x00800000;
private const int WS_DLGFRAME = 0x00400000;
private const int WS_CAPTION = WS_BORDER | WS_DLGFRAME;
private const int WS_THICKFRAME = 262144;
private const int WS_HIDE = 0;
private const int WS_SHOW = 5;
private const int WS_MINIMIZE = 6;
private const int WS_SHOWNORMAL = 1;
private const int SW_SHOWMAXIMIZED = 3;
private const int SW_SHOWDEFAULT = 10;
private const int SW_SHOWNOACTIVATE = 4;
private const int WM_SETICON = 0x80;
private const int ICON_SMALL = 0;
private const int ICON_BIG = 1;
private const uint EVENT_OBJECT_FOCUS = 0x8005;
private const uint WINEVENT_OUTOFCONTEXT= 0;
private const UInt32 SWP_NOSIZE = 0x0001;
private const UInt32 SWP_NOMOVE = 0x0002;
private const UInt32 SWP_NOACTIVATE = 0x0010;
private const UInt32 SWP_SHOWWINDOW = 0x0040;
private const UInt32 SWP_NOZORDER = 0x0004;
private const UInt32 SWP_NOREDRAW = 0x0008;
private const UInt32 SWP_HIDEWINDOW = 0x0080;
private const int MF_BYCOMMAND = 0x00000000;
private const int SC_CLOSE = 0xF060;
private const int SC_MINIMIZE = 0xF020;
private const int SC_MAXIMIZE = 0xF030;
private const int WS_SYSMENU = 0x00080000;
private const uint WS_POPUP = 0x80000000;
private const int WS_MAXIMIZE = 0x01000000;
static readonly IntPtr HWND_BOTTOM = new IntPtr(1);
static readonly IntPtr HWND_TOP = new IntPtr(0);
static readonly IntPtr HWND_TOPMOST = new IntPtr(-1);
static readonly IntPtr HWND_NOTOPMOST = new IntPtr(-2);
[DllImport("user32.dll")]
public static extern int DeleteMenu(IntPtr hMenu, int nPosition, int wFlags);
[DllImport("user32.dll")]
private static extern IntPtr GetSystemMenu(IntPtr hWnd, bool bRevert);
[DllImport("user32.dll", SetLastError = true)]
static extern IntPtr SendMessage(IntPtr hWnd, UInt32 Msg, IntPtr wParam, StringBuilder lParam);
[DllImport("user32.dll", SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
internal static extern bool MoveWindow(System.IntPtr hWnd, int X, int Y, int nWidth, int nHeight, bool bRepaint);
[DllImport("user32.dll", SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
private static extern bool SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int x, int y, int cx, int cy, uint uFlags);
[DllImport("USER32.DLL")]
[return: MarshalAs(UnmanagedType.I4)]
public static extern int SetWindowLong(IntPtr hWnd, int nIndex, int dwNewLong);
[DllImport("USER32.DLL")]
[return: MarshalAs(UnmanagedType.I4)]
public static extern int GetWindowLong(IntPtr hWnd, int nIndex);
[DllImport("user32.dll")]
[return: MarshalAs(UnmanagedType.Bool)]
static extern bool IsWindowVisible(IntPtr hWnd);
[DllImport("user32.dll")]
[return: MarshalAs(UnmanagedType.Bool)]
static extern bool IsIconic(IntPtr hWnd);
[DllImport("user32.dll")]
static extern IntPtr SendMessage(IntPtr hWnd, uint Msg, int wParam, IntPtr lParam);
[DllImport("user32.dll")]
[return: MarshalAs(UnmanagedType.Bool)]
static extern bool ShowWindow(IntPtr hWnd, int nCmdShow);
[DllImport("user32.dll", SetLastError = true)]
[return: MarshalAs(UnmanagedType.I8)]
private static extern long SetParent(IntPtr hWndChild, IntPtr hWndNewParent);
[DllImport("user32.dll", SetLastError = true)]
[return: MarshalAs(UnmanagedType.I4)]
private static extern int IsZoomed(IntPtr hWnd);
[DllImport("user32.dll", SetLastError = true)]
private static extern IntPtr GetForegroundWindow();
[DllImport("user32.dll")]
[return: MarshalAs(UnmanagedType.I4)]
static extern int GetWindowText(IntPtr hWnd, StringBuilder text, int count);
[DllImport("user32.dll")]
static extern IntPtr SetWinEventHook(uint eventMin, uint eventMax, IntPtr hmodWinEventProc, WinEventDelegate lpfnWinEventProc, uint idProcess,uint idThread, uint dwFlags);
delegate void WinEventDelegate(IntPtr hWinEventHook, uint eventType,IntPtr hwnd, int idObject, int idChild, uint dwEventThread, uint dwmsEventTime);
[DllImport("user32.dll")]
[return: MarshalAs(UnmanagedType.Bool)]
static extern bool UnhookWinEvent(IntPtr hWinEventHook);
[DllImport("user32.dll", SetLastError = true)]
static extern uint GetWindowThreadProcessId(IntPtr hWnd, out uint processId);
[DllImport("user32.dll")]
private static extern IntPtr FindWindow(string className, string windowText);
[DllImport("user32.dll")]
[return: MarshalAs(UnmanagedType.Bool)]
static extern bool SetWindowText(IntPtr hWnd, string text);
[DllImport("user32.dll", SetLastError = true)]
static extern IntPtr SetFocus(IntPtr hWnd);
[DllImport("user32.dll")]
[return: MarshalAs(UnmanagedType.Bool)]
static extern bool SetForegroundWindow(IntPtr hWnd);
[DllImport("user32.dll")]
static extern IntPtr GetAncestor(IntPtr hWnd, uint uCmd);
[DllImport("user32.dll")]
[return: MarshalAs(UnmanagedType.Bool)]
static extern bool SetLayeredWindowAttributes(IntPtr hwnd, uint crKey, byte bAlpha, uint dwFlags);
[DllImport("user32.dll", SetLastError = true)]
static extern IntPtr FindWindowEx(IntPtr hwndParent, IntPtr hwndChildAfter, string lpszClass, string lpszWindow);
[DllImport("user32.dll")]
[return: MarshalAs(UnmanagedType.Bool)]
static extern bool IsWindow(IntPtr hWnd);
[DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)]
[return: MarshalAs(UnmanagedType.I4)]
static extern int GetClassName(IntPtr hWnd, StringBuilder lpClassName, int nMaxCount);
[DllImport("user32.dll")]
static extern IntPtr GetLastActivePopup(IntPtr hWnd);
[DllImport("user32.dll", SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
static extern bool GetWindowRect(IntPtr hwnd, out RECT lpRect);
[DllImport("user32.dll", SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
static extern bool ShowOwnedPopups(IntPtr hwnd, bool show);
[StructLayout(LayoutKind.Sequential)]
public struct RECT
{
public int Left; // x position of upper-left corner
public int Top; // y position of upper-left corner
public int Right; // x position of lower-right corner
public int Bottom; // y position of lower-right corner
}
#endregion
}
}
+9
View File
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="cef.redist.x64" version="3.2987.1601" targetFramework="net461" />
<package id="cef.redist.x86" version="3.2987.1601" targetFramework="net461" />
<package id="CefSharp.Common" version="57.0.0" targetFramework="net461" />
<package id="CefSharp.WinForms" version="57.0.0" targetFramework="net461" />
<package id="Microsoft.WindowsAPICodePack-Core" version="1.1.0.2" targetFramework="net462" />
<package id="Microsoft.WindowsAPICodePack-Shell" version="1.1.0.0" targetFramework="net462" />
</packages>
+73
View File
@@ -0,0 +1,73 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Il codice è stato generato da uno strumento.
// Versione runtime:4.0.30319.42000
//
// Le modifiche apportate a questo file possono provocare un comportamento non corretto e andranno perse se
// il codice viene rigenerato.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Step.UI.Properties {
using System;
/// <summary>
/// Classe di risorse fortemente tipizzata per la ricerca di stringhe localizzate e così via.
/// </summary>
// Questa classe è stata generata automaticamente dalla classe StronglyTypedResourceBuilder.
// tramite uno strumento quale ResGen o Visual Studio.
// Per aggiungere o rimuovere un membro, modificare il file con estensione ResX ed eseguire nuovamente ResGen
// con l'opzione /str oppure ricompilare il progetto VS.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.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() {
}
/// <summary>
/// Restituisce l'istanza di ResourceManager nella cache utilizzata da questa classe.
/// </summary>
[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("Step.UI.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Esegue l'override della proprietà CurrentUICulture del thread corrente per tutte le
/// ricerche di risorse eseguite utilizzando questa classe di risorse fortemente tipizzata.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Cerca una risorsa localizzata di tipo System.Drawing.Icon simile a (Icona).
/// </summary>
internal static System.Drawing.Icon CMS_Icon {
get {
object obj = ResourceManager.GetObject("CMS_Icon", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
}
}
+124
View File
@@ -0,0 +1,124 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="CMS_Icon" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\CMS_Icon.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>
Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

+49 -18
View File
@@ -32,50 +32,79 @@
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ServerControlWindow));
this.stopServerButton = new System.Windows.Forms.Button();
this.openUiButton = new System.Windows.Forms.Button();
this.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components);
this.StepNotifyIcon = new System.Windows.Forms.NotifyIcon(this.components);
this.NotifyIconMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
this.StopServerItem = new System.Windows.Forms.ToolStripMenuItem();
this.NotifyIconMenu.SuspendLayout();
this.SuspendLayout();
//
// stopServerButton
//
this.stopServerButton.Location = new System.Drawing.Point(7, 7);
this.stopServerButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.stopServerButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.stopServerButton.Location = new System.Drawing.Point(122, 18);
this.stopServerButton.Margin = new System.Windows.Forms.Padding(2);
this.stopServerButton.Name = "stopServerButton";
this.stopServerButton.Size = new System.Drawing.Size(97, 37);
this.stopServerButton.Size = new System.Drawing.Size(107, 43);
this.stopServerButton.TabIndex = 0;
this.stopServerButton.Text = "Server Stop";
this.stopServerButton.Text = "Close CMS Server";
this.stopServerButton.UseVisualStyleBackColor = true;
this.stopServerButton.Click += new System.EventHandler(this.StopServerButton_Click);
//
// openUiButton
//
this.openUiButton.Location = new System.Drawing.Point(115, 7);
this.openUiButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.openUiButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.openUiButton.Location = new System.Drawing.Point(11, 18);
this.openUiButton.Margin = new System.Windows.Forms.Padding(2);
this.openUiButton.Name = "openUiButton";
this.openUiButton.Size = new System.Drawing.Size(97, 37);
this.openUiButton.Size = new System.Drawing.Size(107, 43);
this.openUiButton.TabIndex = 1;
this.openUiButton.Text = "Open UI";
this.openUiButton.Text = "Open CMS Client";
this.openUiButton.UseVisualStyleBackColor = true;
this.openUiButton.Click += new System.EventHandler(this.OpenUiButton_Click);
//
// notifyIcon1
// StepNotifyIcon
//
this.notifyIcon1.BalloonTipText = "CMS";
this.notifyIcon1.Icon = ((System.Drawing.Icon)(resources.GetObject("notifyIcon1.Icon")));
this.notifyIcon1.Text = "CMS Server";
this.notifyIcon1.Visible = true;
this.notifyIcon1.Click += new System.EventHandler(this.notifyIcon1_Click);
this.StepNotifyIcon.BalloonTipText = "CMS Step Server";
this.StepNotifyIcon.ContextMenuStrip = this.NotifyIconMenu;
this.StepNotifyIcon.Icon = ((System.Drawing.Icon)(resources.GetObject("StepNotifyIcon.Icon")));
this.StepNotifyIcon.Text = "CMS Server";
this.StepNotifyIcon.Visible = true;
this.StepNotifyIcon.Click += new System.EventHandler(this.notifyIcon1_Click);
//
// NotifyIconMenu
//
this.NotifyIconMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.StopServerItem});
this.NotifyIconMenu.Name = "NotifyIconMenu";
this.NotifyIconMenu.RenderMode = System.Windows.Forms.ToolStripRenderMode.Professional;
this.NotifyIconMenu.Size = new System.Drawing.Size(167, 26);
//
// StopServerItem
//
this.StopServerItem.Name = "StopServerItem";
this.StopServerItem.Size = new System.Drawing.Size(166, 22);
this.StopServerItem.Text = "Close CMS Server";
this.StopServerItem.Click += new System.EventHandler(this.StopServerItem_Click);
//
// ServerControlWindow
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(218, 50);
this.ClientSize = new System.Drawing.Size(239, 72);
this.Controls.Add(this.openUiButton);
this.Controls.Add(this.stopServerButton);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Margin = new System.Windows.Forms.Padding(2);
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "ServerControlWindow";
this.Text = "Step";
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "CMS Step - Control Window";
this.NotifyIconMenu.ResumeLayout(false);
this.ResumeLayout(false);
}
@@ -84,6 +113,8 @@
private System.Windows.Forms.Button stopServerButton;
private System.Windows.Forms.Button openUiButton;
private System.Windows.Forms.NotifyIcon notifyIcon1;
}
private System.Windows.Forms.NotifyIcon StepNotifyIcon;
private System.Windows.Forms.ContextMenuStrip NotifyIconMenu;
private System.Windows.Forms.ToolStripMenuItem StopServerItem;
}
}
+8 -1
View File
@@ -65,7 +65,7 @@ namespace Step.UI
private void OpenUiButton_Click(object sender, EventArgs e)
{
Process.Start("http://localhost:9000/index.html");
Process.Start(Environment.CurrentDirectory + @"\Client\x86\CMS_Client.exe", "http://localhost:9000/index.html");
}
private void StopServerButton_Click(object sender, EventArgs e)
@@ -77,6 +77,13 @@ namespace Step.UI
private void notifyIcon1_Click(object sender, EventArgs e)
{
this.Show();
this.TopMost = true;
this.TopMost = false;
}
private void StopServerItem_Click(object sender, EventArgs e)
{
MessageServices.Current.Publish("StopServer");
}
}
}
File diff suppressed because it is too large Load Diff
+12
View File
@@ -48,6 +48,11 @@
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="ServerControlWindow.cs">
<SubType>Form</SubType>
</Compile>
@@ -61,9 +66,16 @@
<None Include="readme.md" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="ServerControlWindow.resx">
<DependentUpon>ServerControlWindow.cs</DependentUpon>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="Resources\CMS_Icon.ico" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
+60 -1
View File
@@ -1,11 +1,12 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27004.2009
VisualStudioVersion = 15.0.26730.16
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Step", "Step\Step.csproj", "{AFED34E1-77DB-4D81-830A-A8D0A190573D}"
ProjectSection(ProjectDependencies) = postProject
{3F5C2483-FC87-43EF-92A8-66FF7D0E440F} = {3F5C2483-FC87-43EF-92A8-66FF7D0E440F}
{66FA29DB-925A-402B-A4C7-D3D780FB1BC3} = {66FA29DB-925A-402B-A4C7-D3D780FB1BC3}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Step.Model", "Step.Model\Step.Model.csproj", "{631375DD-06D3-49BB-8130-D9DDB34C429D}"
@@ -19,32 +20,90 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Step.Database", "Step.Datab
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Step.Config", "Step.Config\Step.Config.csproj", "{3F5C2483-FC87-43EF-92A8-66FF7D0E440F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Step.Client", "Step.Client\Step.Client.csproj", "{66FA29DB-925A-402B-A4C7-D3D780FB1BC3}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{AFED34E1-77DB-4D81-830A-A8D0A190573D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AFED34E1-77DB-4D81-830A-A8D0A190573D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AFED34E1-77DB-4D81-830A-A8D0A190573D}.Debug|x64.ActiveCfg = Debug|Any CPU
{AFED34E1-77DB-4D81-830A-A8D0A190573D}.Debug|x64.Build.0 = Debug|Any CPU
{AFED34E1-77DB-4D81-830A-A8D0A190573D}.Debug|x86.ActiveCfg = Debug|Any CPU
{AFED34E1-77DB-4D81-830A-A8D0A190573D}.Debug|x86.Build.0 = Debug|Any CPU
{AFED34E1-77DB-4D81-830A-A8D0A190573D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AFED34E1-77DB-4D81-830A-A8D0A190573D}.Release|Any CPU.Build.0 = Release|Any CPU
{AFED34E1-77DB-4D81-830A-A8D0A190573D}.Release|x64.ActiveCfg = Release|Any CPU
{AFED34E1-77DB-4D81-830A-A8D0A190573D}.Release|x64.Build.0 = Release|Any CPU
{AFED34E1-77DB-4D81-830A-A8D0A190573D}.Release|x86.ActiveCfg = Release|Any CPU
{AFED34E1-77DB-4D81-830A-A8D0A190573D}.Release|x86.Build.0 = Release|Any CPU
{631375DD-06D3-49BB-8130-D9DDB34C429D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{631375DD-06D3-49BB-8130-D9DDB34C429D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{631375DD-06D3-49BB-8130-D9DDB34C429D}.Debug|x64.ActiveCfg = Debug|Any CPU
{631375DD-06D3-49BB-8130-D9DDB34C429D}.Debug|x64.Build.0 = Debug|Any CPU
{631375DD-06D3-49BB-8130-D9DDB34C429D}.Debug|x86.ActiveCfg = Debug|Any CPU
{631375DD-06D3-49BB-8130-D9DDB34C429D}.Debug|x86.Build.0 = Debug|Any CPU
{631375DD-06D3-49BB-8130-D9DDB34C429D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{631375DD-06D3-49BB-8130-D9DDB34C429D}.Release|Any CPU.Build.0 = Release|Any CPU
{631375DD-06D3-49BB-8130-D9DDB34C429D}.Release|x64.ActiveCfg = Release|Any CPU
{631375DD-06D3-49BB-8130-D9DDB34C429D}.Release|x64.Build.0 = Release|Any CPU
{631375DD-06D3-49BB-8130-D9DDB34C429D}.Release|x86.ActiveCfg = Release|Any CPU
{631375DD-06D3-49BB-8130-D9DDB34C429D}.Release|x86.Build.0 = Release|Any CPU
{20FC0937-E7CA-4693-95F9-7A948EFD173B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{20FC0937-E7CA-4693-95F9-7A948EFD173B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{20FC0937-E7CA-4693-95F9-7A948EFD173B}.Debug|x64.ActiveCfg = Debug|Any CPU
{20FC0937-E7CA-4693-95F9-7A948EFD173B}.Debug|x64.Build.0 = Debug|Any CPU
{20FC0937-E7CA-4693-95F9-7A948EFD173B}.Debug|x86.ActiveCfg = Debug|Any CPU
{20FC0937-E7CA-4693-95F9-7A948EFD173B}.Debug|x86.Build.0 = Debug|Any CPU
{20FC0937-E7CA-4693-95F9-7A948EFD173B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{20FC0937-E7CA-4693-95F9-7A948EFD173B}.Release|Any CPU.Build.0 = Release|Any CPU
{20FC0937-E7CA-4693-95F9-7A948EFD173B}.Release|x64.ActiveCfg = Release|Any CPU
{20FC0937-E7CA-4693-95F9-7A948EFD173B}.Release|x64.Build.0 = Release|Any CPU
{20FC0937-E7CA-4693-95F9-7A948EFD173B}.Release|x86.ActiveCfg = Release|Any CPU
{20FC0937-E7CA-4693-95F9-7A948EFD173B}.Release|x86.Build.0 = Release|Any CPU
{357D5EE1-FFC8-489B-9232-22CF474D9A6F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{357D5EE1-FFC8-489B-9232-22CF474D9A6F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{357D5EE1-FFC8-489B-9232-22CF474D9A6F}.Debug|x64.ActiveCfg = Debug|Any CPU
{357D5EE1-FFC8-489B-9232-22CF474D9A6F}.Debug|x64.Build.0 = Debug|Any CPU
{357D5EE1-FFC8-489B-9232-22CF474D9A6F}.Debug|x86.ActiveCfg = Debug|Any CPU
{357D5EE1-FFC8-489B-9232-22CF474D9A6F}.Debug|x86.Build.0 = Debug|Any CPU
{357D5EE1-FFC8-489B-9232-22CF474D9A6F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{357D5EE1-FFC8-489B-9232-22CF474D9A6F}.Release|Any CPU.Build.0 = Release|Any CPU
{357D5EE1-FFC8-489B-9232-22CF474D9A6F}.Release|x64.ActiveCfg = Release|Any CPU
{357D5EE1-FFC8-489B-9232-22CF474D9A6F}.Release|x64.Build.0 = Release|Any CPU
{357D5EE1-FFC8-489B-9232-22CF474D9A6F}.Release|x86.ActiveCfg = Release|Any CPU
{357D5EE1-FFC8-489B-9232-22CF474D9A6F}.Release|x86.Build.0 = Release|Any CPU
{3F5C2483-FC87-43EF-92A8-66FF7D0E440F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3F5C2483-FC87-43EF-92A8-66FF7D0E440F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3F5C2483-FC87-43EF-92A8-66FF7D0E440F}.Debug|x64.ActiveCfg = Debug|Any CPU
{3F5C2483-FC87-43EF-92A8-66FF7D0E440F}.Debug|x64.Build.0 = Debug|Any CPU
{3F5C2483-FC87-43EF-92A8-66FF7D0E440F}.Debug|x86.ActiveCfg = Debug|Any CPU
{3F5C2483-FC87-43EF-92A8-66FF7D0E440F}.Debug|x86.Build.0 = Debug|Any CPU
{3F5C2483-FC87-43EF-92A8-66FF7D0E440F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3F5C2483-FC87-43EF-92A8-66FF7D0E440F}.Release|Any CPU.Build.0 = Release|Any CPU
{3F5C2483-FC87-43EF-92A8-66FF7D0E440F}.Release|x64.ActiveCfg = Release|Any CPU
{3F5C2483-FC87-43EF-92A8-66FF7D0E440F}.Release|x64.Build.0 = Release|Any CPU
{3F5C2483-FC87-43EF-92A8-66FF7D0E440F}.Release|x86.ActiveCfg = Release|Any CPU
{3F5C2483-FC87-43EF-92A8-66FF7D0E440F}.Release|x86.Build.0 = Release|Any CPU
{66FA29DB-925A-402B-A4C7-D3D780FB1BC3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{66FA29DB-925A-402B-A4C7-D3D780FB1BC3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{66FA29DB-925A-402B-A4C7-D3D780FB1BC3}.Debug|x64.ActiveCfg = Debug|x64
{66FA29DB-925A-402B-A4C7-D3D780FB1BC3}.Debug|x64.Build.0 = Debug|x64
{66FA29DB-925A-402B-A4C7-D3D780FB1BC3}.Debug|x86.ActiveCfg = Debug|x86
{66FA29DB-925A-402B-A4C7-D3D780FB1BC3}.Debug|x86.Build.0 = Debug|x86
{66FA29DB-925A-402B-A4C7-D3D780FB1BC3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{66FA29DB-925A-402B-A4C7-D3D780FB1BC3}.Release|Any CPU.Build.0 = Release|Any CPU
{66FA29DB-925A-402B-A4C7-D3D780FB1BC3}.Release|x64.ActiveCfg = Release|x64
{66FA29DB-925A-402B-A4C7-D3D780FB1BC3}.Release|x64.Build.0 = Release|x64
{66FA29DB-925A-402B-A4C7-D3D780FB1BC3}.Release|x86.ActiveCfg = Release|x86
{66FA29DB-925A-402B-A4C7-D3D780FB1BC3}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE