Upload files

Signed-off-by: Lev Rusanov <30170278+JDM170@users.noreply.github.com>
This commit is contained in:
2023-09-26 00:34:08 +07:00
parent e5b8e2cb25
commit 74de9b32f0
13 changed files with 1105 additions and 0 deletions

337
Form1.Designer.cs generated Normal file
View File

@@ -0,0 +1,337 @@
namespace WindowsFormsApp1
{
partial class Form1
{
/// <summary>
/// Обязательная переменная конструктора.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Освободить все используемые ресурсы.
/// </summary>
/// <param name="disposing">истинно, если управляемый ресурс должен быть удален; иначе ложно.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Код, автоматически созданный конструктором форм Windows
/// <summary>
/// Требуемый метод для поддержки конструктора — не изменяйте
/// содержимое этого метода с помощью редактора кода.
/// </summary>
private void InitializeComponent()
{
System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea10 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
System.Windows.Forms.DataVisualization.Charting.Legend legend10 = new System.Windows.Forms.DataVisualization.Charting.Legend();
System.Windows.Forms.DataVisualization.Charting.Series series28 = new System.Windows.Forms.DataVisualization.Charting.Series();
System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint19 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0D, 0D);
System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint20 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0D, 0D);
System.Windows.Forms.DataVisualization.Charting.Series series29 = new System.Windows.Forms.DataVisualization.Charting.Series();
System.Windows.Forms.DataVisualization.Charting.Series series30 = new System.Windows.Forms.DataVisualization.Charting.Series();
this.dataGridView1 = new System.Windows.Forms.DataGridView();
this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridView2 = new System.Windows.Forms.DataGridView();
this.Column4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column6 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridView3 = new System.Windows.Forms.DataGridView();
this.Column7 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column8 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column9 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.add = new System.Windows.Forms.Button();
this.sub = new System.Windows.Forms.Button();
this.mul = new System.Windows.Forms.Button();
this.div = new System.Windows.Forms.Button();
this.chart1 = new System.Windows.Forms.DataVisualization.Charting.Chart();
this.build_a = new System.Windows.Forms.Button();
this.build_b = new System.Windows.Forms.Button();
this.build_c = new System.Windows.Forms.Button();
this.textBox1 = new System.Windows.Forms.TextBox();
this.del_by_name = new System.Windows.Forms.Button();
this.clean_graph = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dataGridView2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dataGridView3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.chart1)).BeginInit();
this.SuspendLayout();
//
// dataGridView1
//
this.dataGridView1.AllowUserToAddRows = false;
this.dataGridView1.AllowUserToDeleteRows = false;
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.Column1,
this.Column2,
this.Column3});
this.dataGridView1.Location = new System.Drawing.Point(12, 12);
this.dataGridView1.Name = "dataGridView1";
this.dataGridView1.Size = new System.Drawing.Size(351, 150);
this.dataGridView1.TabIndex = 0;
//
// Column1
//
this.Column1.HeaderText = "alpha";
this.Column1.Name = "Column1";
//
// Column2
//
this.Column2.HeaderText = "low";
this.Column2.Name = "Column2";
//
// Column3
//
this.Column3.HeaderText = "high";
this.Column3.Name = "Column3";
//
// dataGridView2
//
this.dataGridView2.AllowUserToAddRows = false;
this.dataGridView2.AllowUserToDeleteRows = false;
this.dataGridView2.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView2.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.Column4,
this.Column5,
this.Column6});
this.dataGridView2.Location = new System.Drawing.Point(12, 190);
this.dataGridView2.Name = "dataGridView2";
this.dataGridView2.Size = new System.Drawing.Size(351, 150);
this.dataGridView2.TabIndex = 1;
//
// Column4
//
this.Column4.HeaderText = "alpha";
this.Column4.Name = "Column4";
//
// Column5
//
this.Column5.HeaderText = "low";
this.Column5.Name = "Column5";
//
// Column6
//
this.Column6.HeaderText = "high";
this.Column6.Name = "Column6";
//
// dataGridView3
//
this.dataGridView3.AllowUserToAddRows = false;
this.dataGridView3.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView3.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.Column7,
this.Column8,
this.Column9});
this.dataGridView3.Location = new System.Drawing.Point(12, 411);
this.dataGridView3.Name = "dataGridView3";
this.dataGridView3.Size = new System.Drawing.Size(351, 150);
this.dataGridView3.TabIndex = 2;
//
// Column7
//
this.Column7.HeaderText = "alpha";
this.Column7.Name = "Column7";
//
// Column8
//
this.Column8.HeaderText = "low";
this.Column8.Name = "Column8";
//
// Column9
//
this.Column9.HeaderText = "high";
this.Column9.Name = "Column9";
//
// add
//
this.add.Location = new System.Drawing.Point(12, 357);
this.add.Name = "add";
this.add.Size = new System.Drawing.Size(80, 34);
this.add.TabIndex = 3;
this.add.Text = "add";
this.add.UseVisualStyleBackColor = true;
this.add.Click += new System.EventHandler(this.addition_Click);
//
// sub
//
this.sub.Location = new System.Drawing.Point(98, 357);
this.sub.Name = "sub";
this.sub.Size = new System.Drawing.Size(80, 34);
this.sub.TabIndex = 4;
this.sub.Text = "sub";
this.sub.UseVisualStyleBackColor = true;
this.sub.Click += new System.EventHandler(this.subtraction_Click);
//
// mul
//
this.mul.Location = new System.Drawing.Point(184, 357);
this.mul.Name = "mul";
this.mul.Size = new System.Drawing.Size(80, 34);
this.mul.TabIndex = 5;
this.mul.Text = "mul";
this.mul.UseVisualStyleBackColor = true;
this.mul.Click += new System.EventHandler(this.multiply_Click);
//
// div
//
this.div.Location = new System.Drawing.Point(270, 357);
this.div.Name = "div";
this.div.Size = new System.Drawing.Size(80, 34);
this.div.TabIndex = 6;
this.div.Text = "div";
this.div.UseVisualStyleBackColor = true;
this.div.Click += new System.EventHandler(this.divide_Click);
//
// chart1
//
chartArea10.Name = "ChartArea1";
this.chart1.ChartAreas.Add(chartArea10);
legend10.Name = "Legend1";
this.chart1.Legends.Add(legend10);
this.chart1.Location = new System.Drawing.Point(380, 12);
this.chart1.Name = "chart1";
series28.ChartArea = "ChartArea1";
series28.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line;
series28.Legend = "Legend1";
series28.Name = "A1";
series28.Points.Add(dataPoint19);
series28.Points.Add(dataPoint20);
series29.ChartArea = "ChartArea1";
series29.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line;
series29.Legend = "Legend1";
series29.Name = "B2";
series30.ChartArea = "ChartArea1";
series30.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line;
series30.Legend = "Legend1";
series30.Name = "C3";
this.chart1.Series.Add(series28);
this.chart1.Series.Add(series29);
this.chart1.Series.Add(series30);
this.chart1.Size = new System.Drawing.Size(512, 440);
this.chart1.TabIndex = 7;
this.chart1.Text = "chart1";
//
// build_a
//
this.build_a.Location = new System.Drawing.Point(380, 458);
this.build_a.Name = "build_a";
this.build_a.Size = new System.Drawing.Size(101, 31);
this.build_a.TabIndex = 8;
this.build_a.Text = "Построить A";
this.build_a.UseVisualStyleBackColor = true;
this.build_a.Click += new System.EventHandler(this.build_a_Click);
//
// build_b
//
this.build_b.Location = new System.Drawing.Point(487, 458);
this.build_b.Name = "build_b";
this.build_b.Size = new System.Drawing.Size(101, 31);
this.build_b.TabIndex = 9;
this.build_b.Text = "Построить B";
this.build_b.UseVisualStyleBackColor = true;
this.build_b.Click += new System.EventHandler(this.build_b_Click);
//
// build_c
//
this.build_c.Location = new System.Drawing.Point(594, 458);
this.build_c.Name = "build_c";
this.build_c.Size = new System.Drawing.Size(101, 31);
this.build_c.TabIndex = 10;
this.build_c.Text = "Построить C";
this.build_c.UseVisualStyleBackColor = true;
this.build_c.Click += new System.EventHandler(this.build_c_Click);
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(380, 496);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(208, 20);
this.textBox1.TabIndex = 11;
//
// del_by_name
//
this.del_by_name.Location = new System.Drawing.Point(380, 522);
this.del_by_name.Name = "del_by_name";
this.del_by_name.Size = new System.Drawing.Size(208, 23);
this.del_by_name.TabIndex = 12;
this.del_by_name.Text = "Удалить по названию";
this.del_by_name.UseVisualStyleBackColor = true;
this.del_by_name.Click += new System.EventHandler(this.del_by_name_Click);
//
// clean_graph
//
this.clean_graph.Location = new System.Drawing.Point(594, 496);
this.clean_graph.Name = "clean_graph";
this.clean_graph.Size = new System.Drawing.Size(101, 49);
this.clean_graph.TabIndex = 13;
this.clean_graph.Text = "Очистить график";
this.clean_graph.UseVisualStyleBackColor = true;
this.clean_graph.Click += new System.EventHandler(this.clean_graph_Click);
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(907, 574);
this.Controls.Add(this.clean_graph);
this.Controls.Add(this.del_by_name);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.build_c);
this.Controls.Add(this.build_b);
this.Controls.Add(this.build_a);
this.Controls.Add(this.chart1);
this.Controls.Add(this.div);
this.Controls.Add(this.mul);
this.Controls.Add(this.sub);
this.Controls.Add(this.add);
this.Controls.Add(this.dataGridView3);
this.Controls.Add(this.dataGridView2);
this.Controls.Add(this.dataGridView1);
this.Name = "Form1";
this.Text = "Калькулятор нечетких множеств";
this.Load += new System.EventHandler(this.Form1_Load);
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dataGridView2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dataGridView3)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.chart1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.DataGridView dataGridView1;
private System.Windows.Forms.DataGridViewTextBoxColumn Column1;
private System.Windows.Forms.DataGridViewTextBoxColumn Column2;
private System.Windows.Forms.DataGridViewTextBoxColumn Column3;
private System.Windows.Forms.DataGridView dataGridView2;
private System.Windows.Forms.DataGridViewTextBoxColumn Column4;
private System.Windows.Forms.DataGridViewTextBoxColumn Column5;
private System.Windows.Forms.DataGridViewTextBoxColumn Column6;
private System.Windows.Forms.DataGridView dataGridView3;
private System.Windows.Forms.DataGridViewTextBoxColumn Column7;
private System.Windows.Forms.DataGridViewTextBoxColumn Column8;
private System.Windows.Forms.DataGridViewTextBoxColumn Column9;
private System.Windows.Forms.Button add;
private System.Windows.Forms.Button sub;
private System.Windows.Forms.Button mul;
private System.Windows.Forms.Button div;
private System.Windows.Forms.DataVisualization.Charting.Chart chart1;
private System.Windows.Forms.Button build_a;
private System.Windows.Forms.Button build_b;
private System.Windows.Forms.Button build_c;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Button del_by_name;
private System.Windows.Forms.Button clean_graph;
}
}

