예제 #1
0
        private void button_solve_Click(object sender, EventArgs e)
        {
            Program.Solver.Init(Maintainer.ReadMatrix(dataGridView1));
            Program.Solver.SortZeroOnTop       = (comboBox1.SelectedIndex == 0);
            Program.Solver.ReduceByMainElement = (comboBox2.SelectedIndex == 0);

            toolStripStatusLabel2.Text = Program.Solver.Solve();
            statusStrip1.Refresh();

            Maintainer.DisplayVector(Program.Solver.XVector, dataGridView4);
            Maintainer.DisplayVector(Program.Solver.ErrorVector, dataGridView5);
            Maintainer.DisplayMatrix(Program.Solver.History[Program.Solver.History.Count - 1].Item1, dataGridView2);
            Maintainer.DisplayHistory(dataGridView3);
        }
예제 #2
0
 private void defaultToolStripMenuItem_Click(object sender, EventArgs e)
 {
     Maintainer.DisplayMatrix(Maintainer.DefaultMatrix, dataGridView1);
     button_solve.PerformClick();
 }
예제 #3
0
 private void Cell_KeyPress(object Sender, KeyPressEventArgs pressE)
 {
     pressE.KeyChar = Maintainer.ConvertForDouble(pressE.KeyChar);
 }
예제 #4
0
 private void toolStripButton3_Click(object sender, EventArgs e)
 {
     Maintainer.DisplayMatrix(Maintainer.GenerateRandMatrix(dataGridView1, false), dataGridView1);
     button_solve.PerformClick();
 }
예제 #5
0
 private void numericUpDown1_ValueChanged(object sender, EventArgs e)
 {
     Maintainer.ResizeTable((int)numericUpDown1.Value, dataGridView1);
 }
예제 #6
0
 private void textBox3_KeyPress(object sender, KeyPressEventArgs e)
 {
     e.KeyChar = Maintainer.ConvertForInt(e.KeyChar);
 }