void LoadChart(string mac) { Class.NW_SignalLog cls = new Class.NW_SignalLog(); cls.MacAddress = mac; dt = cls.NW_SignalLog_GetByMac(); Series Dssnr = new Series("DSSNR \r\n " + mac, ViewType.Line); Series UsTx = new Series("USTX \r\n " + mac, ViewType.Line); Series DsRx = new Series("DSRX \r\n " + mac, ViewType.Line); Series UsSnr = new Series("USSNR \r\n " + mac, ViewType.StepArea); Series UsNoise = new Series("", ViewType.StepArea); // Series Remote = new Series("Remote \r\n " + mac, ViewType.Line); for (int i = 0; i < dt.Rows.Count; i++) { if (dt.Rows[i]["Status"].ToString() == "online") { Dssnr.Points.Add(new SeriesPoint(((DateTime)dt.Rows[i]["DateTime"]).ToString("dd/MM/yy H"), dt.Rows[i]["value1"].ToString())); UsTx.Points.Add(new SeriesPoint(((DateTime)dt.Rows[i]["DateTime"]).ToString("dd/MM/yy H"), dt.Rows[i]["value2"].ToString())); DsRx.Points.Add(new SeriesPoint(((DateTime)dt.Rows[i]["DateTime"]).ToString("dd/MM/yy H"), dt.Rows[i]["value3"].ToString())); } else { Dssnr.Points.Add(new SeriesPoint(((DateTime)dt.Rows[i]["DateTime"]).ToString("dd/MM/yy H"), "0")); UsTx.Points.Add(new SeriesPoint(((DateTime)dt.Rows[i]["DateTime"]).ToString("dd/MM/yy H"), "0")); DsRx.Points.Add(new SeriesPoint(((DateTime)dt.Rows[i]["DateTime"]).ToString("dd/MM/yy H"), "0")); } if (dt.Rows[i]["value4"].ToString() != "") { UsSnr.Points.Add(new SeriesPoint(((DateTime)dt.Rows[i]["DateTime"]).ToString("dd/MM/yy H"), dt.Rows[i]["value4"].ToString())); if (int.Parse(dt.Rows[i]["value4"].ToString()) < 210) { UsNoise.Points.Add(new SeriesPoint(((DateTime)dt.Rows[i]["DateTime"]).ToString("dd/MM/yy H"), dt.Rows[i]["value4"].ToString())); } else { UsNoise.Points.Add(new SeriesPoint(((DateTime)dt.Rows[i]["DateTime"]).ToString("dd/MM/yy H"), "0")); } } else { UsSnr.Points.Add(new SeriesPoint(((DateTime)dt.Rows[i]["DateTime"]).ToString("dd/MM/yy H"), "0")); UsNoise.Points.Add(new SeriesPoint(((DateTime)dt.Rows[i]["DateTime"]).ToString("dd/MM/yy H"), "0")); } } // chartDSSNR.Series.AddRange(new Series[] { Dssnr }); // chartUSTx.Series.AddRange(new Series[] { UsTx }); // chartDSRx.Series.AddRange(new Series[] { DsRx }); chartUSSnr.Series.AddRange(new Series[] { UsSnr, UsNoise }); chartRemote.Series.AddRange(new Series[] { UsTx, Dssnr, DsRx }); }
void LoadChart(string mac) { Class.NW_SignalLog cls = new Class.NW_SignalLog(); cls.MacAddress = mac; dt = cls.NW_SignalLog_GetByMac(); Series Dssnr = new Series("DSSNR \r\n "+mac, ViewType.Line); Series UsTx = new Series("USTX \r\n " + mac, ViewType.Line); Series DsRx = new Series("DSRX \r\n " + mac, ViewType.Line); Series UsSnr = new Series("USSNR \r\n " + mac, ViewType.StepArea); Series UsNoise = new Series("", ViewType.StepArea); // Series Remote = new Series("Remote \r\n " + mac, ViewType.Line); for (int i = 0; i < dt.Rows.Count; i++) { if (dt.Rows[i]["Status"].ToString() == "online") { Dssnr.Points.Add(new SeriesPoint(((DateTime)dt.Rows[i]["DateTime"]).ToString("dd/MM/yy H"), dt.Rows[i]["value1"].ToString())); UsTx.Points.Add(new SeriesPoint(((DateTime)dt.Rows[i]["DateTime"]).ToString("dd/MM/yy H"), dt.Rows[i]["value2"].ToString())); DsRx.Points.Add(new SeriesPoint(((DateTime)dt.Rows[i]["DateTime"]).ToString("dd/MM/yy H"), dt.Rows[i]["value3"].ToString())); } else { Dssnr.Points.Add(new SeriesPoint(((DateTime)dt.Rows[i]["DateTime"]).ToString("dd/MM/yy H"), "0")); UsTx.Points.Add(new SeriesPoint(((DateTime)dt.Rows[i]["DateTime"]).ToString("dd/MM/yy H"), "0")); DsRx.Points.Add(new SeriesPoint(((DateTime)dt.Rows[i]["DateTime"]).ToString("dd/MM/yy H"), "0")); } if (dt.Rows[i]["value4"].ToString() != "") { UsSnr.Points.Add(new SeriesPoint(((DateTime)dt.Rows[i]["DateTime"]).ToString("dd/MM/yy H"), dt.Rows[i]["value4"].ToString())); if (int.Parse(dt.Rows[i]["value4"].ToString()) < 210) { UsNoise.Points.Add(new SeriesPoint(((DateTime)dt.Rows[i]["DateTime"]).ToString("dd/MM/yy H"), dt.Rows[i]["value4"].ToString())); } else { UsNoise.Points.Add(new SeriesPoint(((DateTime)dt.Rows[i]["DateTime"]).ToString("dd/MM/yy H"), "0")); } } else { UsSnr.Points.Add(new SeriesPoint(((DateTime)dt.Rows[i]["DateTime"]).ToString("dd/MM/yy H"), "0")); UsNoise.Points.Add(new SeriesPoint(((DateTime)dt.Rows[i]["DateTime"]).ToString("dd/MM/yy H"), "0")); } } // chartDSSNR.Series.AddRange(new Series[] { Dssnr }); // chartUSTx.Series.AddRange(new Series[] { UsTx }); // chartDSRx.Series.AddRange(new Series[] { DsRx }); chartUSSnr.Series.AddRange(new Series[] { UsSnr,UsNoise }); chartRemote.Series.AddRange(new Series[] { UsTx, Dssnr , DsRx }); }
void LoadList(string mac) { Class.NW_SignalLog cls = new Class.NW_SignalLog(); cls.MacAddress = mac; gridItem.DataSource = cls.NW_SignalLog_GetByMac(); }
void LoadList(string mac) { Class.NW_SignalLog cls = new Class.NW_SignalLog(); cls.MacAddress = mac; gridItem.DataSource = cls.NW_SignalLog_GetByMac(); }