/// <summary> /// /// </summary> /// <param name="task"></param> /// <param name="pr"></param> public void ProcessExecutedTask(Task task, ParseResult pr) { int instantFlux = Convert.ToInt32(pr.NameObjects.GetObject("IF")); // remain amount out int32 range // int remainAmount = 0; object remainAmountObject = pr.NameObjects.GetObject("RemainAmount"); Debug.Assert(remainAmountObject != null, "remianAmountObject == null"); try { remainAmount = Convert.ToInt32(remainAmountObject); } catch (Exception ) { } //int remainAmount = 0; int beforeWL = Convert.ToInt32(pr.NameObjects.GetObject("WL1")); int behindWL = Convert.ToInt32(pr.NameObjects.GetObject("WL2")); int height = Convert.ToInt32(pr.NameObjects.GetObject("Height")); XD202Data data = new XD202Data(instantFlux, remainAmount, height, beforeWL, behindWL); XD202Device d = task.Device as XD202Device; d.XD202Data = data; // TODO: // DB.MeasureSluiceData.Insert(d, data); }
/// <summary> /// /// </summary> /// <param name="data"></param> public void RefreshXD202Data(XD202Data data) { if (data != null) { this.txtDT.Text = data.DT.ToString(); this.txtBeforeWaterLevel.Text = data.BeforeWaterLevel.ToString(); this.txtBehindWaterLevel.Text = data.BehindWaterLevel.ToString(); this.txtHeight.Text = data.Height.ToString(); this.txtRemainAmount.Text = data.RemainAmount.ToString(); this.txtInstantFlux.Text = data.InstantFlux.ToString(); } else { ClearData(); } }
/// <summary> /// /// </summary> /// <param name="task"></param> /// <param name="pr"></param> public void ProcessExecutedTask(Task task, ParseResult pr) { int instantFlux = Convert.ToInt32(pr.NameObjects.GetObject("IF")); int remainAmount = Convert.ToInt32(pr.NameObjects.GetObject("RemainAmount")); int beforeWL = Convert.ToInt32(pr.NameObjects.GetObject ("WL1")); int behindWL = Convert.ToInt32(pr.NameObjects.GetObject("WL2")); int height = Convert.ToInt32(pr.NameObjects.GetObject("Height")); XD202Data data = new XD202Data(instantFlux, remainAmount, height, beforeWL, behindWL); XD202Device d = task.Device as XD202Device; d.XD202Data = data; // TODO: // DB.MeasureSluiceData.Insert(d, data); }
/// <summary> /// /// </summary> /// <param name="task"></param> /// <param name="pr"></param> public void ProcessExecutedTask(Task task, ParseResult pr) { int instantFlux = Convert.ToInt32(pr.NameObjects.GetObject("IF")); int remainAmount = Convert.ToInt32(pr.NameObjects.GetObject("RemainAmount")); int beforeWL = Convert.ToInt32(pr.NameObjects.GetObject("WL1")); int behindWL = Convert.ToInt32(pr.NameObjects.GetObject("WL2")); int height = Convert.ToInt32(pr.NameObjects.GetObject("Height")); XD202Data data = new XD202Data(instantFlux, remainAmount, height, beforeWL, behindWL); XD202Device d = task.Device as XD202Device; d.XD202Data = data; // TODO: // DB.MeasureSluiceData.Insert(d, data); }