Ejemplo n.º 1
0
 protected virtual void ONEAcceptibilityChanged(PeakAcceptabilityChangedEventArgs e)
 {
     if (PeakAcceptabilityChanged != null)
     {
         Relation_PeakAcceptabilityChanged(this, e);
     }
 }
Ejemplo n.º 2
0
        public void peak_acceptability_change(DataGridView dgv)
        {
            if (dgv.IsCurrentCellDirty)
            {
                dgv.CommitEdit(DataGridViewDataErrorContexts.Commit);

                int columnIndex = dgv.CurrentCell.ColumnIndex;
                int rowIndex    = dgv.CurrentCell.RowIndex;

                if (columnIndex < 0)
                {
                    return;
                }
                string columnName = dgv.Columns[columnIndex].HeaderText;

                if (columnName == "Peak Accepted")
                {
                    bool          acceptibilityStatus = Convert.ToBoolean(dgv.Rows[rowIndex].Cells[columnIndex].Value);
                    DeltaMassPeak selected_peak       = (DeltaMassPeak)dgv.Rows[rowIndex].DataBoundItem;
                    PeakAcceptabilityChangedEventArgs AcceptabilityChangedEventData = new PeakAcceptabilityChangedEventArgs(acceptibilityStatus, selected_peak);
                    ONEAcceptibilityChanged(AcceptabilityChangedEventData);
                }
            }
        }
Ejemplo n.º 3
0
 protected void Relation_PeakAcceptabilityChanged(object sender, PeakAcceptabilityChangedEventArgs e)
 {
     Parallel.ForEach(SaveState.lollipop.et_relations.Where(p => e.Peak.grouped_relations.Contains(p)), pRelation => pRelation.Accepted = e.IsPeakAcceptable);
     Parallel.ForEach(SaveState.lollipop.ee_relations.Where(p => e.Peak.grouped_relations.Contains(p)), pRelation => pRelation.Accepted = e.IsPeakAcceptable);
 }