ode = = System.Windows.Forms.FormBorderStyle.FixedSingle;. MaximizeBox = false;. MinimizeBox = false;. Name = "About";
}
# endregionSystem.Windows.Forms.PictureBox pictureBox1; System.Windows.Forms.Label label1; System.Windows.Forms.Label label2; System.Windows.Forms.Label label3; System.Windows.Forms.Label label4;
}
}
Graphics.cs
using
{partial class Graphics: Form
{Graphics ()
{(); ();
} void MakeGraphicFirst ()
{(Result.Q! = null)
{. ChartTitle.TextBlock.Text = "Залежність витрати повітря n від Cкорость в точці відбору проби";. ChartTitle.TextBlock.Appearance.TextProperties.Color = Color.Black; w = new Font ("Times New Roman ", 12, FontStyle.Bold);. ChartTitle.TextBlock.Appearance.TextProperties.Font = w; chartSeries = new ChartSeries ();. Appearance.LabelAppearance.Visible = false;. Name =" Витрата-Швидкість "; . Type = ChartSeriesType.Line;. Appearance.LineSeriesAppearance.Color = Color.Black; (int i = 0; i
{first = new ChartSeriesItem ();. XValue = Result.we [i];. YValue = Result.Q [i];. AddItem (first);
}. Appearance.PointMark.Dimensions.Width = 1;. Appearance.PointMark.Dimensions.Height = 1;. Appearance.PointMark.FillStyle.MainColor = Color.Green;. Appearance.PointMark.Visible = true;. PlotArea . Appearance.FillStyle.FillType = Telerik.Charting.Styles.FillType.Gradient;. PlotArea.Appearance.FillStyle.MainColor = System.Drawing.Color.FromArgb (65, 201, 254);. PlotArea.Appearance.FillStyle.SecondColor = System.Drawing.Color.FromArgb (0, 107, 186);. Series.Add (chartSeries);
}
{. Show ("Спочатку виконайте розрахунок!");
}
}
}
}
MainForm.cs
using
{partial class Form1: Form
{Form1 ()
{();
}
# region Головні методиvoid сохранитьРезультатыToolStripMenuItem_Click (object sender, EventArgs e)
{saver = new SaveFileDialog ();. Title = "Збереження результатів";. FileName = "Result.txt";. Filter = "txt files (*. txt) | *. txt"; (saver . ShowDialog () == DialogResult.OK)
{(MakeExportToTXT (saver.FileName))
{. Show ("Збереження завершено!");
}
else MessageBox.Show ("Збереження не виконано. Спочатку зробіть розрахунок!");
}
} bool MakeExportToTXT (string path)
{(Result.Q! = null)
{xMas = new StreamWriter (path, true, Encoding.GetEncoding (1251));. WriteLine ("Збережені дані розрахунків");
xMas.WriteLine ();
xMas.WriteLine ("____________________________________________");
xMas.WriteLine ("Максимальний діаметр частинок:" + textBox11.Text);
xMas.WriteLine ("Коефіцієнт Архімеда:" + textBox12.Text);
xMas.WriteLine ("Розрахунок коефіцієнта Рейнольса:" + textBox13.Text);
xMas.WriteLine ("Коефіцієнт гідравлічного опору:" + textBox14.Text);
...