Exemplo n.º 1
0
 private void dataGridView6_CellValueChanged(object sender, DataGridViewCellEventArgs e)
 {
     if (_changingIntValue)
     {
         return;
     }
     try
     {
         _changingIntValue = true;
         if (e.ColumnIndex == 1 && e.RowIndex > -1)
         {
             double o = 0;
             if (!double.TryParse(dataGridView6.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString(), out o))
             {
                 o = 0;
             }
             dataGridView6.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = o;
             Class1.Variable v = ((Class1.Variable)dataGridView6.Rows[e.RowIndex].Cells[0].Value);
             v.SetValue(o);
         }
     }
     finally
     {
         _changingIntValue = false;
     }
 }
Exemplo n.º 2
0
 private void dataGridView7_CellValueChanged(object sender, DataGridViewCellEventArgs e)
 {
     if (_changingIntValue)
     {
         return;
     }
     try
     {
         _changingIntValue = true;
         if (e.ColumnIndex == 1 && e.RowIndex > -1)
         {
             Class1.Variable v = ((Class1.Variable)dataGridView7.Rows[e.RowIndex].Cells[0].Value);
             v.SetValue(dataGridView7.Rows[e.RowIndex].Cells[e.ColumnIndex].Value);
         }
     }
     finally
     {
         _changingIntValue = false;
     }
 }
Exemplo n.º 3
0
 private void checkedListBox1_ItemCheck(object sender, ItemCheckEventArgs e)
 {
     Class1.Variable v = ((Class1.Variable)checkedListBox1.Items[e.Index]);
     v.SetValue(e.NewValue == CheckState.Checked);
 }