예제 #1
0
 private void LoadMeasurementList()
 {
     MeasurementView.Items.Clear();
     results = new ResultsRecs();
     recs    = results.GetMap();
     foreach (var key in recs.Keys)
     {
         List <INCCResults.results_rec> list = new List <INCCResults.results_rec>();
         if (recs.TryGetValue(key, out list))
         {
             foreach (INCCResults.results_rec rr in list)
             {
                 ListViewItem lvi = new ListViewItem(new string[6] {
                     rr.acq.detector_id.ToString(), rr.meas_option.PrintName(), rr.acq.item_id.ToString(),
                     rr.acq.stratum_id.ToString() == String.Empty ? "Default" : rr.acq.stratum_id.ToString(), rr.acq.MeasDateTime.ToString("yyyy/MM/dd"), rr.acq.MeasDateTime.ToString("HH:mm:ss")
                 });
                 lvi.Name = rr.acq.MeasDateTime.ToString();
                 MeasurementView.Items.Add(lvi);
             }
         }
     }
     this.Refresh();
     if (MeasurementView.Items.Count <= 0)
     {
         MessageBox.Show("There are no measurements in the database.", "WARNING");
     }
 }
예제 #2
0
 private void LoadMeasurementList()
 {
     MeasurementView.Items.Clear();
     results = new ResultsRecs();
     recs = results.GetMap();
     foreach (var key in recs.Keys)
     {
         List<INCCResults.results_rec> list = new List<INCCResults.results_rec>();
         if (recs.TryGetValue(key, out list))
             foreach (INCCResults.results_rec rr in list)
             {
                 ListViewItem lvi = new ListViewItem(new string[6] { rr.acq.detector_id.ToString(), rr.meas_option.PrintName(), rr.acq.item_id.ToString(),
                     rr.acq.stratum_id.ToString() == String.Empty ? "Default" : rr.acq.stratum_id.ToString(), rr.acq.MeasDateTime.ToString("yyyy/MM/dd"), rr.acq.MeasDateTime.ToString("HH:mm:ss") });
                 lvi.Name = rr.acq.MeasDateTime.ToString();
                 MeasurementView.Items.Add(lvi);
             }
     }
     this.Refresh();
     if (MeasurementView.Items.Count <= 0)
         MessageBox.Show("There are no measurements in the database.", "WARNING");
 }