diff --git a/Client/View/MainForm.cs b/Client/View/MainForm.cs index 1c428ebe..a23cb81e 100644 --- a/Client/View/MainForm.cs +++ b/Client/View/MainForm.cs @@ -179,6 +179,8 @@ namespace CMS_Client.View Browser.LoadHandler.OnLoadError += BrowserLoadsError; Browser.KeyboardHandler.OnKeyEvent += BrowserKeyPress; Browser.ContextMenuHandler.OnBeforeContextMenu += BrowserContextMenu; + Browser.DisplayHandler.OnConsoleMessage += BrowserConsoleMessage; + } #endregion @@ -354,6 +356,13 @@ namespace CMS_Client.View e.Model.Clear(); } + + //Override Javascript Console Message + private void BrowserConsoleMessage(object sender, CfxOnConsoleMessageEventArgs e) + { + e.SetReturnValue(true); + } + #endregion /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/Client/View/NcWindow.cs b/Client/View/NcWindow.cs index af1efa7f..f73cb80c 100644 --- a/Client/View/NcWindow.cs +++ b/Client/View/NcWindow.cs @@ -280,7 +280,6 @@ namespace CMS_Client.View public static void SetState(NcState St) { state = St; - CaptureHMI(); } @@ -374,7 +373,6 @@ namespace CMS_Client.View //Start the Hook if (MainViewHandle != IntPtr.Zero && ncprocess.MainWindowHandle != IntPtr.Zero && MainProcessPID != 0 && NcProcessPID != 0 && windowstarted) { - CaptureHMI(); //Detach the hook if (hhook != IntPtr.Zero) UnhookWinEvent(hhook); @@ -383,11 +381,11 @@ namespace CMS_Client.View procDelegate = new WinEventDelegate(WinEventProc); hhook = SetWinEventHook(EVENT_OBJECT_FOCUS, EVENT_OBJECT_FOCUS, IntPtr.Zero, procDelegate, 0, 0, WINEVENT_OUTOFCONTEXT); - //Start the new Thread of Image Captutre - if (CaptureThread != null) - CaptureThread.Abort(); - CaptureThread = new Thread(new ThreadStart(CaptureCycle)); - CaptureThread.Start(); + //Start the new Thread of Image Captutre - in Standby (NICOLA CARMINATI 25/01/2018) + //if (CaptureThread != null) + // CaptureThread.Abort(); + //CaptureThread = new Thread(new ThreadStart(CaptureCycle)); + //CaptureThread.Start(); //Start the new Thread of Follow-NC-Window if (Config.VendorHmiConfig.FollowNcWindow) @@ -449,15 +447,13 @@ namespace CMS_Client.View 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); - } - } + //if (ActualPID != LastHookedPID) + //{ + // //get the Handle of the Popup + // PopupHandle = GetLastActivePopup(ncprocess.MainWindowHandle); + // if (PopupHandle != ncprocess.MainWindowHandle) + // ResizeOutofBoundWindow(ncprocess.MainWindowHandle, PopupHandle); + //} } diff --git a/Step/wwwroot/assets/images/Fanuc_Placeholder.JPG b/Step/wwwroot/assets/images/Fanuc_Placeholder.JPG new file mode 100644 index 00000000..f0f5a028 Binary files /dev/null and b/Step/wwwroot/assets/images/Fanuc_Placeholder.JPG differ diff --git a/Step/wwwroot/assets/images/Osai_Placeholder.JPG b/Step/wwwroot/assets/images/Osai_Placeholder.JPG new file mode 100644 index 00000000..bc99dd3d Binary files /dev/null and b/Step/wwwroot/assets/images/Osai_Placeholder.JPG differ diff --git a/Step/wwwroot/assets/images/Siemens_Placeholder.JPG b/Step/wwwroot/assets/images/Siemens_Placeholder.JPG new file mode 100644 index 00000000..d90a285d Binary files /dev/null and b/Step/wwwroot/assets/images/Siemens_Placeholder.JPG differ diff --git a/Step/wwwroot/assets/styles/base/nc.less b/Step/wwwroot/assets/styles/base/nc.less index cbc1427e..27735eba 100644 --- a/Step/wwwroot/assets/styles/base/nc.less +++ b/Step/wwwroot/assets/styles/base/nc.less @@ -17,6 +17,7 @@ height: 768px; width: 1024px; border: none; + background-image: url('../images/Osai_Placeholder.JPG') } #nc-softkeys-container{ diff --git a/Step/wwwroot/src/App.vue b/Step/wwwroot/src/App.vue index 67f0ef83..1dbc93d3 100644 --- a/Step/wwwroot/src/App.vue +++ b/Step/wwwroot/src/App.vue @@ -5,7 +5,7 @@
- +
 
 
@@ -71,14 +71,7 @@ export default { this.$forceUpdate(); }); - ms.subscribeToChannel("HMI-start-render", args => { - let NEWsrc = cmsClient.getScreenBase64(true); - if(this.HMIsrc != NEWsrc) - this.HMIsrc = NEWsrc; - else - Factory.Get(MessageService).publishToChannel("HMI-end-render"); - }); - + let _this = this; Factory.Get(LoginService) .getUserInfo() @@ -124,9 +117,6 @@ export default { Factory.Get(MessageService).publishToChannel("HMI-hide"); } }, - HMIsrc: function() { - this.$nextTick(() => {Factory.Get(MessageService).publishToChannel("HMI-end-render")}); - }, loadingOperations: function(n, o) { if (o == 0 && n > 0) { iziToast.show({ @@ -187,8 +177,7 @@ export default { return { state: this.$store.state, applyBlur: false, - loadingOperations: 0, - HMIsrc: "" + loadingOperations: 0 }; } }; diff --git a/Step/wwwroot/src/app.business-logic.ts b/Step/wwwroot/src/app.business-logic.ts index ed0d8c13..0eb277e2 100644 --- a/Step/wwwroot/src/app.business-logic.ts +++ b/Step/wwwroot/src/app.business-logic.ts @@ -149,10 +149,10 @@ if (typeof cmsClient != "undefined") { }); - Factory.Get(MessageService).subscribeToChannel("HMI-end-render", args => { +/* Factory.Get(MessageService).subscribeToChannel("HMI-end-render", args => { clearTimeout(RerenderInterval); RerenderInterval = setTimeout(ElaborateHMIStatus, 15); - }); + }); */ } @@ -185,19 +185,23 @@ function stopDrag(){ * */ function HideHmi() { HMIvisible = false; - Factory.Get(MessageService).publishToChannel("HMI-start-render"); + ElaborateHMIStatus(); + //Factory.Get(MessageService).publishToChannel("HMI-start-render"); } function showAlarms() { HMIAlarmsVisible = true; - Factory.Get(MessageService).publishToChannel("HMI-start-render"); + ElaborateHMIStatus(); + //Factory.Get(MessageService).publishToChannel("HMI-start-render"); } function showModal() { HMIModalsVisible = true; - Factory.Get(MessageService).publishToChannel("HMI-start-render"); + ElaborateHMIStatus(); + //Factory.Get(MessageService).publishToChannel("HMI-start-render"); } function startDrag() { HMIDragging = true; - Factory.Get(MessageService).publishToChannel("HMI-start-render"); + ElaborateHMIStatus(); + //Factory.Get(MessageService).publishToChannel("HMI-start-render"); } //Private function for elaborate status