bool PrepList(AssaySelector.MeasurementOption filter, Detector det) { if (Goal == EndGoal.Report) { if (LMOnly) // LMOnly mlist.RemoveAll(EmptyCSVFile); // cull those without LM CSV results else mlist.RemoveAll(EmptyINCC5File); // cull those with traditional INCC5 results } ctrllog = N.App.Loggers.Logger(LMLoggers.AppSection.Control); if (mlist.Count == 0) { string msg = string.Format("No {0}measurements for {1} found.", TypeTextFragment(filter), det == null ? "any" : det.Id.DetectorId); MessageBox.Show(msg, "WARNING"); return false; } LoadList(filter); if (Goal == EndGoal.Report || Goal == EndGoal.Reanalysis || Goal == EndGoal.Transfer) // it is for a named detector so elide the detector column listView1.Columns[1].Width = 0; if (!AllMeas) listView1.Columns[0].Width = 0; if (filter == AssaySelector.MeasurementOption.rates) // show item id listView1.Columns[2].Width = 0; if (filter == AssaySelector.MeasurementOption.normalization) { listView1.Columns[2].Width = 0; listView1.Columns[3].Width = 0; } if (filter == AssaySelector.MeasurementOption.background) // NEXT: add configuration active or passive column { listView1.Columns[2].Width = 0; listView1.Columns[3].Width = 0; } if (!AssaySelector.ForMass(filter) && !filter.IsWildCard()) listView1.Columns[7].Width = 0; // material column if (Goal == EndGoal.Reanalysis) { listView1.Columns[0].Text = "Id"; listView1.Columns[0].Width = 43; } return true; }
public void Init(List<INCCDB.IndexedResults> ilist, AssaySelector.MeasurementOption filter, EndGoal goal, bool lmonly, string inspnum = "", Detector detector = null) { LMOnly = lmonly; bool alltypes = filter.IsWildCard() && !lmonly; System.Windows.Input.Mouse.OverrideCursor = System.Windows.Input.Cursors.Wait; try { PrepNotepad(); SetTitlesAndChoices(filter, alltypes, goal, detector == null ? string.Empty : detector.Id.DetectorId, string.Empty); mlist = N.App.DB.MeasurementsFor(ilist, LMOnly, skipMethods: false); bGood = PrepList(filter, detector); } finally { System.Windows.Input.Mouse.OverrideCursor = null; } }