270
Form1.cs Normal file
View File

@@ -0,0 +1,270 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Windows.Forms.DataVisualization.Charting;
namespace WindowsFormsApp1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private double ConvertDGValue(object value)
{ return Convert.ToDouble(value); }
private void MergeDGs()
{
DataGridView matrix_low, matrix_high;
if (dataGridView1.Rows.Count < dataGridView2.Rows.Count)
{
matrix_low = dataGridView1;
matrix_high = dataGridView2;
}
else
{
matrix_low = dataGridView2;
matrix_high = dataGridView1;
}
int lowRowCount = matrix_low.Rows.Count,
highRowCount = matrix_high.Rows.Count;
int wrong = 0;
for (int first = 0; first < highRowCount; first++)
{
for (int second = 0; second < lowRowCount; second++)
if (ConvertDGValue(matrix_low[0, second].Value) != ConvertDGValue(matrix_high[0, first].Value))
wrong++;
if (wrong > lowRowCount - 1)
dataGridView3.Rows.Add(new object[] { matrix_high[0, first].Value, matrix_high[1, first].Value, matrix_high[2, first].Value });
wrong = 0;
}
}
private double[,] ConvertDGtoMatrix(DataGridView dgv)
{
int rowCount = dgv.Rows.Count,
colCount = dgv.Columns.Count;
double[,] matrix = new double[colCount, rowCount];
for (int i = 0; i < rowCount; i++)
for (int j = 0; j < colCount; j++)
matrix[j, i] = ConvertDGValue(dgv[j, i].Value);
return matrix;
}
private double[,] SortMatrix(double[,] matrix)
{
int rowCount = matrix.GetLength(1),
colCount = matrix.GetLength(0);
double temp;
for (int i = 0; i < rowCount; i++)
for (int j = 0; j < rowCount; j++)
if (matrix[0, i] < matrix[0, j])
for (int k = 0; k < colCount; k++)
{
temp = matrix[k, i];
matrix[k, i] = matrix[k, j];
matrix[k, j] = temp;
}
return matrix;
}
private void PrintGraph(double[,] matrix, string chart_series)
{
DataPointCollection points = chart1.Series.FindByName(chart_series).Points;
int matrixLength = matrix.GetLength(1);
points.Clear();
for (int i = 0; i < matrixLength; i++)
points.AddXY(matrix[1, i], matrix[0, i]);
for(int i = matrixLength - 1; i >= 0; i--)
points.AddXY(matrix[2, i], matrix[0, i]);
}
private void Form1_Load(object sender, EventArgs e)
{
dataGridView1.Rows.Add(new object[] { 0, 1, 9 });
dataGridView1.Rows.Add(new object[] { 0.5, 2, 8 });
dataGridView1.Rows.Add(new object[] { 1, 3, 4 });
dataGridView2.Rows.Add(new object[] { 0, 1, 9 });
dataGridView2.Rows.Add(new object[] { 0.5, 3, 6 });
dataGridView2.Rows.Add(new object[] { 0.2, 2, 7 });
dataGridView2.Rows.Add(new object[] { 1, 4, 5 });
/*// Simple merging
if(dataGridView2.Rows.Count > dataGridView1.Rows.Count)
{
for(int row = dataGridView1.Rows.Count; row < dataGridView2.Rows.Count; row++)
{
dataGridView3.RowCount++;
for(int col = 0; col < dataGridView1.Columns.Count; col++)
dataGridView3[col, row].Value = ConvertDGValue(dataGridView2[col, row].Value);
}
}*/
}
private void addition_Click(object sender, EventArgs e)
{
DataGridView matrix_low, matrix_high;
if (dataGridView1.Rows.Count < dataGridView2.Rows.Count)
{
matrix_low = dataGridView1;
matrix_high = dataGridView2;
}
else
{
matrix_low = dataGridView2;
matrix_high = dataGridView1;
}
dataGridView3.Rows.Clear();
for (int high = 0; high < matrix_high.Rows.Count; high++)
{
for (int low = 0; low < matrix_low.Rows.Count; low++)
{
if (ConvertDGValue(matrix_low[0, low].Value) == ConvertDGValue(matrix_high[0, high].Value))
{
dataGridView3.Rows.Add(new object[]
{
matrix_high[0, high].Value,
ConvertDGValue(matrix_low[1, low].Value) + ConvertDGValue(matrix_high[1, high].Value),
ConvertDGValue(matrix_low[2, low].Value) + ConvertDGValue(matrix_high[2, high].Value)
});
}
}
}
MergeDGs();
}
private void subtraction_Click(object sender, EventArgs e)
{
DataGridView matrix_low, matrix_high;
if (dataGridView1.Rows.Count < dataGridView2.Rows.Count)
{
matrix_low = dataGridView1;
matrix_high = dataGridView2;
}
else
{
matrix_low = dataGridView2;
matrix_high = dataGridView1;
}
dataGridView3.Rows.Clear();
for (int high = 0; high < matrix_high.Rows.Count; high++)
{
for (int low = 0; low < matrix_low.Rows.Count; low++)
{
if (ConvertDGValue(matrix_low[0, low].Value) == ConvertDGValue(matrix_high[0, high].Value))
{
dataGridView3.Rows.Add(new object[]
{
matrix_high[0, high].Value,
ConvertDGValue(matrix_low[1, low].Value) - ConvertDGValue(matrix_high[2, high].Value),
ConvertDGValue(matrix_low[2, low].Value) - ConvertDGValue(matrix_high[1, high].Value)
});
}
}
}
MergeDGs();
}
private void multiply_Click(object sender, EventArgs e)
{
DataGridView matrix_low, matrix_high;
if (dataGridView1.Rows.Count < dataGridView2.Rows.Count)
{
matrix_low = dataGridView1;
matrix_high = dataGridView2;
}
else
{
matrix_low = dataGridView2;
matrix_high = dataGridView1;
}
dataGridView3.Rows.Clear();
for (int high = 0; high < matrix_high.Rows.Count; high++)
{
for (int low = 0; low < matrix_low.Rows.Count; low++)
{
if (ConvertDGValue(matrix_low[0, low].Value) == ConvertDGValue(matrix_high[0, high].Value))
{
dataGridView3.Rows.Add(new object[]
{
matrix_high[0, high].Value,
ConvertDGValue(matrix_low[1, low].Value) * ConvertDGValue(matrix_high[1, high].Value),
ConvertDGValue(matrix_low[2, low].Value) * ConvertDGValue(matrix_high[2, high].Value)
});
}
}
}
MergeDGs();
}
private void divide_Click(object sender, EventArgs e)
{
DataGridView matrix_low, matrix_high;
if (dataGridView1.Rows.Count < dataGridView2.Rows.Count)
{
matrix_low = dataGridView1;
matrix_high = dataGridView2;
}
else
{
matrix_low = dataGridView2;
matrix_high = dataGridView1;
}
dataGridView3.Rows.Clear();
for (int high = 0; high < matrix_high.Rows.Count; high++)
{
for (int low = 0; low < matrix_low.Rows.Count; low++)
{
if (ConvertDGValue(matrix_low[0, low].Value) == ConvertDGValue(matrix_high[0, high].Value))
{
dataGridView3.Rows.Add(new object[]
{
matrix_high[0, high].Value,
ConvertDGValue(matrix_low[1, low].Value) / ConvertDGValue(matrix_high[2, high].Value),
ConvertDGValue(matrix_low[2, low].Value) / ConvertDGValue(matrix_high[1, high].Value)
});
}
}
}
MergeDGs();
}
private void build_a_Click(object sender, EventArgs e)
{
double[,] matrix = SortMatrix(ConvertDGtoMatrix(dataGridView1));
PrintGraph(matrix, "A1");
}
private void build_b_Click(object sender, EventArgs e)
{
double[,] matrix = SortMatrix(ConvertDGtoMatrix(dataGridView2));
PrintGraph(matrix, "B2");
}
private void build_c_Click(object sender, EventArgs e)
{
double[,] matrix = SortMatrix(ConvertDGtoMatrix(dataGridView3));
PrintGraph(matrix, "C3");
}
private void del_by_name_Click(object sender, EventArgs e)
{
string text = textBox1.Text;
chart1.Series.FindByName(text).Points.Clear();
}
private void clean_graph_Click(object sender, EventArgs e)
{
chart1.Series.FindByName("A1").Points.Clear();
chart1.Series.FindByName("B2").Points.Clear();
chart1.Series.FindByName("C3").Points.Clear();
}
}
}

