public void initAllDayForRead(AllDay allDayOrigin) { allMass = 0; //Всего с.в. из загруженных тонн за день и по сменам dayMassSV = allDayOrigin.getDayMassSV(); nightMassSV = allDayOrigin.getNightMassSV(); allMassSV = allDayOrigin.getAllMassSV(); //Всего воды из за груженных тонн за день и по сменам dayMassWater = allDayOrigin.getDayMassWater(); nightMassWater = allDayOrigin.getNightMassWater(); allMassWater = allDayOrigin.getAllMassWater(); serovodorodDay = allDayOrigin.getSerovodorotDay(); serovodorotNight = allDayOrigin.getSerovodorotNight(); dateTime = allDayOrigin.getDateTime(); //relation - отношение,рассчёт отношения массы с.в. и воды relationDaySV = allDayOrigin.getRelationDaySV(); relationNightSV = allDayOrigin.getRelationNightSV(); relationAllSV = allDayOrigin.getRelationAllSV(); //Метан за сутки //allDayMetan = allDayOrigin.Meta; GPAvalue = allDayOrigin.getGPA(); foreach (ProductComputationyInDay prodRead in allDayOrigin.getProductCompInDaysByVisable()) { productCompForReads.AddLast(new ProductCompForRead(prodRead)); } }
public WWWForm parseAllDay(AllDay allDay) { var data = new WWWForm(); LinkedList <ProductComputationyInDay> tempProdComps = allDay.getProductCompInDays(); AllDayDTO allDayDTO = new AllDayDTO(allDay); int count = 1; data.AddField("AllDay", JsonUtility.ToJson(allDayDTO).ToString()); ProductCompDTO productCompDTO = null; foreach (ProductComputationyInDay prodComp in tempProdComps) { productCompDTO = new ProductCompDTO(prodComp); data.AddField("ProductComp_" + count, JsonUtility.ToJson(productCompDTO).ToString()); count++; } //data.add /* * foreach (Product prod in products) * { * tempProdDto = new ProductDTO(prod.uniqueProduct_id, prod.name, prod.coffSV, prod.coffWater, prod.coffMetana, prod.valueGas); * data.AddField("Product_" + count, JsonUtility.ToJson(tempProdDto).ToString()); * count++; * } */ return(data); }
private void Awake() { //allDay_Now.setProducts(contProd.getProducts()); //инит. комп. dropDown_nameProduct = dropDown_nameProduct.GetComponent <Dropdown>(); allDay_Now = allDay_NowGO.GetComponent <AllDay>(); //Установление связей с конт. прод. contLogic = new ContainerLogic(containerProductGO); //contLogic.setContainerProduct(containerProductGO); // contLogic. //получение базовых продуктов для формирование расчётных продукьтов // //allDay_Now.setProductsOnStartProject(contLogic.getProducts()); allDay_Now.initNewAllDay(contLogic.getProducts(), DateTime.Now.AddDays(-1), coefForGPA); //формирование выводов параметров в окне оператора.Переделать или сделать кастыль Debug.Log("Check - " + GetComponentsInChildren <FieldMassScript>().ToString()); // Invoke("initTextListForDay",1f); initTextListForDay(contentDay); initTextListForNight(contentNight); //itemsContentDay = get }
public void SaveAllDayRead_inFile(AllDay allDay, string date, bool defaultOrNot) { if (defaultOrNot) { SaveAllDayRead_inFile(allDay, date, pathAllDayReadDefault + "(" + date + ").json"); } else { SaveAllDayRead_inFile(allDay, date, pathAllDayRead); } }
public AllDayDTO(AllDay allDay) { this.allMass = allDay.getAllMass() + ""; this.dayMassSV = allDay.getDayMassSV() + ""; this.nightMassSV = allDay.getNightMassSV() + ""; this.allMassSV = allDay.getAllMassSV() + ""; this.dayMassWater = allDay.getDayMassWater() + ""; this.nightMassWater = allDay.getNightMassWater() + ""; this.allMassWater = allDay.getAllMassWater() + ""; this.relationDaySV = allDay.getRelationDaySV() + ""; this.relationNightSV = allDay.getRelationNightSV() + ""; this.relationAllSV = allDay.getRelationAllSV() + ""; this.serovodorodDay = allDay.getSerovodorotDay() + ""; this.serovodorodNight = allDay.getSerovodorotNight() + ""; this.GPA = allDay.getGPA() + ""; this.date = allDay.getDateTime().ToString("yyyy.MM.dd"); }
public void SaveAllDayRead_inFile(AllDay allDay, string date, string pathAllDayRead) { string tempPath = Path.Combine(Application.dataPath, pathAllDayRead); Debug.Log(tempPath); if (!File.Exists(tempPath)) { // return false; Debug.Log("Shit!!!!!!"); //Validate } AllDayDTO allDayDTO = new AllDayDTO(allDay); string[] contentForFile = { JsonUtility.ToJson(allDayDTO) }; File.WriteAllLines(tempPath, contentForFile); // return true; }
public AllDayDtoRead(AllDay allDay_Now) { this.allMass = allDay_Now.getAllMass(); this.dayMassSV = allDay_Now.getDayMassSV(); this.nightMassSV = allDay_Now.getNightMassSV(); this.allMassSV = allDay_Now.getAllMassSV(); this.dayMassWater = allDay_Now.getDayMassWater(); this.nightMassWater = allDay_Now.getNightMassWater(); this.allMassWater = allDay_Now.getAllMassWater(); this.relationDaySV = allDay_Now.getRelationDaySV(); this.relationNightSV = allDay_Now.getRelationNightSV(); this.relationAllSV = allDay_Now.getRelationAllSV(); this.allDayMetan = 0; this.GPAvalue = allDay_Now.getGPA(); serovodorodDay = allDay_Now.getSerovodorotDay(); serovodorotNight = allDay_Now.getSerovodorotNight(); this.coefForGPA = 0; this.date = allDay_Now.getDateTime().ToString("yyyy.MM.dd"); }
public static IObservable<task> SetDeadline(string id_task, DateTime deadline, AllDay all_day) { return client.get<task>("tasks/set_deadline", new p() { { "id_task", id_task }, { "deadline", deadline.ToString() }, { "all_day", ((int)all_day).ToString() } }); }