private void ParseFavorites() { string[] items; items = FavoritesFromBD.Split(';'); int itemsLength = items.Length - 1; for (int i = 1; i < itemsLength; i++) { EmpresaFavFromBD = int.Parse(AuxFunctions.GetDataValue(items[i], "idempresa:")); GranjaFavFromBD = int.Parse(AuxFunctions.GetDataValue(items[i], "idgranja:")); NucleoFavFromBD = int.Parse(AuxFunctions.GetDataValue(items[i], "idnucleo:")); GalponFavFromBD = int.Parse(AuxFunctions.GetDataValue(items[i], "idgalpon:")); SiloFavFromBD = int.Parse(AuxFunctions.GetDataValue(items[i], "idsilo:")); } }
private void ParseFavoritesFromBD() { string[] items; items = favoritesFromBD.Split(';'); int itemsLength = items.Length - 2; for (int i = 0; i <= itemsLength; i++) { IdEmpresaFav = int.Parse(AuxFunctions.GetDataValue(items[i], "idempresa:")); IdGranjaFav = int.Parse(AuxFunctions.GetDataValue(items[i], "idgranja:")); IdNucleoFav = int.Parse(AuxFunctions.GetDataValue(items[i], "idnucleo:")); IdGalponFav = int.Parse(AuxFunctions.GetDataValue(items[i], "idgalpon:")); IdSiloFav = int.Parse(AuxFunctions.GetDataValue(items[i], "idsilo:")); print(IdEmpresaFav + "/" + IdGranjaFav + "/" + IdNucleoFav + "/" + IdGalponFav + "/" + IdSiloFav); } }
private void ParseRemoteControl() { string[] items; items = RemoteControl.Split(';'); CanalFromBD = int.Parse(AuxFunctions.GetDataValue(items[0], "canal:")); NivelFromBD = int.Parse(AuxFunctions.GetDataValue(items[0], "nivel:")); EmpresaIdFromBD = int.Parse(AuxFunctions.GetDataValue(items[0], "idempresa:")); GranjaIdFromBD = int.Parse(AuxFunctions.GetDataValue(items[0], "idgranja:")); NucleoIdFromBD = int.Parse(AuxFunctions.GetDataValue(items[0], "idnucleo:")); GalponIdFromBD = int.Parse(AuxFunctions.GetDataValue(items[0], "idgalpon:")); SiloIdFromBD = int.Parse(AuxFunctions.GetDataValue(items[0], "idsilo:")); ActiveElemFromBD = int.Parse(AuxFunctions.GetDataValue(items[0], "activa:")); ZoomFromBD = int.Parse(AuxFunctions.GetDataValue(items[0], "zoom:")); CurrentPageFromBD = int.Parse(AuxFunctions.GetDataValue(items[0], "pagina:")); TotalPagesFromBD = int.Parse(AuxFunctions.GetDataValue(items[0], "cantidadpag:")); FlagFromBD = int.Parse(AuxFunctions.GetDataValue(items[0], "flag:")); }
void ParseData() { string[] items; items = remoteControlFromBD.Split(';'); CanalFromBD = int.Parse(AuxFunctions.GetDataValue(items[0], "canal:")); NivelFromBD = int.Parse(AuxFunctions.GetDataValue(items[0], "nivel:")); EmpresaIdFromBD = AuxFunctions.GetDataValue(items[0], "idempresa:"); GranjaIdFromBD = AuxFunctions.GetDataValue(items[0], "idgranja:"); NucleoIdFromBD = AuxFunctions.GetDataValue(items[0], "idnucleo:"); //GalponIdFromBD = AuxFunctions.GetDataValue(items[0], "idgalpon:"); //SiloID = AuxFunctions.GetDataValue(items[0], "idsilo:"); activeElem = int.Parse(AuxFunctions.GetDataValue(items[0], "activa:")); zoomFromBD = int.Parse(AuxFunctions.GetDataValue(items[0], "zoom:")); currentPageFromBD = int.Parse(AuxFunctions.GetDataValue(items[0], "pagina:")); totalPagesFromBD = int.Parse(AuxFunctions.GetDataValue(items[0], "cantidadpag:")); flagFromBD = int.Parse(AuxFunctions.GetDataValue(items[0], "flag:")); }
void SetElementValues() { if (itemsData != "-1") { items = itemsData.Split(';'); ConfortBD = AuxFunctions.GetDataValue(items[id], "Confort:"); DensidadBD = AuxFunctions.GetDataValue(items[id], "Densidad:"); TemperaturaBD = AuxFunctions.GetDataValue(items[id], "Temperatura:"); MortalidadBD = AuxFunctions.GetDataValue(items[id], "Mortalidad:"); ConsumoBD = AuxFunctions.GetDataValue(items[id], "Consumo:"); EficienciaBD = AuxFunctions.GetDataValue(items[id], "Eficiencia:"); InventarioBD = AuxFunctions.GetDataValue(items[id], "Inventario:"); ConfortA = transform.Find("ConfortA").GetComponent <CanvasGroup>(); ConfortL = transform.Find("ConfortL").GetComponent <CanvasGroup>(); ConfortP = transform.Find("ConfortP").GetComponent <CanvasGroup>(); ConfortE = transform.Find("ConfortE").GetComponent <CanvasGroup>(); DensidadB = transform.Find("DensidadB").GetComponent <CanvasGroup>(); DensidadM = transform.Find("DensidadM").GetComponent <CanvasGroup>(); DensidadA = transform.Find("DensidadA").GetComponent <CanvasGroup>(); TemperaturaEF = transform.Find("TemperaturaEF").GetComponent <CanvasGroup>(); TemperaturaF = transform.Find("TemperaturaF").GetComponent <CanvasGroup>(); TemperaturaT = transform.Find("TemperaturaT").GetComponent <CanvasGroup>(); TemperaturaC = transform.Find("TemperaturaC").GetComponent <CanvasGroup>(); TemperaturaEC = transform.Find("TemperaturaEC").GetComponent <CanvasGroup>(); MortalidadA = transform.Find("MortalidadA").GetComponent <CanvasGroup>(); MortalidadN = transform.Find("MortalidadN").GetComponent <CanvasGroup>(); ConsumoB = transform.Find("ConsumoB").GetComponent <CanvasGroup>(); ConsumoN = transform.Find("ConsumoN").GetComponent <CanvasGroup>(); ConsumoA = transform.Find("ConsumoA").GetComponent <CanvasGroup>(); ConsumoI = transform.Find("ConsumoI").GetComponent <CanvasGroup>(); Eficiencia1 = transform.Find("Eficiencia1").GetComponent <CanvasGroup>(); Eficiencia2 = transform.Find("Eficiencia2").GetComponent <CanvasGroup>(); Eficiencia3 = transform.Find("Eficiencia3").GetComponent <CanvasGroup>(); Eficiencia4 = transform.Find("Eficiencia4").GetComponent <CanvasGroup>(); Eficiencia5 = transform.Find("Eficiencia5").GetComponent <CanvasGroup>(); InventarioE = transform.Find("InventarioE").GetComponent <CanvasGroup>(); InventarioB = transform.Find("InventarioB").GetComponent <CanvasGroup>(); InventarioA = transform.Find("InventarioA").GetComponent <CanvasGroup>(); InventarioX = transform.Find("InventarioX").GetComponent <CanvasGroup>(); ConfortA.alpha = 0f; ConfortL.alpha = 0f; ConfortP.alpha = 0f; ConfortE.alpha = 0f; DensidadB.alpha = 0f; DensidadM.alpha = 0f; DensidadA.alpha = 0f; TemperaturaEF.alpha = 0f; TemperaturaF.alpha = 0f; TemperaturaT.alpha = 0f; TemperaturaC.alpha = 0f; TemperaturaEC.alpha = 0f; MortalidadA.alpha = 0f; MortalidadN.alpha = 0f; ConsumoB.alpha = 0f; ConsumoN.alpha = 0f; ConsumoA.alpha = 0f; ConsumoI.alpha = 0f; Eficiencia1.alpha = 0f; Eficiencia2.alpha = 0f; Eficiencia3.alpha = 0f; Eficiencia4.alpha = 0f; Eficiencia5.alpha = 0f; InventarioE.alpha = 0f; InventarioB.alpha = 0f; InventarioA.alpha = 0f; InventarioX.alpha = 0f; if (ConfortBD == "A") { ConfortA.alpha = 1f; } if (ConfortBD == "L") { ConfortL.alpha = 1f; } if (ConfortBD == "P") { ConfortP.alpha = 1f; } if (ConfortBD == "E") { ConfortE.alpha = 1f; } if (DensidadBD == "B") { DensidadB.alpha = 1f; } if (DensidadBD == "M") { DensidadM.alpha = 1f; } if (DensidadBD == "A") { DensidadA.alpha = 1f; } if (TemperaturaBD == "EF") { TemperaturaEF.alpha = 1f; } if (TemperaturaBD == "F") { TemperaturaF.alpha = 1f; } if (TemperaturaBD == "T") { TemperaturaT.alpha = 1f; } if (TemperaturaBD == "C") { TemperaturaC.alpha = 1f; } if (TemperaturaBD == "EC") { TemperaturaEC.alpha = 1f; } if (MortalidadBD == "A") { MortalidadA.alpha = 1f; } if (MortalidadBD == "N") { MortalidadN.alpha = 1f; } if (ConsumoBD == "B") { ConsumoB.alpha = 1f; } if (ConsumoBD == "N") { ConsumoN.alpha = 1f; } if (ConsumoBD == "A") { ConsumoA.alpha = 1f; } if (ConsumoBD == "I") { ConsumoI.alpha = 1f; } if (EficienciaBD == "1") { Eficiencia1.alpha = 1f; } if (EficienciaBD == "2") { Eficiencia2.alpha = 1f; } if (EficienciaBD == "3") { Eficiencia3.alpha = 1f; } if (EficienciaBD == "4") { Eficiencia4.alpha = 1f; } if (EficienciaBD == "5") { Eficiencia5.alpha = 1f; } if (InventarioBD == "E") { InventarioE.alpha = 1f; } if (InventarioBD == "B") { InventarioB.alpha = 1f; } if (InventarioBD == "A") { InventarioA.alpha = 1f; } if (InventarioBD == "X") { InventarioX.alpha = 1f; } } }
IEnumerator ActualizarTarjeta() { while (true) { WWW itemsTarjetaFullScreen = new WWW("https://commendable-rigs.000webhostapp.com/revisarPantallaActiva.php"); //WWW itemsTarjetaFullScreen = new WWW("http://localhost/indicadores/revisarPantallaActiva.php"); yield return(itemsTarjetaFullScreen); if (itemsTarjetaFullScreen.error == null) { itemsTarjetaFullScreenString = itemsTarjetaFullScreen.text; } int itemsTarjetaFullScreenInt = int.Parse(itemsTarjetaFullScreenString); if (itemsTarjetaFullScreenString == "-1") { SceneManager.LoadScene("GridBoardView"); } else { this.transform.Find("Titulo").GetComponent <Text>().text = "Tarjeta " + itemsTarjetaFullScreenInt; //Revisamos en la Base de Datos los valores de la tarjeta específica WWWForm form = new WWWForm(); form.AddField("tarjetaid", itemsTarjetaFullScreenInt); WWW itemsData = new WWW("https://commendable-rigs.000webhostapp.com/tarjetaconespecifica.php", form); //WWW itemsData = new WWW("http://localhost/indicadores/tarjetaconespecifica.php"); yield return(itemsData); if (itemsData.error == null) { string itemsDataString = itemsData.text; items = itemsDataString.Split(';'); ConfortBD = AuxFunctions.GetDataValue(items[itemsTarjetaFullScreenInt], "Confort:"); DensidadBD = AuxFunctions.GetDataValue(items[itemsTarjetaFullScreenInt], "Densidad:"); TemperaturaBD = AuxFunctions.GetDataValue(items[itemsTarjetaFullScreenInt], "Temperatura:"); MortalidadBD = AuxFunctions.GetDataValue(items[itemsTarjetaFullScreenInt], "Mortalidad:"); ConsumoBD = AuxFunctions.GetDataValue(items[itemsTarjetaFullScreenInt], "Consumo:"); EficienciaBD = AuxFunctions.GetDataValue(items[itemsTarjetaFullScreenInt], "Eficiencia:"); InventarioBD = AuxFunctions.GetDataValue(items[itemsTarjetaFullScreenInt], "Inventario:"); ConfortA = transform.Find("ConfortA").GetComponent <CanvasGroup>(); ConfortL = transform.Find("ConfortL").GetComponent <CanvasGroup>(); ConfortP = transform.Find("ConfortP").GetComponent <CanvasGroup>(); ConfortE = transform.Find("ConfortE").GetComponent <CanvasGroup>(); DensidadB = transform.Find("DensidadB").GetComponent <CanvasGroup>(); DensidadM = transform.Find("DensidadM").GetComponent <CanvasGroup>(); DensidadA = transform.Find("DensidadA").GetComponent <CanvasGroup>(); TemperaturaEF = transform.Find("TemperaturaEF").GetComponent <CanvasGroup>(); TemperaturaF = transform.Find("TemperaturaF").GetComponent <CanvasGroup>(); TemperaturaT = transform.Find("TemperaturaT").GetComponent <CanvasGroup>(); TemperaturaC = transform.Find("TemperaturaC").GetComponent <CanvasGroup>(); TemperaturaEC = transform.Find("TemperaturaEC").GetComponent <CanvasGroup>(); MortalidadA = transform.Find("MortalidadA").GetComponent <CanvasGroup>(); MortalidadN = transform.Find("MortalidadN").GetComponent <CanvasGroup>(); ConsumoB = transform.Find("ConsumoB").GetComponent <CanvasGroup>(); ConsumoN = transform.Find("ConsumoN").GetComponent <CanvasGroup>(); ConsumoA = transform.Find("ConsumoA").GetComponent <CanvasGroup>(); ConsumoI = transform.Find("ConsumoI").GetComponent <CanvasGroup>(); Eficiencia1 = transform.Find("Eficiencia1").GetComponent <CanvasGroup>(); Eficiencia2 = transform.Find("Eficiencia2").GetComponent <CanvasGroup>(); Eficiencia3 = transform.Find("Eficiencia3").GetComponent <CanvasGroup>(); Eficiencia4 = transform.Find("Eficiencia4").GetComponent <CanvasGroup>(); Eficiencia5 = transform.Find("Eficiencia5").GetComponent <CanvasGroup>(); InventarioE = transform.Find("InventarioE").GetComponent <CanvasGroup>(); InventarioB = transform.Find("InventarioB").GetComponent <CanvasGroup>(); InventarioA = transform.Find("InventarioA").GetComponent <CanvasGroup>(); InventarioX = transform.Find("InventarioX").GetComponent <CanvasGroup>(); ConfortA.alpha = 0f; ConfortL.alpha = 0f; ConfortP.alpha = 0f; ConfortE.alpha = 0f; DensidadB.alpha = 0f; DensidadM.alpha = 0f; DensidadA.alpha = 0f; TemperaturaEF.alpha = 0f; TemperaturaF.alpha = 0f; TemperaturaT.alpha = 0f; TemperaturaC.alpha = 0f; TemperaturaEC.alpha = 0f; MortalidadA.alpha = 0f; MortalidadN.alpha = 0f; ConsumoB.alpha = 0f; ConsumoN.alpha = 0f; ConsumoA.alpha = 0f; ConsumoI.alpha = 0f; Eficiencia1.alpha = 0f; Eficiencia2.alpha = 0f; Eficiencia3.alpha = 0f; Eficiencia4.alpha = 0f; Eficiencia5.alpha = 0f; InventarioE.alpha = 0f; InventarioB.alpha = 0f; InventarioA.alpha = 0f; InventarioX.alpha = 0f; if (ConfortBD == "A") { ConfortA.alpha = 1f; } if (ConfortBD == "L") { ConfortL.alpha = 1f; } if (ConfortBD == "P") { ConfortP.alpha = 1f; } if (ConfortBD == "E") { ConfortE.alpha = 1f; } if (DensidadBD == "B") { DensidadB.alpha = 1f; } if (DensidadBD == "M") { DensidadM.alpha = 1f; } if (DensidadBD == "A") { DensidadA.alpha = 1f; } if (TemperaturaBD == "EF") { TemperaturaEF.alpha = 1f; } if (TemperaturaBD == "F") { TemperaturaF.alpha = 1f; } if (TemperaturaBD == "T") { TemperaturaT.alpha = 1f; } if (TemperaturaBD == "C") { TemperaturaC.alpha = 1f; } if (TemperaturaBD == "EC") { TemperaturaEC.alpha = 1f; } if (MortalidadBD == "A") { MortalidadA.alpha = 1f; } if (MortalidadBD == "N") { MortalidadN.alpha = 1f; } if (ConsumoBD == "B") { ConsumoB.alpha = 1f; } if (ConsumoBD == "N") { ConsumoN.alpha = 1f; } if (ConsumoBD == "A") { ConsumoA.alpha = 1f; } if (ConsumoBD == "I") { ConsumoI.alpha = 1f; } if (EficienciaBD == "1") { Eficiencia1.alpha = 1f; } if (EficienciaBD == "2") { Eficiencia2.alpha = 1f; } if (EficienciaBD == "3") { Eficiencia3.alpha = 1f; } if (EficienciaBD == "4") { Eficiencia4.alpha = 1f; } if (EficienciaBD == "5") { Eficiencia5.alpha = 1f; } if (InventarioBD == "E") { InventarioE.alpha = 1f; } if (InventarioBD == "B") { InventarioB.alpha = 1f; } if (InventarioBD == "A") { InventarioA.alpha = 1f; } if (InventarioBD == "X") { InventarioX.alpha = 1f; } } } } }