Beispiel #1
0
 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();
     }
 }
 private void BtnRecalculateResultsOnClick(object sender, EventArgs e)
 {
     var change = new WorkspaceChangeArgs(Workspace.Data, Workspace.SavedData);
     change.AddPeakPickingChange();
     UpdateWorkspaceVersion(change);
     Workspace.ResultCalculator.SetRequeryPending();
     RefreshStats();
 }
Beispiel #3
0
        protected override void Diff(WorkspaceChangeArgs workspaceChange, ImmutableSortedList <string, string> newValues, ImmutableSortedList <string, string> oldValues)
        {
            var differences = new HashSet <KeyValuePair <string, string> >(newValues);

            differences.SymmetricExceptWith(oldValues);
            var diffKeys = new HashSet <string>(differences.Select(pair => pair.Key));

            if (diffKeys.Contains(SettingEnum.mass_accuracy.ToString()))
            {
                workspaceChange.AddPeakPickingChange();
            }
            if (diffKeys.Contains(SettingEnum.max_isotope_retention_time_shift.ToString()))
            {
                workspaceChange.AddTurnoverChange();
            }
            if (diffKeys.Contains(SettingEnum.err_on_side_of_lower_abundance.ToString()))
            {
                workspaceChange.AddTurnoverChange();
            }
            if (diffKeys.Any())
            {
                workspaceChange.AddSettingChange();
            }
        }