protected override void Diff(WorkspaceChangeArgs workspaceChange, ImmutableSortedList <string, TracerDefData> newValues, ImmutableSortedList <string, TracerDefData> oldValues) { if (!Equals(newValues.Keys, oldValues.Keys)) { workspaceChange.AddChromatogramMassChange(); return; } for (int i = 0; i < newValues.Count; i++) { var newValue = newValues.Values[i]; var oldValue = oldValues.Values[i]; if (!newValue.EqualMasses(oldValue)) { workspaceChange.AddChromatogramMassChange(); } if (!newValue.EqualPeakPicking(oldValue)) { workspaceChange.AddPeakPickingChange(); } } if (!Equals(newValues, oldValues)) { workspaceChange.AddSettingChange(); } }
protected override void Diff(WorkspaceChangeArgs workspaceChange, ImmutableSortedList <string, double> newValues, ImmutableSortedList <string, double> oldValues) { if (!Equals(newValues, oldValues)) { workspaceChange.AddChromatogramMassChange(); } }
private void BtnRegenerateChromatogramsOnClick(object sender, EventArgs e) { if (MessageBox.Show(this, "Are you sure you want to delete all of the chromatograms in this workspace? Regenerating chromatograms can take a really long time.", Program.AppName, MessageBoxButtons.OKCancel) != DialogResult.OK) { return; } var change = new WorkspaceChangeArgs(Workspace.Data, Workspace.SavedData); change.AddChromatogramMassChange(); UpdateWorkspaceVersion(change); Workspace.ChromatogramGenerator.SetRequeryPending(); RefreshStats(); }