diff --git a/NKC_WF/Content/SheetColor.css b/NKC_WF/Content/SheetColor.css index e607c85..e05d68f 100644 --- a/NKC_WF/Content/SheetColor.css +++ b/NKC_WF/Content/SheetColor.css @@ -1,46 +1,6 @@ -rect { - transform: rotate(90deg); -} -#IT000001 { - fill: #FFAA55; -} -#IT000002 { - fill: green; -} -/*#IT000003 { - fill: orange; - .flashStroke; - .strokeThick; -}*/ -#IT000004 { - fill: #FF6969; - /*.flashStroke; - .strokeThick;*/ -} -#IT000005 { - fill: #0033FF; -} -/*#IT000006 { - fill: orange; -}*/ -#IT000007 { - fill: #AACCFF; -} -#IT000008 { - fill: #2288FF; -} -.tableSvg { - background: url(../Images/test.svg) no-repeat top left; - background-size: contain; -} -.fVerde { - fill: green; -} -.fBlu { - fill: blue; -} +/* ANIMAZIONE */ .strokeThick { - stroke-width: 2px !important; + stroke-width: 5px !important; } /* Animazione per richiamo attenzione*/ .flashStroke { @@ -77,4 +37,69 @@ 100% { stroke: #005ccc; } +} +/* COLORI */ +.SFONDO { + background-image: url("../Images/MT0006110.jpg"); + background-repeat: no-repeat; + /* Do not repeat the image */ + background-size: cover; + /* Resize the background image to cover the entire container */ +} +.GRIGIO { + fill: #ACACAC; +} +.VERDE { + fill: green; +} +.BLU { + fill: #0033FF; +} +.ARANCIO { + fill: orange; +} +.GIALLO { + fill: yellow; +} +.PURPLE { + fill: purple; +} +/* Classi da sostituire dinamicamente*/ +#BLK-BCK { + background-image: url("../Images/MT0006110.jpg"); + background-repeat: no-repeat; + /* Do not repeat the image */ + background-size: cover; + /* Resize the background image to cover the entire container */ +} +#BLK-CUT { + fill: #ACACAC; +} +#BLK-SEL { + fill: orange; + stroke: blue; + /* Safari 4.0 - 8.0 */ + -webkit-animation-name: blueFlash; + -webkit-animation-duration: 0.5s; + -webkit-animation-timing-function: linear; + -webkit-animation-delay: 0s; + -webkit-animation-iteration-count: infinite; + -webkit-animation-direction: alternate; + /* Standard syntax */ + animation-name: blueFlash; + animation-duration: 0.5s; + animation-timing-function: linear; + animation-delay: 0s; + animation-iteration-count: infinite; + animation-direction: alternate; + stroke-width: 5px !important; +} +#BLK-BIN { + fill: green; +} +#BLK-CART { + fill: #0033FF; +} +#BLK-SEC-OP { + fill: purple; } \ No newline at end of file diff --git a/NKC_WF/Content/SheetColor.less b/NKC_WF/Content/SheetColor.less index 8a2c150..dbe6010 100644 --- a/NKC_WF/Content/SheetColor.less +++ b/NKC_WF/Content/SheetColor.less @@ -1,58 +1,5 @@ -rect { - transform: rotate(90deg); -} - -#IT000001 { - fill: #FFAA55; -} - -#IT000002 { - fill: green; -} - -/*#IT000003 { - fill: orange; - .flashStroke; - .strokeThick; -}*/ - -#IT000004 { - fill: #FF6969; - /*.flashStroke; - .strokeThick;*/ -} - - -#IT000005 { - fill: #0033FF; -} - -/*#IT000006 { - fill: orange; -}*/ -#IT000007 { - fill: #AACCFF; -} -#IT000008 { - fill: #2288FF; -} - -.tableSvg { - background: url(../Images/test.svg) no-repeat top left; - background-size: contain; -} - - - -.fVerde { - fill: green; -} - -.fBlu { - fill: blue; -} - -@borderThick: 2px; +/* ANIMAZIONE */ +@borderThick: 5px; .strokeThick { stroke-width: @borderThick !important; @@ -97,4 +44,53 @@ 100% { stroke: #005ccc; } -} \ No newline at end of file +} + +/* COLORI */ +.SFONDO { + background-image: url("../Images/MT0006110.jpg"); + background-repeat: no-repeat; /* Do not repeat the image */ + background-size: cover; /* Resize the background image to cover the entire container */ +} +.GRIGIO { + fill: #ACACAC; +} +.VERDE { + fill: green; +} +.BLU { + fill: #0033FF; +} +.ARANCIO { + fill: orange; +} +.GIALLO { + fill: yellow; +} +.PURPLE { + fill: purple; +} + + +/* Classi da sostituire dinamicamente*/ +#BLK-BCK { + .SFONDO; +} +#BLK-CUT { + .GRIGIO; +} +#BLK-SEL { + .ARANCIO; + .flashStroke; + .strokeThick; +} +#BLK-BIN { + .VERDE; +} +#BLK-CART { + .BLU; +} + +#BLK-SEC-OP { + .PURPLE; +} diff --git a/NKC_WF/Content/SheetColor.min.css b/NKC_WF/Content/SheetColor.min.css index 8494bee..cd0938e 100644 --- a/NKC_WF/Content/SheetColor.min.css +++ b/NKC_WF/Content/SheetColor.min.css @@ -1 +1 @@ -rect{transform:rotate(90deg);}#IT000001{fill:#fa5;}#IT000002{fill:green;}#IT000004{fill:#ff6969;}#IT000005{fill:#03f;}#IT000007{fill:#acf;}#IT000008{fill:#28f;}.tableSvg{background:url(../Images/test.svg) no-repeat top left;background-size:contain;}.fVerde{fill:green;}.fBlu{fill:blue;}.strokeThick{stroke-width:2px !important;}.flashStroke{stroke:blue;-webkit-animation-name:blueFlash;-webkit-animation-duration:.5s;-webkit-animation-timing-function:linear;-webkit-animation-delay:0s;-webkit-animation-iteration-count:infinite;-webkit-animation-direction:alternate;animation-name:blueFlash;animation-duration:.5s;animation-timing-function:linear;animation-delay:0s;animation-iteration-count:infinite;animation-direction:alternate;}@-webkit-keyframes blueFlash{0%{stroke:#c4dbff;}25%{stroke:#9dc4ff;}50%{stroke:#5ca5ff;}75%{stroke:#1b82ff;}100%{stroke:#005ccc;}} \ No newline at end of file +.strokeThick{stroke-width:5px !important;}.flashStroke{stroke:blue;-webkit-animation-name:blueFlash;-webkit-animation-duration:.5s;-webkit-animation-timing-function:linear;-webkit-animation-delay:0s;-webkit-animation-iteration-count:infinite;-webkit-animation-direction:alternate;animation-name:blueFlash;animation-duration:.5s;animation-timing-function:linear;animation-delay:0s;animation-iteration-count:infinite;animation-direction:alternate;}@-webkit-keyframes blueFlash{0%{stroke:#c4dbff;}25%{stroke:#9dc4ff;}50%{stroke:#5ca5ff;}75%{stroke:#1b82ff;}100%{stroke:#005ccc;}}.SFONDO{background-image:url("../Images/MT0006110.jpg");background-repeat:no-repeat;background-size:cover;}.GRIGIO{fill:#acacac;}.VERDE{fill:green;}.BLU{fill:#03f;}.ARANCIO{fill:orange;}.GIALLO{fill:yellow;}.PURPLE{fill:purple;}#BLK-BCK{background-image:url("../Images/MT0006110.jpg");background-repeat:no-repeat;background-size:cover;}#BLK-CUT{fill:#acacac;}#BLK-SEL{fill:orange;stroke:blue;-webkit-animation-name:blueFlash;-webkit-animation-duration:.5s;-webkit-animation-timing-function:linear;-webkit-animation-delay:0s;-webkit-animation-iteration-count:infinite;-webkit-animation-direction:alternate;animation-name:blueFlash;animation-duration:.5s;animation-timing-function:linear;animation-delay:0s;animation-iteration-count:infinite;animation-direction:alternate;stroke-width:5px !important;}#BLK-BIN{fill:green;}#BLK-CART{fill:#03f;}#BLK-SEC-OP{fill:purple;} \ No newline at end of file diff --git a/NKC_WF/Controllers/getMUCssController.cs b/NKC_WF/Controllers/getMUCssController.cs index 2af7a3f..d61b077 100644 --- a/NKC_WF/Controllers/getMUCssController.cs +++ b/NKC_WF/Controllers/getMUCssController.cs @@ -1,4 +1,4 @@ -using System; +using SteamWare; using System.IO; using System.Net; using System.Net.Http; @@ -13,23 +13,33 @@ namespace NKC_WF.Controllers // GET api/ public HttpResponseMessage Get() { - string filename = HttpContext.Current.Server.MapPath("~/Content/SheetColor.css"); - string answ = File.ReadAllText(filename); - // rendo dinamico in base al secondo pari/dispari il mio #IT00006 - int secondi = DateTime.Now.Second; - if (secondi % 2 == 0) + string answ = ""; + // recupero da REDIS! + string redKey = memLayer.ML.redHash("MachineUnload:01:Css"); + // se vuoto scrivo versione attuale... + if (!memLayer.ML.redKeyPresent(redKey)) { - answ += "#IT000006 {fill: orange;}"; - answ += "#IT000003 {fill: orange; .flashStroke; .strokeThick;}"; - + memLayer.ML.setRSV(redKey, answ); } - else + answ = memLayer.ML.getRSV(redKey); + // RICALCOLO SOLO SE non trovo in REDIS (perché invalidato) + if (answ == "") + // se vuoto lo calcolo... !!!FIXME!!! leggere da DB!!!! { - answ += "#IT000006 {fill: blue;}"; - answ += "#IT000003 {fill: blue; .flashStroke; .strokeThick;}"; - } + string filename = HttpContext.Current.Server.MapPath("~/Content/SheetColor.css"); + answ = File.ReadAllText(filename); - //return answ; + // imposto sfondo ... + answ = answ.Replace("#BLK-BCK", "#Sheet"); + // ...e primi 3 items... + answ = answ.Replace("#BLK-CUT", "#IT000006, #IT000007, #IT000008"); + answ = answ.Replace("#BLK-SEL", "#IT000003"); + answ = answ.Replace("#BLK-BIN", "#IT000001"); + answ = answ.Replace("#BLK-CART", "#IT000002"); + + // salvo redis! + memLayer.ML.setRSV(redKey, answ); + } return new HttpResponseMessage(HttpStatusCode.OK) diff --git a/NKC_WF/Controllers/getMUCssRevController.cs b/NKC_WF/Controllers/getMUCssRevController.cs index c73d076..4743a9f 100644 --- a/NKC_WF/Controllers/getMUCssRevController.cs +++ b/NKC_WF/Controllers/getMUCssRevController.cs @@ -1,4 +1,4 @@ -using System; +using SteamWare; using System.Web.Http; namespace NKC_WF.Controllers @@ -8,9 +8,15 @@ namespace NKC_WF.Controllers // GET api/ public int Get() { - // cambio ogni 3 secondi... int answ = 0; - answ = (DateTime.Now.Second / 5); + // recupero da REDIS! + string redKey = memLayer.ML.redHash("MachineUnload:01:CssRev"); + // se vuoto scrivo 1... + if (!memLayer.ML.redKeyPresent(redKey)) + { + memLayer.ML.setRCntI(redKey); + } + answ = memLayer.ML.getRCnt(redKey); return answ; } diff --git a/NKC_WF/Images/MT0006110.jpg b/NKC_WF/Images/MT0006110.jpg new file mode 100644 index 0000000..94d3da8 Binary files /dev/null and b/NKC_WF/Images/MT0006110.jpg differ diff --git a/NKC_WF/Images/Test11.svg b/NKC_WF/Images/Test11.svg new file mode 100644 index 0000000..d9c49d8 --- /dev/null +++ b/NKC_WF/Images/Test11.svg @@ -0,0 +1,25 @@ + + + + + Part 1 + + + + + + Part 2 + + + Part 3 + + + + + + + + + + + diff --git a/NKC_WF/Images/test - Copia (2).svg b/NKC_WF/Images/test - Copia (2).svg new file mode 100644 index 0000000..b7456f9 --- /dev/null +++ b/NKC_WF/Images/test - Copia (2).svg @@ -0,0 +1,25 @@ + + + + + IT000002 + + + + + + IT000002 + + + IT000003 + + + + + + + + + + + diff --git a/NKC_WF/Images/test.backup.svg b/NKC_WF/Images/test - Copia.svg similarity index 55% rename from NKC_WF/Images/test.backup.svg rename to NKC_WF/Images/test - Copia.svg index 40ab133..ed10a30 100644 --- a/NKC_WF/Images/test.backup.svg +++ b/NKC_WF/Images/test - Copia.svg @@ -1,4 +1,5 @@ + - + viewBox="0 0 297 210" + height="210mm" + width="297mm"> @@ -19,28 +19,27 @@ - + - + - + /> + + d="m 80.130951,98.184522 31.749999,-3.023809 22.67857,12.095237 40.82143,-9.82738 v 37.04167 l -52.91667,30.23809 -42.333329,-27.97024 z" /> - + + /> diff --git a/NKC_WF/Images/test.svg b/NKC_WF/Images/test.svg index ed10a30..b7456f9 100644 --- a/NKC_WF/Images/test.svg +++ b/NKC_WF/Images/test.svg @@ -1,45 +1,25 @@ - - - - - - - image/svg+xml - - - - - - - - - - - - - + + + + + IT000002 + + + + + + IT000002 + + + IT000003 + + + + + + + + + + diff --git a/NKC_WF/MachineUnload.aspx b/NKC_WF/MachineUnload.aspx index a286232..006db1c 100644 --- a/NKC_WF/MachineUnload.aspx +++ b/NKC_WF/MachineUnload.aspx @@ -17,6 +17,53 @@ --%> +
diff --git a/NKC_WF/NKC_WF.csproj b/NKC_WF/NKC_WF.csproj index 0b427ab..d9c00b4 100644 --- a/NKC_WF/NKC_WF.csproj +++ b/NKC_WF/NKC_WF.csproj @@ -208,8 +208,11 @@ - + + + +