Rename getUnknownAlpha to GetUnknownAlpha, disable form resize, make dataGridView3 read only

Signed-off-by: Lev Rusanov <30170278+JDM170@users.noreply.github.com>
This commit is contained in:
2023-10-07 16:41:33 +07:00
parent a432cd3df6
commit 9778d9d272
2 changed files with 39 additions and 34 deletions

63
Form1.Designer.cs generated
View File

@@ -28,13 +28,13 @@
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea3 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea5 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
System.Windows.Forms.DataVisualization.Charting.Legend legend3 = new System.Windows.Forms.DataVisualization.Charting.Legend(); System.Windows.Forms.DataVisualization.Charting.Legend legend5 = new System.Windows.Forms.DataVisualization.Charting.Legend();
System.Windows.Forms.DataVisualization.Charting.Series series7 = new System.Windows.Forms.DataVisualization.Charting.Series(); System.Windows.Forms.DataVisualization.Charting.Series series13 = new System.Windows.Forms.DataVisualization.Charting.Series();
System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint5 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0D, 0D); System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint9 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0D, 0D);
System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint6 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0D, 0D); System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint10 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0D, 0D);
System.Windows.Forms.DataVisualization.Charting.Series series8 = new System.Windows.Forms.DataVisualization.Charting.Series(); System.Windows.Forms.DataVisualization.Charting.Series series14 = new System.Windows.Forms.DataVisualization.Charting.Series();
System.Windows.Forms.DataVisualization.Charting.Series series9 = new System.Windows.Forms.DataVisualization.Charting.Series(); System.Windows.Forms.DataVisualization.Charting.Series series15 = new System.Windows.Forms.DataVisualization.Charting.Series();
this.dataGridView1 = new System.Windows.Forms.DataGridView(); this.dataGridView1 = new System.Windows.Forms.DataGridView();
this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -140,6 +140,7 @@
this.Column9}); this.Column9});
this.dataGridView3.Location = new System.Drawing.Point(12, 411); this.dataGridView3.Location = new System.Drawing.Point(12, 411);
this.dataGridView3.Name = "dataGridView3"; this.dataGridView3.Name = "dataGridView3";
this.dataGridView3.ReadOnly = true;
this.dataGridView3.Size = new System.Drawing.Size(351, 150); this.dataGridView3.Size = new System.Drawing.Size(351, 150);
this.dataGridView3.TabIndex = 2; this.dataGridView3.TabIndex = 2;
// //
@@ -147,18 +148,21 @@
// //
this.Column7.HeaderText = "alpha"; this.Column7.HeaderText = "alpha";
this.Column7.Name = "Column7"; this.Column7.Name = "Column7";
this.Column7.ReadOnly = true;
this.Column7.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; this.Column7.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
// //
// Column8 // Column8
// //
this.Column8.HeaderText = "low"; this.Column8.HeaderText = "low";
this.Column8.Name = "Column8"; this.Column8.Name = "Column8";
this.Column8.ReadOnly = true;
this.Column8.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; this.Column8.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
// //
// Column9 // Column9
// //
this.Column9.HeaderText = "high"; this.Column9.HeaderText = "high";
this.Column9.Name = "Column9"; this.Column9.Name = "Column9";
this.Column9.ReadOnly = true;
this.Column9.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; this.Column9.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
// //
// add // add
@@ -203,29 +207,29 @@
// //
// chart1 // chart1
// //
chartArea3.Name = "ChartArea1"; chartArea5.Name = "ChartArea1";
this.chart1.ChartAreas.Add(chartArea3); this.chart1.ChartAreas.Add(chartArea5);
legend3.Name = "Legend1"; legend5.Name = "Legend1";
this.chart1.Legends.Add(legend3); this.chart1.Legends.Add(legend5);
this.chart1.Location = new System.Drawing.Point(380, 12); this.chart1.Location = new System.Drawing.Point(380, 12);
this.chart1.Name = "chart1"; this.chart1.Name = "chart1";
series7.ChartArea = "ChartArea1"; series13.ChartArea = "ChartArea1";
series7.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line; series13.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line;
series7.Legend = "Legend1"; series13.Legend = "Legend1";
series7.Name = "A1"; series13.Name = "A1";
series7.Points.Add(dataPoint5); series13.Points.Add(dataPoint9);
series7.Points.Add(dataPoint6); series13.Points.Add(dataPoint10);
series8.ChartArea = "ChartArea1"; series14.ChartArea = "ChartArea1";
series8.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line; series14.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line;
series8.Legend = "Legend1"; series14.Legend = "Legend1";
series8.Name = "B2"; series14.Name = "B2";
series9.ChartArea = "ChartArea1"; series15.ChartArea = "ChartArea1";
series9.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line; series15.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line;
series9.Legend = "Legend1"; series15.Legend = "Legend1";
series9.Name = "C3"; series15.Name = "C3";
this.chart1.Series.Add(series7); this.chart1.Series.Add(series13);
this.chart1.Series.Add(series8); this.chart1.Series.Add(series14);
this.chart1.Series.Add(series9); this.chart1.Series.Add(series15);
this.chart1.Size = new System.Drawing.Size(512, 440); this.chart1.Size = new System.Drawing.Size(512, 440);
this.chart1.TabIndex = 7; this.chart1.TabIndex = 7;
this.chart1.Text = "chart1"; this.chart1.Text = "chart1";
@@ -301,7 +305,7 @@
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(907, 574); this.ClientSize = new System.Drawing.Size(904, 576);
this.Controls.Add(this.compare); this.Controls.Add(this.compare);
this.Controls.Add(this.clean_graph); this.Controls.Add(this.clean_graph);
this.Controls.Add(this.del_by_name); this.Controls.Add(this.del_by_name);
@@ -317,6 +321,7 @@
this.Controls.Add(this.dataGridView3); this.Controls.Add(this.dataGridView3);
this.Controls.Add(this.dataGridView2); this.Controls.Add(this.dataGridView2);
this.Controls.Add(this.dataGridView1); this.Controls.Add(this.dataGridView1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Name = "Form1"; this.Name = "Form1";
this.Text = "Калькулятор нечетких множеств"; this.Text = "Калькулятор нечетких множеств";
this.Load += new System.EventHandler(this.Form1_Load); this.Load += new System.EventHandler(this.Form1_Load);

View File

@@ -47,7 +47,7 @@ namespace WindowsFormsApp1
return matrix; return matrix;
} }
private Tuple<double[,], double[,]> getUnknownAlpha(double[,] matrix1, double[,] matrix2) private Tuple<double[,], double[,]> GetUnknownAlpha(double[,] matrix1, double[,] matrix2)
{ {
double[,] matrix_low, matrix_high; double[,] matrix_low, matrix_high;
if(matrix1.GetLength(1) < matrix2.GetLength(1)) if(matrix1.GetLength(1) < matrix2.GetLength(1))
@@ -143,7 +143,7 @@ namespace WindowsFormsApp1
{ {
double[,] matrix_low = ConvertDGtoMatrix(dataGridView1), double[,] matrix_low = ConvertDGtoMatrix(dataGridView1),
matrix_high = ConvertDGtoMatrix(dataGridView2); matrix_high = ConvertDGtoMatrix(dataGridView2);
Tuple<double[,], double[,]> tuple = getUnknownAlpha(matrix_low, matrix_high); Tuple<double[,], double[,]> tuple = GetUnknownAlpha(matrix_low, matrix_high);
matrix_low = tuple.Item1; matrix_low = tuple.Item1;
matrix_high = tuple.Item2; matrix_high = tuple.Item2;
dataGridView3.Rows.Clear(); dataGridView3.Rows.Clear();
@@ -162,7 +162,7 @@ namespace WindowsFormsApp1
{ {
double[,] matrix_low = ConvertDGtoMatrix(dataGridView1), double[,] matrix_low = ConvertDGtoMatrix(dataGridView1),
matrix_high = ConvertDGtoMatrix(dataGridView2); matrix_high = ConvertDGtoMatrix(dataGridView2);
Tuple<double[,], double[,]> tuple = getUnknownAlpha(matrix_low, matrix_high); Tuple<double[,], double[,]> tuple = GetUnknownAlpha(matrix_low, matrix_high);
matrix_low = tuple.Item1; matrix_low = tuple.Item1;
matrix_high = tuple.Item2; matrix_high = tuple.Item2;
dataGridView3.Rows.Clear(); dataGridView3.Rows.Clear();
@@ -181,7 +181,7 @@ namespace WindowsFormsApp1
{ {
double[,] matrix_low = ConvertDGtoMatrix(dataGridView1), double[,] matrix_low = ConvertDGtoMatrix(dataGridView1),
matrix_high = ConvertDGtoMatrix(dataGridView2); matrix_high = ConvertDGtoMatrix(dataGridView2);
Tuple<double[,], double[,]> tuple = getUnknownAlpha(matrix_low, matrix_high); Tuple<double[,], double[,]> tuple = GetUnknownAlpha(matrix_low, matrix_high);
matrix_low = tuple.Item1; matrix_low = tuple.Item1;
matrix_high = tuple.Item2; matrix_high = tuple.Item2;
dataGridView3.Rows.Clear(); dataGridView3.Rows.Clear();
@@ -200,7 +200,7 @@ namespace WindowsFormsApp1
{ {
double[,] matrix_low = ConvertDGtoMatrix(dataGridView1), double[,] matrix_low = ConvertDGtoMatrix(dataGridView1),
matrix_high = ConvertDGtoMatrix(dataGridView2); matrix_high = ConvertDGtoMatrix(dataGridView2);
Tuple<double[,], double[,]> tuple = getUnknownAlpha(matrix_low, matrix_high); Tuple<double[,], double[,]> tuple = GetUnknownAlpha(matrix_low, matrix_high);
matrix_low = tuple.Item1; matrix_low = tuple.Item1;
matrix_high = tuple.Item2; matrix_high = tuple.Item2;
dataGridView3.Rows.Clear(); dataGridView3.Rows.Clear();