示例#1
0
 public points[] GetPeakPoints()
 {
     if (label3.Text == "Peak" || label3.Text == "Two Peaks")
     {
         points[] peakPoints = new points[peaksData.Count()];
         if (YaxiscomboBox.Text.Contains("#"))
         {
             int i = 0;
             foreach (var item in peaksData)
             {
                 peakPoints[i].x = item.value;
                 peakPoints[i].y = item.times;
                 i++;
             }
         }
         else
         {
             int i = 0;
             foreach (var item in peaksData)
             {
                 peakPoints[i].x = item.x;
                 peakPoints[i].y = item.y;
                 i++;
             }
         }
         return(peakPoints);
     }
     return(null);
 }
示例#2
0
 public points[] GetPoints()
 {
     if (label3.Text == "Polynomial Fit" || label3.Text == "Peak" || label3.Text == "Two Peaks" || label3.Text == "Normal Distribution Fit")
     {
         if (YaxiscomboBox.Text.Contains("#"))
         {
             points[] dataPoints = new points[dataDict.Count()];
             int      i          = 0;
             foreach (var item in dataDict)
             {
                 dataPoints[i].x = item.Key;
                 dataPoints[i].y = item.Value;
                 i++;
             }
             return(dataPoints);
         }
         else
         {
             return(dataPoints);
         }
     }
     else if (label3.Text == "Logistic Regression")
     {
         points[] dataPoints = new points[dataDict.Count()];
         int      i          = 0;
         foreach (var item in dataDict)
         {
             dataPoints[i].x = item.Key;
             dataPoints[i].y = item.Value;
             i++;
         }
         return(dataPoints);
     }
     return(null);
 }