private void Retry(ChromatogramLoadingStatus status) { ChromatogramManager.RemoveFile(status.FilePath); if (!_partialProgressList.Contains(status.FilePath)) { _partialProgressList.Add(status.FilePath); } graphChromatograms.ClearGraph(status.FilePath); for (int i = 0; i < flowFileStatus.Controls.Count; i++) { var control = (FileProgressControl)flowFileStatus.Controls[i]; if (control.FilePath.Equals(status.FilePath)) { control.Reset(); Selected = i; break; } } // Add this file back into the chromatogram set for each of its replicates. ModifyDocument(Resources.AllChromatogramsGraph_Retry_Retry_import_results, monitor => { Program.MainWindow.ModifyDocumentNoUndo(doc => { var oldResults = doc.Settings.MeasuredResults ?? new MeasuredResults(new ChromatogramSet[0]); var newResults = oldResults.AddDataFile(status.FilePath, status.ReplicateNames); return(doc.ChangeMeasuredResults(newResults, monitor)); }); }); }
public ResultsMemoryDocumentContainer(SrmDocument docInitial, string pathInitial, bool wait) { SetDocument(docInitial, null, wait); // Chromatogram loader needs file path to know how to place the .skyd file DocumentFilePath = pathInitial; ChromatogramManager = new ChromatogramManager(false); ChromatogramManager.Register(this); Register(ChromatogramManager); LibraryManager = new LibraryManager(); LibraryManager.Register(this); Register(LibraryManager); RetentionTimeManager = new RetentionTimeManager(); RetentionTimeManager.Register(this); Register(RetentionTimeManager); IonMobilityManager = new IonMobilityLibraryManager(); IonMobilityManager.Register(this); Register(IonMobilityManager); IrtDbManager = new IrtDbManager(); IrtDbManager.Register(this); Register(IrtDbManager); }
public override void ResetProgress() { base.ResetProgress(); ChromatogramManager.ResetProgress(Document); LibraryManager.ResetProgress(Document); RetentionTimeManager.ResetProgress(Document); IonMobilityManager.ResetProgress(Document); IrtDbManager.ResetProgress(Document); }
public virtual void Dispose() { ChromatogramManager.Dispose(); // Release current document to ensure the streams are closed on it SetDocument(new SrmDocument(SrmSettingsList.GetDefault()), Document); foreach (var loader in BackgroundLoaders) { loader.ClearCache(); } }
private void ElapsedTimer_Tick(object sender, EventArgs e) { // Update timer and overall progress bar. // ReSharper disable LocalizableElement lblDuration.Text = _stopwatch.Elapsed.ToString(@"hh\:mm\:ss"); // ReSharper restore LocalizableElement // Determine if we should automatically retry any failed file. if (_retryTime <= DateTime.Now) { _retryTime = DateTime.MaxValue; _retryDlg = new ImportResultsRetryCountdownDlg(RETRY_COUNTDOWN, () => { for (int i = 0; i < flowFileStatus.Controls.Count; i++) { var control = (FileProgressControl)flowFileStatus.Controls[_nextRetry]; if (++_nextRetry == flowFileStatus.Controls.Count) { _nextRetry = 0; } if (control.Error != null) { ChromatogramManager.RemoveFile(control.FilePath); Retry(control.Status); break; } } _retryDlg.Dispose(); }, () => { _stopwatch.Stop(); elapsedTimer.Stop(); _retryDlg.Dispose(); }); _retryDlg.ShowDialog(this); } }
public MultiFileLoadMonitor(ChromatogramManager manager, IDocumentContainer container, object tag) : base(manager, container, tag) { _chromatogramManager = manager; }