120
Form1.resx Normal file
View File

@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

20
Program.cs Normal file
View File

@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Windows.Forms;
namespace WindowsFormsApp1
{
internal static class Program
{
/// <summary>
/// Главная точка входа для приложения.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
}
}

View File

@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// Общие сведения об этой сборке предоставляются следующим набором
// набора атрибутов. Измените значения этих атрибутов для изменения сведений,
// связанных со сборкой.
[assembly: AssemblyTitle("WindowsFormsApp1")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("WindowsFormsApp1")]
[assembly: AssemblyCopyright("Copyright © 2023")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Установка значения False для параметра ComVisible делает типы в этой сборке невидимыми
// для компонентов COM. Если необходимо обратиться к типу в этой сборке через
// COM, следует установить атрибут ComVisible в TRUE для этого типа.
[assembly: ComVisible(false)]
// Следующий GUID служит для идентификации библиотеки типов, если этот проект будет видимым для COM
[assembly: Guid("4dd4b527-5b45-4dcb-a174-f82a583069b1")]
// Сведения о версии сборки состоят из указанных ниже четырех значений:
//
// Основной номер версии
// Дополнительный номер версии
// Номер сборки
// Редакция
//
// Можно задать все значения или принять номера сборки и редакции по умолчанию
// используя "*", как показано ниже:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

63
Properties/Resources.Designer.cs generated Normal file
View File

@@ -0,0 +1,63 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Этот код создан программой.
// Исполняемая версия:4.0.30319.42000
//
// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
// повторной генерации кода.
// </auto-generated>
//------------------------------------------------------------------------------
namespace WindowsFormsApp1.Properties {
using System;
/// <summary>
/// Класс ресурса со строгой типизацией для поиска локализованных строк и т.д.
/// </summary>
// Этот класс создан автоматически классом StronglyTypedResourceBuilder
// с помощью такого средства, как ResGen или Visual Studio.
// Чтобы добавить или удалить член, измените файл .ResX и снова запустите ResGen
// с параметром /str или перестройте свой проект VS.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Возвращает кэшированный экземпляр ResourceManager, использованный этим классом.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WindowsFormsApp1.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Перезаписывает свойство CurrentUICulture текущего потока для всех
/// обращений к ресурсу с помощью этого класса ресурса со строгой типизацией.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}

117
Properties/Resources.resx Normal file
View File

@@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

26
Properties/Settings.Designer.cs generated Normal file
View File

@@ -0,0 +1,26 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Этот код создан программой.
// Исполняемая версия:4.0.30319.42000
//
// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
// повторной генерации кода.
// </auto-generated>
//------------------------------------------------------------------------------
namespace WindowsFormsApp1.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.7.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
}
}

View File

@@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

81
WindowsFormsApp1.csproj Normal file
View File

@@ -0,0 +1,81 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{4DD4B527-5B45-4DCB-A174-F82A583069B1}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>WindowsFormsApp1</RootNamespace>
<AssemblyName>WindowsFormsApp1</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.DirectoryServices" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Windows.Forms.DataVisualization" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Form1.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Form1.resx">
<DependentUpon>Form1.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="app.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

25
WindowsFormsApp1.sln Normal file
View File

@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.6.33815.320
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WindowsFormsApp1", "WindowsFormsApp1.csproj", "{4DD4B527-5B45-4DCB-A174-F82A583069B1}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{4DD4B527-5B45-4DCB-A174-F82A583069B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4DD4B527-5B45-4DCB-A174-F82A583069B1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4DD4B527-5B45-4DCB-A174-F82A583069B1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4DD4B527-5B45-4DCB-A174-F82A583069B1}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {1436E423-3982-418A-A6EC-59B9DCC8462D}
EndGlobalSection
EndGlobal

3
app.config Normal file
View File

@@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup></configuration>

BIN
presentation.pptx Normal file

Binary file not shown.