Client: Siemens-Tested and fixed HMI-commands

This commit is contained in:
Nicola Carminati
2018-04-27 10:38:38 +02:00
parent 68d7986e9f
commit ac77686c63
4 changed files with 29 additions and 27 deletions
+1 -1
View File
@@ -588,7 +588,7 @@ namespace CMS_Client.View
public void keyPressedHandler(bool altPressed, bool ctrlPressed, bool shiftPressed, int key)
{
//Work only if is a Developer mode
if (Config.ClientConfig.DeveloperMode)
if (Config.ClientConfig.DeveloperMode && altPressed)
{
if (key == (int)Keys.F1)
Browser.GoBack();
+1 -1
View File
@@ -837,7 +837,7 @@ namespace CMS_Client.View
if (KeybPID == MainProcessPID || KeybPID == NcProcessPID)
{
//Filter if is keydown
if (wParam == HWND_KEYUP)
if (wParam == HWND_SYSKEYDOWN)
mainFrm.keyPressedHandler(altPressed, ctrlPressed, shiftPressed, Key);
}
+5 -5
View File
@@ -98,12 +98,12 @@
<hmi_cmd_demo_9>Utensili</hmi_cmd_demo_9>
<!-- HMI Command SIEMENS -->
<hmi_cmd_siemens_1>Machine</hmi_cmd_siemens_1>
<hmi_cmd_siemens_2>Parameter</hmi_cmd_siemens_2>
<hmi_cmd_siemens_3>Program</hmi_cmd_siemens_3>
<hmi_cmd_siemens_1>Macchina</hmi_cmd_siemens_1>
<hmi_cmd_siemens_2>Parametri</hmi_cmd_siemens_2>
<hmi_cmd_siemens_3>Programma</hmi_cmd_siemens_3>
<hmi_cmd_siemens_4>Prog. Manager</hmi_cmd_siemens_4>
<hmi_cmd_siemens_5>Diagnostics</hmi_cmd_siemens_5>
<hmi_cmd_siemens_6>Setup</hmi_cmd_siemens_6>
<hmi_cmd_siemens_5>Diagnostica</hmi_cmd_siemens_5>
<hmi_cmd_siemens_6>Messa in serv.</hmi_cmd_siemens_6>
<!-- HMI Command FANUC -->
<hmi_cmd_fanuc_1>Pos</hmi_cmd_fanuc_1>
@@ -1,9 +1,9 @@
<template>
<span id="nc-buttons-container" v-if="commandCount">
<span id="nc-buttons-container" v-if="getNumofCommands()">
<span class="container">
<header>
<button @click="sendCommands(command)" v-for="command in commandCount" :key="command" :title="'hmi_cmd_'+ ncname +'_' + command | localize('hmi_cmd_'+ ncname +'_' + command)">
{{'hmi_cmd_'+ ncname +'_' + command | localize('cmd hmi' +' ' + command)}}
<button @click="sendCommands(command)" v-for="command in getNumofCommands()" :key="command" :title="'hmi_cmd_'+ getNcName() +'_' + command | localize('hmi_cmd_'+ ncname +'_' + command)">
{{'hmi_cmd_'+ getNcName() +'_' + command | localize('cmd hmi' +' ' + command)}}
</button>
</header>
</span>
@@ -15,31 +15,33 @@
export default {
data: function() {
return {
commandCount:0,
ncname : 'demo'
};
},
mounted: function() {
//Setup Number of Commands
if (typeof cmsClient != "undefined")
this.commandCount = cmsClient.getHMICommandCount();
else
this.commandCount = 0;
//Setup Nc Name
if(this.$store.state.machineInfo.isOsai)
ncname : 'osai'
else if(this.$store.state.machineInfo.isFanuc)
ncname : 'fanuc'
else if(this.$store.state.machineInfo.isSiemens)
ncname : 'siemens'
},
methods: {
sendCommands: function(id){
if (typeof cmsClient != "undefined")
cmsClient.sendHMICommand(id);
}
},
getNumofCommands: function(){
//get Number of Commands
if (typeof cmsClient != "undefined")
return cmsClient.getHMICommandCount();
else
return 0;
},
getNcName: function(){
//get Nc Name
if(this.$store.state.machineInfo.isOsai)
return 'osai';
else if(this.$store.state.machineInfo.isFanuc)
return 'fanuc';
else if(this.$store.state.machineInfo.isSiemens)
return 'siemens';
else
return 'demo';
},
}
};
</script>