コード例 #1
0
ファイル: HalfLifeForm.cs プロジェクト: zrolfs/pwiz
 private void Requery()
 {
     UpdateCohortCombo();
     if (string.IsNullOrEmpty(Peptide))
     {
         Text = TabText = "Half Life: " + ProteinName.Substring(0, Math.Min(20, ProteinName.Length));
     }
     else
     {
         Text = TabText = "Half Life: " + Peptide;
     }
     if (!IsHandleCreated)
     {
         return;
     }
     dataGridView1.Rows.Clear();
     RequeryPeptideAnalyses();
     foreach (var peptideAnalysis in _peptideAnalyses)
     {
         peptideAnalysis.EnsurePeaksCalculated();
         tbxProteinDescription.Text = peptideAnalysis.Peptide.ProteinDescription;
         foreach (var peptideFileAnalysis in peptideAnalysis.GetFileAnalyses(false))
         {
             var row = dataGridView1.Rows[dataGridView1.Rows.Add()];
             row.Tag = peptideFileAnalysis;
         }
     }
     UpdateRows(true);
 }
コード例 #2
0
 /// <summary>
 /// Comparison
 /// </summary>
 /// <param name="other"></param>
 /// <returns></returns>
 public bool Equals(ProteinInformation other)
 {
     if (other == null)
     {
         return(false);
     }
     return(ProteinName.Equals(other.ProteinName));
 }
コード例 #3
0
        /// <summary>
        /// Overloaded comparison
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }
            var objAsProt = obj as ProteinInformation;

            if (objAsProt == null)
            {
                return(false);
            }
            return(ProteinName.Equals(objAsProt.ProteinName));
        }
コード例 #4
0
 public override int GetHashCode()
 {
     return(ProteinName != null ? ProteinName.GetHashCode() : 0);
 }