Compare commits

...

296 Commits

Author SHA1 Message Date
Samuele E. Locatelli 96b7e4e455 Merge remote-tracking branch 'origin/Connect-UI' into develop 2020-11-11 10:07:49 +01:00
Samuele E. Locatelli cab2a84231 Fix changes 2020-11-11 10:07:05 +01:00
Samuele Locatelli 33498ba894 new rel 146 2020-11-10 20:01:33 +01:00
Samuele Locatelli 337b834869 Merge branch 'Star_Paddle' into Connect-UI 2020-11-10 19:59:23 +01:00
Samuele E. Locatelli cefb9df5bd Merge branch 'Star_Paddle' into develop 2020-11-10 18:22:31 +01:00
Samuele E. Locatelli fe3b630e56 Added Vacuum chart fixes 2020-11-10 18:21:47 +01:00
Samuele E. Locatelli aede998431 Fix Loader image 2020-11-10 17:40:22 +01:00
Samuele E. Locatelli c47efbfbfc Fix UI behaviour 2020-11-09 16:54:21 +01:00
Samuele E. Locatelli 496e38ab7d Added Backend 2020-11-09 15:05:01 +01:00
Samuele E. Locatelli ad3e3f8b9b Added Backend 2020-11-05 18:04:08 +01:00
Samuele E. Locatelli 8b44ff84af Added Type to DB Softkey 2020-11-05 12:35:21 +01:00
Samuele E. Locatelli e375f3323b Merge branch 'develop' into Star_Paddle 2020-11-05 10:33:50 +01:00
Samuele E. Locatelli 1a217424f8 Merge remote-tracking branch 'origin/Connect-UI' into develop 2020-11-05 10:32:04 +01:00
Samuele E. Locatelli 526b83d0fe Fix Thermocamera UI 2020-11-05 10:31:51 +01:00
Samuele Locatelli 7e7fb3dab7 Merge branch 'Thermocamera' into Connect-UI 2020-11-04 10:05:10 +01:00
Samuele Locatelli 7576b33e93 update conf x gestione cache warmers 2020-11-04 10:04:57 +01:00
Samuele E. Locatelli 1c13bf0bae Added OPC variables 2020-11-04 09:54:14 +01:00
Samuele Locatelli 3dd81652b5 Fix richiesta warmers SEMPRE senza cache 2020-11-04 09:23:55 +01:00
Samuele Locatelli ee21a0fe2e Merge remote-tracking branch 'origin/develop' into develop 2020-11-04 08:49:47 +01:00
Samuele Locatelli 66293fc2d2 New rel 2020-11-04 08:49:41 +01:00
Samuele E. Locatelli fcec70b367 Fix Thermocamera UI 2020-11-03 21:48:21 +01:00
Samuele E. Locatelli cb3082522c Merge remote-tracking branch 'origin/Connect-UI' into develop 2020-11-03 21:04:20 +01:00
Samuele Locatelli 94beb343eb Merge branch 'develop' into Connect-UI 2020-11-03 19:11:11 +01:00
Samuele Locatelli fa3916c2a4 Update metodi cancel/confirm x ricetta... 2020-11-03 19:10:59 +01:00
Samuele Locatelli 45505d70e1 new rel 2020-11-03 17:19:46 +01:00
Samuele E. Locatelli 0d26ddb4f6 Fix Resistance color 2020-11-03 17:06:39 +01:00
Samuele E. Locatelli 20b5d2c99c Merge remote-tracking branch 'origin/Connect-UI' into develop 2020-11-03 15:57:22 +01:00
Samuele E. Locatelli 3401ba241b Added Backup Recipes 2020-11-03 15:57:11 +01:00
Samuele Locatelli 0badc4b4a8 Merge branch 'develop' of https://bitbucket.org/ncarminati/cms_thermo_active into develop 2020-11-03 12:43:34 +01:00
Samuele Locatelli e463f0ece5 new rel 2020-11-03 12:39:38 +01:00
Samuele Locatelli 96ee5ad494 Merge remote-tracking branch 'gitlab.steamware/Thermocamera' into Connect-UI 2020-11-03 12:38:46 +01:00
Samuele E. Locatelli 94bc8a7c50 Aggiunto parametro x swapping X/Y in richieste FLIR 2020-11-03 12:35:19 +01:00
Samuele E. Locatelli f7a0291ab0 Added other fixes 2020-11-02 21:57:17 +01:00
Samuele E. Locatelli 20d76d43ec Thermocamera UI Fix 2020-11-02 21:40:56 +01:00
Samuele Locatelli c014b16ace Merge remote-tracking branch 'gitlab.steamware/Connect-UI' into develop 2020-11-02 09:41:11 +01:00
Samuele Locatelli b89bc03791 v_0.110.142 2020-11-02 09:03:50 +01:00
Samuele Locatelli 244f7132af fix serverconfig x prod 2020-11-02 09:03:14 +01:00
Samuele Locatelli c6510b928d Merge remote-tracking branch 'origin/develop' into Thermocamera 2020-11-02 08:53:00 +01:00
Samuele E. Locatelli 5bc750da90 Merge remote-tracking branch 'origin/Connect-UI' into develop 2020-10-30 19:09:49 +01:00
Samuele E. Locatelli 0f44285d8a Merge branch 'Connect-UI' into Thermocamera 2020-10-30 19:08:49 +01:00
Samuele E. Locatelli 5c20450d4c Fix configurazioni x termocamera 2020-10-30 19:08:40 +01:00
Samuele E. Locatelli d1359ac605 Fix gauges 2020-10-30 18:04:08 +01:00
Samuele E. Locatelli bd03826140 Merge remote-tracking branch 'origin/Connect-UI' into develop 2020-10-30 17:47:12 +01:00
Samuele E. Locatelli b4de394af6 Fix thermocamera 2020-10-30 17:46:45 +01:00
Samuele E. Locatelli 09ebcca66c start modifica x gestione dimensione riflettori 2020-10-30 16:55:19 +01:00
Samuele Locatelli 88aaaf78a3 Merge remote-tracking branch 'gitlab.steamware/Connect-UI' into develop 2020-10-30 16:18:44 +01:00
Samuele Locatelli 97c4e1ce97 new rel 141 2020-10-30 16:18:38 +01:00
Samuele E. Locatelli a3a2f75bde fix calcolo centro in posizione video 2020-10-30 16:00:52 +01:00
Samuele Locatelli bc784720ba ver 140 2020-10-30 14:01:46 +01:00
Samuele Locatelli 1a5145fe2f Merge remote-tracking branch 'gitlab.steamware/Connect-UI' into develop 2020-10-30 13:49:40 +01:00
Samuele Locatelli d33061aeda Merge remote-tracking branch 'origin/develop' into develop 2020-10-30 13:49:32 +01:00
Samuele E. Locatelli b16dee60ba Merge remote-tracking branch 'origin/Connect-UI' into develop 2020-10-30 12:43:28 +01:00
Samuele E. Locatelli 17156418f0 Added Screenshot 2020-10-30 12:42:40 +01:00
Samuele E. Locatelli 637e691a7b Merge remote-tracking branch 'origin/Connect-UI' into Thermocamera 2020-10-30 12:30:29 +01:00
Samuele E. Locatelli adb1d0e27c fix conv floating point 2020-10-30 12:29:57 +01:00
Samuele Locatelli be0feb3705 Merge branch 'develop' into Connect-UI 2020-10-30 12:02:32 +01:00
Samuele Locatelli a1560a8e78 update rev 2020-10-30 12:02:17 +01:00
Samuele E. Locatelli b39ea3815b Fix gestioen ,/. per float ThermoCam 2020-10-30 11:58:21 +01:00
Samuele Locatelli 6b97cd1a4d Merge branch 'Connect-UI' into Thermocamera 2020-10-30 10:25:08 +01:00
Samuele Locatelli f7e5e4da3c new rel 2020-10-30 10:24:56 +01:00
Samuele Locatelli 7149f29f98 Fix ack/strobe for ThermoCam processing 2020-10-30 10:24:42 +01:00
Samuele Locatelli a3894b3561 Merge remote-tracking branch 'origin/Thermocamera' into develop 2020-10-28 12:11:47 +01:00
Samuele Locatelli f8afb1a1b4 Update x gestione (sim) della termocam su richiesta PLC 2020-10-28 12:11:03 +01:00
Samuele E. Locatelli f76b03d957 Merge remote-tracking branch 'origin/Connect-UI' into Thermocamera 2020-10-27 17:34:15 +01:00
Samuele Locatelli 7013193a75 Merge remote-tracking branch 'origin/Thermocamera' into Thermocamera 2020-10-27 17:31:19 +01:00
Samuele Locatelli d33ecbe685 update x refresh warmers post load ricetta 2020-10-27 17:31:10 +01:00
Samuele E. Locatelli 687e2d7809 Fix Thermo-prophet 2020-10-27 17:30:16 +01:00
Samuele E. Locatelli eb8cb57ae2 fix gestione null x ricette legacy 2020-10-27 16:16:36 +01:00
Samuele E. Locatelli 0392251697 Merge remote-tracking branch 'origin/Connect-UI' into Thermocamera 2020-10-27 15:59:45 +01:00
Samuele E. Locatelli bc427cf0ef cms-connect store fix 2020-10-27 15:59:35 +01:00
Samuele Locatelli 9bab587ecd Merge branch 'Thermocamera' into Connect-UI 2020-10-27 15:53:51 +01:00
Samuele Locatelli 61b94daf28 primo giro load/save ThermoCamData 2020-10-27 15:51:32 +01:00
Samuele Locatelli 4911353eb1 reset dati ThermoCam alla rich
iesta conf Risc da PLC
2020-10-27 15:08:49 +01:00
Samuele Locatelli 6cced708fd new rel 2020-10-27 14:29:53 +01:00
Samuele Locatelli 2aaf3e06d2 FIx calcolo centroidi delle resistenze 2020-10-27 14:29:47 +01:00
Samuele Locatelli 0f5cd7cf89 Merge branch 'develop' into Connect-UI 2020-10-27 12:19:27 +01:00
Samuele Locatelli 4436eb2ab0 new rel 2020-10-27 12:19:16 +01:00
Samuele Locatelli 655407a9a8 WebAPI x status TCam 2020-10-27 12:17:40 +01:00
Samuele Locatelli 00ce6c2a04 Merge remote-tracking branch 'origin/Connect-UI' into Thermocamera 2020-10-26 19:21:59 +01:00
Samuele Locatelli beaa30a24d Update vers 133 2020-10-26 19:19:41 +01:00
Samuele Locatelli 375f5556ef Update x salvataggio valori canali warmers in ricetta 2020-10-26 19:19:32 +01:00
Samuele E. Locatelli 8c79299d2f Merge remote-tracking branch 'origin/Connect-UI' into Connect-UI 2020-10-26 17:35:55 +01:00
Samuele E. Locatelli 94cc2cc80b Fix messages bounce 2020-10-26 17:35:25 +01:00
Samuele Locatelli a3f0758380 new rel 2020-10-24 18:58:33 +02:00
Samuele Locatelli 0f30b9f8fc Fix sim scrittura ThermoCam data 2020-10-24 18:58:18 +02:00
Samuele E. Locatelli 27a741e843 Merge remote-tracking branch 'origin/Connect-UI' into Connect-UI 2020-10-24 15:44:31 +02:00
Samuele E. Locatelli 2f9d847410 fix UI Thermocamera 2020-10-24 15:43:39 +02:00
Samuele Locatelli d72c6104fd Merge branch 'Thermocamera' into Connect-UI 2020-10-24 15:25:31 +02:00
Samuele Locatelli 8422f75978 New Rel 2020-10-24 15:25:10 +02:00
Samuele Locatelli 3d5703ad79 Update WebApi x gestione chiamate Termo fino a S7Net 2020-10-24 15:24:59 +02:00
Samuele Locatelli ca80c97455 Mock metodo lettura sw termocamera x simulare 2020-10-24 14:42:00 +02:00
Samuele Locatelli 5bf06971df Merge branch 'Thermocamera' into Connect-UI 2020-10-24 14:24:53 +02:00
Samuele Locatelli 44123da2c2 fix tutte letture 2020-10-24 14:24:11 +02:00
Samuele Locatelli 6f7a2675ef fix gestione lettura thermo params 2020-10-24 14:18:41 +02:00
Samuele Locatelli fc41652d44 Aggiunta commenti a termocamera... 2020-10-24 14:03:00 +02:00
Samuele Locatelli 6c3d22278a Merge remote-tracking branch 'origin/Connect-UI' into Thermocamera 2020-10-24 12:45:19 +02:00
Samuele Locatelli d7bd17f679 new rel 2020-10-24 12:45:14 +02:00
Samuele Locatelli 30a5592196 Fix lettura warmers 2020-10-24 12:44:43 +02:00
Samuele E. Locatelli 998ca04b99 Fix functions "private/public" 2020-10-24 12:41:34 +02:00
Samuele Locatelli b466235c58 Aggiunta chiamate WebApi x termocamera 2020-10-24 12:11:19 +02:00
Samuele Locatelli 735026187d Merge branch 'Connect-UI' of https://bitbucket.org/ncarminati/cms_thermo_active into Thermocamera 2020-10-24 12:00:05 +02:00
Samuele E. Locatelli 457cef0eb6 ReadCMSCOnnectCOnfig 2020-10-24 11:51:10 +02:00
Samuele E. Locatelli 36ef955bb6 Fix UI Modals 2020-10-24 11:50:52 +02:00
Samuele Locatelli e6b2b00aa5 Update metodi lettura TCam 2020-10-24 11:40:30 +02:00
Samuele Locatelli 6c4c441d65 Merge branch 'Connect-UI' of https://bitbucket.org/ncarminati/cms_thermo_active into Thermocamera 2020-10-24 10:02:33 +02:00
Samuele Locatelli 7ca2ad059f Typo + eventi lettura inseriti come segnaposto 2020-10-24 10:02:18 +02:00
Samuele E. Locatelli bf6510c149 anycpu Client 2020-10-24 10:00:04 +02:00
Samuele Locatelli eddfe40814 Merge remote-tracking branch 'origin/Connect-UI' into develop 2020-10-24 09:10:45 +02:00
Samuele Locatelli 4ac901df06 Merge remote-tracking branch 'origin/develop' into Thermocamera 2020-10-23 19:55:41 +02:00
Samuele Locatelli fad3c82b46 Proseguo configurazione livelli di accesso dati ThermoCam + refactor 2020-10-23 19:51:07 +02:00
Samuele E. Locatelli b6bd0b734c first commit runnable 2020-10-23 18:26:12 +02:00
Samuele E. Locatelli bd9682361c Merge remote-tracking branch 'origin/develop' into develop 2020-10-23 18:25:16 +02:00
Samuele E. Locatelli 8281bf0ff5 Clean some unused images 2020-10-23 18:24:36 +02:00
Nicola eb14841bfd Fix Chromium devtools 2020-10-23 18:12:03 +02:00
Nicola f8a140cdf6 DIsable transparent on Chromium 2020-10-23 17:09:45 +02:00
Nicola 358f8c9330 Fix last commit 2020-10-23 16:34:01 +02:00
Nicola 17100d2f93 Merge remote-tracking branch 'origin/Thermocamera' into develop 2020-10-23 16:31:24 +02:00
Nicola 5eb07dfaa4 Changed Client library 2020-10-23 16:23:59 +02:00
Samuele Locatelli b7984023f9 start vers con ThermoCam 0.106.128 2020-10-23 15:08:26 +02:00
Samuele Locatelli 2344940480 Merge remote-tracking branch 'origin/Thermocamera' into develop 2020-10-23 15:06:42 +02:00
Samuele Locatelli 498bfdbf34 start modifica DTO riscaldi 2020-10-23 15:06:31 +02:00
Samuele E. Locatelli 42fc70e319 Added UI to Thermocamera 2020-10-22 18:48:47 +02:00
Samuele E. Locatelli 865a09fe89 Added first part of frontend 2020-10-22 17:19:03 +02:00
Samuele E. Locatelli 44702e769a First commit of thermocamera 2020-10-22 17:02:39 +02:00
Samuele E. Locatelli cbe5e7d303 Fix Piece count CONNECT 2020-10-22 17:00:50 +02:00
Samuele E. Locatelli 510b6c8a96 Fix CMS-Connect 2020-10-22 16:15:39 +02:00
Samuele Locatelli 0a8e49082d Fix nuget packages su DB (Netwtonsoft.Json) 2020-10-22 08:29:13 +02:00
Samuele Locatelli bf5ad49bfa Merge remote-tracking branch 'origin/develop' into develop 2020-10-22 08:21:56 +02:00
Samuele Locatelli 75bfe30d68 New rel number 2020-10-22 08:21:50 +02:00
Samuele E. Locatelli 98dbb7946a predisposizione futura 2020-10-21 11:16:10 +02:00
Samuele E. Locatelli b5a024ba0e CMSConnect Fix 2020-10-21 10:54:37 +02:00
Samuele E. Locatelli e3df06bb08 Fix COnnect startup 2020-10-20 19:03:32 +02:00
Samuele E. Locatelli 946ce23f6f Added variables 2020-10-20 17:49:27 +02:00
Samuele E. Locatelli 7fd5ee32fb Fix First commit CMS-Connect 2020-10-20 14:17:31 +02:00
Samuele Locatelli c8d50d1dc7 update vers num 2020-10-20 13:03:09 +02:00
Samuele Locatelli 215452a92f Update 4.6.2 COMPILA!!! 2020-10-20 13:01:49 +02:00
Samuele Locatelli 0ada41f47d new rel 125.. 2020-10-19 19:11:44 +02:00
Samuele Locatelli 0df05264eb Added nuget package per MConnectSDK e 4.6.2 2020-10-19 19:11:29 +02:00
Samuele Locatelli 82aa2e84b9 vers 0.102.124 2020-10-19 18:47:41 +02:00
Samuele Locatelli a794402ccb Aggiunta gestione LastTCicloNetto ( denom. % tempo cerchio) 2020-10-19 18:47:20 +02:00
Samuele Locatelli 95a7a1355e update tutti i proj alla 4.6.2 2020-10-19 18:03:09 +02:00
Samuele E. Locatelli 5bfe2bfa1f Design 2020-10-16 15:18:52 +02:00
Samuele E. Locatelli b5c32938df Fix Load program 2020-10-16 12:36:03 +02:00
Samuele Locatelli 59246cab9e Merge remote-tracking branch 'origin/develop' into develop 2020-10-16 11:39:19 +02:00
Samuele Locatelli 26d0132274 update vers number 2020-10-16 11:38:26 +02:00
Samuele E. Locatelli 74ad352393 Merge remote-tracking branch 'origin/develop' into develop 2020-10-16 11:25:28 +02:00
Samuele E. Locatelli f8ccb0492a Fix combo disabled 2020-10-16 11:23:14 +02:00
Samuele E. Locatelli 5f1ca0699a Fixes 2020-10-16 11:05:23 +02:00
Samuele E. Locatelli bd4cb3504a FIx load recipe 2020-10-15 15:47:22 +02:00
Samuele Locatelli 7c2db0170c update vers numb 2020-10-15 13:14:11 +02:00
Samuele E. Locatelli dee9084d62 fix Process-start window 2020-10-15 12:56:08 +02:00
Samuele E. Locatelli f842773efc Fix a lot of UI 2020-10-15 12:07:17 +02:00
Samuele E. Locatelli b64446e68e ancora fix serverCOnfig.xml 2020-10-14 16:18:45 +02:00
Samuele E. Locatelli 34d3414f8e fix serverconfig con IP di produzioen (messo SIM) + log WinCC 2020-10-14 16:10:41 +02:00
Samuele Locatelli e303abec94 new rel 2020-10-14 15:06:01 +02:00
Samuele E. Locatelli d643f693d7 Merge remote-tracking branch 'origin/develop' into develop 2020-10-14 14:59:54 +02:00
Samuele E. Locatelli 75fe84861a Fix Dashboard 2020-10-14 14:59:30 +02:00
Samuele Locatelli fdaf80247f typo static x boolean 2020-10-14 12:24:43 +02:00
Samuele Locatelli 83393d4aa1 Merge remote-tracking branch 'origin/develop' into develop 2020-10-14 12:23:30 +02:00
Samuele Locatelli 8cfa418a75 vers 119: semaforo x sync update DB dei dati prod 2020-10-14 12:22:50 +02:00
Samuele E. Locatelli 3ed6d88523 Merge remote-tracking branch 'origin/develop' into develop 2020-10-14 10:58:06 +02:00
Samuele E. Locatelli 8822d1e9d2 Fix Config 2020-10-14 10:57:40 +02:00
Samuele Locatelli f1f00e3326 vers 118: dati prod panel SOLO SE ho fatto 1 pezzo 2020-10-14 10:34:43 +02:00
Samuele E. Locatelli 42a6eaa77f fix calcolo inizio lotto da tciclo (/1000) 2020-10-14 09:31:04 +02:00
Samuele Locatelli 06ef9d377d Merge remote-tracking branch 'origin/develop' into develop 2020-10-14 09:04:11 +02:00
Samuele Locatelli 5b9f771d06 vers 117 2020-10-14 09:03:26 +02:00
Samuele Locatelli 49de435bab cambio gestione epsilon per valori gauges (x10) 2020-10-14 09:03:04 +02:00
Samuele Locatelli e8c55ada85 update gestione data inizio a null fino a primo pezzo (+ fix tcGross) 2020-10-14 08:51:24 +02:00
Samuele E. Locatelli c2cd9adef8 Fix Dashboards UI 2020-10-13 18:10:57 +02:00
Samuele E. Locatelli df0c74540f check modifica num riscaldi + cambio ordine check x save prod 2020-10-13 16:27:05 +02:00
Samuele Locatelli 5d3d1f45f8 new rel 116 2020-10-13 16:10:37 +02:00
Samuele Locatelli 57e96b9eb9 update x refresh prodPanel 2020-10-13 16:10:27 +02:00
Samuele Locatelli 795af144c1 Merge remote-tracking branch 'origin/develop' into develop 2020-10-13 14:45:06 +02:00
Samuele Locatelli 075a7e2e8d new rel 115 2020-10-13 14:45:00 +02:00
Samuele Locatelli 523300e5e1 refresh periodo lettura 2020-10-13 14:43:55 +02:00
Samuele E. Locatelli 0e9d0acfcb Fix Warmers behaviour 2020-10-13 11:14:12 +02:00
Samuele E. Locatelli c7c8564aff Merge remote-tracking branch 'origin/develop' into develop 2020-10-13 10:03:08 +02:00
Samuele E. Locatelli cadf52012c Fix keyboard behaviour 2020-10-13 10:01:35 +02:00
Samuele Locatelli d3d49c6bf9 Merge remote-tracking branch 'origin/develop' into develop 2020-10-12 11:53:54 +02:00
Samuele Locatelli 32409742e8 new rel 2020-10-12 11:53:44 +02:00
Samuele E. Locatelli 3c329bb5c8 Fix loader 2020-10-12 11:49:26 +02:00
Samuele E. Locatelli 542769af1c Fix Translations 2020-10-12 11:25:52 +02:00
Samuele E. Locatelli 66564fde66 Fix UI Caricatore 2020-10-12 11:13:17 +02:00
Samuele E. Locatelli f3e10a223b Fix Translations 2020-10-10 16:58:19 +02:00
Samuele E. Locatelli edd1e7cf47 Fix loader Behaviour (SVG in progress) 2020-10-10 16:46:30 +02:00
Samuele E. Locatelli 19a57d4ba7 FIx Pirometro behaviour 2020-10-10 15:17:19 +02:00
Samuele E. Locatelli a35b7485fb Fix riscaldi behaviour 2020-10-10 12:53:40 +02:00
Samuele E. Locatelli 3a991b7d5e Fix Auto behaviour 2020-10-09 17:37:25 +02:00
Samuele E. Locatelli 47f2b80abd Fix preriscaldi UI 2020-10-09 15:49:38 +02:00
Samuele Locatelli 339f590010 Merge remote-tracking branch 'origin/develop' into develop 2020-10-09 15:31:40 +02:00
Samuele Locatelli 894c732c61 fix lettura preriscaldi 2020-10-09 15:30:23 +02:00
Samuele E. Locatelli 60e144968f FIx Barriers Image 2020-10-09 15:23:36 +02:00
Samuele Locatelli 685db9d4da Merge remote-tracking branch 'origin/develop' into develop 2020-10-09 12:54:02 +02:00
Samuele E. Locatelli 6d52d14f58 Fix UI Dashboard 2020-10-09 12:52:51 +02:00
Samuele Locatelli 8f48a05914 Fix x forzare rilettura TUTTO da WebAPI 2020-10-09 12:52:43 +02:00
Samuele E. Locatelli acb12da71a Fix Pirometro View 2020-10-09 11:21:17 +02:00
Samuele E. Locatelli 07d23bd055 Fix slider behaviour 2020-10-09 10:40:16 +02:00
Samuele Locatelli 4b5f406849 new rel number 2020-10-08 19:08:48 +02:00
Samuele Locatelli 491321a509 Merge remote-tracking branch 'origin/develop' into develop 2020-10-08 19:08:28 +02:00
Samuele E. Locatelli 0d6b42c356 Added loader on setup pages 2020-10-08 19:06:01 +02:00
Samuele E. Locatelli 592984bd22 Fix UI components 2020-10-08 18:09:46 +02:00
Samuele E. Locatelli ccb3054ec7 Merge remote-tracking branch 'origin/develop' into develop 2020-10-08 18:04:01 +02:00
= 79b1fc2f24 fix update recipe 2020-10-08 15:28:34 +02:00
Samuele Locatelli 6ffd356eba fix richieste hist impossibili (start<0) 2020-10-07 13:03:27 +02:00
Samuele Locatelli a4f6ffcc28 update vers numb 2020-10-05 15:51:48 +02:00
Samuele Locatelli 704049c7a7 Merge remote-tracking branch 'origin/develop' into develop 2020-10-05 15:51:17 +02:00
= 91ac201873 Merge remote-tracking branch 'CMS/develop' into develop 2020-10-05 15:49:40 +02:00
= 56ee15521d fix numero negativo in progresso 2020-10-05 15:49:36 +02:00
Samuele Locatelli 5180881114 refresh conf x prod 2020-10-05 15:40:04 +02:00
Samuele E. Locatelli 6144554b4e Merge remote-tracking branch 'origin/develop' into develop 2020-10-05 15:12:52 +02:00
Samuele E. Locatelli e4ed4b6b0f update xml softkeys 2020-10-05 15:12:42 +02:00
Samuele Locatelli 8769127f91 set vers 0.99 2020-10-05 15:10:36 +02:00
Samuele Locatelli f0ee892ce5 typo 2020-10-05 15:08:32 +02:00
Samuele Locatelli 23bcf80ba7 Merge remote-tracking branch 'origin/develop' into develop 2020-10-05 15:05:51 +02:00
Samuele Locatelli cb16049c72 typo, start vers 1 2020-10-05 15:05:40 +02:00
= 6c834482a4 fix gauge & dashboard 2020-10-05 15:02:34 +02:00
= 51e682c166 fix setpointhmi invalid 2020-10-05 14:45:43 +02:00
= 0ec2d5e931 disgno formato 2020-10-05 14:36:07 +02:00
= 4e431a7be7 dashboard e statistiche 2020-10-05 11:43:37 +02:00
= e60b47560e fix naming dei files e dashboard con cestino 2020-10-05 11:10:58 +02:00
= 3c05f497ef Merge remote-tracking branch 'CMS/develop' into develop 2020-10-03 18:36:29 +02:00
= ab9f65391e dashboar grafico e legenda 2020-10-03 18:32:57 +02:00
= d207f82cc1 dashboard legend 2020-10-03 18:08:55 +02:00
Samuele E. Locatelli fd98b2fabb Merge remote-tracking branch 'origin/develop' into develop 2020-10-03 16:26:23 +02:00
Samuele E. Locatelli dfc2eca2c2 UI preheating complete 2020-10-03 16:25:46 +02:00
Samuele Locatelli f7cc7c202b vers 106: senza schedTask --> disabled 7gg 2020-10-03 15:01:37 +02:00
Samuele Locatelli 164ffffc95 Merge remote-tracking branch 'origin/develop' into develop 2020-10-03 14:55:46 +02:00
Samuele Locatelli 6ca90f00bd Implementata gestione load/save SchedTask su file in area TMP 2020-10-03 14:55:38 +02:00
Samuele E. Locatelli bb24cdd2cc Merge remote-tracking branch 'origin/develop' into develop 2020-10-03 14:45:38 +02:00
Samuele E. Locatelli 4fcc0a52fb FIx Preriscaldi UI WIP 2020-10-03 14:42:56 +02:00
Samuele Locatelli 9f1e9a9b6a Completato metodi x mockup lettura SchedTask 2020-10-03 13:16:40 +02:00
Samuele Locatelli c881dae49b bozza gestioen SchedTask 2020-10-03 13:07:19 +02:00
Samuele Locatelli 4aa4fbb40d Add model x sched task 2020-10-03 12:42:08 +02:00
Samuele Locatelli 7ad55f3f9d new rel 2020-10-03 12:00:39 +02:00
Samuele Locatelli 0f63c012c8 Merge remote-tracking branch 'origin/develop' into develop 2020-10-03 12:00:16 +02:00
Samuele Locatelli eefb9e751f Completamento gestione thread setpointHMI invalidati 2020-10-03 12:00:11 +02:00
Samuele Locatelli bf27fb3ce1 COmpletata bozza gestione setpointHmi invalidato 2020-10-03 11:48:37 +02:00
Samuele Locatelli 6e5b5cbd00 NEW command parameters from PLC 2020-10-03 10:50:12 +02:00
= 41830e6b9d fix update recipe 2020-10-03 07:49:50 +02:00
Samuele Locatelli 60a78f434f update vers numb 2020-10-02 12:12:04 +02:00
Samuele Locatelli 3ad4905de3 Merge remote-tracking branch 'origin/develop' into develop 2020-10-02 09:36:16 +02:00
Samuele Locatelli 840491fcb3 Merge remote-tracking branch 'origin/develop' into develop 2020-10-02 09:30:34 +02:00
Samuele Locatelli 50a1d2708c refresh vue from build 2020-10-02 09:30:23 +02:00
Samuele Locatelli 7ca411b9a1 Fix condition for ProdInfoUpdate calc 2020-10-02 09:30:15 +02:00
Samuele E. Locatelli ebf1bcd62e fix translations 2020-10-02 09:29:37 +02:00
Samuele E. Locatelli 6f4128ce2f Merge remote-tracking branch 'origin/develop' into develop 2020-10-02 09:05:11 +02:00
Samuele E. Locatelli c959946e1d Fix SSL connections 2020-10-02 09:04:24 +02:00
Samuele Locatelli 7d6e934b2a Merge remote-tracking branch 'origin/develop' into develop 2020-10-02 08:20:07 +02:00
Samuele E. Locatelli 12b5525fb5 Fix translations 2020-10-01 17:57:15 +02:00
= cc90b8422a Merge remote-tracking branch 'CMS/develop' into develop 2020-10-01 16:58:39 +02:00
= fc5a5f9c9c fix labels reactivity 2020-10-01 16:57:58 +02:00
Samuele E. Locatelli e2089e6d5a Merge remote-tracking branch 'origin/develop' into develop 2020-10-01 16:54:56 +02:00
Samuele E. Locatelli 494627ddfc translations 2020-10-01 16:53:43 +02:00
= 86cef70db6 fix chiamate multiple dashboard e formato remaining time 2020-10-01 16:29:46 +02:00
Samuele E. Locatelli 3ef99c0e0b Fix labels 2020-10-01 16:12:13 +02:00
Samuele E. Locatelli 269e8873aa setup correctly languages 2020-10-01 15:29:32 +02:00
= d58aae4e61 fix conferma ricetta 2020-10-01 11:00:19 +02:00
= 9e4188bf90 fix tempo rimanente 2020-10-01 10:54:36 +02:00
= 21a3c1fc1c fix tempo rimanente 2020-10-01 10:27:38 +02:00
= 095a98daf1 vuex version 2020-10-01 10:11:19 +02:00
= daf0c77f04 fix gantt footer font size 2020-10-01 09:55:48 +02:00
= 682f84b1d7 fix rendering valuation bottleneck 2020-10-01 09:49:12 +02:00
Samuele Locatelli ee846a4998 fix condizioni update invio 2020-09-30 21:49:36 +02:00
Samuele Locatelli 94da9f2aad start rel 103 2020-09-30 21:19:15 +02:00
Samuele E. Locatelli 02ba937d02 Fix styles 2020-09-30 12:39:36 +02:00
Samuele E. Locatelli 515c4d14b9 commit altra modifica Nicola... 2020-09-29 17:40:47 +02:00
Samuele E. Locatelli f0985fa0d6 Merge remote-tracking branch 'origin/develop' into develop 2020-09-29 16:48:04 +02:00
Samuele E. Locatelli 001877453a Fix Folder managing 2020-09-29 16:47:28 +02:00
Samuele Locatelli 39acc17b98 Update modello x fornire cicli pre-riscaldo 2020-09-29 16:07:32 +02:00
Samuele Locatelli 130cbceaed Fix calcolo tempo stimato 2020-09-29 15:25:13 +02:00
Samuele Locatelli 657072ee90 Aggiunta metodi retrieve asc/desc 2020-09-29 15:25:00 +02:00
Samuele Locatelli e53443ffe3 Merge remote-tracking branch 'origin/develop' into develop 2020-09-29 12:37:29 +02:00
Samuele Locatelli bd8577b32e Fix calcolo fine stimata (sec --> minuti) 2020-09-29 12:37:23 +02:00
Samuele Locatelli 14d91f173b start rel 102 2020-09-29 12:37:10 +02:00
Samuele E. Locatelli 045e0b62d8 Folder editor WIP 2020-09-29 10:53:23 +02:00
Samuele E. Locatelli af8820ba4e Fix Buttons style 2020-09-29 10:27:36 +02:00
Samuele E. Locatelli 5e2b482098 added activated status on setup-buttons 2020-09-29 10:10:42 +02:00
Samuele Locatelli 2d4c585a49 Merge remote-tracking branch 'origin/develop' into develop 2020-09-28 19:14:12 +02:00
Samuele Locatelli 5491ea4abd fix calcoli stima durata e tempi ciclo x casi riscaldo ed in generale... 2020-09-28 19:13:54 +02:00
Samuele Locatelli 6e95f35295 start new rel 2020-09-28 19:13:15 +02:00
Samuele E. Locatelli 5acf57c494 Merge remote-tracking branch 'origin/develop' into develop 2020-09-28 17:28:21 +02:00
Samuele E. Locatelli 06f15d5533 fix load-program WIP 2020-09-28 17:27:22 +02:00
= 456eb99262 Merge remote-tracking branch 'CMS/develop' into develop 2020-09-28 16:39:31 +02:00
= 5e5b5b02d4 fix dashboard 2020-09-28 16:38:54 +02:00
Samuele E. Locatelli 472ed086eb Merge remote-tracking branch 'origin/develop' into develop 2020-09-28 16:23:58 +02:00
Samuele E. Locatelli ead744cb07 fix crystallisation box 2020-09-28 16:23:12 +02:00
= 496d64d53a Merge remote-tracking branch 'CMS/develop' into develop 2020-09-28 16:21:36 +02:00
= 82583c8387 svuoto lista done 2020-09-28 16:21:23 +02:00
Samuele E. Locatelli 2039417194 fix options-cycle 2020-09-28 16:16:31 +02:00
= 3a9c801eec pulizia ciclo... 2020-09-28 16:09:51 +02:00
= 96d7a571ac barbatrucco per la gestione della keyboard senza refresh 2020-09-28 16:01:11 +02:00
= 31ae8a93b5 Merge remote-tracking branch 'CMS/develop' into develop 2020-09-28 15:05:24 +02:00
= 93e48d5fd8 fix modal 2020-09-28 15:05:11 +02:00
Samuele E. Locatelli 72bcdeb301 Fix first page to Process 2020-09-28 15:00:30 +02:00
= 958b97814a Merge remote-tracking branch 'CMS/develop' into develop 2020-09-28 14:36:33 +02:00
= 63e7629a72 fix pan zoom 2020-09-28 14:36:23 +02:00
549 changed files with 26687 additions and 195231 deletions
+2 -1
View File
@@ -8,9 +8,10 @@
<OutputType>Library</OutputType>
<RootNamespace>Client.Chromium</RootNamespace>
<AssemblyName>Client.Chromium</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
+1 -1
View File
@@ -68,7 +68,7 @@
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Config.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup>
+2 -1
View File
@@ -11,7 +11,8 @@
<xs:element name="RenderingMethod" minOccurs='1' maxOccurs='1'/>
<xs:element name="ShowVirtualKeyboard" minOccurs='1' maxOccurs='1'/>
<xs:element name="RunningOnSecondaryScreen" minOccurs='1' maxOccurs='1'/>
<xs:element name="DeveloperMode" minOccurs='1' maxOccurs='1'/>
<xs:element name="DeveloperMode" minOccurs='1' maxOccurs='1'/>
<xs:element name="EnableTransparent" minOccurs='1' maxOccurs='1'/>
</xs:all>
</xs:complexType>
</xs:element>
+1
View File
@@ -2,6 +2,7 @@
<Config>
<Client>
<IsSCM>false</IsSCM>
<EnableTransparent>false</EnableTransparent>
<TranspColor>#FF00FF</TranspColor>
<RenderingMethod>GPU</RenderingMethod> <!-- GPU/CPU -->
<ShowVirtualKeyboard>true</ShowVirtualKeyboard>
+10
View File
@@ -31,6 +31,7 @@ namespace Client.Config
.Descendants(Constants.CLIENT_CONFIG_KEY)
.Select(x => new SubModels.Client()
{
EnableTransparent = ValidateEnableTransparent(x.Element("EnableTransparent").Value),
TranspColor = ValidateTranspColor(x.Element("TranspColor").Value),
RenderingMethod = ValidateRendering(x.Element("RenderingMethod").Value),
RunningOnSecondaryScreen = ValidateSecScreen(x.Element("RunningOnSecondaryScreen").Value),
@@ -179,7 +180,16 @@ namespace Client.Config
throw new Exception(@"Configuration Error: ""Client - DeveloperMode"" is not a valid Boolean Type");
}
private static bool ValidateEnableTransparent(string value)
{
Boolean DeveloperMode;
if (Boolean.TryParse(value, out DeveloperMode))
return DeveloperMode;
else
throw new Exception(@"Configuration Error: ""Client - EnableTransparent"" is not a valid Boolean Type");
}
private static Boolean ValidateFollowNcWin(String value)
{
+3
View File
@@ -13,5 +13,8 @@ namespace Client.Config.SubModels
public Boolean DeveloperMode { get; set; }
public Boolean IsSCM { get; set; }
public Boolean Autorun { get; set; }
public Boolean EnableTransparent { get; set; }
}
}
+1 -1
View File
@@ -8,7 +8,7 @@
//public static string BASE_PATH = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) + "\\";
public static string BROWSER_CACHE_FOLDER = BASE_PATH + "LocalStorage";
public static string STARTUP_CONFIG_SCHEMA_PATH = BASE_PATH + "ClientValidator.xsd";
public static string STARTUP_CONFIG_PATH = BASE_PATH + "lib\\Config.xml";
public static string STARTUP_CONFIG_PATH = BASE_PATH + "Config.xml";
public static string CEF_PATH = BASE_PATH + "CEF";
public static string CEF_X86_PATH = BASE_PATH + "CEF\\Release_X86";
public static string CEF_X64_PATH = BASE_PATH + "CEF\\Release_X64";
+5
View File
@@ -569,6 +569,11 @@ namespace Active_Client.Browser_Tools
return;
}
string path = e.Arguments[0].StringValue;
if (Directory.Exists(path))
{
e.SetReturnValue(JsonConvert.SerializeObject(new ErrorContainer("directory_already_exists")));
return;
}
try
{
Directory.CreateDirectory(path);
+4 -3
View File
@@ -26,7 +26,7 @@
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<ApplicationVersion>2.0.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
@@ -128,7 +128,8 @@
<HintPath>..\packages\Microsoft.WindowsAPICodePack-Shell.1.1.0.0\lib\Microsoft.WindowsAPICodePack.ShellExtensions.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
@@ -248,7 +249,7 @@
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.6.2">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4.6.2 %28x86 e x64%29</ProductName>
<ProductName>Microsoft .NET Framework 4.6.2 %28x86 and x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
+4 -2
View File
@@ -170,8 +170,10 @@ namespace Active_Client
e.CommandLine.AppendSwitch("--disable-pinch");
e.CommandLine.AppendSwitch("--enable-media-stream");
e.CommandLine.AppendSwitch("--enable-usermedia-screen-capture");
e.CommandLine.AppendSwitch("--no-proxy-server");
e.CommandLine.AppendSwitch("--no-proxy-server");
e.CommandLine.AppendSwitch("--ignore-certificate-errors-spki-list");
e.CommandLine.AppendSwitch("--ignore-certificate-errors");
e.CommandLine.AppendSwitch("--ignore-ssl-errors");
}
+1 -2
View File
@@ -31,5 +31,4 @@ using System.Runtime.InteropServices;
// È 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")]
[assembly: AssemblyVersion("2.0.*")]
+1 -1
View File
@@ -3,5 +3,5 @@
<package id="MetroModernUI" version="1.4.0.0" targetFramework="net462" />
<package id="Microsoft.WindowsAPICodePack-Core" version="1.1.0.2" targetFramework="net462" />
<package id="Microsoft.WindowsAPICodePack-Shell" version="1.1.0.0" targetFramework="net462" />
<package id="Newtonsoft.Json" version="12.0.1" targetFramework="net462" />
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net462" />
</packages>
+6
View File
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" />
</startup>
</configuration>
+615
View File
@@ -0,0 +1,615 @@
using CefSharp;
using Client.Config;
using Client.Config.SubModels;
using Client2020.BrowserTools.Models;
using Client2020.BrowserTools.Models.Errors;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Linq;
using System.Threading;
using System.Windows.Forms;
namespace Client2020.BrowserTools
{
public class BrowserJSObject
{
private Form mainForm;
private static readonly string[] _validExtensions = { ".json", ".rcp", ".tpl" };
//private static readonly string[] _validExtensions = { "", ".txt", ".cnc", ".cn", ".cno", ".ini", ".mpf", ".spf", ".tap", ".anc", ".iso" };
private static readonly string[] _validImages = { ".svg" };
private static string jobPath = "";
private static Dictionary<string, IntPtr> _editorOpened = new Dictionary<string, IntPtr>();
public static string RECENT_FOLDER_KEY = "RECENT";
private const string THERMO_RECIPE_PATH = @"C:\CMS\Recipes";
private const string THERMO_SCREENSHOT_PATH = @"C:\CMS\Screenshots";
private const string CMS_PATH = @"C:\CMS";
#region CONSTRUCTOR_METHOD
public BrowserJSObject(Form f)
{
mainForm = f;
}
#endregion CONSTRUCTOR_METHOD
#region FORM_BEHAVIOUR_METHODS
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
Application.Exit();
}
public string takeScreenshot(string RecipeName)
{
string path = THERMO_SCREENSHOT_PATH + "\\" + RecipeName;
string pathFile = THERMO_SCREENSHOT_PATH + "\\" + RecipeName + "\\" + DateTime.Now.ToString("yyyy_MM_dd_HH_mm_ss") + ".jpg";
try
{
if (!Directory.Exists(path))
Directory.CreateDirectory(path);
Bitmap captureBitmap = new Bitmap(1920, 1080, PixelFormat.Format32bppArgb);
Rectangle captureRectangle = Screen.AllScreens[0].Bounds;
Graphics captureGraphics = Graphics.FromImage(captureBitmap);
captureGraphics.CopyFromScreen(captureRectangle.Left, captureRectangle.Top, 0, 0, captureRectangle.Size);
captureBitmap.Save(pathFile, ImageFormat.Jpeg);
}
catch (Exception ex)
{
return (JsonConvert.SerializeObject(new ErrorContainer("cannot_create_image")));
}
return (JsonConvert.SerializeObject(new ScreenshotController(pathFile))); ;
}
#endregion FORM_BEHAVIOUR_METHODS
#region NC_BEHAVIOUR_METHODS
public void setNcWindowState(int val)
{
}
public int getNcWindowState()
{
return 0;
}
public string getScreenBase64()
{
return "";
}
#endregion NC_BEHAVIOUR_METHODS
#region CHROMIUM_METHODS
// Get the Version of Chromium
public string getChromiumVersion()
{
return Cef.ChromiumVersion + " (" + Application.ProductVersion + ")";
}
#endregion CHROMIUM_METHODS
#region STEP_METHODS
// Get the ID of STEP Client
public int getClientID()
{
return Config.ConnectionConfig.Id;
}
public void forceStepFocus()
{
}
public void forceNcFocus()
{
}
public void forceProdFocus()
{
}
// Get the option of virtual Keyb configured
public bool isVirtualKeybConfigured()
{
return Config.ClientConfig.ShowVirtualKeyboard;
}
// Get the option of virtual Keyb configured
public bool isHMIenabled()
{
return Config.VendorHmiConfig.Enabled;
}
// Get the option of PROD Enabled
public bool isPRODenabled()
{
return Config.ProdSoftwareConfig.Enabled;
}
// Get the SCM option
public bool isSCMVisualStyle()
{
return Config.ClientConfig.IsSCM;
}
public string openExternalBrowser(string proc)
{
Process.Start(proc);
return "";
}
#endregion STEP_METHODS
#region PROCESSES_METHODS
// Read all configured processes
public string getConfiguredProcesses()
{
return JsonConvert.SerializeObject(Config.ExtSoftwaresConfig.Where(X => X.inMainMenuBar == false));
}
// Read all configured processes in main menu
public string getConfiguredProcessesInMainMenu()
{
return JsonConvert.SerializeObject(Config.ExtSoftwaresConfig.Where(X => X.inMainMenuBar == true));
}
// Start a new process
public void startNewProcess(string proc)
{
Thread t = new Thread(new ParameterizedThreadStart(OpenNew));
t.Start(proc);
}
// Open the last window or Start a new process
public void openOrStartProcess(string proc)
{
Thread t = new Thread(new ParameterizedThreadStart(OpenStartNew));
t.Start(proc);
}
// Function used in Thread
private void OpenStartNew(object id)
{
Software sft = Config.ExtSoftwaresConfig.FirstOrDefault(X => X.id == (string)id);
if (sft != null && File.Exists(sft.path))
{
Process[] p = Process.GetProcessesByName(Path.GetFileNameWithoutExtension(sft.path)).OrderByDescending(X => X.StartTime).ToArray();
if (p.Count() > 0 && p[0].MainWindowHandle != IntPtr.Zero)
NcWindow.ForceExtFocus(p[0].MainWindowHandle, 0, 0, 0, 0);
else
{
ProcessStartInfo PS = new ProcessStartInfo(sft.path, sft.arguments);
PS.WorkingDirectory = new FileInfo(sft.path).Directory.FullName;
Process.Start(PS);
}
}
}
// Function used in Thread
private void OpenNew(object id)
{
Software sft = Config.ExtSoftwaresConfig.FirstOrDefault(X => X.id == (string)id);
if (sft != null)
{
ProcessStartInfo PS = new ProcessStartInfo(sft.path, sft.arguments);
PS.WorkingDirectory = new FileInfo(sft.path).Directory.FullName;
Process.Start(PS);
}
}
#endregion PROCESSES_METHODS
#region FILESYSTEM_METHODS
public string getOSdriveList()
{
List<Drive> drivelist = new List<Drive>();
if (Directory.Exists(THERMO_RECIPE_PATH))
{
drivelist.Add(new Drive()
{
Name = ElaborateName("Recipes", "", DriveType.Unknown),
Path = THERMO_RECIPE_PATH + "\\",
Type = "SPFO"
});
}
return JsonConvert.SerializeObject(drivelist);
}
public string getOSextDriveList()
{
List<Drive> drivelist = new List<Drive>();
// USB & HD Drives
foreach (var drive in DriveInfo.GetDrives())
{
if (drive.IsReady)
{
//Filter NC Address
if (drive.DriveType != DriveType.Network && drive.DriveType == DriveType.Removable)
{
drivelist.Add(new Drive()
{
Name = ElaborateName(drive.VolumeLabel, drive.Name.TrimEnd('\\'), drive.DriveType),
Path = drive.RootDirectory.ToString(),
Type = ElaborateType(drive.DriveType)
});
}
}
}
return JsonConvert.SerializeObject(drivelist);
}
public string backupRecipes(String p)
{
if (!Directory.Exists(p))
{
return (JsonConvert.SerializeObject(new ErrorContainer("path_not_exists")));
}
try
{
string finalPath = p + "Backup_Recipes_" + DateTime.Now.ToString("yyyy_MM_dd_HH_mm_ss");
Directory.CreateDirectory(finalPath);
this.CopyFilesRecursively(new DirectoryInfo(THERMO_RECIPE_PATH),new DirectoryInfo(finalPath));
Process.Start(finalPath);
}
catch (Exception e)
{
return (JsonConvert.SerializeObject(new ErrorContainer("error_during_backup")));
}
return JsonConvert.SerializeObject("");
}
// Read all files in directory
public string getFileList(string p)
{
List<FileModel> filelist = new List<FileModel>();
if (p != RECENT_FOLDER_KEY && !Directory.Exists(p))
{
return (JsonConvert.SerializeObject(new ErrorContainer("file_not_exists")));
}
try
{
if (p == RECENT_FOLDER_KEY)
{
filelist = new List<FileModel>();
}
else
{
// Add directories
foreach (string item in Directory.GetDirectories(p))
{
filelist.Add(new FileModel
{
Name = Path.GetFileName(item),
AbsolutePath = Path.GetFullPath(item),
Path = Path.GetFullPath(item),
IsDirectory = true,
FileExist = true,
IsMain = false
});
}
// Add files
foreach (string item in Directory.GetFiles(p))
{
if (_validExtensions.Contains(Path.GetExtension(item).ToLower()))
{
bool isJob = false;
filelist.Add(new FileModel
{
Name = Path.GetFileName(item),
AbsolutePath = Path.GetFullPath(item),
Path = Path.GetFullPath(item),
IsDirectory = false,
IsJob = isJob,
IsMain = false,
FileExist = true
});
}
}
}
}
catch { }
return (JsonConvert.SerializeObject(filelist));
}
// Read info of a file
public string getProgramInfo(string p)
{
string imagePath, imageDirectory;
if (!File.Exists(p))
{
return (JsonConvert.SerializeObject(new InfoFile()));
}
FileInfo f = new FileInfo(p);
InfoFile file = new InfoFile
{
Name = f.Name,
CreationDate = f.CreationTime,
LastModDate = f.LastAccessTime,
AbsolutePath = p,
CanEdit = !f.IsReadOnly
};
imagePath = Path.GetFileNameWithoutExtension(p);
imageDirectory = Path.GetDirectoryName(p);
file.SheetX = "";
file.SheetY = "";
file.SheetZ = "";
file.Annotation = "";
try
{
dynamic content = JsonConvert.DeserializeObject(File.ReadAllText(p));
if (content != null && content.RecipeParameters != null)
{
if (content.RecipeParameters.general_sizes_sheet_dim_x != null)
file.SheetX = content.RecipeParameters.general_sizes_sheet_dim_x;
if (content.RecipeParameters.general_sizes_sheet_dim_y != null)
file.SheetY = content.RecipeParameters.general_sizes_sheet_dim_y;
if (content.RecipeParameters.general_sizes_sheet_thickness != null)
file.SheetZ = content.RecipeParameters.general_sizes_sheet_thickness;
if (content.recipeNotes != null)
file.Annotation = content.recipeNotes;
}
foreach (string ext in _validImages)
{
if (File.Exists(imageDirectory + "/" + imagePath + ext))
{
if (ext.ToLower().Equals(".svg"))
file.PreviewBase64 = File.ReadAllText(imageDirectory + "/" + imagePath + ext);
else
file.PreviewBase64 = "data:image/" + ext + ";base64," + Convert.ToBase64String(File.ReadAllBytes(imageDirectory + "/" + imagePath + ext));
break;
}
}
}
catch (Exception ex)
{
}
return (JsonConvert.SerializeObject(file));
}
public string duplicateRecipe(string p1, string p2)
{
string oldFile = CMS_PATH + "\\" + p1 + ".rcp";
string newFile = CMS_PATH + "\\" + p2 + ".rcp";
string oldImage = CMS_PATH + "\\" + p1 + ".svg";
string newImage = CMS_PATH + "\\" + p2 + ".svg";
if (!File.Exists(oldFile))
{
return (JsonConvert.SerializeObject(new ErrorContainer("file_not_found")));
}
if (File.Exists(newFile))
{
return (JsonConvert.SerializeObject(new ErrorContainer("file_already_exists")));
}
try
{
File.Copy(oldFile, newFile, true);
if (File.Exists(oldImage))
{
File.Copy(oldImage, newImage, true);
}
}
catch (Exception ex)
{
return(JsonConvert.SerializeObject(new ErrorContainer("cannot_copy_file")));
}
return "";
}
public string getAllRecipeDirectories()
{
List<string> dirs = this.DirSearch(THERMO_RECIPE_PATH);
for (int i = 0; i < dirs.Count; i++)
{
dirs[i] = dirs[i].Remove(0, CMS_PATH.Length + 1);
}
return(JsonConvert.SerializeObject(dirs));
}
public string deleteFile(string p)
{
FileAttributes attr = File.GetAttributes(p);
if (!File.Exists(p) || attr.HasFlag(FileAttributes.Directory))
{
return (JsonConvert.SerializeObject(new ErrorContainer("file_not_found")));
}
if (attr.HasFlag(FileAttributes.ReadOnly))
{
return (JsonConvert.SerializeObject(new ErrorContainer("file_not_editable")));
}
try
{
File.Delete(p);
string images = Path.ChangeExtension(p, "svg");
if (File.Exists(images))
{
File.Delete(images);
}
}
catch (Exception ex)
{
return (JsonConvert.SerializeObject(new ErrorContainer("cannot_delete_file")));
}
return "";
}
public string deleteFolder(string p)
{
FileAttributes attr = File.GetAttributes(p);
if (!Directory.Exists(p) || !attr.HasFlag(FileAttributes.Directory))
{
return (JsonConvert.SerializeObject(new ErrorContainer("directory_not_found")));
}
if (attr.HasFlag(FileAttributes.ReadOnly))
{
return (JsonConvert.SerializeObject(new ErrorContainer("directory_not_editable")));
}
try
{
Directory.Delete(p, true);
}
catch (Exception ex)
{
return (JsonConvert.SerializeObject(new ErrorContainer("cannot_delete_directory")));
}
return "";
}
public string createFolder(string path)
{
if (Directory.Exists(path))
{
return (JsonConvert.SerializeObject(new ErrorContainer("directory_already_exists")));
}
try
{
Directory.CreateDirectory(path);
}
catch (Exception ex)
{
return (JsonConvert.SerializeObject(new ErrorContainer("cannot_delete_directory")));
}
return "";
}
// Private functions
private string ElaborateType(DriveType type)
{
switch (type)
{
case DriveType.Fixed: return "HD";
case DriveType.Removable: return "USB";
case DriveType.Network: return "NTW";
}
return "SPFO";
}
private string ElaborateName(string name, string letter, DriveType type)
{
var retName = "";
if (!string.IsNullOrWhiteSpace(name))
retName = name;
else
{
switch (type)
{
case DriveType.Fixed: retName = "Hard_Disk"; break;
case DriveType.Removable: retName = "Usb_Disk"; break;
case DriveType.Network: retName = "Netword_Disk"; break;
default: retName = "Undefined"; break;
}
}
if (!string.IsNullOrWhiteSpace(letter))
retName = retName + " (" + letter + ")";
return retName;
}
public void CopyFilesRecursively(DirectoryInfo source, DirectoryInfo target)
{
foreach (DirectoryInfo dir in source.GetDirectories())
CopyFilesRecursively(dir, target.CreateSubdirectory(dir.Name));
foreach (FileInfo file in source.GetFiles())
file.CopyTo(Path.Combine(target.FullName, file.Name));
}
private List<String> DirSearch(string sDir)
{
List<String> files = new List<String>();
try
{
files.Add(sDir);
foreach (string d in Directory.GetDirectories(sDir))
{
files.AddRange(DirSearch(d));
}
}
catch (System.Exception excpt)
{
MessageBox.Show(excpt.Message);
}
return files;
}
public void cleanFileWatcher()
{
}
#endregion FILESYSTEM_METHODS
}
}
+11
View File
@@ -0,0 +1,11 @@
using System;
namespace Client2020.BrowserTools.Models
{
public class Drive
{
public String Name;
public String Path;
public String Type;
}
}
@@ -0,0 +1,14 @@
using System;
namespace Client2020.BrowserTools.Models.Errors
{
public class ErrorContainer
{
public String error;
public ErrorContainer(String Err)
{
this.error = Err;
}
}
}
+13
View File
@@ -0,0 +1,13 @@
namespace Client2020.BrowserTools.Models
{
public class FileModel
{
public string Name;
public string AbsolutePath;
public string Path;
public bool IsDirectory;
public bool IsJob;
public bool IsMain;
public bool FileExist;
}
}
@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
namespace Client2020.BrowserTools.Models
{
public class InfoFile
{
public String Name;
public String AbsolutePath;
public DateTime CreationDate;
public DateTime LastModDate;
public String SheetX;
public String SheetY;
public String SheetZ;
public String Annotation;
public Boolean CanEdit;
public string PreviewBase64;
}
}
@@ -0,0 +1,21 @@
using Client2020.BrowserTools.Metadata;
using System;
using System.Collections.Generic;
namespace Client2020.BrowserTools.Models
{
public class JobToStep
{
public string name;
public DateTime lastEditTimestamp;
public string isoMainProgram;
public Metas metadata;
public List<PPContainer> partPrograms;
public JobToStep()
{
metadata = new Metas();
partPrograms = new List<PPContainer>();
}
}
}
@@ -0,0 +1,17 @@
using System.Collections.Generic;
namespace Client2020.BrowserTools.Metadata
{
public class CustomParam
{
public string name;
public string type;
public List<string> selectionList;
public int value;
public CustomParam()
{
selectionList = new List<string>();
}
}
}
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
namespace Client2020.BrowserTools.Metadata
{
public class GenericsParam
{
public List<ImageParam> images;
public string description;
public TimeSpan executionTime;
public GenericsParam()
{
images = new List<ImageParam>();
}
}
}
@@ -0,0 +1,8 @@
namespace Client2020.BrowserTools.Metadata
{
public class ImageParam
{
public string name;
public string base64;
}
}
@@ -0,0 +1,18 @@
using System.Collections.Generic;
namespace Client2020.BrowserTools.Metadata
{
public class Metas
{
public GenericsParam generics;
public List<int> tools;
public List<CustomParam> customs;
public Metas()
{
generics = new GenericsParam();
tools = new List<int>();
customs = new List<CustomParam>();
}
}
}
@@ -0,0 +1,14 @@
using System;
namespace Client2020.BrowserTools.Metadata
{
public class PPContainer
{
public String name;
public PPContainer(String name)
{
this.name = name;
}
}
}
@@ -0,0 +1,20 @@
using Client2020.BrowserTools.Metadata;
using System;
using System.Collections.Generic;
namespace Client2020.BrowserTools.Models
{
public class MetadataToFile
{
public string description;
public TimeSpan executionTime;
public List<int> tools;
public List<CustomParam> customs;
public MetadataToFile()
{
tools = new List<int>();
customs = new List<CustomParam>();
}
}
}
@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Client2020.BrowserTools.Models
{
class ScreenshotController
{
public String path;
public ScreenshotController(String path)
{
this.path = path;
}
}
}
+26
View File
@@ -0,0 +1,26 @@
using CefSharp;
namespace Client2020
{
internal class CMSContextBrowser : IContextMenuHandler
{
public void OnBeforeContextMenu(IWebBrowser chromiumWebBrowser, IBrowser browser, IFrame frame, IContextMenuParams parameters, IMenuModel model)
{
//throw new System.NotImplementedException();
}
public bool OnContextMenuCommand(IWebBrowser chromiumWebBrowser, IBrowser browser, IFrame frame, IContextMenuParams parameters, CefMenuCommand commandId, CefEventFlags eventFlags)
{
return false;
}
public void OnContextMenuDismissed(IWebBrowser chromiumWebBrowser, IBrowser browser, IFrame frame)
{
}
public bool RunContextMenu(IWebBrowser chromiumWebBrowser, IBrowser browser, IFrame frame, IContextMenuParams parameters, IMenuModel model, IRunContextMenuCallback callback)
{
return true;
}
}
}
+50
View File
@@ -0,0 +1,50 @@
using CefSharp;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Client2020
{
class CMSRenderBrowser : IRenderProcessMessageHandler
{
public void OnFocusedNodeChanged(IWebBrowser chromiumWebBrowser, IBrowser browser, IFrame frame, IDomNode node)
{
if (node != null)
{
string NodeName = node.TagName.ToLower();
string dom = node["type"];
//Filter if this node is an INPUT Node
if (NodeName != null && NodeName.Equals("input"))
{
//Filter if the node Type is TEXT or PASSWORD
if (dom == null || (dom.ToLower().Equals("text") || dom.ToLower().Equals("password")))
NcWindow.openVirtualKeyboard(true, false);
}
//Filter if this node is TEXTAREA Node
else if (NodeName != null && NodeName.Equals("textarea"))
NcWindow.openVirtualKeyboard(true, false);
else
NcWindow.closeVirtualKeyboard();
}
else
NcWindow.closeVirtualKeyboard();
}
public void OnContextCreated(IWebBrowser chromiumWebBrowser, IBrowser browser, IFrame frame)
{
}
public void OnContextReleased(IWebBrowser chromiumWebBrowser, IBrowser browser, IFrame frame)
{
}
public void OnUncaughtException(IWebBrowser chromiumWebBrowser, IBrowser browser, IFrame frame, JavascriptException exception)
{
}
}
}
+193
View File
@@ -0,0 +1,193 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\CefSharp.WinForms.84.4.10\build\CefSharp.WinForms.props" Condition="Exists('..\packages\CefSharp.WinForms.84.4.10\build\CefSharp.WinForms.props')" />
<Import Project="..\packages\CefSharp.Common.84.4.10\build\CefSharp.Common.props" Condition="Exists('..\packages\CefSharp.Common.84.4.10\build\CefSharp.Common.props')" />
<Import Project="..\packages\cef.redist.x86.84.4.1\build\cef.redist.x86.props" Condition="Exists('..\packages\cef.redist.x86.84.4.1\build\cef.redist.x86.props')" />
<Import Project="..\packages\cef.redist.x64.84.4.1\build\cef.redist.x64.props" Condition="Exists('..\packages\cef.redist.x64.84.4.1\build\cef.redist.x64.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>{0780047F-12E4-4FCC-9748-6B23F0FD3711}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>Client2020</RootNamespace>
<AssemblyName>Active_Client</AssemblyName>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>x64</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\Thermo.Active\bin\Client_Debug\x64\</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>
<StartupObject>Client2020.Program</StartupObject>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>..\Thermo.Active\bin\Client\x64\</OutputPath>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
<PropertyGroup />
<PropertyGroup>
<ApplicationIcon>Resources\ACTIVE_ICONA.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<OutputPath>..\Thermo.Active\bin\Client_Debug\x64\</OutputPath>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Management" />
<Reference Include="System.Management.Instrumentation" />
<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="BrowserTools\BrowserJSObject.cs" />
<Compile Include="BrowserTools\Models\Drive.cs" />
<Compile Include="BrowserTools\Models\Errors\ErrorContainer.cs" />
<Compile Include="BrowserTools\Models\File.cs" />
<Compile Include="BrowserTools\Models\InfoFile.cs" />
<Compile Include="BrowserTools\Models\JobToStep.cs" />
<Compile Include="BrowserTools\Models\MetadataToFile.cs" />
<Compile Include="BrowserTools\Models\Metadata\CustomParam.cs" />
<Compile Include="BrowserTools\Models\Metadata\GenericsParam.cs" />
<Compile Include="BrowserTools\Models\Metadata\ImageParam.cs" />
<Compile Include="BrowserTools\Models\Metadata\Metas.cs" />
<Compile Include="BrowserTools\Models\Metadata\PPContainer.cs" />
<Compile Include="BrowserTools\Models\ScreenshotController.cs" />
<Compile Include="CMSContextBrowser.cs" />
<Compile Include="CMSRenderBrowser.cs" />
<Compile Include="LoadingForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="LoadingForm.Designer.cs">
<DependentUpon>LoadingForm.cs</DependentUpon>
</Compile>
<Compile Include="MainForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="MainForm.Designer.cs">
<DependentUpon>MainForm.cs</DependentUpon>
</Compile>
<Compile Include="NcWindow.cs" />
<Compile Include="OpeningForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="OpeningForm.Designer.cs">
<DependentUpon>OpeningForm.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="LoadingForm.resx">
<DependentUpon>LoadingForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="MainForm.resx">
<DependentUpon>MainForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="OpeningForm.resx">
<DependentUpon>OpeningForm.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>
<None Include="app.manifest" />
<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" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Client.Config\Client.Config.csproj">
<Project>{205a6ade-fb5a-45cb-9c51-9817e7bb8939}</Project>
<Name>Client.Config</Name>
</ProjectReference>
<ProjectReference Include="..\Client.Utils\Client.Utils.csproj">
<Project>{34434b22-d546-4a5c-b575-49720c77643a}</Project>
<Name>Client.Utils</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="Resources\ACTIVE_ICONA.ico" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\ACTIVE_ICONA.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\CM_ACTIVE_LOGO.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\CM_ACTIVE_LOGO_INVERTED.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\CMS_LOGO.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\MAESTRO_ACTIVE_LOGO.jpg" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\SCM_MAESTRO_ACTIVE_ICONA.ico" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\SinumerikHmi.ico" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\cef.redist.x64.84.4.1\build\cef.redist.x64.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\cef.redist.x64.84.4.1\build\cef.redist.x64.props'))" />
<Error Condition="!Exists('..\packages\cef.redist.x86.84.4.1\build\cef.redist.x86.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\cef.redist.x86.84.4.1\build\cef.redist.x86.props'))" />
<Error Condition="!Exists('..\packages\CefSharp.Common.84.4.10\build\CefSharp.Common.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\CefSharp.Common.84.4.10\build\CefSharp.Common.props'))" />
<Error Condition="!Exists('..\packages\CefSharp.Common.84.4.10\build\CefSharp.Common.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\CefSharp.Common.84.4.10\build\CefSharp.Common.targets'))" />
<Error Condition="!Exists('..\packages\CefSharp.WinForms.84.4.10\build\CefSharp.WinForms.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\CefSharp.WinForms.84.4.10\build\CefSharp.WinForms.props'))" />
<Error Condition="!Exists('..\packages\CefSharp.WinForms.84.4.10\build\CefSharp.WinForms.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\CefSharp.WinForms.84.4.10\build\CefSharp.WinForms.targets'))" />
</Target>
<Import Project="..\packages\CefSharp.Common.84.4.10\build\CefSharp.Common.targets" Condition="Exists('..\packages\CefSharp.Common.84.4.10\build\CefSharp.Common.targets')" />
<Import Project="..\packages\CefSharp.WinForms.84.4.10\build\CefSharp.WinForms.targets" Condition="Exists('..\packages\CefSharp.WinForms.84.4.10\build\CefSharp.WinForms.targets')" />
</Project>
+158
View File
@@ -0,0 +1,158 @@
namespace Client2020
{
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()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(LoadingForm));
this.StatusLBL = new System.Windows.Forms.Label();
this.ErrorLBL = new System.Windows.Forms.Label();
this.CloseLabel = new System.Windows.Forms.Label();
this.LogoSCM = new System.Windows.Forms.PictureBox();
this.VersionLBL = new System.Windows.Forms.Label();
this.LogoCMS = new System.Windows.Forms.PictureBox();
((System.ComponentModel.ISupportInitialize)(this.LogoSCM)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.LogoCMS)).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.White;
this.StatusLBL.Font = new System.Drawing.Font("Microsoft Sans Serif", 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(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("Microsoft Sans Serif", 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;
//
// 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("Microsoft Sans Serif", 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::Client2020.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("Microsoft Sans Serif", 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;
//
// LogoCMS
//
this.LogoCMS.BackColor = System.Drawing.Color.White;
this.LogoCMS.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
this.LogoCMS.Image = global::Client2020.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;
//
// LoadingForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
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.LogoCMS);
this.Controls.Add(this.LogoSCM);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "LoadingForm";
this.Padding = new System.Windows.Forms.Padding(0, 60, 0, 0);
this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
this.Text = "Loading Active Client";
this.TopMost = true;
((System.ComponentModel.ISupportInitialize)(this.LogoSCM)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.LogoCMS)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Label StatusLBL;
private System.Windows.Forms.Label ErrorLBL;
private System.Windows.Forms.Label CloseLabel;
private System.Windows.Forms.PictureBox LogoSCM;
private System.Windows.Forms.Label VersionLBL;
private System.Windows.Forms.PictureBox LogoCMS;
}
}
+50
View File
@@ -0,0 +1,50 @@
using Client.Config;
using System;
using System.Drawing;
using System.Windows.Forms;
namespace Client2020
{
public partial class LoadingForm : Form
{
//Constructor
public LoadingForm()
{
InitializeComponent();
if (Config.ClientConfig.IsSCM)
{
LogoCMS.Visible = false;
LogoSCM.Visible = true;
this.Icon = Client2020.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));
}
//Show & Set the status
public void Show(String status)
{
this.Show();
//Invoke method if is needed or call the method in STD mode
if (this.InvokeRequired)
{
this.Invoke((MethodInvoker)delegate () { StatusLBL.Text = status; });
}
else
{
StatusLBL.Text = status;
}
}
}
}
File diff suppressed because it is too large Load Diff
+52
View File
@@ -0,0 +1,52 @@
namespace Client2020
{
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()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
this.SuspendLayout();
//
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1920, 1080);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "MainForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Active Client 2.0";
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
this.ResumeLayout(false);
}
#endregion
}
}
+91
View File
@@ -0,0 +1,91 @@
using CefSharp;
using CefSharp.WinForms;
using Client.Config;
using Client.Utils;
using Client2020.BrowserTools;
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 Client2020
{
public partial class MainForm : Form
{
ChromiumWebBrowser browser;
public MainForm()
{
InitializeComponent();
//Setup the Icon
if (Config.ClientConfig.IsSCM)
this.Icon = Properties.Resources.MAESTRO_ACTIVE_ICON;
//Start the browser
browser = new ChromiumWebBrowser(Config.ConnectionConfig.StartingUrl);
this.Controls.Add(browser);
//Setup the Object Custom
browser.JavascriptObjectRepository.Register(Constants.BROWSER_JS_OBJ_NAME, new BrowserJSObject(this), isAsync: false, options: BindingOptions.DefaultBinder);
//Setup the Handlers
browser.RenderProcessMessageHandler = new CMSRenderBrowser();
browser.MenuHandler = new CMSContextBrowser();
//Setu the NC behaviour
NcWindow.mainFrm = this;
NcWindow.StartStepFollowing(this.Handle);
}
public void keyPressedHandler(bool altPressed, bool ctrlPressed, bool shiftPressed, int key)
{
//Work only if is a Developer mode
if (Config.ClientConfig.DeveloperMode && altPressed)
{
if (key == (int)Keys.F5)
{
browser.Reload(true);
}
if (key == (int)Keys.F12)
{
WindowInfo wi = new WindowInfo();
wi.SetAsPopup(this.Handle, "DevTools");
browser.ShowDevTools(wi);
}
//wi.SetAsChild(this.Handle);
if (key == (int)Keys.F10)
ShowPopup("chrome://gpu/");
if (key == (int)Keys.F11)
ShowPopup("chrome://version/");
}
}
//Show Chrome Window
private void ShowPopup(string url)
{
int w = 1600, h = 800;
Form frm = new Form();
frm.Controls.Add(new ChromiumWebBrowser(url));
frm.Height = h;
frm.Width = w;
frm.StartPosition = FormStartPosition.CenterScreen;
frm.ShowDialog();
}
}
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+162
View File
@@ -0,0 +1,162 @@
namespace Client2020
{
partial class OpeningForm
{
/// <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()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(OpeningForm));
this.StatusLBL = new System.Windows.Forms.Label();
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();
//
// 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.White;
this.StatusLBL.Font = new System.Drawing.Font("Microsoft Sans Serif", 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(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("Microsoft Sans Serif", 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::Client2020.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("Microsoft Sans Serif", 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.Text = "X";
this.CloseLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
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::Client2020.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("Microsoft Sans Serif", 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.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.LogoCMS);
this.Controls.Add(this.LogoSCM);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "OpeningForm";
this.Padding = new System.Windows.Forms.Padding(0, 60, 0, 0);
this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
this.Text = "Loading Active Client";
this.TopMost = true;
this.Load += new System.EventHandler(this.LoadingForm_Load);
((System.ComponentModel.ISupportInitialize)(this.LogoCMS)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.LogoSCM)).EndInit();
this.ResumeLayout(false);
}
#endregion
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;
}
}
+347
View File
@@ -0,0 +1,347 @@
using Client.Config;
using Client.Config.SubModels;
using Client.Utils;
using Newtonsoft.Json;
using System;
using System.Drawing;
using System.IO;
using System.Net;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Client2020
{
public partial class OpeningForm : Form
{
public const int TimerTest = 500;
private HttpWebRequest ConnTestRequest;
private HttpWebResponse ConnTestResponse;
private String ConnTestError;
private Task ConnTask;
private ushort WaitDot = 1;
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#region WINDOW_START_&_BEHAVIOUR_METHOD
//Constructor
public OpeningForm()
{
InitializeComponent();
if (Config.ClientConfig.IsSCM)
{
LogoCMS.Visible = false;
LogoSCM.Visible = true;
this.Icon = Client2020.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));
}
//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());
}
//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;
}
}
//Set Opacity of the Window
private void setOpacity(double opacity)
{
//Invoke method if is needed or call the method in STD mode
if (this.InvokeRequired)
{
this.Invoke((MethodInvoker)delegate () { this.Opacity = opacity; });
}
else
{
this.Opacity = opacity;
}
}
//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();
}
#endregion
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#region CONNECTING_TASK_METHOD
//Main Void of the background Task
private void BagroundWorker()
{
//Set App Opacity
setOpacity(1);
//Show the loading state on the app ICON
//try to Request
if (!Config.ConnectionConfig.BypassReadConfiguration)
{
setStatus("Connecting to " + Config.ConnectionConfig.ServerUrl + ":" + Config.ConnectionConfig.ServerPort, "");
Boolean error = false;
do
{
if (error == true)
return;
} while (!testConnection(new Uri(Config.ConnectionConfig.ReadConfigUrl), out error));
}
//Set App Opacity (Only Siemens)
if (Config.VendorHmiConfig.Type == 2)
setOpacity(0.85);
//Open Nc Window
setStatus("Opening NC Window... ", "");
if (Config.VendorHmiConfig.Enabled)
if (!OpenNcWindow())
return;
//Open Nc Window
setStatus("Opening PROD Window... ", "");
if (Config.ProdSoftwareConfig.Enabled)
{
var exename = Path.GetFileNameWithoutExtension(Config.ProdSoftwareConfig.Path);
if (!OpenProdWindow(Config.ProdSoftwareConfig.Path, exename))
return;
}
//Set App Opacity
setOpacity(1);
//Close the Window
closeWindow();
}
//Sub-Method used to test the connection
private bool testConnection(Uri url, out Boolean error)
{
Boolean Connected = false;
error = false;
//Try to connect
if (url.Scheme == Uri.UriSchemeHttps || url.Scheme == Uri.UriSchemeHttp)
{
try
{
ConnTestRequest = (HttpWebRequest)WebRequest.Create(url);
ConnTestRequest.Timeout = (int)(TimerTest);
ConnTestRequest.KeepAlive = false;
ConnTestResponse = (HttpWebResponse)ConnTestRequest.GetResponse();
ConnTestError = ConnTestResponse.StatusCode.ToString();
Connected = (ConnTestResponse.StatusCode == HttpStatusCode.OK) ? true : false;
}
catch (WebException ex)
{
Connected = false;
ConnTestError = ex.Status.ToString();
}
}
else
Connected = true;
//Check if it's connected
if (Connected)
{
// var jsonDefinition = new { ncVendor = "", showHMI = "", ncIp = "", ncPort = "", prodEnabled = "", prodPath = "", extPrograms = "" };
var jsonDefinition = new ServerConfigModel();
setStatus("Connected!", "");
//Read the configuration from Server
try
{
using (var reader = new StreamReader(ConnTestResponse.GetResponseStream()))
{
var ConfigResponse = JsonConvert.DeserializeAnonymousType(reader.ReadToEnd(), jsonDefinition);
if (!String.IsNullOrWhiteSpace(ConfigResponse.NcVendor) && !String.IsNullOrWhiteSpace(ConfigResponse.ShowHMI))
{
string ncVendorName = ConfigResponse.NcVendor.ToUpper();
string ncVendorHMI = ConfigResponse.ShowHMI.ToUpper();
Config.VendorHmiConfig.IpAddress = ConfigResponse.NcIp.ToUpper();
Config.VendorHmiConfig.Port = ConfigResponse.NcPort.ToUpper();
string ProdEnabled = ConfigResponse.ProdEnabled.ToUpper();
string ProdPath = ConfigResponse.ProdPath.ToUpper();
string Autorun = ConfigResponse.Autorun.ToUpper();
//Read the Server Type
if (ncVendorName.Equals("DEMO"))
Config.VendorHmiConfig.Type = 0;
else if (ncVendorName.Equals("FANUC"))
Config.VendorHmiConfig.Type = 1;
else if (ncVendorName.Equals("SIEMENS"))
Config.VendorHmiConfig.Type = 2;
else if (ncVendorName.Equals("OSAI"))
Config.VendorHmiConfig.Type = 3;
else if (ncVendorName.Equals("S7NET"))
Config.VendorHmiConfig.Type = 4;
else
{
setStatus("Close the application!", "Errror in configuration, from server");
error = true;
return false;
}
//Read if the HMI must be visible
if (ncVendorHMI.ToUpper().Equals("TRUE"))
Config.VendorHmiConfig.Enabled = true;
else
Config.VendorHmiConfig.Enabled = false;
//Autorun
if (Autorun.ToUpper().Equals("TRUE"))
Config.ClientConfig.Autorun = true;
else
Config.ClientConfig.Autorun = false;
//Read if the HMI must be visible
if (ProdEnabled.ToUpper().Equals("TRUE"))
Config.ProdSoftwareConfig.Enabled = true;
else
Config.ProdSoftwareConfig.Enabled = false;
// Paths
Config.ProdSoftwareConfig.Path = ProdPath;
Config.TextEditorPath = ConfigResponse.EditorPath;
if (ConfigResponse.ExtSoftwares != null)
Config.ExtSoftwaresConfig = ConfigResponse.ExtSoftwares.ToArray();
return true;
}
}
return true;
}
catch (Exception e)
{
setStatus("Error!", "Error While loading the configuration");
return false;
}
}
else
{
//Set the Dot string
String dot = "";
for (int i = 0; i < WaitDot; i++) dot += ".";
//Set the status
setStatus("Retry connection to " + Config.ConnectionConfig.ServerUrl + ":" + Config.ConnectionConfig.ServerPort + " " + dot, "Server not found (Error: " + ConnTestError + ")");
if (WaitDot < 3)
WaitDot++;
else
WaitDot = 0;
//Wait 500 ms
Thread.Sleep(500);
return false;
}
}
//Sub-Method used to open the NC Window
private bool OpenNcWindow()
{
return true;
}
//Sub-Method used to open the NC Window
private bool OpenProdWindow(string ExePath, string ExeName)
{
return true;
}
#endregion
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#region CLOSE_BUTTON_BEHAVIUR
//On click Method
private void CloseLabel_Click(object sender, EventArgs e)
{
//Exit
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
private void CloseLabel_MouseClick(object sender, EventArgs e)
{
Environment.Exit(0);
}
private void CloseLabel_MouseClick(object sender, MouseEventArgs e)
{
}
}
}
File diff suppressed because it is too large Load Diff
+182
View File
@@ -0,0 +1,182 @@
using Client.Config;
using Client.Utils;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Management;
using Microsoft.Win32;
using CefSharp.WinForms;
using CefSharp;
namespace Client2020
{
static class Program
{
static Mutex CmsStepClientMutex = new Mutex(true, "{66fa29db-925a-402b-a4c7-d3d780fb1bc3}");
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
//Crate General Exception Handler
AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(GeneralExMethod);
//Read App Configuration
readConfiguration();
//Initialize Chromium
InitializeCefSettings();
//Check if is already running an instance of this application
if (!CmsStepClientMutex.WaitOne(TimeSpan.Zero, true))
ShowAlarmAndClose("Only one istance of " + Application.ProductName + " can be executed!");
//Check Graphic Card in Energy Saving mode
checkGraphicCard();
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
//Run the Loading Form
Application.Run(new OpeningForm());
//Run the Main-Browser Form
Application.Run(new MainForm());
}
static private void InitializeCefSettings()
{
try
{
if (Config.ConnectionConfig.DeleteCahceFolderOnStartup && Directory.Exists(Constants.BROWSER_CACHE_FOLDER))
{
Directory.Delete(Constants.BROWSER_CACHE_FOLDER, true);
}
}
catch (Exception E)
{
ShowAlarmAndClose(E.Message);
}
//Setup the CEF Folder
var settings = new CefSettings();
if (Config.ClientConfig.RenderingMethod == Constants.Rendering.CPU)
settings.CefCommandLineArgs.Add("--disable-gpu");
if (Config.ClientConfig.EnableTransparent == true)
settings.CefCommandLineArgs.Add("--enable-transparent-visuals");
settings.CefCommandLineArgs.Add("--disable-pinch");
settings.CefCommandLineArgs.Add("--enable-media-stream");
settings.CefCommandLineArgs.Add("--enable-usermedia-screen-capture");
settings.CefCommandLineArgs.Add("--no-proxy-server");
settings.CefCommandLineArgs.Add("--ignore-certificate-errors-spki-list");
settings.CefCommandLineArgs.Add("--ignore-ssl-errors");
CefSharpSettings.FocusedNodeChangedEnabled = true;
CefSharpSettings.LegacyJavascriptBindingEnabled = true;
settings.LogSeverity = LogSeverity.Fatal;
settings.CachePath = Constants.BROWSER_CACHE_FOLDER;
//Initialize Cef
try
{
Cef.Initialize(settings);
}
catch (Exception E)
{
ShowAlarmAndClose(E.Message);
}
}
#region CONFIG_METHODS
//Sub-Method used to read the configuration
static private void readConfiguration()
{
//Read the Config
try
{
ConfigController.ReadStartupConfig();
}
catch (Exception E)
{
ShowAlarmAndClose(E.Message);
}
}
static private void checkGraphicCard()
{
ManagementObjectSearcher VideoCardsQuery = new ManagementObjectSearcher("root\\CIMV2", "SELECT * FROM Win32_VideoController");
ManagementObjectCollection VideoCards = VideoCardsQuery.Get();
//Check if i have more Cards
if (VideoCards.Count > 1)
{
//Prepare List of Cards
String Cardlist = "";
foreach (ManagementObject card in VideoCards)
{
Cardlist = Cardlist + " - " + card["Name"] + "\n";
}
//If is Win 10 check the Registry Key
if (Environment.OSVersion.Version.Major == 10)
{
string keyName = @"HKEY_CURRENT_USER\Software\Microsoft\DirectX\UserGpuPreferences";
string valueName = System.Reflection.Assembly.GetExecutingAssembly().Location;
Object value = Registry.GetValue(keyName, valueName, null);
if (value == null || !value.Equals("GpuPreference=1;"))
{
//code if key Not Exist add it and restart
Registry.SetValue(keyName, valueName, "GpuPreference=1;");
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);
}
}
}
}
#endregion
private static void GeneralExMethod(object sender, UnhandledExceptionEventArgs args)
{
Exception e = (Exception)args.ExceptionObject;
//Create Directory
if (!Directory.Exists(Client.Utils.Constants.CEF_EXCEPTIONLOG_PATH))
Directory.CreateDirectory(Constants.CEF_EXCEPTIONLOG_PATH);
//Log the exception on File
string path = Constants.CEF_EXCEPTIONLOG_PATH + @"\" + DateTime.Now.ToString("yyyy_MM_dd") + @".txt";
using (StreamWriter sw = File.AppendText(path))
sw.WriteLine(DateTime.Now.ToString("HH:mm:ss") + " | Class.Name: " + e.TargetSite.ReflectedType.Name + " | Method.Name: " + e.TargetSite.Name + " | Error: " + e.Message);
}
//Method Used to Show an alarm and close the application
public static void ShowAlarmAndClose(string Message)
{
MessageBox.Show(Message,
Application.ProductName,
MessageBoxButtons.OK,
MessageBoxIcon.Error,
MessageBoxDefaultButton.Button1
);
Environment.Exit(-1);
}
}
}
+36
View File
@@ -0,0 +1,36 @@
using System.Reflection;
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("Active Client 2.0")]
[assembly: AssemblyDescription("Active Client - Main HMI for CMS Machines")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("CMS Spa")]
[assembly: AssemblyProduct("Active Client")]
[assembly: AssemblyCopyright("Copyright © 2020")]
[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("0780047f-12e4-4fcc-9748-6b23f0fd3711")]
// 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("2.0")]
+133
View File
@@ -0,0 +1,133 @@
//------------------------------------------------------------------------------
// <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 Client2020.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("Client2020.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 ACTIVE_ICONA {
get {
object obj = ResourceManager.GetObject("ACTIVE_ICONA", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
/// <summary>
/// Cerca una risorsa localizzata di tipo System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap ACTIVE_ICONA1 {
get {
object obj = ResourceManager.GetObject("ACTIVE_ICONA1", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Cerca una risorsa localizzata di tipo System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap CM_ACTIVE_LOGO {
get {
object obj = ResourceManager.GetObject("CM_ACTIVE_LOGO", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <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>
internal static System.Drawing.Icon SinumerikHmi {
get {
object obj = ResourceManager.GetObject("SinumerikHmi", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
}
}
+142
View File
@@ -0,0 +1,142 @@
<?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="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>
<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>
<data name="ACTIVE_ICONA" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ACTIVE_ICONA.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ACTIVE_ICONA1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ACTIVE_ICONA.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>
+30
View File
@@ -0,0 +1,30 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Client2020.Properties
{
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.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: 104 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 428 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

+83
View File
@@ -0,0 +1,83 @@
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
<dependency>
<dependentAssembly>
<assemblyIdentity type="Win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*"></assemblyIdentity>
</dependentAssembly>
</dependency>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<!-- Opzioni manifesto di Controllo dell'account utente
Per modificare il livello di Controllo dell'account utente di Windows, sostituire il
nodo requestedExecutionLevel con uno dei seguenti.
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
Se si specifica l'elemento requestedExecutionLevel, la funzionalità Virtualizzazione file system e registro di sistema verrà disabilitata.
Rimuovere questo elemento se l'applicazione richiede questa virtualizzazione per
compatibilità con le versioni precedenti.
-->
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- Elenco delle versioni di Windows in cui è stata testata questa applicazione e
per cui è stato previsto l'uso. Rimuovere il commento dagli elementi appropriati per
fare in modo che Windows selezioni automaticamente l'ambiente più compatibile. -->
<!-- Windows Vista -->
<!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />-->
<!-- Windows 8 -->
<!--<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />-->
<!-- Windows 8.1 -->
<!--<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />-->
<!-- Windows 7 -->
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />
<!-- Windows 10 -->
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
</application>
</compatibility>
<!-- Indica che l'applicazione è sensibile ai valori DPI e non verrà scalata automaticamente da Windows in caso di
valori DPI maggiori. Le applicazioni Windows Presentation Foundation (WPF) sono automaticamente sensibili ai valori DPI, pertanto non è necessario
acconsentire esplicitamente. Con le applicazioni Windows Form destinate a .NET Framework 4.6 per cui è stato acconsentito esplicitamente a questa impostazione,
è anche necessario impostare 'EnableWindowsFormsHighDpiAutoResizing' su 'true' nel relativo file app.config. -->
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">false</dpiAware>
</windowsSettings>
</application>
<!-- Abilita i temi per finestre di dialogo e controlli comuni di Windows (Windows XP e versioni successive) -->
<!--
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="*"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
-->
</assembly>
+8
View File
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="cef.redist.x64" version="84.4.1" targetFramework="net462" />
<package id="cef.redist.x86" version="84.4.1" targetFramework="net462" />
<package id="CefSharp.Common" version="84.4.10" targetFramework="net462" />
<package id="CefSharp.WinForms" version="84.4.10" targetFramework="net462" />
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net462" />
</packages>
+6
View File
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/>
</startup>
</configuration>
+114
View File
@@ -0,0 +1,114 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\CefSharp.WinForms.84.4.10\build\CefSharp.WinForms.props" Condition="Exists('..\packages\CefSharp.WinForms.84.4.10\build\CefSharp.WinForms.props')" />
<Import Project="..\packages\CefSharp.Common.84.4.10\build\CefSharp.Common.props" Condition="Exists('..\packages\CefSharp.Common.84.4.10\build\CefSharp.Common.props')" />
<Import Project="..\packages\cef.redist.x86.84.4.1\build\cef.redist.x86.props" Condition="Exists('..\packages\cef.redist.x86.84.4.1\build\cef.redist.x86.props')" />
<Import Project="..\packages\cef.redist.x64.84.4.1\build\cef.redist.x64.props" Condition="Exists('..\packages\cef.redist.x64.84.4.1\build\cef.redist.x64.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>{97474BC6-6405-4043-9BEE-E1BDE6B8D972}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>Client_New</RootNamespace>
<AssemblyName>Client_New</AssemblyName>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>x64</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>x64</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|x64'">
<PlatformTarget>x64</PlatformTarget>
<OutputPath>bin\x64\Debug\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<PlatformTarget>x64</PlatformTarget>
<OutputPath>bin\x64\Release\</OutputPath>
<Optimize>true</Optimize>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<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="Form1.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Form1.resx">
<DependentUpon>Form1.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>
<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" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\cef.redist.x64.84.4.1\build\cef.redist.x64.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\cef.redist.x64.84.4.1\build\cef.redist.x64.props'))" />
<Error Condition="!Exists('..\packages\cef.redist.x86.84.4.1\build\cef.redist.x86.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\cef.redist.x86.84.4.1\build\cef.redist.x86.props'))" />
<Error Condition="!Exists('..\packages\CefSharp.Common.84.4.10\build\CefSharp.Common.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\CefSharp.Common.84.4.10\build\CefSharp.Common.props'))" />
<Error Condition="!Exists('..\packages\CefSharp.Common.84.4.10\build\CefSharp.Common.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\CefSharp.Common.84.4.10\build\CefSharp.Common.targets'))" />
<Error Condition="!Exists('..\packages\CefSharp.WinForms.84.4.10\build\CefSharp.WinForms.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\CefSharp.WinForms.84.4.10\build\CefSharp.WinForms.props'))" />
<Error Condition="!Exists('..\packages\CefSharp.WinForms.84.4.10\build\CefSharp.WinForms.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\CefSharp.WinForms.84.4.10\build\CefSharp.WinForms.targets'))" />
</Target>
<Import Project="..\packages\CefSharp.Common.84.4.10\build\CefSharp.Common.targets" Condition="Exists('..\packages\CefSharp.Common.84.4.10\build\CefSharp.Common.targets')" />
<Import Project="..\packages\CefSharp.WinForms.84.4.10\build\CefSharp.WinForms.targets" Condition="Exists('..\packages\CefSharp.WinForms.84.4.10\build\CefSharp.WinForms.targets')" />
</Project>
+51
View File
@@ -0,0 +1,51 @@
namespace Client_New
{
partial class Form1
{
/// <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();
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1264, 609);
this.ControlBox = false;
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Name = "Form1";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Form1";
this.ResumeLayout(false);
}
#endregion
}
}
+28
View File
@@ -0,0 +1,28 @@
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;
using CefSharp.WinForms;
namespace Client_New
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
var browser = new ChromiumWebBrowser("http:\\localhost:9000");
this.Controls.Add(browser);
}
private void cursort(object sender, EventArgs e)
{
//throw new NotImplementedException();
}
}
}
+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>
+22
View File
@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Client_New
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
}
}
+36
View File
@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Client_New")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Client_New")]
[assembly: AssemblyCopyright("Copyright © 2020")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("97474bc6-6405-4043-9bee-e1bde6b8d972")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
+63
View File
@@ -0,0 +1,63 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Client_New.Properties {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[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>
/// Returns the cached ResourceManager instance used by this class.
/// </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("Client_New.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}
+117
View File
@@ -0,0 +1,117 @@
<?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.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: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" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</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" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
+26
View File
@@ -0,0 +1,26 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Client_New.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.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>
+7
View File
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="cef.redist.x64" version="84.4.1" targetFramework="net461" />
<package id="cef.redist.x86" version="84.4.1" targetFramework="net461" />
<package id="CefSharp.Common" version="84.4.10" targetFramework="net461" />
<package id="CefSharp.WinForms" version="84.4.10" targetFramework="net461" />
</packages>
@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("THermo.Active.Thermocamera")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("THermo.Active.Thermocamera")]
[assembly: AssemblyCopyright("Copyright © 2020")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("8d8ec91a-3a15-4a1d-951b-a35e7068debd")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<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>{8D8EC91A-3A15-4A1D-951B-A35E7068DEBD}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>THermo.Active.Thermocamera</RootNamespace>
<AssemblyName>THermo.Active.Thermocamera</AssemblyName>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<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' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
<Compile Include="ThermocameraComunicator.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Thermo.Active.Model\Thermo.Active.Model.csproj">
<Project>{631375DD-06D3-49BB-8130-D9DDB34C429D}</Project>
<Name>Thermo.Active.Model</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
@@ -0,0 +1,308 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Configuration;
using System.Drawing;
using System.Globalization;
using System.IO.MemoryMappedFiles;
using System.Linq;
using System.Net.NetworkInformation;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
using Thermo.Active.Model.DTOModels.ThWarmers;
namespace Thermo.Active.Thermocamera
{
public class ThermocameraComunicator
{
#region Private Fields
private const int DIM_MMF = NUM_CHAR_MSG * 2 + 2;
private const string MMF_REQ = "CMS_MMF_REQ";
private const string MMF_RES = "CMS_MMF_RES";
private const int NUM_CHAR_MSG = 5000;
private const int REQ = 1;
private const int RES = 2;
private static ThermocameraComunicator _instance;
private MemoryMappedViewAccessor accessor;
private MemoryMappedViewAccessor accessorResp;
private MemoryMappedFile mmf;
private MemoryMappedFile mmfRes;
#endregion Private Fields
#region Protected Fields
/// <summary>
/// Generatore random
/// </summary>
protected Random rnd = new Random();
/// <summary>
/// Booleana dell'uso sw ext: true = Utilizzo vero sw lettura FLIR / false = simulazione SW RAND
/// </summary>
protected bool useTCamSw = true;
#endregion Protected Fields
#region Private Constructors
private ThermocameraComunicator()
{
mmf = MemoryMappedFile.CreateOrOpen(MMF_REQ, DIM_MMF);
mmfRes = MemoryMappedFile.CreateOrOpen(MMF_RES, DIM_MMF);
accessor = mmf.CreateViewAccessor();
accessorResp = mmfRes.CreateViewAccessor();
}
#endregion Private Constructors
#region Private Properties
/// <summary>
/// Simulazione valore tra 100 e 300 °C
/// </summary>
private float simVal
{
get
{
float answ = 100 + 200 * (float)rnd.NextDouble();
return answ;
}
}
#endregion Private Properties
#region Private Methods
private bool readCommand(MemoryMappedViewAccessor accessor, string command, int timeoutMS, out string resp)
{
resp = "";
byte response = 0;
int totalCycle = 0;
int sleepTime = 500;
byte[] bytesToRead = new byte[NUM_CHAR_MSG];
if (!accessor.CanRead)
return false;
//Read Pre-Command
while (response != RES)
{
totalCycle++;
accessor.Read(0, out response);
if (response != RES)
Thread.Sleep(sleepTime);
if (totalCycle * sleepTime > timeoutMS)
return false;
}
//Read Command
accessor.ReadArray(1, bytesToRead, 0, bytesToRead.Length);
//Elaborate String
string textRecieved = Encoding.UTF8.GetString(bytesToRead);
if (textRecieved == null)
return false;
string[] textSplitted = textRecieved.Replace("\0", string.Empty).Split(';');
if (textSplitted.Length < 2)
return false;
if (textSplitted[0] != command)
return false;
char[] bufferToClean = Enumerable.Repeat('\0', NUM_CHAR_MSG).ToArray();
accessor.WriteArray(0, bufferToClean, 0, bufferToClean.Length);
//Output
textSplitted = textSplitted.Skip(1).ToArray();
resp = String.Join(";", textSplitted);
return true;
}
private bool writeCommand(MemoryMappedViewAccessor accessor, string command)
{
char[] bufferToClean = Enumerable.Repeat('\0', NUM_CHAR_MSG).ToArray();
accessor.WriteArray(0, bufferToClean, 0, bufferToClean.Length);
char[] bufferToWrite = command.ToCharArray();
//Write Pre-Command
accessor.Write(0, REQ);
//Write Command
accessor.WriteArray(1, bufferToWrite, 0, bufferToWrite.Length);
return true;
}
#endregion Private Methods
#region Public Methods
/// <summary>
/// Swap x/y requesto from FLIR camera
/// </summary>
public bool flirSwapXY
{
get
{
bool answ = false;
bool.TryParse(ConfigurationManager.AppSettings["flirSwapXY"], out answ);
return answ;
}
}
public static ThermocameraComunicator getInstance()
{
if (_instance == null)
_instance = new ThermocameraComunicator();
return _instance;
}
/// <summary>
/// Restituisce lettura di tutti i punti (cetroidi) richeisti
/// </summary>
/// <param name="points">Dictionary dei canali e relativi punti medi (centro calcolato della resistenza di riferimento del canale)</param>
/// <param name="timeoutMS">Timeout in ms, 10000 std, da conf</param>
/// <param name="temp">°C</param>
/// <returns></returns>
public bool readMultiTemperatures(Dictionary<int, ThermoPoint> points, int timeoutMS, out Dictionary<int, double> temp)
{
temp = new Dictionary<int, double>();
// modalità impiego vero sw esterno
if (useTCamSw)
{
const string tempCommand = "GetTemperature";
string response;
string cmdRead = "";
foreach (var point in points)
{
if (flirSwapXY)
{
cmdRead += point.Value.Y + ";" + point.Value.X + ";";
}
else
{
cmdRead += point.Value.X + ";" + point.Value.Y + ";";
}
}
if (!writeCommand(accessor, tempCommand + ";" + cmdRead))
return false;
if (!readCommand(accessorResp, tempCommand, timeoutMS, out response))
return false;
string[] respSplitted = response.Replace(",", ".").Split(';');
int idxResp = 0;
foreach (var item in points)
{
string str = respSplitted[idxResp];
double tmp;
if (str.Trim() != "")
{
if (double.TryParse(str.Trim(), NumberStyles.Float, CultureInfo.InvariantCulture, out tmp))
temp.Add(item.Key, tmp);
else
return false;
}
idxResp++;
}
}
else
{
// simulo!
foreach (var item in points)
{
temp.Add(item.Key, simVal);
}
// attende 5 sec
Thread.Sleep(5000);
}
return true;
}
/// <summary>
/// Lettura temp singolo punto
/// </summary>
/// <param name="x"></param>
/// <param name="y"></param>
/// <param name="timeoutMS"></param>
/// <param name="temp"></param>
/// <returns></returns>
public bool readTemperature(int x, int y, int timeoutMS, out float temp)
{
temp = 0f;
// modalità impiego vero sw esterno
if (useTCamSw)
{
const string tempCommand = "GetTemperature";
string response;
if (!writeCommand(accessor, tempCommand + ";" + x + ";" + y + ";"))
return false;
if (!readCommand(accessorResp, tempCommand, timeoutMS, out response))
return false;
response = response.TrimEnd(';');
if (!float.TryParse(response, NumberStyles.Float, CultureInfo.InvariantCulture, out temp))
return false;
}
else
{
// simulo!
temp = simVal;
// attende 5 sec
Thread.Sleep(5000);
}
return true;
}
public bool showWindow(int x, int y, int dimX, int dimY, int timeoutMS)
{
const string tempCommand = "ShowWindow";
string response;
if (!writeCommand(accessor, tempCommand + ";" + x + ";" + y + ";" + dimX + ";" + dimY + ";"))
return false;
if (!readCommand(accessorResp, tempCommand, timeoutMS, out response))
return false;
if (!response.StartsWith("1;"))
return false;
return true;
}
/// <summary>
/// Richiesta di scattare fotografia
/// </summary>
/// <param name="timeoutMS">attesa in ms, 10000 std, da conf</param>
/// <returns></returns>
public bool takePicture(int timeoutMS)
{
// modalità impiego vero sw esterno
if (useTCamSw)
{
const string tempCommand = "SetParameter_Integer";
string response;
if (!writeCommand(accessor, tempCommand + ";TAKE_IMAGE;"))
return false;
if (!readCommand(accessorResp, tempCommand, timeoutMS, out response))
return false;
if (!response.StartsWith("True;"))
return false;
}
else
{
// attende 5 sec
Thread.Sleep(5000);
}
return true;
}
#endregion Public Methods
}
}
@@ -0,0 +1,122 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Thermo.Active.Model.DTOModels.AlarmModels;
using YamlDotNet.Core.Tokens;
namespace Thermo.Active.CmsConnectGateway
{
public static class CMSConnectConstants
{
public const string IP_ADDR_LABEL = "IP_ADDRESS=";
public const string GATEWAY_LABEL = "DEFAULT_GATEWAY=";
public const string DNSIP_LABEL = "DNS_IP=";
public const string DNSPREFIX_LABEL = "DNS_SUFFIX=";
public const string PROXY_ADDR_LABEL = "PROXY=";
public const string NO_PROXY_LABEL = "NO_PROXY=";
public const string UNDEF_VALUE = "none";
public const string CONNECTION_OK_VALUE = "OK";
public const string CONNECTION_NOWEB_VALUE = "NO_WEB";
public const string CONNECTION_NOPORT_VALUE = "NO_PORTS";
public const int REBOOT_MINUTES_MAX = 2;
public const int REBOOT_MSWAIT_BETWEEN_OP = 500;
public const string ADMIN_COMMAND = "sudo ";
public const string SSH_SET_PROXY_COMMAND = ADMIN_COMMAND + "./setProxy.sh ";
public const string SSH_SET_DNSIP_COMMAND = ADMIN_COMMAND + "./setDnsIp.sh ";
public const string SSH_SET_DNSSUFFIX_COMMAND = ADMIN_COMMAND + "./setDnsSuffix.sh ";
public const string SSH_SET_NETWORK_COMMAND = ADMIN_COMMAND + "./setNetwork.sh ";
public const string SSH_GET_NETWORK_COMMAND = ADMIN_COMMAND + "./getNetworkConfiguration.sh ";
public const string SSH_GET_PROXY_COMMAND = ADMIN_COMMAND + "./getProxyConfiguration.sh ";
public const string SSH_TEST_CONNECTION_COMMAND = ADMIN_COMMAND + "./testConnection.sh ";
public const string SSH_GW_REBOOT_COMMAND = ADMIN_COMMAND + "./gatewayReboot.sh ";
public const string YAML_CONFIG_FILE = "./example-mconnect.conf.yaml";
public const string CONNECT_UNDEFINED = "UNDEFINED";
public const string CONNECT_MACHINE_STAUTS_EXE = "EXE";
public const string CONNECT_MACHINE_STAUTS_READY = "READY";
public const string CONNECT_MACHINE_STAUTS_SETUP = "SETUP";
public const string CONNECT_MACHINE_STAUTS_FAIL = "FAIL";
public const string CONNECT_MACHINE_STAUTS_POWEROFF = "POWER_OFF";
public const string CONNECT_PROC_STAUTS_EXE = "EXE";
public const string CONNECT_PROC_STAUTS_READY = "READY";
public const string CONNECT_PROC_STAUTS_HOLD = "HOLD";
public const string CONNECT_PROC_STAUTS_FHOLD = "FEED_HOLD";
public const string CONNECT_PROC_STAUTS_OSTOP = "OPTIONAL_STOP";
public const string CONNECT_PROC_STAUTS_PSTOPPED = "PROGRAM_STOPPED";
public const string CONNECT_PROC_MODE_AUTO = "AUTOMATIC";
public const string CONNECT_PROC_MODE_EDIT = "EDIT";
public const string CONNECT_PROC_MODE_JOG = "MANUAL_JOG";
public static string ConvertThermoToConnectStatus(int status)
{
switch (status)
{
case 0: return CONNECT_MACHINE_STAUTS_POWEROFF;
case 1: return CONNECT_MACHINE_STAUTS_READY;
case 2: return CONNECT_MACHINE_STAUTS_EXE;
case 4: return CONNECT_MACHINE_STAUTS_SETUP;
case 8: return CONNECT_MACHINE_STAUTS_FAIL;
case 16: return CONNECT_MACHINE_STAUTS_READY;
case 128: return CONNECT_MACHINE_STAUTS_FAIL;
default: return CONNECT_UNDEFINED;
}
}
public static string ConvertThermoToConnectProcessStatus(int status)
{
switch (status)
{
case 0: return CONNECT_PROC_STAUTS_READY;
case 1: return CONNECT_PROC_STAUTS_READY;
case 2: return CONNECT_PROC_STAUTS_EXE;
case 4: return CONNECT_PROC_STAUTS_FHOLD;
case 8: return CONNECT_PROC_STAUTS_OSTOP;
case 16: return CONNECT_PROC_STAUTS_HOLD;
case 128: return CONNECT_PROC_STAUTS_HOLD;
default: return CONNECT_UNDEFINED;
}
}
public static string ConvertThermoToConnectProcessMode(int status)
{
switch (status)
{
case 1: return CONNECT_PROC_MODE_EDIT;
case 2: return CONNECT_PROC_MODE_AUTO;
case 4: return CONNECT_PROC_MODE_JOG;
default: return CONNECT_UNDEFINED;
}
}
public static bool ConvertThermoToConnectPower(int status)
{
switch (status)
{
case 0: return false;
default: return true;
}
}
public static bool ConvertThermoToConnectMachineAlarm(DTOAlarmsModel alarms)
{
return alarms.PlcAlarms.Count > 0;
}
public static string ConvertThermoToConnectAlarms(DTOAlarmsModel alarms)
{
List<string> alms = new List<string>();
foreach (DTOPlcAlarmModel alarm in alarms.PlcAlarms) {
int severity = alarm.IsWarning ? 500 : 900;
alms.Add(alarm.Id.ToString("D6") + "|" + severity);
}
return string.Join(",", alms);
}
}
}
@@ -0,0 +1,13 @@
---------------------------------------------------------------
------- MConnect Client SDK -------
---------------------------------------------------------------
Libreria di utility per connessione con il cloud di Maestro Connect.
Le dipendenze inserite sono necessarie al funzionamento dell'SDK.
Sono inclusi a titolo di esempio due files:
* example-mconnect.conf.yaml
* example-NLog.config
Attenzione a configurare correttamente il file NLog.xml includendo il rule per la classe, vedere ad esempio il file example-NLog.config allegato.
@@ -9,8 +9,9 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Thermo.Active.CmsConnectGateway</RootNamespace>
<AssemblyName>Thermo.Active.CmsConnectGateway</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -30,23 +31,84 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="MConnectSDK, Version=1.2.2007.218, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MConnectSDK.1.2.2007.218\lib\net462\MConnectSDK.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.1.1.1\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.6.7\lib\net45\NLog.dll</HintPath>
</Reference>
<Reference Include="Pipelines.Sockets.Unofficial, Version=1.0.0.0, Culture=neutral, PublicKeyToken=42ea0a778e13fbe2, processorArchitecture=MSIL">
<HintPath>..\packages\Pipelines.Sockets.Unofficial.2.1.16\lib\net461\Pipelines.Sockets.Unofficial.dll</HintPath>
</Reference>
<Reference Include="Renci.SshNet, Version=2016.1.0.0, Culture=neutral, PublicKeyToken=1cee9f8bde3db106, processorArchitecture=MSIL">
<HintPath>..\packages\SSH.NET.2016.1.0\lib\net40\Renci.SshNet.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Net.IPNetwork, Version=2.4.0.126, Culture=neutral, PublicKeyToken=717343cc2c25edcf, processorArchitecture=MSIL">
<HintPath>..\packages\IPNetwork2.2.4.0.126\lib\net46\System.Net.IPNetwork.dll</HintPath>
<Reference Include="StackExchange.Redis, Version=2.0.0.0, Culture=neutral, PublicKeyToken=c219ff1ca8c2ce46, processorArchitecture=MSIL">
<HintPath>..\packages\StackExchange.Redis.2.1.58\lib\net461\StackExchange.Redis.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
</Reference>
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Diagnostics.PerformanceCounter, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Diagnostics.PerformanceCounter.4.7.0\lib\net461\System.Diagnostics.PerformanceCounter.dll</HintPath>
</Reference>
<Reference Include="System.IO.Compression, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\System.IO.Compression.4.3.0\lib\net46\System.IO.Compression.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.IO.Pipelines, Version=4.0.2.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.IO.Pipelines.4.7.3\lib\net461\System.IO.Pipelines.dll</HintPath>
</Reference>
<Reference Include="System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll</HintPath>
</Reference>
<Reference Include="System.Net.IPNetwork, Version=2.5.226.0, Culture=neutral, PublicKeyToken=717343cc2c25edcf, processorArchitecture=MSIL">
<HintPath>..\packages\IPNetwork2.2.5.226\lib\net46\System.Net.IPNetwork.dll</HintPath>
</Reference>
<Reference Include="System.Numerics" />
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.7.1\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.Threading.Channels, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Threading.Channels.4.7.1\lib\net461\System.Threading.Channels.dll</HintPath>
</Reference>
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
</Reference>
<Reference Include="System.Transactions" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="YamlDotNet, Version=7.0.0.0, Culture=neutral, PublicKeyToken=ec19458f3c15af5e, processorArchitecture=MSIL">
<HintPath>..\packages\YamlDotNet.7.0.0\lib\net45\YamlDotNet.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Builders\iBuilder.cs" />
<Compile Include="CMSConnectConstants.cs" />
<Compile Include="GatewayAdapter.cs" />
<Compile Include="Events\GatewayRebootEventHandlerArgs.cs" />
<Compile Include="Exceptions\GatewayException.cs" />
@@ -56,8 +118,23 @@
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="example-mconnect.conf.yaml" />
<None Include="example-NLog.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup />
<ItemGroup>
<Content Include="README.txt" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\cms_core_library\CMS_CORE_Library\CMS_CORE_Library.csproj">
<Project>{4abf8eef-2b23-483e-acdc-53214fe28681}</Project>
<Name>CMS_CORE_Library</Name>
</ProjectReference>
<ProjectReference Include="..\Thermo.Active.Model\Thermo.Active.Model.csproj">
<Project>{631375dd-06d3-49bb-8130-d9ddb34c429d}</Project>
<Name>Thermo.Active.Model</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.4.0" newVersion="4.1.4.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.6.0" newVersion="4.0.6.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.2.0.1" newVersion="4.2.0.1" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.IO.Pipelines" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.2.2" newVersion="4.0.2.2" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.1" newVersion="4.0.1.1" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Threading.Channels" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.IO.Compression" publicKeyToken="b77a5c561934e089" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.InteropServices.RuntimeInformation" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.nlog-project.org/schemas/NLog.xsd NLog.xsd"
autoReload="true"
throwExceptions="false"
internalLogLevel="Off" internalLogFile="c:\temp\nlog-internal.log" >
<!-- optional, add some variabeles
https://github.com/nlog/NLog/wiki/Configuration-file#variables
-->
<variable name="myvar" value="myvalue"/>
<!--
See https://github.com/nlog/nlog/wiki/Configuration-file
for information on customizing logging rules and outputs.
-->
<targets async="true">
<target xsi:type="File"
name="mconnect_sdk"
fileName="${basedir}/logs/${shortdate}.log"
layout="${longdate} ${uppercase:${level}} ${message}"
/>
</targets>
<rules>
<logger name="MConnectSDK.*" minlevel="Debug" writeTo="mconnect_sdk" />
</rules>
</nlog>
@@ -0,0 +1,14 @@
#File di conf per MConnectClientSDK
conf:
Client_ID: "test"
MachineID: "cjpjwuas400cb0slxs5zfj4yh"
PingTarget: "stg.api.maestroconnect.scmgroup.com"
AliveTarget: "https://stg.api.maestroconnect.scmgroup.com/health"
BaseUrl: "https://stg.api.maestroconnect.scmgroup.com/api"
UploadUrl: "https://stg.api.maestroconnect.scmgroup.com/storage-api/backups"
WebAppUrl: "https://stg.maestroconnect.scmgroup.com/settings/machine-activation?user_code={0}&machine_id={1}"
MemoryLayer:
Redis:
ConnectionString: "127.0.0.1,abortConnect=false,ssl=false"
DbIndex: 1
Module: "MCC"
@@ -1,5 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="IPNetwork2" version="2.4.0.126" targetFramework="net461" />
<package id="IPNetwork2" version="2.5.226" targetFramework="net462" />
<package id="MConnectSDK" version="1.2.2007.218" targetFramework="net462" />
<package id="Microsoft.Bcl.AsyncInterfaces" version="1.1.1" targetFramework="net462" />
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net462" />
<package id="NLog" version="4.6.7" targetFramework="net462" />
<package id="Pipelines.Sockets.Unofficial" version="2.1.16" targetFramework="net462" />
<package id="SSH.NET" version="2016.1.0" targetFramework="net461" />
<package id="StackExchange.Redis" version="2.1.58" targetFramework="net462" />
<package id="System.Buffers" version="4.5.1" targetFramework="net462" />
<package id="System.Diagnostics.PerformanceCounter" version="4.7.0" targetFramework="net462" />
<package id="System.IO.Compression" version="4.3.0" targetFramework="net462" />
<package id="System.IO.Pipelines" version="4.7.3" targetFramework="net462" />
<package id="System.Memory" version="4.5.4" targetFramework="net462" />
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net462" />
<package id="System.Runtime.CompilerServices.Unsafe" version="4.7.1" targetFramework="net462" />
<package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="net462" />
<package id="System.Threading.Channels" version="4.7.1" targetFramework="net462" />
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net462" />
<package id="YamlDotNet" version="7.0.0" targetFramework="net462" />
</packages>
+121
View File
@@ -0,0 +1,121 @@
<ModelDesign>
<Machine>
<Property SymbolicName="Model" BrowseName="Model" DataType="ua:String" ValueRank="Scalar" Value="EIDOS" />
<Property SymbolicName="Manufacturer" BrowseName="Manufacturer" DataType="ua:String" ValueRank="Scalar" Value="CMS Industries" />
<Property SymbolicName="Serial" BrowseName="Serial" DataType="ua:String" ValueRank="Scalar" Value="9943" />
<Property SymbolicName="Type" BrowseName="Type" DataType="ua:String" ValueRank="Scalar" Value="CNC_MACHINE" />
<Property SymbolicName="BuildYear" BrowseName="BuildYear" DataType="ua:String" ValueRank="Scalar" Value="2020" />
<Variable SymbolicName="Status" BrowseName="Status" DataType="ua:String" ValueRank="Scalar" Units="Enum" />
<Variable SymbolicName="Alarm" BrowseName="Alarm" DataType="ua:Boolean" ValueRank="Scalar" Units="Bool" />
<Variable SymbolicName="Emergency" BrowseName="Emergency" DataType="ua:Boolean" ValueRank="Scalar" Units="Bool" />
<Variable SymbolicName="Power" BrowseName="Power" DataType="ua:Boolean" ValueRank="Scalar" Units="Bool" />
<Variable SymbolicName="ActiveTime" BrowseName="ActiveTime" DataType="ua:Float" ValueRank="Scalar" Units="h" CmsDataType="CounterList" CmsDataIndex="001" CmsDataOpt="HOURS" />
<Variable SymbolicName="ActiveWorkingTime" BrowseName="ActiveWorkingTime" DataType="ua:Float" ValueRank="Scalar" Units="h" CmsDataType="CounterList" CmsDataIndex="002" CmsDataOpt="HOURS" />
<Component Name="Cnc">
<Property SymbolicName="Name" BrowseName="Name" DataType="ua:String" ValueRank="Scalar" Value="SIEMENS" />
<Property SymbolicName="Version" BrowseName="Version" DataType="ua:String" ValueRank="Scalar" Value="S71500" />
<Condition SymbolicName="Condition" BrowseName="Condition" DataType="ua:String" ValueRank="Scalar" Type="OffNormalAlarmState" Units="" />
<Component Name="CncProcesses">
<Component Name="01">
<Variable SymbolicName="Mode" BrowseName="Mode" DataType="ua:String" ValueRank="Scalar" Units="Enum" />
<Variable SymbolicName="SubMode" BrowseName="SubMode" DataType="ua:String" ValueRank="Scalar" Units="" />
<Variable SymbolicName="Status" BrowseName="Status" DataType="ua:String" ValueRank="Scalar" Units="Enum" />
<Variable SymbolicName="FeedOverride" BrowseName="FeedOverride" DataType="ua:String" ValueRank="Scalar" Units="Perc" />
<Variable SymbolicName="RapidOverride" BrowseName="RapidOverride" DataType="ua:String" ValueRank="Scalar" Units="Perc" />
<Variable SymbolicName="SpeedOverride" BrowseName="SpeedOverride" DataType="ua:String" ValueRank="Scalar" Units="Perc" />
</Component>
</Component>
</Component>
<Component Name="Plc">
<Property SymbolicName="Name" BrowseName="Name" DataType="ua:String" ValueRank="Scalar" Value="SIEMENS" />
<Property SymbolicName="Version" BrowseName="Version" DataType="ua:String" ValueRank="Scalar" Value="" />
<Condition SymbolicName="Condition" BrowseName="Condition" DataType="ua:String" ValueRank="Scalar" Type="OffNormalAlarmState" Units="" />
</Component>
<Component Name="Hmi">
<Property SymbolicName="Name" BrowseName="Name" DataType="ua:String" ValueRank="Scalar" Value="CMS Active" />
<Variable SymbolicName="Version" BrowseName="Version" DataType="ua:String" ValueRank="Scalar" Value="" />
<Variable SymbolicName="User" BrowseName="User" DataType="ua:String" ValueRank="Scalar" Units="" />
</Component>
<Component Name="Axes">
<Component Name="01">
<Property SymbolicName="Type" BrowseName="Type" DataType="ua:String" ValueRank="Scalar" Value="LINEAR" />
<Property SymbolicName="Name" BrowseName="Name" DataType="ua:String" ValueRank="Scalar" Value="X" />
<Property SymbolicName="Role" BrowseName="Role" DataType="ua:String" ValueRank="Scalar" Value="MASTER" />
<Property SymbolicName="MasterId" BrowseName="MasterId" DataType="ua:String" ValueRank="Scalar" Value="0" />
<Variable SymbolicName="Load" BrowseName="Load" DataType="ua:Float" ValueRank="Scalar" Units="Perc"/>
<Variable SymbolicName="CurrentPos" BrowseName="CurrentPos" DataType="ua:Float" ValueRank="Scalar" Units="mm" SGroup="2" DBand="1" VGroup="P" />
<Variable SymbolicName="FeedRate" BrowseName="FeedRate" DataType="ua:Float" ValueRank="Scalar" Units="m/min" SGroup="4" DBand="1" VGroup="P" />
</Component>
<Component Name="02">
<Property SymbolicName="Type" BrowseName="Type" DataType="ua:String" ValueRank="Scalar" Value="LINEAR" />
<Property SymbolicName="Name" BrowseName="Name" DataType="ua:String" ValueRank="Scalar" Value="Y" />
<Property SymbolicName="Role" BrowseName="Role" DataType="ua:String" ValueRank="Scalar" Value="MASTER" />
<Property SymbolicName="MasterId" BrowseName="MasterId" DataType="ua:String" ValueRank="Scalar" Value="0" />
<Variable SymbolicName="Load" BrowseName="Load" DataType="ua:Float" ValueRank="Scalar" Units="Perc"/>
<Variable SymbolicName="CurrentPos" BrowseName="CurrentPos" DataType="ua:Float" ValueRank="Scalar" Units="mm" SGroup="2" DBand="1" VGroup="P" />
<Variable SymbolicName="FeedRate" BrowseName="FeedRate" DataType="ua:Float" ValueRank="Scalar" Units="m/min" SGroup="4" DBand="1" VGroup="P" />
</Component>
<Component Name="03">
<Property SymbolicName="Type" BrowseName="Type" DataType="ua:String" ValueRank="Scalar" Value="LINEAR" />
<Property SymbolicName="Name" BrowseName="Name" DataType="ua:String" ValueRank="Scalar" Value="Z" />
<Property SymbolicName="Role" BrowseName="Role" DataType="ua:String" ValueRank="Scalar" Value="MASTER" />
<Property SymbolicName="MasterId" BrowseName="MasterId" DataType="ua:String" ValueRank="Scalar" Value="0" />
<Variable SymbolicName="Load" BrowseName="Load" DataType="ua:Float" ValueRank="Scalar" Units="Perc"/>
<Variable SymbolicName="CurrentPos" BrowseName="CurrentPos" DataType="ua:Float" ValueRank="Scalar" Units="mm" SGroup="2" DBand="1" VGroup="P" />
<Variable SymbolicName="FeedRate" BrowseName="FeedRate" DataType="ua:Float" ValueRank="Scalar" Units="m/min" SGroup="4" DBand="1" VGroup="P" />
</Component>
<Component Name="04">
<Property SymbolicName="Type" BrowseName="Type" DataType="ua:String" ValueRank="Scalar" Value="LINEAR" />
<Property SymbolicName="Name" BrowseName="Name" DataType="ua:String" ValueRank="Scalar" Value="V" />
<Property SymbolicName="Role" BrowseName="Role" DataType="ua:String" ValueRank="Scalar" Value="MASTER" />
<Property SymbolicName="MasterId" BrowseName="MasterId" DataType="ua:String" ValueRank="Scalar" Value="0" />
<Variable SymbolicName="Load" BrowseName="Load" DataType="ua:Float" ValueRank="Scalar" Units="Perc"/>
<Variable SymbolicName="CurrentPos" BrowseName="CurrentPos" DataType="ua:Float" ValueRank="Scalar" Units="mm" SGroup="2" DBand="1" VGroup="P" />
<Variable SymbolicName="FeedRate" BrowseName="FeedRate" DataType="ua:Float" ValueRank="Scalar" Units="m/min" SGroup="4" DBand="1" VGroup="P" />
</Component>
<Component Name="05">
<Property SymbolicName="Type" BrowseName="Type" DataType="ua:String" ValueRank="Scalar" Value="LINEAR" />
<Property SymbolicName="Name" BrowseName="Name" DataType="ua:String" ValueRank="Scalar" Value="B" />
<Property SymbolicName="Role" BrowseName="Role" DataType="ua:String" ValueRank="Scalar" Value="MASTER" />
<Property SymbolicName="MasterId" BrowseName="MasterId" DataType="ua:String" ValueRank="Scalar" Value="0" />
<Variable SymbolicName="Load" BrowseName="Load" DataType="ua:Float" ValueRank="Scalar" Units="Perc"/>
<Variable SymbolicName="CurrentPos" BrowseName="CurrentPos" DataType="ua:Float" ValueRank="Scalar" Units="mm" SGroup="2" DBand="1" VGroup="P" />
<Variable SymbolicName="FeedRate" BrowseName="FeedRate" DataType="ua:Float" ValueRank="Scalar" Units="m/min" SGroup="4" DBand="1" VGroup="P" />
</Component>
<Component Name="06">
<Property SymbolicName="Type" BrowseName="Type" DataType="ua:String" ValueRank="Scalar" Value="LINEAR" />
<Property SymbolicName="Name" BrowseName="Name" DataType="ua:String" ValueRank="Scalar" Value="C" />
<Property SymbolicName="Role" BrowseName="Role" DataType="ua:String" ValueRank="Scalar" Value="MASTER" />
<Property SymbolicName="MasterId" BrowseName="MasterId" DataType="ua:String" ValueRank="Scalar" Value="0" />
<Variable SymbolicName="Load" BrowseName="Load" DataType="ua:Float" ValueRank="Scalar" Units="Perc"/>
<Variable SymbolicName="CurrentPos" BrowseName="CurrentPos" DataType="ua:Float" ValueRank="Scalar" Units="mm" SGroup="2" DBand="1" VGroup="P" />
<Variable SymbolicName="FeedRate" BrowseName="FeedRate" DataType="ua:Float" ValueRank="Scalar" Units="m/min" SGroup="4" DBand="1" VGroup="P" />
</Component>
</Component>
<Component Name="OperatingGroups">
</Component>
<Component Name="AuxiliaryGroups">
</Component>
<Component Name="ProductionProcesses">
<Component Name="01">
<Component Name="Programs">
<Component Name="01">
<Variable SymbolicName="Name" BrowseName="Name" DataType="ua:String" ValueRank="Scalar" Units="" />
<Variable SymbolicName="RepsTarget" BrowseName="RepsTarget" DataType="ua:String" ValueRank="Scalar" Units="" />
<Variable SymbolicName="RepsDone" BrowseName="RepsDone" DataType="ua:String" ValueRank="Scalar" Units="" />
</Component>
</Component>
</Component>
</Component>
<Component Name="Events">
<Variable SymbolicName="Donwtimes" BrowseName="Donwtimes" DataType="ua:String" ValueRank="Scalar" />
<Variable SymbolicName="Production" BrowseName="Production" DataType="ua:String" ValueRank="Scalar" />
<Variable SymbolicName="Kpis" BrowseName="Kpis" DataType="ua:String" ValueRank="Scalar" />
<Variable SymbolicName="Tools" BrowseName="Tools" DataType="ua:String" ValueRank="Scalar" />
<Variable SymbolicName="Messages" BrowseName="Messages" DataType="ua:String" ValueRank="Scalar" />
</Component>
</Machine>
</ModelDesign>
@@ -1,70 +1,68 @@
<?xml version="1.0" encoding="utf-8"?>
<inputsOperator>
<buttonsListModal>
<id>1</id>
<simpleModal>
<id>1</id>
<title>
<lang langKey="it">Attesa carico/scarico lastra</lang>
<lang langKey="en">Waiting sheet load/unload</lang>
</title>
</simpleModal>
<simpleModal>
<id>2</id>
<title>
<lang langKey="it">Attesa carico/scarico pezzo</lang>
<lang langKey="en">Waiting piece load/unload</lang>
</title>
</simpleModal>
<simpleModal>
<id>3</id>
<title>
<lang langKey="it">Pausa ciclo attiva</lang>
<lang langKey="en">Pause cycle active</lang>
</title>
</simpleModal>
<simpleModal>
<id>4</id>
<title>
<lang langKey="it">Ciclo parcheggio in corso</lang>
<lang langKey="en">Parking cycle ongoing</lang>
</title>
</simpleModal>
<realValueModal>
<id>10</id>
<title>
<lang langKey="en">External water</lang>
<lang langKey="it">Acqua esterna</lang>
</title>
</realValueModal>
<realValueModal>
<id>11</id>
<title>
<lang langKey="en">External water</lang>
<lang langKey="it">Acqua esterna</lang>
</title>
</realValueModal>
<buttonsListModal>
<id>6</id>
<title>
<lang langKey="en">External water</lang>
<lang langKey="it">Acqua esterna</lang>
</title>
<buttons>
<button>
<value>3</value>
<title>
<lang langKey="it">Hai rimosso manualmente anche il pezzo lavorato ?</lang>
<lang langKey="en">Have you also manually removed the workpiece ?</lang>
<lang langKey="en">External water</lang>
<lang langKey="it">Acqua esterna</lang>
</title>
<buttons>
<button>
<value>0</value>
<title>
<lang langKey="it">No</lang>
<lang langKey="en">No</lang>
</title>
</button>
<button>
<value>1</value>
<title>
<lang langKey="it">Si</lang>
<lang langKey="en">Yes</lang>
</title>
</button>
</buttons>
</buttonsListModal>
<simpleModal>
<id>2</id>
</button>
<button>
<value>4</value>
<title>
<lang langKey="it">DUE Hai rimosso manualmente anche il pezzo lavorato ?</lang>
<lang langKey="en">DUE Have you also manually removed the workpiece ?</lang>
<lang langKey="en">External water</lang>
<lang langKey="it">Acqua esterna</lang>
</title>
</simpleModal>
<realValueModal>
<id>10</id>
<title>
<lang langKey="en">External water</lang>
<lang langKey="it">Acqua esterna</lang>
</title>
</realValueModal>
<realValueModal>
<id>11</id>
<title>
<lang langKey="en">External water</lang>
<lang langKey="it">Acqua esterna</lang>
</title>
</realValueModal>
<buttonsListModal>
<id>6</id>
<title>
<lang langKey="en">External water</lang>
<lang langKey="it">Acqua esterna</lang>
</title>
<buttons>
<button>
<value>3</value>
<title>
<lang langKey="en">External water</lang>
<lang langKey="it">Acqua esterna</lang>
</title>
</button>
<button>
<value>4</value>
<title>
<lang langKey="en">External water</lang>
<lang langKey="it">Acqua esterna</lang>
</title>
</button>
</buttons>
</buttonsListModal>
</button>
</buttons>
</buttonsListModal>
</inputsOperator>
@@ -8,6 +8,8 @@
<idParam>-1</idParam>
<showDelay>false</showDelay>
<priority>1</priority>
<category>Positions</category>
<subCategory_1>Frame</subCategory_1>
</block>
<block>
<id>2</id>
@@ -44,6 +46,8 @@
<idParam>-1</idParam>
<showDelay>false</showDelay>
<priority>1</priority>
<category>Positions</category>
<subCategory_1>Mould</subCategory_1>
</block>
<block>
<id>6</id>
@@ -53,6 +57,8 @@
<idParam>-1</idParam>
<showDelay>false</showDelay>
<priority>2</priority>
<category>Heats</category>
<subCategory_1>LowerHeaters</subCategory_1>
</block>
<block>
<id>7</id>
@@ -62,6 +68,8 @@
<idParam>0</idParam>
<showDelay>false</showDelay>
<priority>1</priority>
<category>Heats</category>
<subCategory_1>UpperHeaters</subCategory_1>
</block>
<block>
<id>8</id>
@@ -71,9 +79,8 @@
<idParam>80</idParam>
<showDelay>true</showDelay>
<priority>3</priority>
<category>Pyrometer</category>
<category>Pyrometer</category>
<subCategory_1>Pyrometer</subCategory_1>
<subCategory_2></subCategory_2>
</block>
<block>
<id>9</id>
@@ -83,6 +90,8 @@
<idParam>-1</idParam>
<showDelay>false</showDelay>
<priority>4</priority>
<category>Heats</category>
<subCategory_1>DecomSustain</subCategory_1>
</block>
<block>
<id>10</id>
@@ -92,6 +101,8 @@
<idParam>-1</idParam>
<showDelay>false</showDelay>
<priority>5</priority>
<category>Cycle</category>
<subCategory_1>AcrylicFrame</subCategory_1>
</block>
<block>
<id>11</id>
@@ -110,6 +121,8 @@
<idParam>-1</idParam>
<showDelay>false</showDelay>
<priority>1</priority>
<category>Cycle</category>
<subCategory_1>UpperOverheating</subCategory_1>
</block>
<block>
<id>13</id>
@@ -119,9 +132,7 @@
<idParam>99</idParam>
<showDelay>true</showDelay>
<priority>2</priority>
<category>Drawing</category>
<subCategory_1></subCategory_1>
<subCategory_2></subCategory_2>
<category>Drawing</category>
</block>
<block>
<id>14</id>
@@ -131,6 +142,8 @@
<idParam>-1</idParam>
<showDelay>true</showDelay>
<priority>1</priority>
<category>Positions</category>
<subCategory_1>Mould</subCategory_1>
</block>
<block>
<id>15</id>
@@ -149,6 +162,8 @@
<idParam>-1</idParam>
<showDelay>true</showDelay>
<priority>3</priority>
<category>Cooling</category>
<subCategory_1>Blowing</subCategory_1>
</block>
<block>
<id>17</id>
@@ -158,18 +173,19 @@
<idParam>139</idParam>
<showDelay>true</showDelay>
<priority>4</priority>
<category>Cooling</category>
<category>Cooling</category>
<subCategory_1>Pyrometer</subCategory_1>
<subCategory_2></subCategory_2>
</block>
<block>
<id>19</id>
<label>MB_Mod_Vuoto</label>
<type>VACUUM</type>
<section>FORMING</section>
<idParam>-1</idParam>
<idParam>189</idParam>
<showDelay>true</showDelay>
<priority>5</priority>
<category>Vacuum</category>
<subCategory_1>Main</subCategory_1>
</block>
<block>
<id>21</id>
@@ -179,6 +195,8 @@
<idParam>-1</idParam>
<showDelay>true</showDelay>
<priority>6</priority>
<category>Vacuum</category>
<subCategory_1>Direct</subCategory_1>
</block>
<block>
<id>23</id>
@@ -187,8 +205,9 @@
<section>FORMING</section>
<idParam>-1</idParam>
<showDelay>true</showDelay>
<priority>7</priority>
<category>Vacuum</category>
<subCategory_1>Aux</subCategory_1>
</block>
<block>
<id>25</id>
@@ -198,6 +217,8 @@
<idParam>-1</idParam>
<showDelay>true</showDelay>
<priority>8</priority>
<category>Cooling</category>
<subCategory_1>Nebulizer</subCategory_1>
</block>
<block>
<id>26</id>
@@ -216,6 +237,8 @@
<idParam>-1</idParam>
<showDelay>true</showDelay>
<priority>9</priority>
<category>Positions</category>
<subCategory_1>UpperPlate</subCategory_1>
</block>
<block>
<id>29</id>
@@ -225,6 +248,8 @@
<idParam>-1</idParam>
<showDelay>false</showDelay>
<priority>9</priority>
<category>UpperPlate</category>
<subCategory_1>Cycle</subCategory_1>
</block>
<block>
<id>30</id>
@@ -234,6 +259,8 @@
<idParam>-1</idParam>
<showDelay>false</showDelay>
<priority>9</priority>
<category>Positions</category>
<subCategory_1>UpperPlate</subCategory_1>
</block>
<block>
<id>31</id>
@@ -243,6 +270,8 @@
<idParam>-1</idParam>
<showDelay>true</showDelay>
<priority>10</priority>
<category>UpperPlate</category>
<subCategory_1>Air</subCategory_1>
</block>
<block>
<id>33</id>
@@ -252,6 +281,8 @@
<idParam>-1</idParam>
<showDelay>true</showDelay>
<priority>11</priority>
<category>UpperPlate</category>
<subCategory_1>Vacuum</subCategory_1>
</block>
<block>
<id>34</id>
@@ -279,6 +310,8 @@
<idParam>-1</idParam>
<showDelay>true</showDelay>
<priority>10</priority>
<category>UpperPlate</category>
<subCategory_1>Extraction</subCategory_1>
</block>
<block>
<id>38</id>
@@ -297,6 +330,8 @@
<idParam>-1</idParam>
<showDelay>true</showDelay>
<priority>2</priority>
<category>Extraction</category>
<subCategory_1>Main</subCategory_1>
</block>
<block>
<id>40</id>
@@ -306,6 +341,8 @@
<idParam>-1</idParam>
<showDelay>true</showDelay>
<priority>1</priority>
<category>Positions</category>
<subCategory_1>Mould</subCategory_1>
</block>
<block>
<id>41</id>
@@ -324,6 +361,8 @@
<idParam>-1</idParam>
<showDelay>false</showDelay>
<priority>1</priority>
<category>Positions</category>
<subCategory_1>Frame</subCategory_1>
</block>
<block>
<id>43</id>
@@ -360,6 +399,8 @@
<idParam>-1</idParam>
<showDelay>true</showDelay>
<priority>6</priority>
<category>Vacuum</category>
<subCategory_1>Pre</subCategory_1>
</block>
<block>
<id>47</id>
File diff suppressed because it is too large Load Diff
+50 -34
View File
@@ -28,36 +28,22 @@
<textEditorPath>C:\Windows\System32\notepad.exe</textEditorPath>
<MTCFolderPath>C:\CMS\MTC\ADAPTER\</MTCFolderPath>
<MTCApplicationName>SCMA</MTCApplicationName>
<CMSConnectReady>false</CMSConnectReady>
<CMSConnectReady>true</CMSConnectReady>
<maxAlarmsRows>50000</maxAlarmsRows>
<alarmToDelete>5000</alarmToDelete>
</serverConfig>
<extSoftwares>
<software>
<longName>Calculator</longName>
<shortName>CAL</shortName>
<path>C:\Windows\System32\calc.exe</path>
<arguments></arguments>
<inMainMenuBar>true</inMainMenuBar>
</software>
<software>
<longName>NotePad</longName>
<shortName>NP</shortName>
<path>C:\Windows\System32\notepad.exe</path>
<arguments></arguments>
<inMainMenuBar>true</inMainMenuBar>
</software>
<software>
<longName>MsPaint</longName>
<shortName>PA</shortName>
<path>C:\Windows\System32\mspaint.exe</path>
<longName>HC-DIAG2</longName>
<shortName>HD2</shortName>
<path>C:\Program Files (x86)\HC-DIAG2\HC-DIAG2.exe</path>
<arguments></arguments>
<inMainMenuBar>false</inMainMenuBar>
</software>
<software>
<longName>NotePad2</longName>
<shortName>NP2</shortName>
<path>C:\Windows\System32\notepad.exe</path>
<longName>Calc</longName>
<shortName>NP</shortName>
<path>C:\Windows\System32\calc.exe</path>
<arguments></arguments>
<inMainMenuBar>false</inMainMenuBar>
</software>
@@ -71,9 +57,17 @@
<key>warmerPlanSizeY</key>
<value>1200</value>
</entry>
<entry>
<key>flirImgX</key>
<value>1000</value>
</entry>
<entry>
<key>flirImgY</key>
<value>803</value>
</entry>
<entry>
<key>resistSizeX</key>
<value>250</value>
<value>125</value>
</entry>
<entry>
<key>resistSizeY</key>
@@ -81,25 +75,46 @@
</entry>
<entry>
<key>warmerAutocompStartValue</key>
<value>30</value>
<value>50</value>
</entry>
<entry>
<key>warmerAutocompStep</key>
<value>5</value>
</entry>
<entry>
<key>LoaderXsize</key>
<value>1400</value>
</entry>
<entry>
<key>loaderSuckersNumber</key>
<value>12</value>
</entry>
<entry>
<key>ThermoCameraXpos</key>
<value>93</value>
</entry>
<entry>
<key>ThermoCameraYpos</key>
<value>728</value>
</entry>
<entry>
<key>ThermoCameraXdim</key>
<value>828</value>
</entry>
<entry>
<key>ThermoCameraYdim</key>
<value>1004</value>
</entry>
</additionalParameters>
<unitOfMeasures>
<unitOfMeasure id="0" value="" />
<unitOfMeasure id="1" value="%" />
<unitOfMeasure id="2" value="mm" />
<unitOfMeasure id="1" value="mm" />
<unitOfMeasure id="2" value="Nm" />
<unitOfMeasure id="3" value="°C" />
<unitOfMeasure id="4" value="Nm" />
<unitOfMeasure id="5" value="Bar" />
<unitOfMeasure id="6" value="mm/s" />
<unitOfMeasure id="7" value="mm/10" />
<unitOfMeasure id="8" value="Bar/10" />
<unitOfMeasure id="9" value="°C/10" />
<unitOfMeasure id="10" value="Nm/10" />
<unitOfMeasure id="4" value="mm/s" />
<unitOfMeasure id="5" value="ms" />
<unitOfMeasure id="6" value="s" />
<unitOfMeasure id="7" value="%" />
</unitOfMeasures>
<sampling>
<thread name="alarms" value="200" />
@@ -114,13 +129,14 @@
<thread name="powerOn" value="500" />
<thread name="prodCycle" value="1000" />
<thread name="prodInfo" value="1000" />
<thread name="prodPanel" value="1000" />
<thread name="prodPanel" value="500" />
<thread name="modules" value="200" />
<thread name="recipe" value="400" />
<thread name="scada" value="1000" />
<thread name="statusCommand" value="250" />
<thread name="FlirCamera" value="500" />
<thread name="userSK" value="250" />
<thread name="warmers" value="1500" />
<thread name="warmers" value="500" />
<thread name="watchdog" value="250" />
</sampling>
</serverConfig>
@@ -18,7 +18,7 @@
<scaleFactor>1000</scaleFactor>
<numDec>1</numDec>
<minVal>0</minVal>
<maxVal>5000000</maxVal>
<maxVal>2000000</maxVal>
</parameter>
<parameter>
<category>GAUGE</category>
@@ -2,7 +2,7 @@
<userSoftKeys>
<softKey_procedure>
<active>true</active>
<active>false</active>
<category>1</category>
<operatorConfirmationNeeded>false</operatorConfirmationNeeded>
<plcId>1</plcId>
@@ -22,7 +22,7 @@
<lang langKey="en">Refresh alarms</lang>
<lang langKey="it">Refresh allarmi</lang>
</localizedNames>
<visible>true</visible>
<visible>false</visible>
</softKey_procedure>
<softKey_procedure>
@@ -31,10 +31,12 @@
<operatorConfirmationNeeded>false</operatorConfirmationNeeded>
<plcId>3</plcId>
<localizedNames>
<lang langKey="en">Termoregulator</lang>
<lang langKey="en">Thermoregulator</lang>
<lang langKey="it">Termoregolatori</lang>
</localizedNames>
<visible>true</visible>
<refCallParam>options_thermoregulator_enable</refCallParam>
<refCallLabel>options_thermoregulator_enable_button</refCallLabel>
</softKey_procedure>
<softKey_procedure>
@@ -85,6 +87,8 @@
</localizedNames>
<visible>true</visible>
<starred>true</starred>
<refCallParam>heaters_enable</refCallParam>
<refCallLabel>heaters_enable_button</refCallLabel>
</softKey_procedure>
<softKey_procedure>
@@ -110,7 +114,6 @@
<lang langKey="it">Pompe vuoto</lang>
</localizedNames>
<visible>true</visible>
<starred>true</starred>
</softKey_procedure>
<softKey_procedure>
@@ -119,20 +122,20 @@
<operatorConfirmationNeeded>true</operatorConfirmationNeeded>
<plcId>10</plcId>
<localizedNames>
<lang langKey="en">Last cycle</lang>
<lang langKey="it">Ultimo ciclo</lang>
<lang langKey="en">Last load</lang>
<lang langKey="it">Ultimo carico</lang>
</localizedNames>
<visible>true</visible>
</softKey_procedure>
<softKey_procedure>
<active>false</active>
<active>true</active>
<category>10</category>
<operatorConfirmationNeeded>true</operatorConfirmationNeeded>
<plcId>11</plcId>
<localizedNames>
<lang langKey="en">START Cycle</lang>
<lang langKey="it">START Ciclo</lang>
<lang langKey="en">Gantry realignment</lang>
<lang langKey="it">Riallineamento gantry</lang>
</localizedNames>
<visible>true</visible>
</softKey_procedure>
@@ -423,16 +426,27 @@
<visible>true</visible>
</softKey_procedure>
<softKey_procedure>
<active>true</active>
<category>7</category>
<operatorConfirmationNeeded>false</operatorConfirmationNeeded>
<plcId>35</plcId>
<localizedNames>
<lang langKey="en">Heating pyrometer</lang>
<lang langKey="it">Pirometro riscaldo</lang>
</localizedNames>
<visible>true</visible>
<starred>true</starred>
</softKey_procedure>
<softKey_procedure>
<active>true</active>
<category>7</category>
<operatorConfirmationNeeded>false</operatorConfirmationNeeded>
<plcId>36</plcId>
<localizedNames>
<lang langKey="en">Dashboard Setpoint Plus</lang>
<lang langKey="it">Dashboard Setpoint Plus</lang>
<lang langKey="en">Pyrometer +1</lang>
<lang langKey="it">Pirometro +1</lang>
</localizedNames>
<visible>true</visible>
<refCallParam>dash_setpoint_plus</refCallParam>
@@ -445,8 +459,8 @@
<operatorConfirmationNeeded>false</operatorConfirmationNeeded>
<plcId>37</plcId>
<localizedNames>
<lang langKey="en">Dashboard Setpoint Minus</lang>
<lang langKey="it">Dashboard Setpoint Minus</lang>
<lang langKey="en">Pyrometer -1</lang>
<lang langKey="it">Pirometro -1</lang>
</localizedNames>
<visible>true</visible>
<refCallParam>dash_setpoint_minus</refCallParam>
+3
View File
@@ -65,6 +65,9 @@ namespace Thermo.Active.Config
public static List<RiskChannelModel> RiskChannelConfig;
public static List<RiskBoardModel> RiskBoardConfig;
public static List<AxesConfigModel> AxesConfig;
public static Dictionary<string,string> CMSConnectEntry;
public static string CMSConnectDataModel;
}
File diff suppressed because it is too large Load Diff
@@ -37,6 +37,7 @@
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
@@ -51,6 +52,9 @@
<Content Include="Config\axesConfig.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Config\DataModel.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Config\inputOperatorConfig.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
@@ -33,6 +33,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Xml.Linq" />
@@ -80,6 +81,10 @@
<Project>{b2366b08-96bd-4f6b-b748-b45089b87a14}</Project>
<Name>Thermo.Active.NC</Name>
</ProjectReference>
<ProjectReference Include="..\THermo.Active.Thermocamera\Thermo.Active.Thermocamera.csproj">
<Project>{8D8EC91A-3A15-4A1D-951B-A35E7068DEBD}</Project>
<Name>Thermo.Active.Thermocamera</Name>
</ProjectReference>
<ProjectReference Include="..\Thermo.Active.Utils\Thermo.Active.Utils.csproj">
<Project>{cbeb631b-abfa-4042-9779-c0060b0dfefe}</Project>
<Name>Thermo.Active.Utils</Name>
File diff suppressed because it is too large Load Diff
+1 -8
View File
@@ -13,6 +13,7 @@ namespace Thermo.Active.Core
ThreadsFunctions.ManageWatchdog,
ThreadsFunctions.ManageStatusCommand,
ThreadsFunctions.ManageConfRequest,
ThreadsFunctions.ManageFlirCamera,
ThreadsFunctions.ReadAlarms,
ThreadsFunctions.ReadPowerOnData,
ThreadsFunctions.StatThread,
@@ -38,7 +39,6 @@ namespace Thermo.Active.Core
ThreadsFunctions.ReadM154Data // levare?
};
private static Action ThreadSetupCmsConnect = ThreadsFunctions.SetupCmsConnect;
private volatile static List<Thread> RunningThreadsList = new List<Thread>();
public static Thread StartClient;
@@ -48,13 +48,6 @@ namespace Thermo.Active.Core
public static void Start()
{
ThreadsFunctions.RestoreConnection();
if (Config.ServerConfig.ServerStartupConfig.CmsConnectReady)
{
Thread t = new Thread(() => ThreadSetupCmsConnect());
t.Start();
Thread.Sleep(30);
}
}
public static void StartWorkers()
+32
View File
@@ -6,6 +6,38 @@
<assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.10.4.0" newVersion="6.10.4.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.IO.Pipelines" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.2.2" newVersion="4.0.2.2" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.1" newVersion="4.0.1.1" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.2.0.1" newVersion="4.2.0.1" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.IO.Compression" publicKeyToken="b77a5c561934e089" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.6.0" newVersion="4.0.6.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.4.0" newVersion="4.1.4.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.InteropServices.RuntimeInformation" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
+59 -27
View File
@@ -1,30 +1,62 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
</configSections>
<entityFramework>
<defaultConnectionFactory type="MySql.Data.Entity.MySqlConnectionFactory, MySql.Data.Entity.EF6" />
<providers>
<provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6, Version=6.9.10.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"></provider>
</providers>
</entityFramework>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" />
</startup>
<system.data>
<DbProviderFactories>
<remove invariant="MySql.Data.MySqlClient" />
<add description=".Net Framework Data Provider for MySQL" invariant="MySql.Data.MySqlClient" name="MySQL Data Provider" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.10.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
</DbProviderFactories>
</system.data>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.10.4.0" newVersion="6.10.4.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<configSections>
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
</configSections>
<entityFramework>
<defaultConnectionFactory type="MySql.Data.Entity.MySqlConnectionFactory, MySql.Data.Entity.EF6" />
<providers>
<provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6, Version=6.9.10.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"></provider>
</providers>
</entityFramework>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" />
</startup>
<system.data>
<DbProviderFactories>
<remove invariant="MySql.Data.MySqlClient" />
<add description=".Net Framework Data Provider for MySQL" invariant="MySql.Data.MySqlClient" name="MySQL Data Provider" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.10.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
</DbProviderFactories>
</system.data>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.10.4.0" newVersion="6.10.4.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.IO.Pipelines" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.2.2" newVersion="4.0.2.2" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.1" newVersion="4.0.1.1" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.2.0.1" newVersion="4.2.0.1" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.IO.Compression" publicKeyToken="b77a5c561934e089" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.6.0" newVersion="4.0.6.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.4.0" newVersion="4.1.4.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.InteropServices.RuntimeInformation" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
@@ -34,22 +34,41 @@ namespace Thermo.Active.Database.Controllers
.SingleOrDefault();
}
/// <summary>
/// Get historical paginated data from DB (DESC ordered
/// Get historical paginated data from DB (DESC ordered)
/// </summary>
/// <param name="numStart"></param>
/// <param name="numRecord"></param>
/// <returns></returns>
public List<ProdInfoModel> GetPaginated(int numStart, int numRecord)
public List<ProdInfoModel> GetPaginatedDesc(int numStart, int numRecord)
{
// cehck numEnd
int numEnd = numStart - numRecord;
// check numEnd
if (numEnd < 0)
numEnd = 0;
// retrieve
return dbCtx
.ProdInfo
.Where(x => x.NumDone <= numStart && x.NumDone > numEnd)
.Where(x => x.NumDone <= numStart)
//.Where(x => x.NumDone <= numStart && x.NumDone > numEnd)
.OrderByDescending(x => x.DtEvent)
.Take(numRecord)
.ToList();
}
/// <summary>
/// Get historical paginated data from DB (ASC ordered)
/// </summary>
/// <param name="numStart"></param>
/// <param name="numRecord"></param>
/// <returns></returns>
public List<ProdInfoModel> GetPaginatedAsc(int numStart, int numRecord)
{
int numEnd = numStart + numRecord;
// retrieve
return dbCtx
.ProdInfo
.Where(x => x.NumDone >= numStart)
.OrderBy(x => x.DtEvent)
.Take(numRecord)
.ToList();
}
/// <summary>
@@ -1,5 +1,7 @@
using System.Collections.Generic;
using Thermo.Active.Database.Redis;
using Thermo.Active.Model.DTOModels;
using Thermo.Active.Model.DTOModels.ThAxes;
namespace Thermo.Active.Database.Controllers
{
@@ -12,6 +14,26 @@ namespace Thermo.Active.Database.Controllers
private const string redisAlmCurr = "AdpConf:Plc:Condition:Curr";
private const string redisAlmIt = "AdpConf:Plc:Condition:It";
private const string redisAlmEn = "AdpConf:Plc:Condition:En";
private const string currentUserPath = "Machine:Hmi:User";
private const string machineStatusPath = "Machine:Status";
private const string machinePowerPath = "Machine:Power";
private const string machineAlarmPath = "Machine:Alarm";
private const string machineEmergencyPath = "Machine:Emergency";
private const string alarmsPath = "Machine:Plc:Condition";
private const string processStatusPath = "Machine:Cnc:CncProcesses:%NN%:Status";
private const string processModePath = "Machine:Cnc:CncProcesses:%NN%:Mode";
private const string processFeedOverridePath = "Machine:Cnc:CncProcesses:%NN%:FeedOverride";
private const string processRapidOverridePath = "Machine:Cnc:CncProcesses:%NN%:RapidOverride";
private const string processSpeedOverridePath = "Machine:Cnc:CncProcesses:%NN%:SpeedOverride";
private const string datamodelPath = "AdpConf:DataModel";
private const string currentActiveVersionPath = "Machine:Hmi:Version";
private const string machineAxisPosition = "Machine:Axes:%NN%:CurrentPos";
private const string machineAxisSpeed = "Machine:Axes:%NN%:FeedRate";
private const string machineAxisLoad = "Machine:Axes:%NN%:Load";
private const string machineAxisName = "Machine:Axes:%NN%:Name";
private const string machineEventKpis = "Events:Kpis";
private const string machineMessagePath = "Events:Messages";
public static void WriteProductionNotification(uint ProductionProcess, string Notification)
{
@@ -48,6 +70,22 @@ namespace Thermo.Active.Database.Controllers
string redisHash = redUtil.man.redHash(redisAlmEn);
return redUtil.man.redSaveHashDict(redisHash, alarms);
}
public static bool WriteDatamodel(string datamodel)
{
string redisHash = redUtil.man.redHash(datamodelPath);
return redUtil.man.setRSV(redisHash, datamodel.ToString());
}
public static bool WriteDefaultEntry(Dictionary<string, string> entries)
{
foreach (KeyValuePair<string,string> entry in entries)
{
if (!redUtil.man.setRSV(redUtil.man.redHash(entry.Key), entry.Value))
return false;
}
return true;
}
public static bool WriteAlarmsConfigIt(Dictionary<string, string> alarms)
{
@@ -55,6 +93,120 @@ namespace Thermo.Active.Database.Controllers
return redUtil.man.redSaveHashDict(redisHash, alarms);
}
public static bool WriteCurrentUser(string User)
{
string redisHash = redUtil.man.redHash(currentUserPath);
return redUtil.man.setRSV(redisHash, User.ToString());
}
public static bool WriteActiveVersion(string version)
{
string redisHash = redUtil.man.redHash(currentActiveVersionPath);
return redUtil.man.setRSV(redisHash, version.ToString());
}
public static bool WriteCurrentMachineStatus(string status)
{
string redisHash = redUtil.man.redHash(machineStatusPath);
return redUtil.man.setRSV(redisHash, status.ToString());
}
public static bool WriteCurrentProcessStatus(uint ProductionProcess, string status)
{
string redisHash = redUtil.man.redHash(processStatusPath).Replace("%NN%", ProductionProcess.ToString("00"));
return redUtil.man.setRSV(redisHash, status.ToString());
}
public static bool WriteCurrentProcessMode(uint ProductionProcess, string status)
{
string redisHash = redUtil.man.redHash(processModePath).Replace("%NN%", ProductionProcess.ToString("00"));
return redUtil.man.setRSV(redisHash, status.ToString());
}
public static bool WriteFakeOverrides(uint ProductionProcess)
{
string redisHash = redUtil.man.redHash(processFeedOverridePath).Replace("%NN%", ProductionProcess.ToString("00"));
if (!redUtil.man.setRSV(redisHash, "100"))
return false;
redisHash = redUtil.man.redHash(processRapidOverridePath).Replace("%NN%", ProductionProcess.ToString("00"));
if (!redUtil.man.setRSV(redisHash, "100"))
return false;
redisHash = redUtil.man.redHash(processSpeedOverridePath).Replace("%NN%", ProductionProcess.ToString("00"));
if(!redUtil.man.setRSV(redisHash, "100"))
return false;
return true;
}
public static bool WriteCurrentMachinePowerPath(bool status)
{
string redisHash = redUtil.man.redHash(machinePowerPath);
if(status)
return redUtil.man.setRSV(redisHash, "true");
else
return redUtil.man.setRSV(redisHash, "false");
}
public static bool WriteCurrentMachineAlarmPath(bool status)
{
string redisHash = redUtil.man.redHash(machineAlarmPath);
if (status)
return redUtil.man.setRSV(redisHash, "true");
else
return redUtil.man.setRSV(redisHash, "false");
}
public static bool WriteCurrentMachineEmergencyPath(bool status)
{
string redisHash = redUtil.man.redHash(machineEmergencyPath);
if (status)
return redUtil.man.setRSV(redisHash, "true");
else
return redUtil.man.setRSV(redisHash, "false");
}
public static bool WriteCurrentAlarms(string alarms)
{
string redisHash = redUtil.man.redHash(alarmsPath);
return redUtil.man.setRSV(redisHash, alarms);
}
public static bool WriteMachineEventKpis(string alarms)
{
string redisHash = redUtil.man.redHash(machineEventKpis);
redUtil.man.ListPush(redisHash, alarms);
return true;
}
public static bool SendMessage(string msg)
{
string redisHash = redUtil.man.redHash(machineMessagePath);
redUtil.man.ListPush(redisHash, msg);
return true;
}
public static bool WriteCurrentAxisStatus(Dictionary<int, DTOAxisInfoModel> axis)
{
foreach(KeyValuePair<int, DTOAxisInfoModel> asse in axis)
{
string redisHash = redUtil.man.redHash(machineAxisName).Replace("%NN%", asse.Value.ID.ToString("00"));
if(redUtil.man.getRSV(redisHash) != null)
{
redisHash = redUtil.man.redHash(machineAxisPosition).Replace("%NN%", asse.Value.ID.ToString("00"));
if (!redUtil.man.setRSV(redisHash, asse.Value.position.ToString()))
return false;
redisHash = redUtil.man.redHash(machineAxisSpeed).Replace("%NN%", asse.Value.ID.ToString("00"));
if (!redUtil.man.setRSV(redisHash, asse.Value.speed.ToString()))
return false;
redisHash = redUtil.man.redHash(machineAxisLoad).Replace("%NN%", asse.Value.ID.ToString("00"));
if (!redUtil.man.setRSV(redisHash, asse.Value.load.ToString()))
return false;
}
}
return true;
}
}
}
@@ -63,6 +63,13 @@ namespace Thermo.Active.Database.Controllers
.Where(x => x.UserId == userId)
.ToList();
}
public List<KeyboardUserSoftKeyModel> FindkeyboardSoftkeys(int userId)
{
return dbCtx.
KeyboardUserSoftkeys
.Where(x => x.UserId == userId)
.ToList();
}
public List<DTOUserSoftKeyConfigModel> GetUserFavoriteSoftkeys(int userId)
{
@@ -87,7 +94,8 @@ namespace Thermo.Active.Database.Controllers
softKeys.Add(new FavoriteUserSoftkeyModel()
{
UserId = userId,
SoftkeyId = softKeyId
SoftkeyId = softKeyId,
Type = (int) SOFTKEY_PLACE.PADDLE
});
}
@@ -111,5 +119,83 @@ namespace Thermo.Active.Database.Controllers
// Save database context
dbCtx.SaveChanges();
}
public DTOKeyboardSoftKeyModel GetKeyboardFavoriteSoftkeys(int userId)
{
// Find user softkey stored in the database
List<KeyboardUserSoftKeyModel> keyboardKey = FindkeyboardSoftkeys(userId);
// Get config
DTOKeyboardSoftKeyModel keybSoftkey = new DTOKeyboardSoftKeyModel();
if(keyboardKey.Count==0)
{
keybSoftkey.IdStar1 = 0;
keybSoftkey.IdStar2 = 0;
}
else
{
keybSoftkey.IdStar1 = keyboardKey.FirstOrDefault().SoftkeyId1;
keybSoftkey.IdStar2 = keyboardKey.FirstOrDefault().SoftkeyId2;
}
return keybSoftkey;
}
public DTOKeyboardSoftKeyModel GetKeyboardFavoriteSoftkeysLoggedUser()
{
List<MachineUserModel> users = dbCtx
.Sessions
.Include("MachineUser")
.Select(x => x.MachineUser)
.GroupBy(x => x.MachineUserId)
.Select(x => x.FirstOrDefault())
.ToList();
if (users.Count > 0)
return GetKeyboardFavoriteSoftkeys(users[0].UserId);
else
return GetKeyboardFavoriteSoftkeys(-1);
}
public DTOKeyboardSoftKeyModel SetKeyboardFavoriteSoftkeys(int userId,int idSoftkey, int pos)
{
// Find user softkey stored in the database
List<KeyboardUserSoftKeyModel> keyboardKey = FindkeyboardSoftkeys(userId);
if (keyboardKey.Count == 0)
{
KeyboardUserSoftKeyModel newModel = new KeyboardUserSoftKeyModel();
newModel.UserId = userId;
if(pos==1)
{
newModel.SoftkeyId1 = idSoftkey;
newModel.SoftkeyId2 = 0;
}
else if (pos == 2)
{
newModel.SoftkeyId1 = 0;
newModel.SoftkeyId2 = idSoftkey;
}
dbCtx.KeyboardUserSoftkeys.Add(newModel);
}
else
{
KeyboardUserSoftKeyModel model = keyboardKey.FirstOrDefault();
if (pos == 1)
model.SoftkeyId1 = idSoftkey;
else if (pos == 2)
model.SoftkeyId2 = idSoftkey;
}
dbCtx.SaveChanges();
return GetKeyboardFavoriteSoftkeys(userId);
}
}
}
@@ -26,6 +26,7 @@ namespace Thermo.Active.Database
public DbSet<FunctionAccessModel> FunctionsAccess { get; set; }
public DbSet<SessionModel> Sessions { get; set; }
public DbSet<FavoriteUserSoftkeyModel> FavoriteUserSoftkeys { get; set; }
public DbSet<KeyboardUserSoftKeyModel> KeyboardUserSoftkeys { get; set; }
// Maintenances
public DbSet<MaintenanceModel> Maintenances { get; set; }
public DbSet<PerformedMaintenanceModel> PerformedMaintenances { get; set; }
@@ -0,0 +1,29 @@
// <auto-generated />
namespace Thermo.Active.Database.Migrations
{
using System.CodeDom.Compiler;
using System.Data.Entity.Migrations;
using System.Data.Entity.Migrations.Infrastructure;
using System.Resources;
[GeneratedCode("EntityFramework.Migrations", "6.2.0-61023")]
public sealed partial class AddedTypeKey : IMigrationMetadata
{
private readonly ResourceManager Resources = new ResourceManager(typeof(AddedTypeKey));
string IMigrationMetadata.Id
{
get { return "202011051133455_AddedTypeKey"; }
}
string IMigrationMetadata.Source
{
get { return null; }
}
string IMigrationMetadata.Target
{
get { return Resources.GetString("Target"); }
}
}
}
@@ -0,0 +1,18 @@
namespace Thermo.Active.Database.Migrations
{
using System;
using System.Data.Entity.Migrations;
public partial class AddedTypeKey : DbMigration
{
public override void Up()
{
AddColumn("dbo.favorite_user_softkey", "type", c => c.Int(nullable: false));
}
public override void Down()
{
DropColumn("dbo.favorite_user_softkey", "type");
}
}
}
File diff suppressed because one or more lines are too long
@@ -0,0 +1,29 @@
// <auto-generated />
namespace Thermo.Active.Database.Migrations
{
using System.CodeDom.Compiler;
using System.Data.Entity.Migrations;
using System.Data.Entity.Migrations.Infrastructure;
using System.Resources;
[GeneratedCode("EntityFramework.Migrations", "6.2.0-61023")]
public sealed partial class AddedKeyboaSoftkey : IMigrationMetadata
{
private readonly ResourceManager Resources = new ResourceManager(typeof(AddedKeyboaSoftkey));
string IMigrationMetadata.Id
{
get { return "202011051531133_AddedKeyboaSoftkey"; }
}
string IMigrationMetadata.Source
{
get { return null; }
}
string IMigrationMetadata.Target
{
get { return Resources.GetString("Target"); }
}
}
}

Some files were not shown because too many files have changed in this diff Show More