Esempio n. 1
0
        private void forwardItem_Click(object sender, EventArgs e)
        {
            if (FormatFactory.PatternRequired(FormatFactory.FormatsDictionary[formatBox.Text]))
            {
                if (patternForm == null || patternForm.IsDisposed)
                {
                    patternForm = new PatternForm();
                }

                patternForm.Owner = this;
                patternForm.Show();
                patternForm.Update(formatBox.Text);
                Hide();
            }
            else
            {
                IMatrix A;
                IVector x0, b;
                constructorForm = (ConstructorForm)Owner;
                constructorForm.GetSLAE(out A, formatBox.Text, out b, out x0);

                mainForm.SetSLAE(A, b, x0);
                mainForm.Show();
                Hide();
            }
        }
Esempio n. 2
0
        private void PatternForm_Load(object sender, EventArgs e)
        {
            SLAESource = (ConstructorForm)(Owner.Owner);
            mainForm   = (MainForm)(Owner.Owner.Owner);


            infoTextBox.Width = Width - 40;
        }
Esempio n. 3
0
        private void ManualEntry_Click(object sender, EventArgs e)
        {
            if (constructorForm == null || constructorForm.IsDisposed)
            {
                constructorForm = new ConstructorForm();
            }

            constructorForm.Owner = this;
            constructorForm.Show();
            Hide();
        }
Esempio n. 4
0
        private void saveToFileToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var save = new SaveFileDialog
            {
                Filter   = "Text file|*.txt",
                FileName = "matrix.txt"
            };

            if (save.ShowDialog() == DialogResult.OK)
            {
                IMatrix A;
                IVector x0, b;
                constructorForm = (ConstructorForm)Owner;
                constructorForm.GetSLAE(out A, formatBox.Text, out b, out x0);
                File.WriteAllText(save.FileName, A.Serialize(b, x0));
            }
        }
Esempio n. 5
0
        private void ManualEntry_Click(object sender, EventArgs e)
        {
            ConstructorForm form = new ConstructorForm();

            form.Show();
        }