示例#1
0
 private void dataGridViewLab05_Reindexate()
 {
     for (int i = 0; i < dataGridViewLab05.RowCount; i++)
     {
         dataGridViewLab05.Rows[i].Cells[0].Value = (i + 1).ToString();
         dataGridViewLab05.Rows[i].Cells[2].Value = LabMethods.Factorial(i + 1);
     }
 }
示例#2
0
        //
        // Lab05
        //

        private void buttonLab05FillArray_Click(object sender, EventArgs e)
        {
            int rowsCount = Convert.ToInt32(numericUpDownLab05RowsAuto.Value);

            double[] array = LabMethods.GetDoubleArray(rowsCount, 20);
            dataGridViewLab05.RowCount = array.Length;
            for (int i = 0; i < array.Length; i++)
            {
                dataGridViewLab05.Rows[i].Cells[0].Value = (i + 1).ToString();
                dataGridViewLab05.Rows[i].Cells[1].Value = array[i].ToString();
                dataGridViewLab05.Rows[i].Cells[2].Value = LabMethods.Factorial(i).ToString();
            }
            textBoxLab05Result.Clear();
            dataGridViewLab05.ClearSelection();
            LabMethods.Lab05CheckedIndices = new bool[0];
        }