Added client SCM/CMS options

This commit is contained in:
Nicola Carminati
2019-04-04 18:33:44 +02:00
parent a681fa31b1
commit 830221b178
39 changed files with 324 additions and 179 deletions
+1
View File
@@ -6,6 +6,7 @@
<xs:element name="Client">
<xs:complexType>
<xs:all>
<xs:element name="IsSCM" minOccurs='1' maxOccurs='1'/>
<xs:element name="TranspColor" minOccurs='1' maxOccurs='1'/>
<xs:element name="RenderingMethod" minOccurs='1' maxOccurs='1'/>
<xs:element name="ShowVirtualKeyboard" minOccurs='1' maxOccurs='1'/>
+1
View File
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Config>
<Client>
<IsSCM>false</IsSCM>
<TranspColor>#FF00FF</TranspColor>
<RenderingMethod>GPU</RenderingMethod> <!-- GPU/CPU -->
<ShowVirtualKeyboard>false</ShowVirtualKeyboard>
+11 -1
View File
@@ -39,7 +39,8 @@ namespace Client.Config
RenderingMethod = ValidateRendering(x.Element("RenderingMethod").Value),
RunningOnSecondaryScreen = ValidateSecScreen(x.Element("RunningOnSecondaryScreen").Value),
ShowVirtualKeyboard = ValidateVirtualKeyboard(x.Element("ShowVirtualKeyboard").Value),
DeveloperMode = ValidateSecScreen(x.Element("DeveloperMode").Value)
DeveloperMode = ValidateDeveloperMode(x.Element("DeveloperMode").Value),
IsSCM = ValidateIsSCM(x.Element("IsSCM").Value)
}).FirstOrDefault();
Config.ConnectionConfig = xmlConfigFile
@@ -150,6 +151,15 @@ namespace Client.Config
throw new Exception(@"Configuration Error: ""Client - RunningOnSecondaryScreen"" is not a valid Boolean Type");
}
private static bool ValidateIsSCM(string value)
{
Boolean IsSCM;
if (Boolean.TryParse(value, out IsSCM))
return IsSCM;
else
throw new Exception(@"Configuration Error: ""Client - IsSCM"" is not a valid Boolean Type");
}
+1
View File
@@ -15,5 +15,6 @@ namespace Client.Config.SubModels
public Boolean RunningOnSecondaryScreen { get; set; }
public Boolean ShowVirtualKeyboard { get; set; }
public Boolean DeveloperMode { get; set; }
public Boolean IsSCM { get; set; }
}
}
+5 -5
View File
@@ -4,10 +4,10 @@ using Chromium.WebBrowser;
using Client.Config;
using Client.Config.SubModels;
using Client.Utils;
using CMS_Client.Browser_Tools.Models;
using CMS_Client.Browser_Tools.Models.Errors;
using CMS_Client.Browser_Tools.Models.Metadata;
using CMS_Client.View;
using Active_Client.Browser_Tools.Models;
using Active_Client.Browser_Tools.Models.Errors;
using Active_Client.Browser_Tools.Models.Metadata;
using Active_Client.View;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
@@ -20,7 +20,7 @@ using System.Threading;
using System.Windows.Forms;
using static Client.Utils.Constants;
namespace CMS_Client.Browser_Tools
namespace Active_Client.Browser_Tools
{
public class BrowserJSObject : JSObject
{
+1 -1
View File
@@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CMS_Client.Browser_Tools.Models
namespace Active_Client.Browser_Tools.Models
{
public class Drive
{
@@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CMS_Client.Browser_Tools.Models.Errors
namespace Active_Client.Browser_Tools.Models.Errors
{
public class ErrorContainer
{
+1 -1
View File
@@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CMS_Client.Browser_Tools.Models
namespace Active_Client.Browser_Tools.Models
{
public class File
{
+1 -1
View File
@@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CMS_Client.Browser_Tools.Models
namespace Active_Client.Browser_Tools.Models
{
public class InfoFile
{
+2 -2
View File
@@ -1,11 +1,11 @@
using CMS_Client.Browser_Tools.Models.Metadata;
using Active_Client.Browser_Tools.Models.Metadata;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CMS_Client.Browser_Tools.Models
namespace Active_Client.Browser_Tools.Models
{
public class JobToStep
{
@@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CMS_Client.Browser_Tools.Models.Metadata
namespace Active_Client.Browser_Tools.Models.Metadata
{
public class CustomParam
{
@@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CMS_Client.Browser_Tools.Models.Metadata
namespace Active_Client.Browser_Tools.Models.Metadata
{
public class GenericsParam
{
@@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CMS_Client.Browser_Tools.Models.Metadata
namespace Active_Client.Browser_Tools.Models.Metadata
{
public class ImageParam
{
@@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CMS_Client.Browser_Tools.Models.Metadata
namespace Active_Client.Browser_Tools.Models.Metadata
{
public class Metas
{
@@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CMS_Client.Browser_Tools.Models.Metadata
namespace Active_Client.Browser_Tools.Models.Metadata
{
public class PPContainer
{
@@ -1,11 +1,11 @@
using CMS_Client.Browser_Tools.Models.Metadata;
using Active_Client.Browser_Tools.Models.Metadata;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CMS_Client.Browser_Tools.Models
namespace Active_Client.Browser_Tools.Models
{
public class MetadataToFile
{
+5 -2
View File
@@ -6,8 +6,8 @@
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{66FA29DB-925A-402B-A4C7-D3D780FB1BC3}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>CMS_Client</RootNamespace>
<AssemblyName>CMS_Client</AssemblyName>
<RootNamespace>Active_Client</RootNamespace>
<AssemblyName>Active_Client</AssemblyName>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
@@ -276,6 +276,9 @@
</ItemGroup>
<ItemGroup>
<Content Include="CMS_Icon.ico" />
<None Include="Resources\SCM_MAESTRO_ACTIVE_ICONA.ico" />
<None Include="Resources\CM_ACTIVE_LOGO_INVERTED.png" />
<None Include="Resources\MAESTRO_ACTIVE_LOGO.jpg" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
+3 -3
View File
@@ -4,7 +4,7 @@ using Chromium.WebBrowser;
using Chromium.WebBrowser.Event;
using Client.Config;
using Client.Utils;
using CMS_Client.View;
using Active_Client.View;
using Microsoft.Win32;
using System;
using System.Collections.Generic;
@@ -18,7 +18,7 @@ using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace CMS_Client
namespace Active_Client
{
public static class Program
{
@@ -121,7 +121,7 @@ namespace CMS_Client
{
//code if key Not Exist add it and restart
Registry.SetValue(keyName, valueName, "GpuPreference=1;");
MessageBox.Show("CMS Active has foundthis Graphic Cards:\n\n" + Cardlist +"\nThe graphic configuration has been setted. Press Ok to restart the Application",Application.ProductName);
MessageBox.Show("Active has foundthis Graphic Cards:\n\n" + Cardlist +"\nThe graphic configuration has been setted. Press Ok to restart the Application",Application.ProductName);
Application.Restart();
Environment.Exit(0);
}
+4 -4
View File
@@ -5,12 +5,12 @@ 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 Active Client")]
[assembly: AssemblyDescription("CMS Active Client - Main HMI for CMS Machines")]
[assembly: AssemblyTitle("Active Client")]
[assembly: AssemblyDescription("Active Client - Main HMI for CMS Machines")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("CMS Spa")]
[assembly: AssemblyProduct("CMS Active Client")]
[assembly: AssemblyCopyright("Copyright © 2017")]
[assembly: AssemblyProduct("Active Client")]
[assembly: AssemblyCopyright("Copyright © 2019")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
+32 -2
View File
@@ -8,7 +8,7 @@
// </auto-generated>
//------------------------------------------------------------------------------
namespace CMS_Client.Properties {
namespace Active_Client.Properties {
using System;
@@ -39,7 +39,7 @@ namespace CMS_Client.Properties {
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);
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Active_Client.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
@@ -70,6 +70,36 @@ namespace CMS_Client.Properties {
}
}
/// <summary>
/// Cerca una risorsa localizzata di tipo System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap CM_ACTIVE_LOGO_INVERTED {
get {
object obj = ResourceManager.GetObject("CM_ACTIVE_LOGO_INVERTED", 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 MAESTRO_ACTIVE_ICON {
get {
object obj = ResourceManager.GetObject("MAESTRO_ACTIVE_ICON", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
/// <summary>
/// Cerca una risorsa localizzata di tipo System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap MAESTRO_ACTIVE_LOGO {
get {
object obj = ResourceManager.GetObject("MAESTRO_ACTIVE_LOGO", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Cerca una risorsa localizzata di tipo System.Drawing.Icon simile a (Icona).
/// </summary>
+9
View File
@@ -124,4 +124,13 @@
<data name="CM_ACTIVE_LOGO" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\CM_ACTIVE_LOGO.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="CM_ACTIVE_LOGO_INVERTED" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\CM_ACTIVE_LOGO_INVERTED.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="MAESTRO_ACTIVE_LOGO" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\MAESTRO_ACTIVE_LOGO.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="MAESTRO_ACTIVE_ICON" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\SCM_MAESTRO_ACTIVE_ICONA.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>
+26 -26
View File
@@ -1,26 +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;
}
}
}
}
//------------------------------------------------------------------------------
// <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 Active_Client.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.6.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;
}
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 296 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

+101 -48
View File
@@ -1,4 +1,4 @@
namespace CMS_Client.View
namespace Active_Client.View
{
partial class LoadingForm
{
@@ -29,80 +29,133 @@
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(LoadingForm));
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.VersionLBL = new System.Windows.Forms.Label();
this.StatusLBL = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.ErrorLBL = new System.Windows.Forms.Label();
this.LogoCMS = new System.Windows.Forms.PictureBox();
this.CloseLabel = new System.Windows.Forms.Label();
this.LogoSCM = new System.Windows.Forms.PictureBox();
this.VersionLBL = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.LogoCMS)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.LogoSCM)).BeginInit();
this.SuspendLayout();
//
// pictureBox1
//
this.pictureBox1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(15)))), ((int)(((byte)(43)))), ((int)(((byte)(91)))));
this.pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
this.pictureBox1.Image = global::CMS_Client.Properties.Resources.CM_ACTIVE_LOGO;
this.pictureBox1.Location = new System.Drawing.Point(-1, 0);
this.pictureBox1.Margin = new System.Windows.Forms.Padding(0);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(971, 203);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox1.TabIndex = 10;
this.pictureBox1.TabStop = false;
//
// VersionLBL
//
this.VersionLBL.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.VersionLBL.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(15)))), ((int)(((byte)(43)))), ((int)(((byte)(91)))));
this.VersionLBL.Font = new System.Drawing.Font("Work Sans", 18F, System.Drawing.FontStyle.Bold);
this.VersionLBL.ForeColor = System.Drawing.Color.White;
this.VersionLBL.Location = new System.Drawing.Point(1, 0);
this.VersionLBL.Name = "VersionLBL";
this.VersionLBL.Size = new System.Drawing.Size(592, 35);
this.VersionLBL.TabIndex = 0;
this.VersionLBL.Text = "...";
this.VersionLBL.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// StatusLBL
//
this.StatusLBL.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
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)(15)))), ((int)(((byte)(43)))), ((int)(((byte)(91)))));
this.StatusLBL.Font = new System.Drawing.Font("Work Sans", 9.749999F, System.Drawing.FontStyle.Bold);
this.StatusLBL.ForeColor = System.Drawing.Color.White;
this.StatusLBL.Location = new System.Drawing.Point(1, 168);
this.StatusLBL.BackColor = System.Drawing.Color.White;
this.StatusLBL.Font = new System.Drawing.Font("Work Sans", 9.749999F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.StatusLBL.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(75)))), ((int)(((byte)(75)))), ((int)(((byte)(75)))));
this.StatusLBL.Location = new System.Drawing.Point(0, 384);
this.StatusLBL.Name = "StatusLBL";
this.StatusLBL.Size = new System.Drawing.Size(969, 35);
this.StatusLBL.TabIndex = 12;
this.StatusLBL.Size = new System.Drawing.Size(502, 34);
this.StatusLBL.TabIndex = 5;
this.StatusLBL.Text = "...";
this.StatusLBL.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// 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.White;
this.ErrorLBL.Font = new System.Drawing.Font("Work Sans", 9.749999F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.ErrorLBL.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
this.ErrorLBL.Location = new System.Drawing.Point(501, 384);
this.ErrorLBL.Name = "ErrorLBL";
this.ErrorLBL.Size = new System.Drawing.Size(468, 34);
this.ErrorLBL.TabIndex = 7;
this.ErrorLBL.Text = "...";
this.ErrorLBL.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// LogoCMS
//
this.LogoCMS.BackColor = System.Drawing.Color.White;
this.LogoCMS.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
this.LogoCMS.Image = global::Active_Client.Properties.Resources.CM_ACTIVE_LOGO_INVERTED;
this.LogoCMS.Location = new System.Drawing.Point(0, 31);
this.LogoCMS.Margin = new System.Windows.Forms.Padding(0);
this.LogoCMS.Name = "LogoCMS";
this.LogoCMS.Size = new System.Drawing.Size(969, 369);
this.LogoCMS.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.LogoCMS.TabIndex = 6;
this.LogoCMS.TabStop = false;
this.LogoCMS.Visible = false;
//
// CloseLabel
//
this.CloseLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.CloseLabel.BackColor = System.Drawing.Color.White;
this.CloseLabel.Cursor = System.Windows.Forms.Cursors.Hand;
this.CloseLabel.Font = new System.Drawing.Font("Work Sans Medium", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.CloseLabel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(15)))), ((int)(((byte)(43)))), ((int)(((byte)(91)))));
this.CloseLabel.Location = new System.Drawing.Point(922, 0);
this.CloseLabel.Margin = new System.Windows.Forms.Padding(3, 0, 2, 0);
this.CloseLabel.Name = "CloseLabel";
this.CloseLabel.Padding = new System.Windows.Forms.Padding(0, 0, 5, 0);
this.CloseLabel.Size = new System.Drawing.Size(47, 31);
this.CloseLabel.TabIndex = 3;
this.CloseLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// LogoSCM
//
this.LogoSCM.BackColor = System.Drawing.Color.White;
this.LogoSCM.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
this.LogoSCM.Image = global::Active_Client.Properties.Resources.MAESTRO_ACTIVE_LOGO;
this.LogoSCM.Location = new System.Drawing.Point(0, 0);
this.LogoSCM.Margin = new System.Windows.Forms.Padding(0);
this.LogoSCM.Name = "LogoSCM";
this.LogoSCM.Size = new System.Drawing.Size(969, 400);
this.LogoSCM.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.LogoSCM.TabIndex = 8;
this.LogoSCM.TabStop = false;
this.LogoSCM.Visible = false;
//
// VersionLBL
//
this.VersionLBL.BackColor = System.Drawing.Color.White;
this.VersionLBL.Font = new System.Drawing.Font("Work Sans", 18F, System.Drawing.FontStyle.Bold);
this.VersionLBL.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(75)))), ((int)(((byte)(75)))), ((int)(((byte)(75)))));
this.VersionLBL.Location = new System.Drawing.Point(0, 0);
this.VersionLBL.Margin = new System.Windows.Forms.Padding(0);
this.VersionLBL.Name = "VersionLBL";
this.VersionLBL.Size = new System.Drawing.Size(929, 31);
this.VersionLBL.TabIndex = 0;
this.VersionLBL.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// LoadingForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(969, 203);
this.Controls.Add(this.VersionLBL);
this.BorderStyle = MetroFramework.Forms.MetroFormBorderStyle.FixedSingle;
this.ClientSize = new System.Drawing.Size(969, 418);
this.ControlBox = false;
this.Controls.Add(this.StatusLBL);
this.Controls.Add(this.pictureBox1);
this.Controls.Add(this.VersionLBL);
this.Controls.Add(this.CloseLabel);
this.Controls.Add(this.ErrorLBL);
this.Controls.Add(this.LogoCMS);
this.Controls.Add(this.LogoSCM);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Movable = false;
this.Name = "LoadingForm";
this.Padding = new System.Windows.Forms.Padding(0, 60, 0, 0);
this.Resizable = false;
this.ShadowType = MetroFramework.Forms.MetroFormShadowType.AeroShadow;
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
this.Text = "Loading CMS Client";
this.Text = "Loading Active Client";
this.TopMost = true;
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.LogoCMS)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.LogoSCM)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.Label VersionLBL;
private System.Windows.Forms.Label StatusLBL;
private System.Windows.Forms.Label ErrorLBL;
private System.Windows.Forms.PictureBox LogoCMS;
private System.Windows.Forms.Label CloseLabel;
private System.Windows.Forms.PictureBox LogoSCM;
private System.Windows.Forms.Label VersionLBL;
}
}
+14 -9
View File
@@ -15,7 +15,7 @@ using System.Windows.Forms;
using Client.Utils;
using System.IO;
namespace CMS_Client.View
namespace Active_Client.View
{
public partial class LoadingForm : MetroFramework.Forms.MetroForm
{
@@ -23,16 +23,21 @@ namespace CMS_Client.View
//Constructor
public LoadingForm()
{
InitializeComponent();
InitializeComponent();
if (Config.ClientConfig.IsSCM)
{
LogoCMS.Visible = false;
LogoSCM.Visible = true;
this.Icon = Properties.Resources.MAESTRO_ACTIVE_ICON;
}
else
{
LogoCMS.Visible = true;
LogoSCM.Visible = false;
}
//Set window Position
this.Location = new Point((Screen.PrimaryScreen.Bounds.Width / 2) - (this.Width / 2), (Screen.PrimaryScreen.Bounds.Height / 2) - (this.Height / 2));
//Setup product label
if (Environment.Is64BitProcess)
VersionLBL.Text = "V" + Application.ProductVersion + " - 64 Bit";
else
VersionLBL.Text = "V" + Application.ProductVersion + " - 32 Bit";
this.Location = new Point((Screen.PrimaryScreen.Bounds.Width / 2) - (this.Width / 2), (Screen.PrimaryScreen.Bounds.Height / 2) - (this.Height / 2));
}
+1 -1
View File
@@ -1,6 +1,6 @@
namespace CMS_Client.View
namespace Active_Client.View
{
partial class MainForm
{
+6 -2
View File
@@ -4,14 +4,14 @@ using Chromium.Remote.Event;
using Chromium.WebBrowser;
using Client.Config;
using Client.Utils;
using CMS_Client.Browser_Tools;
using Active_Client.Browser_Tools;
using System;
using System.Drawing;
using System.Linq;
using System.Windows.Forms;
using static Client.Utils.Constants;
namespace CMS_Client.View
namespace Active_Client.View
{
public partial class MainForm : Form
{
@@ -49,6 +49,10 @@ namespace CMS_Client.View
//Initialize the Windows
InitializeComponent();
//Setup the Icon
if (Config.ClientConfig.IsSCM)
this.Icon = Properties.Resources.MAESTRO_ACTIVE_ICON;
//Start Client Setting
InitializeClientSettings();
+1 -1
View File
@@ -1,4 +1,4 @@
namespace CMS_Client.View
namespace Active_Client.View
{
partial class NcForm
{
+1 -1
View File
@@ -8,7 +8,7 @@ using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace CMS_Client.View
namespace Active_Client.View
{
public partial class NcForm : Form
{
+2 -2
View File
@@ -1,7 +1,7 @@
using Chromium.Remote;
using Client.Config;
using Client.Utils;
using CMS_Client.Properties;
using Active_Client.Properties;
using System;
using System.Collections.Generic;
using System.Diagnostics;
@@ -15,7 +15,7 @@ using System.Threading.Tasks;
using System.Windows.Forms;
using static Client.Utils.Constants;
namespace CMS_Client.View
namespace Active_Client.View
{
static class NcWindow
{
+60 -40
View File
@@ -1,4 +1,4 @@
namespace CMS_Client.View
namespace Active_Client.View
{
partial class OpeningForm
{
@@ -29,34 +29,24 @@
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(OpeningForm));
this.VersionLBL = new System.Windows.Forms.Label();
this.StatusLBL = new System.Windows.Forms.Label();
this.ErrorLBL = new System.Windows.Forms.Label();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.LogoCMS = new System.Windows.Forms.PictureBox();
this.CloseLabel = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.LogoSCM = new System.Windows.Forms.PictureBox();
this.VersionLBL = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.LogoCMS)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.LogoSCM)).BeginInit();
this.SuspendLayout();
//
// VersionLBL
//
this.VersionLBL.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(15)))), ((int)(((byte)(43)))), ((int)(((byte)(91)))));
this.VersionLBL.Font = new System.Drawing.Font("Work Sans", 18F, System.Drawing.FontStyle.Bold);
this.VersionLBL.ForeColor = System.Drawing.Color.White;
this.VersionLBL.Location = new System.Drawing.Point(0, 0);
this.VersionLBL.Name = "VersionLBL";
this.VersionLBL.Size = new System.Drawing.Size(929, 31);
this.VersionLBL.TabIndex = 0;
this.VersionLBL.Text = "...";
this.VersionLBL.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// 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)(15)))), ((int)(((byte)(43)))), ((int)(((byte)(91)))));
this.StatusLBL.BackColor = System.Drawing.Color.White;
this.StatusLBL.Font = new System.Drawing.Font("Work Sans", 9.749999F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.StatusLBL.ForeColor = System.Drawing.Color.White;
this.StatusLBL.Location = new System.Drawing.Point(0, 169);
this.StatusLBL.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(75)))), ((int)(((byte)(75)))), ((int)(((byte)(75)))));
this.StatusLBL.Location = new System.Drawing.Point(0, 384);
this.StatusLBL.Name = "StatusLBL";
this.StatusLBL.Size = new System.Drawing.Size(502, 34);
this.StatusLBL.TabIndex = 5;
@@ -67,36 +57,37 @@
//
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)(15)))), ((int)(((byte)(43)))), ((int)(((byte)(91)))));
this.ErrorLBL.BackColor = System.Drawing.Color.White;
this.ErrorLBL.Font = new System.Drawing.Font("Work Sans", 9.749999F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.ErrorLBL.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
this.ErrorLBL.Location = new System.Drawing.Point(501, 169);
this.ErrorLBL.Location = new System.Drawing.Point(501, 384);
this.ErrorLBL.Name = "ErrorLBL";
this.ErrorLBL.Size = new System.Drawing.Size(468, 34);
this.ErrorLBL.TabIndex = 7;
this.ErrorLBL.Text = "...";
this.ErrorLBL.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// pictureBox1
// LogoCMS
//
this.pictureBox1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(15)))), ((int)(((byte)(43)))), ((int)(((byte)(91)))));
this.pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
this.pictureBox1.Image = global::CMS_Client.Properties.Resources.CM_ACTIVE_LOGO;
this.pictureBox1.Location = new System.Drawing.Point(0, 0);
this.pictureBox1.Margin = new System.Windows.Forms.Padding(0);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(969, 203);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox1.TabIndex = 6;
this.pictureBox1.TabStop = false;
this.LogoCMS.BackColor = System.Drawing.Color.White;
this.LogoCMS.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
this.LogoCMS.Image = global::Active_Client.Properties.Resources.CM_ACTIVE_LOGO_INVERTED;
this.LogoCMS.Location = new System.Drawing.Point(0, 31);
this.LogoCMS.Margin = new System.Windows.Forms.Padding(0);
this.LogoCMS.Name = "LogoCMS";
this.LogoCMS.Size = new System.Drawing.Size(969, 369);
this.LogoCMS.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.LogoCMS.TabIndex = 6;
this.LogoCMS.TabStop = false;
this.LogoCMS.Visible = false;
//
// CloseLabel
//
this.CloseLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.CloseLabel.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(15)))), ((int)(((byte)(43)))), ((int)(((byte)(91)))));
this.CloseLabel.BackColor = System.Drawing.Color.White;
this.CloseLabel.Cursor = System.Windows.Forms.Cursors.Hand;
this.CloseLabel.Font = new System.Drawing.Font("Work Sans Medium", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.CloseLabel.ForeColor = System.Drawing.Color.White;
this.CloseLabel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(15)))), ((int)(((byte)(43)))), ((int)(((byte)(91)))));
this.CloseLabel.Location = new System.Drawing.Point(922, 0);
this.CloseLabel.Margin = new System.Windows.Forms.Padding(3, 0, 2, 0);
this.CloseLabel.Name = "CloseLabel";
@@ -108,18 +99,45 @@
this.CloseLabel.Click += new System.EventHandler(this.CloseLabel_Click);
this.CloseLabel.MouseClick += new System.Windows.Forms.MouseEventHandler(this.CloseLabel_MouseClick);
//
// LogoSCM
//
this.LogoSCM.BackColor = System.Drawing.Color.White;
this.LogoSCM.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
this.LogoSCM.Image = global::Active_Client.Properties.Resources.MAESTRO_ACTIVE_LOGO;
this.LogoSCM.Location = new System.Drawing.Point(0, 0);
this.LogoSCM.Margin = new System.Windows.Forms.Padding(0);
this.LogoSCM.Name = "LogoSCM";
this.LogoSCM.Size = new System.Drawing.Size(969, 400);
this.LogoSCM.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.LogoSCM.TabIndex = 8;
this.LogoSCM.TabStop = false;
this.LogoSCM.Visible = false;
//
// VersionLBL
//
this.VersionLBL.BackColor = System.Drawing.Color.White;
this.VersionLBL.Font = new System.Drawing.Font("Work Sans", 18F, System.Drawing.FontStyle.Bold);
this.VersionLBL.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(75)))), ((int)(((byte)(75)))), ((int)(((byte)(75)))));
this.VersionLBL.Location = new System.Drawing.Point(0, 0);
this.VersionLBL.Margin = new System.Windows.Forms.Padding(0);
this.VersionLBL.Name = "VersionLBL";
this.VersionLBL.Size = new System.Drawing.Size(929, 31);
this.VersionLBL.TabIndex = 0;
this.VersionLBL.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// OpeningForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BorderStyle = MetroFramework.Forms.MetroFormBorderStyle.FixedSingle;
this.ClientSize = new System.Drawing.Size(969, 203);
this.ClientSize = new System.Drawing.Size(969, 418);
this.ControlBox = false;
this.Controls.Add(this.StatusLBL);
this.Controls.Add(this.VersionLBL);
this.Controls.Add(this.CloseLabel);
this.Controls.Add(this.ErrorLBL);
this.Controls.Add(this.pictureBox1);
this.Controls.Add(this.LogoCMS);
this.Controls.Add(this.LogoSCM);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Movable = false;
this.Name = "OpeningForm";
@@ -127,19 +145,21 @@
this.Resizable = false;
this.ShadowType = MetroFramework.Forms.MetroFormShadowType.AeroShadow;
this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
this.Text = "Loading CMS Client";
this.Text = "Loading Active Client";
this.TopMost = true;
this.Load += new System.EventHandler(this.LoadingForm_Load);
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.LogoCMS)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.LogoSCM)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Label VersionLBL;
private System.Windows.Forms.Label StatusLBL;
private System.Windows.Forms.Label ErrorLBL;
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.PictureBox LogoCMS;
private System.Windows.Forms.Label CloseLabel;
private System.Windows.Forms.PictureBox LogoSCM;
private System.Windows.Forms.Label VersionLBL;
}
}
+18 -10
View File
@@ -18,7 +18,7 @@ using MetroFramework;
using Newtonsoft.Json;
using Client.Config.SubModels;
namespace CMS_Client.View
namespace Active_Client.View
{
public partial class OpeningForm : MetroFramework.Forms.MetroForm
{
@@ -36,6 +36,18 @@ namespace CMS_Client.View
public OpeningForm()
{
InitializeComponent();
if (Config.ClientConfig.IsSCM)
{
LogoCMS.Visible = false;
LogoSCM.Visible = true;
this.Icon = Properties.Resources.MAESTRO_ACTIVE_ICON;
}
else
{
LogoCMS.Visible = true;
LogoSCM.Visible = false;
}
//Setup The Browser
if (!SetupBrowser())
@@ -55,12 +67,6 @@ namespace CMS_Client.View
//Start Backgroud Task
ConnTask = Task.Run(() => BagroundWorker());
//Setup product label
if(Environment.Is64BitProcess)
VersionLBL.Text = "V" + Application.ProductVersion + " - 64 Bit";
else
VersionLBL.Text = "V" + Application.ProductVersion + " - 32 Bit";
}
@@ -271,7 +277,8 @@ namespace CMS_Client.View
Config.ProdSoftwareConfig.Path = ProdPath;
Config.ExtSoftwaresConfig = ConfigResponse.ExtSoftwares.ToArray();
if(ConfigResponse.ExtSoftwares != null)
Config.ExtSoftwaresConfig = ConfigResponse.ExtSoftwares.ToArray();
return true;
}
@@ -280,8 +287,9 @@ namespace CMS_Client.View
return true;
}
catch (Exception e)
{
{
setStatus("Error!", "Error While loading the configuration");
return false;
}
+1 -1
View File
@@ -1,4 +1,4 @@
namespace CMS_Client.View
namespace Active_Client.View
{
partial class ProdForm
{
+1 -1
View File
@@ -8,7 +8,7 @@ using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace CMS_Client.View
namespace Active_Client.View
{
public partial class ProdForm : Form
{
+1 -1
View File
@@ -245,7 +245,7 @@ namespace Step.Model
}
// File paths
public const string CLIENT_EXE_NAME = @"CMS_Client.exe";
public const string CLIENT_EXE_NAME = @"Active_Client.exe";
public const string CLIENT_EXE_NAME_NOEXT = @"CMS_Client";
public const string MAINTENANCE_ATTACHMENT_PATH = @"C:\CMS\Active\attachment\maintenance\";
+5 -5
View File
@@ -87,12 +87,12 @@ namespace Step.UI
this.adminMachineToolStripMenuItem});
this.NotifyIconMenu.Name = "NotifyIconMenu";
this.NotifyIconMenu.RenderMode = System.Windows.Forms.ToolStripRenderMode.Professional;
this.NotifyIconMenu.Size = new System.Drawing.Size(181, 70);
this.NotifyIconMenu.Size = new System.Drawing.Size(167, 48);
//
// StopServerItem
//
this.StopServerItem.Name = "StopServerItem";
this.StopServerItem.Size = new System.Drawing.Size(180, 22);
this.StopServerItem.Size = new System.Drawing.Size(166, 22);
this.StopServerItem.Text = "Close CMS Server";
this.StopServerItem.Click += new System.EventHandler(this.StopServerItem_Click);
//
@@ -105,7 +105,7 @@ namespace Step.UI
this.resetSpindleHoursToolStripMenuItem,
this.resetCountersToolStripMenuItem});
this.adminMachineToolStripMenuItem.Name = "adminMachineToolStripMenuItem";
this.adminMachineToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.adminMachineToolStripMenuItem.Size = new System.Drawing.Size(166, 22);
this.adminMachineToolStripMenuItem.Text = "Service";
//
// passwordToolStripMenuItem
@@ -341,7 +341,7 @@ namespace Step.UI
// closeCMSServerToolStripMenuItem
//
this.closeCMSServerToolStripMenuItem.Name = "closeCMSServerToolStripMenuItem";
this.closeCMSServerToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.closeCMSServerToolStripMenuItem.Size = new System.Drawing.Size(166, 22);
this.closeCMSServerToolStripMenuItem.Text = "Close CMS Server";
this.closeCMSServerToolStripMenuItem.Click += new System.EventHandler(this.closeCMSServerToolStripMenuItem_Click);
//
@@ -354,7 +354,7 @@ namespace Step.UI
this.resetSpindleHoursToolStripMenuItem1,
this.resetCountersToolStripMenuItem1});
this.serviceToolStripMenuItem.Name = "serviceToolStripMenuItem";
this.serviceToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.serviceToolStripMenuItem.Size = new System.Drawing.Size(166, 22);
this.serviceToolStripMenuItem.Text = "Service";
//
// passwordToolStripMenuItem1
+1 -1
View File
@@ -88,4 +88,4 @@ if (!String.prototype.format) {
match;
});
};
}
}