public BiomassSensorInformationWindow(string title, bool canEditID, BiomassSensorInformation context)
 {
     InitializeComponent();
         this.Title = title;
         sensorIDbox.IsEnabled = canEditID;
         if (!canEditID)
             saveButton.IsEnabled = false;
         this.DataContext = context;
         if ((from rd in context.ResponseCurve where double.IsNaN(rd.OD) select rd).Count() == 0)
         {
             plotter.AddLineChart(context.ODDataSource).WithDescription("OD Curve").WithStroke(new SolidColorBrush(DesignColors.Blue)).WithStrokeThickness(2);
         }
         if ((from rd in context.ResponseCurve where double.IsNaN(rd.CDW) select rd).Count() == 0)
         {
             dependentPlotter.ConjunctionMode = ViewportConjunctionMode.XY;
             dependentPlotter.AddLineChart(context.CDWDataSource).WithDescription("CDW Curve").WithStroke(new SolidColorBrush(DesignColors.Yellow)).WithStrokeThickness(2);
         }
         context.LoadResponseCurve();
 }
Exemplo n.º 2
0
 private async void ShowResults(BiomassSensorInformation si)
 {
     BiomassSensorInformationWindow piw = new BiomassSensorInformationWindow("Save Sensor Calibration", true, si);
     piw.Show();
     await piw.WaitTask;
     if (piw.Confirmed)
     {
         System.Windows.Forms.FolderBrowserDialog fbd = new System.Windows.Forms.FolderBrowserDialog();
         fbd.ShowDialog();
         if (Directory.Exists(fbd.SelectedPath))
         {
             si.SaveTo(fbd.SelectedPath);
         }
     }
 }
Exemplo n.º 3
0
 private BiomassSensorInformation PrepareResults()
 {
     BiomassSensorInformation si = new BiomassSensorInformation();
     foreach (Subcalibration sub in Subcalibrations)
         if (!double.IsNaN(sub.ResponsePoint.Analog))
             si.ResponseCurve.Add(sub.ResponsePoint);
     return si;
 }