Exemplo n.º 1
0
 public void LoadData(ArrayList xlist,ArrayList ylist, AnalysisType type)
 {
     xList = xlist;
     yList = ylist;
     if (type == AnalysisType.DIA_SYS_TYPE)
     {
         xLabel = "DIA";
         yLabel = "SYS";
         xUnit = "mmHg";
         yUnit = "mmHg";
     }
     if (type == AnalysisType.PULSE_SYS_TYPE)
     {
         xLabel = "Pulse";
         yLabel = "SYS";
         xUnit = "BPM";
         yUnit = "mmHg";
     }
     if (type == AnalysisType.PULSE_DIA_TYPE)
     {
         xLabel = "Pulse";
         yLabel = "DIA";
         xUnit = "BPM";
         yUnit = "mmHg";
     }
     if (type == AnalysisType.PULSE_MAP_TYPE)
     {
         xLabel = "Pulse";
         yLabel = "MAP";
         xUnit = "BPM";
         yUnit = "mmHg";
     }
     cart = new Statistics(xList, yList);
     InitDataToChart();
 }
Exemplo n.º 2
0
 public void LoadData()
 {
     xLabel = "DIA";
     yLabel = "SYS";
     xUnit = "mmHg";
     yUnit = "mmHg";
     xList = new ArrayList();
     yList = new ArrayList();
     Random random = new Random();
     for (float i = -11; i <= 14; i += 0.3f)
     {
         float dia = random.Next(40, 100);
         float sys = random.Next(30, 50) + dia;
         yList.Add(sys);
         xList.Add(dia);
     }
     cart = new Statistics(xList, yList);
     InitDataToChart();
 }
Exemplo n.º 3
0
 public void LoadData(DataTable dt, AnalysisType type)
 {
     xList = new ArrayList();
     yList = new ArrayList();
     if (type == AnalysisType.DIA_SYS_TYPE)
     {
         xLabel = "DIA";
         yLabel = "SYS";
         xUnit = "mmHg";
         yUnit = "mmHg";
         foreach (DataRow row in dt.Rows)
         {
             xList.Add(Convert.ToDouble(row["DIA"].ToString()));
             yList.Add(Convert.ToDouble(row["SYS"].ToString()));
         }
     }
     if (type == AnalysisType.PULSE_SYS_TYPE)
     {
         xLabel = "Pulse";
         yLabel = "SYS";
         xUnit = "BPM";
         yUnit = "mmHg";
         foreach (DataRow row in dt.Rows)
         {
             xList.Add(Convert.ToDouble(row["HeartRate"].ToString()));
             yList.Add(Convert.ToDouble(row["SYS"].ToString()));
         }
     }
     if (type == AnalysisType.PULSE_DIA_TYPE)
     {
         xLabel = "Pulse";
         yLabel = "DIA";
         xUnit = "BPM";
         yUnit = "mmHg";
         foreach (DataRow row in dt.Rows)
         {
             xList.Add(Convert.ToDouble(row["HeartRate"].ToString()));
             yList.Add(Convert.ToDouble(row["DIA"].ToString()));
         }
     }
     if (type == AnalysisType.PULSE_MAP_TYPE)
     {
         xLabel = "Pulse";
         yLabel = "MAP";
         xUnit = "BPM";
         yUnit = "mmHg";
         foreach (DataRow row in dt.Rows)
         {
             xList.Add(Convert.ToDouble(row["HeartRate"].ToString()));
             yList.Add(Convert.ToDouble(row["MAP"].ToString()));
         }
     }
     cart = new Statistics(xList, yList);
     InitDataToChart();
 }