/// <summary> /// /// </summary> /// <returns></returns> private LineHelper[] GetLineHelpers(DataTable tbl) { LineHelper emLine = new LineHelper(strings.IR, Color.Red, 1, SymbolType.None ); LineHelper[] lines = new LineHelper[] { emLine }; foreach (DataRow row in tbl.Rows) { DateTime dt = Convert.ToDateTime(row["dt"]); XDate xdt = XDate.DateTimeToXLDate(dt); float ir = Convert.ToSingle(row["IR"]); emLine.PointList.Add(xdt, ir); } return lines; }
/// <summary> /// /// </summary> /// <returns></returns> private LineHelper[] GetLineHelpers(DataTable tbl) { LineHelper emLine = new LineHelper(strings.Energy, Color.Red, 1, SymbolType.None ); LineHelper[] lines = new LineHelper[] { emLine }; foreach (DataRow row in tbl.Rows) { DateTime dt = Convert.ToDateTime(row["dt"]); XDate xdt = XDate.DateTimeToXLDate(dt); int energy = Convert.ToInt32 ( row["ElectricValue"]); emLine.PointList.Add(xdt, energy); } return lines; }
/// <summary> /// /// </summary> /// <param name="dateTime"></param> /// <param name="dateTime_2"></param> /// <param name="p"></param> /// <returns></returns> //private LineHelper[] GetLineHelpers(DateTime b, DateTime e, string st) private LineHelper[] GetLineHelpers(DataTable tbl) { LineHelper gt1Line = new LineHelper(strings.GT1, ColorHelper.GetLineColor(strings.GT1), ZedConfigValues.Default.GT1Config.Width, SymbolType.None); LineHelper bt1Line = new LineHelper(strings.BT1, ColorHelper.GetLineColor(strings.BT1), ZedConfigValues.Default.BT1Config.Width, SymbolType.None); LineHelper[] lines = new LineHelper[] { gt1Line, bt1Line }; foreach (DataRow row in tbl.Rows) { DateTime dt = Convert.ToDateTime(row["dt"]); XDate xdt = XDate.DateTimeToXLDate(dt); float gt1 = (float)Math.Round(Convert.ToSingle(row["ai1"]), 2); float bt1 = (float)Math.Round(Convert.ToSingle(row["ai2"]), 2); gt1Line.PointList.Add(xdt, gt1); bt1Line.PointList.Add(xdt, bt1); } return lines; }
/// <summary> /// /// </summary> /// <param name="dateTime"></param> /// <param name="dateTime_2"></param> /// <param name="p"></param> /// <returns></returns> //private LineHelper[] GetLineHelpers(DateTime b, DateTime e, string st) private LineHelper[] GetLineHelpers(DataTable tbl) { LineHelper gp1Line = new LineHelper(strings.GP1, ColorHelper.GetLineColor(strings.GP1), ZedConfigValues.Default.GP1Config.Width, SymbolType.None); LineHelper bp1Line = new LineHelper(strings.BP1, ColorHelper.GetLineColor(strings.BP1), ZedConfigValues.Default.BP1Config.Width, SymbolType.None); LineHelper gp2Line = new LineHelper(strings.GP2, ColorHelper.GetLineColor(strings.GP2), ZedConfigValues.Default.GP2Config.Width, SymbolType.None); LineHelper bp2Line = new LineHelper(strings.BP2, ColorHelper.GetLineColor(strings.BP2), ZedConfigValues.Default.BP2Config.Width, SymbolType.None); LineHelper[] lines = new LineHelper[] { gp1Line, bp1Line, gp2Line, bp2Line }; //tbl.Compute( foreach (DataRow row in tbl.Rows) { DateTime dt = Convert.ToDateTime(row["dt"]); XDate xdt = XDate.DateTimeToXLDate(dt); float gp1 = (float)Math.Round(Convert.ToSingle(row["gp1"]), 2); float bp1 = (float)Math.Round(Convert.ToSingle(row["bp1"]), 2); float gp2 = (float)Math.Round(Convert.ToSingle(row["gp2"]), 2); float bp2 = (float)Math.Round(Convert.ToSingle(row["bp2"]), 2); //pts.Add(xdt, gt1); gp1Line.PointList.Add(xdt, gp1); bp1Line.PointList.Add(xdt, bp1); gp2Line.PointList.Add(xdt, gp2); bp2Line.PointList.Add(xdt, bp2); } return lines; }
/// <summary> /// /// </summary> /// <param name="dateTime"></param> /// <param name="dateTime_2"></param> /// <param name="p"></param> /// <returns></returns> //private LineHelper[] GetLineHelpers(DateTime b, DateTime e, string st) private LineHelper[] GetLineHelpers(DataTable tbl, DataTable otTable) { // TODO: 2010-09-25 add OT line // LineHelper gt1Line = new LineHelper(strings.GT1, ColorHelper.GetLineColor(strings.GT1), ZedConfigValues.Default.GT1Config.Width, SymbolType.None); LineHelper bt1Line = new LineHelper(strings.BT1, ColorHelper.GetLineColor(strings.BT1), ZedConfigValues.Default.BT1Config.Width, SymbolType.None); LineHelper gt2Line = new LineHelper(strings.GT2, ColorHelper.GetLineColor(strings.GT2), ZedConfigValues.Default.GT2Config.Width, SymbolType.None); LineHelper bt2Line = new LineHelper(strings.BT2, ColorHelper.GetLineColor(strings.BT2), ZedConfigValues.Default.BT2Config.Width, SymbolType.None); LineHelper otLine = new LineHelper(strings.OT, ColorHelper.GetLineColor(strings.OT), 1, SymbolType.None); //LineHelper i1Line = new LineHelper(strings.I1, ColorHelper.GetLineColor(strings.I1), // 1, SymbolType.None); //i1Line.IsY2Axis = true; //LineHelper h1Line = new LineHelper(strings.H1, ColorHelper.GetLineColor(strings.H1), // 1, SymbolType.None); //h1Line.IsY2Axis = true; LineHelper[] lines = new LineHelper[] { gt1Line, bt1Line, gt2Line, bt2Line, otLine }; foreach (DataRow row in tbl.Rows) { DateTime dt = Convert.ToDateTime(row["dt"]); XDate xdt = XDate.DateTimeToXLDate(dt); float gt1 = (float)Math.Round(Convert.ToSingle(row["gt1"]), 2); float bt1 = (float)Math.Round(Convert.ToSingle(row["bt1"]), 2); float gt2 = (float)Math.Round(Convert.ToSingle(row["gt2"]), 2); float bt2 = (float)Math.Round(Convert.ToSingle(row["bt2"]), 2); //float i1 = (float)Math.Round(Convert.ToSingle (row["i1"]),2); //float h1 = (float)Math.Round(i1 * (gt1 - bt1) * 4.1868 / 1000, 2); //pts.Add(xdt, gt1); gt1Line.PointList.Add(xdt, gt1); bt1Line.PointList.Add(xdt, bt1); gt2Line.PointList.Add(xdt, gt2); bt2Line.PointList.Add(xdt, bt2); //i1Line.PointList.Add(xdt, i1); //h1Line.PointList.Add(xdt, h1); } foreach (DataRow otRow in otTable.Rows) { DateTime dt = Convert.ToDateTime(otRow ["dt"]); XDate xdt = XDate.DateTimeToXLDate(dt); float ot = (float)Math.Round(Convert.ToSingle(otRow["ot"]), 2); otLine.PointList.Add(xdt, ot); } return lines; }