Exemple #1
0
 private static bool SetAnnotationValue(EditNoteDlg editNoteDlg, String annotationName, Object value)
 {
     for (int i = 0; i < editNoteDlg.DataGridView.Rows.Count; i++)
     {
         var row = editNoteDlg.DataGridView.Rows[i];
         if (!annotationName.Equals(row.Cells[0].Value))
         {
             continue;
         }
         row.Cells[1].Value = value;
         return(true);
     }
     return(false);
 }
Exemple #2
0
 private static void SetAnnotationValue(EditNoteDlg editNoteDlg, String annotationName, String value)
 {
     for (int i = 0; i < editNoteDlg.DataGridView.Rows.Count; i++)
     {
         var row = editNoteDlg.DataGridView.Rows[i];
         if (!annotationName.Equals(row.Cells[0].Value))
         {
             continue;
         }
         row.Cells[1].Value = value;
         return;
     }
     throw new ArgumentException("Could not find annotation " + annotationName);
 }