From c3da370a0186eb42c8acf43cc93e7bfde9471bb7 Mon Sep 17 00:00:00 2001 From: Lucio Maranta Date: Fri, 19 Apr 2019 13:16:04 +0200 Subject: [PATCH] Fix loading tools in magazine controls --- Step/SetupActive.iss | 16 +++++++++++++++- .../tooling/components/tooling-depot.ts | 5 +++-- Step/wwwroot/src/store/tooling.store.ts | 7 ++++--- 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/Step/SetupActive.iss b/Step/SetupActive.iss index 3fe61dfd..6b7660d0 100644 --- a/Step/SetupActive.iss +++ b/Step/SetupActive.iss @@ -155,7 +155,7 @@ Name: {userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName}; Filen [Run] ; Install .net -Filename: {tmp}\{#DotNetInstallerName}; Description: {cm:InstallDotNet}; WorkingDir:{tmp}; StatusMsg: {cm:InstallingDotNet}; Check: FrameworkIsNotInstalled +Filename: {tmp}\{#DotNetInstallerName}; Description: {cm:InstallDotNet}; WorkingDir:{tmp}; StatusMsg: {cm:InstallingDotNet}; Check: NetFrameworkIsMissing ; Install MariaDb Filename: "msiexec.exe"; Description: {cm:InstallDotNet}; WorkingDir:{tmp}; StatusMsg: {cm:InstallingMariaDB}; Parameters: "/i {tmp}\{#MariaDBInstallerName}" @@ -200,6 +200,20 @@ var Result := not RegKeyExists(HKEY_LOCAL_MACHINE, 'SOFTWARE\Microsoft\.NETFramework\policy\v4.0'); end; + + function NetFrameworkIsMissing(): Boolean; + var + bSuccess: Boolean; + regVersion: Cardinal; + begin + Result := True; + + bSuccess := RegQueryDWordValue(HKLM, 'Software\Microsoft\NET Framework Setup\NDP\v4\Full', 'Release', regVersion); + if (True = bSuccess) and (regVersion >= 394802) then begin + Result := False; + end; + end; + ///////////////// CreateCustomInputOptionCMsorSCM ////////////////////////// procedure CreateCustomInputOptionCMSorSCM; begin diff --git a/Step/wwwroot/src/app_modules/tooling/components/tooling-depot.ts b/Step/wwwroot/src/app_modules/tooling/components/tooling-depot.ts index 7156eae4..c3c1528b 100644 --- a/Step/wwwroot/src/app_modules/tooling/components/tooling-depot.ts +++ b/Step/wwwroot/src/app_modules/tooling/components/tooling-depot.ts @@ -615,7 +615,7 @@ export default class depot extends Vue { // SIEMENS public doAddToDepotPosition(position, event) { if (this.draggingTool && this.draggingPosition == position.positionId) { - if (this.toolAtPosition(position.positionId) || !position.canLoadTool || position.occupied) + if (this.toolAtPosition(position.positionId) || !position.canLoadTool || position.occupied || !this.checkMagPosType(position.type)) return this.draggingIn = false; @@ -630,8 +630,9 @@ export default class depot extends Vue { // OSAI-FANUC public doAddToNcDepotPosition(position, event) { if (this.draggingTool && this.draggingPosition == position.positionId) { - if (this.ncToolAtPosition(position.positionId) || !position.canLoadTool) + if (this.ncToolAtPosition(position.positionId) || !position.canLoadTool || !this.checkMagPosType(position.type)) return + this.draggingIn = false; this.draggingTool = null; var shankToAdd = event.payload; diff --git a/Step/wwwroot/src/store/tooling.store.ts b/Step/wwwroot/src/store/tooling.store.ts index a8fb987d..8fb5b8f4 100644 --- a/Step/wwwroot/src/store/tooling.store.ts +++ b/Step/wwwroot/src/store/tooling.store.ts @@ -193,11 +193,12 @@ export const toolingStore = { } }, positionCompatible : (state) => (id, posType) : boolean =>{ + + if(!posType || posType==0) + return true; + var isSiemens = machineInfoStore.state.isSiemens; if(isSiemens) { - if(!posType || posType==0) - return true; - // Find tool let tool = state.tools.find(t => t.id === id); if(tool) {