commit a0a8f62618a2a5ebbfe03476f322929370cb96c4 Author: YouMixx Date: Mon Nov 10 17:34:22 2025 +0400 first commit diff --git a/App.config b/App.config new file mode 100644 index 0000000..56efbc7 --- /dev/null +++ b/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/DB.cs b/DB.cs new file mode 100644 index 0000000..68b3674 --- /dev/null +++ b/DB.cs @@ -0,0 +1,40 @@ +using MySql.Data.MySqlClient; +using System.Data; + +namespace NeshinaPolina07_11 +{ + internal class DB + { + private static DB instance; + private readonly string connectionString = "server=git.pgk.alspio.com; port=3306; username=ISP41_Zvyagintsev; password = ISP41_Zvyagintsev;database=ISP41_Zvyagintsev; SslMode=none"; + + private MySqlConnection connection; + + private DB() + { + connection = new MySqlConnection(connectionString); + OpenConnection(); + } + + public static DB GetInstance() + { + if (instance == null) + instance = new DB(); + return instance; + } + + public void OpenConnection() + { + if (connection.State == ConnectionState.Closed) + connection.Open(); + } + + public void CloseConnection() + { + if (connection.State == ConnectionState.Open) + connection.Close(); + } + + public MySqlConnection GetConnection() => connection; + } +} \ No newline at end of file diff --git a/FORM2.Designer.cs b/FORM2.Designer.cs new file mode 100644 index 0000000..54dd3a8 --- /dev/null +++ b/FORM2.Designer.cs @@ -0,0 +1,107 @@ +namespace dem +{ + partial class FORM2 + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.dataGridView1 = new System.Windows.Forms.DataGridView(); + this.Администратор = new System.Windows.Forms.Label(); + this.button1 = new System.Windows.Forms.Button(); + this.button2 = new System.Windows.Forms.Button(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); + this.SuspendLayout(); + // + // dataGridView1 + // + this.dataGridView1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; + this.dataGridView1.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.AllCells; + this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dataGridView1.GridColor = System.Drawing.Color.Chartreuse; + this.dataGridView1.Location = new System.Drawing.Point(12, 72); + this.dataGridView1.Name = "dataGridView1"; + this.dataGridView1.Size = new System.Drawing.Size(776, 349); + this.dataGridView1.TabIndex = 0; + this.dataGridView1.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellContentClick); + // + // Администратор + // + this.Администратор.AutoSize = true; + this.Администратор.Font = new System.Drawing.Font("Times New Roman", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + this.Администратор.Location = new System.Drawing.Point(60, 24); + this.Администратор.Name = "Администратор"; + this.Администратор.Size = new System.Drawing.Size(147, 23); + this.Администратор.TabIndex = 1; + this.Администратор.Text = "Администратор"; + this.Администратор.Click += new System.EventHandler(this.label1_Click); + // + // button1 + // + this.button1.Location = new System.Drawing.Point(375, 26); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(75, 23); + this.button1.TabIndex = 2; + this.button1.Text = "товары"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // button2 + // + this.button2.Location = new System.Drawing.Point(465, 26); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(75, 23); + this.button2.TabIndex = 3; + this.button2.Text = "заказы"; + this.button2.UseVisualStyleBackColor = true; + this.button2.Click += new System.EventHandler(this.button2_Click); + // + // FORM2 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.Chartreuse; + this.ClientSize = new System.Drawing.Size(800, 450); + this.Controls.Add(this.button2); + this.Controls.Add(this.button1); + this.Controls.Add(this.Администратор); + this.Controls.Add(this.dataGridView1); + this.Name = "FORM2"; + this.Text = "FORM2"; + this.Load += new System.EventHandler(this.FORM2_Load); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.DataGridView dataGridView1; + private System.Windows.Forms.Label Администратор; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.Button button2; + } +} \ No newline at end of file diff --git a/FORM2.cs b/FORM2.cs new file mode 100644 index 0000000..8024e78 --- /dev/null +++ b/FORM2.cs @@ -0,0 +1,82 @@ +using MySql.Data.MySqlClient; +using NeshinaPolina07_11; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace dem +{ + public partial class FORM2 : Form + { + + public FORM2() + { + InitializeComponent(); + } + + private void label1_Click(object sender, EventArgs e) + { + + } + + private void FORM2_Load(object sender, EventArgs e) + { + + } + + private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) + { + + } + + private void button1_Click(object sender, EventArgs e) + { + try + { + var qwe = DB.GetInstance(); + var con = qwe.GetConnection(); + string qwerty = "select * from products"; + using (MySqlCommand cmd = new MySqlCommand(qwerty, con)) + using (MySqlDataAdapter adapter = new MySqlDataAdapter(cmd)) + { + DataTable dt = new DataTable(); + adapter.Fill(dt); + dataGridView1.DataSource = dt; + } + } + catch (Exception ex) + { + MessageBox.Show("Ошибка загрузки данных: " + ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + private void button2_Click(object sender, EventArgs e) + { + try + { + var qwe = DB.GetInstance(); + var con = qwe.GetConnection(); + string qwerty = "select * from orders"; + using (MySqlCommand cmd = new MySqlCommand(qwerty, con)) + using (MySqlDataAdapter adapter = new MySqlDataAdapter(cmd)) + { + DataTable dt = new DataTable(); + adapter.Fill(dt); + dataGridView1.DataSource = dt; + } + } + catch (Exception ex) + { + MessageBox.Show("Ошибка загрузки данных: " + ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + } + + +} diff --git a/FORM2.resx b/FORM2.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/FORM2.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/FORM3.Designer.cs b/FORM3.Designer.cs new file mode 100644 index 0000000..97a6041 --- /dev/null +++ b/FORM3.Designer.cs @@ -0,0 +1,81 @@ +namespace dem +{ + partial class FORM3 + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.dataGridView1 = new System.Windows.Forms.DataGridView(); + this.Клиент = new System.Windows.Forms.Label(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); + this.SuspendLayout(); + // + // dataGridView1 + // + this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dataGridView1.Location = new System.Drawing.Point(68, 104); + this.dataGridView1.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + this.dataGridView1.Name = "dataGridView1"; + this.dataGridView1.Size = new System.Drawing.Size(718, 371); + this.dataGridView1.TabIndex = 0; + this.dataGridView1.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellContentClick); + // + // Клиент + // + this.Клиент.AutoSize = true; + this.Клиент.Font = new System.Drawing.Font("Times New Roman", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + this.Клиент.Location = new System.Drawing.Point(64, 42); + this.Клиент.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.Клиент.Name = "Клиент"; + this.Клиент.Size = new System.Drawing.Size(74, 23); + this.Клиент.TabIndex = 1; + this.Клиент.Text = "Клиент"; + this.Клиент.UseWaitCursor = true; + // + // FORM3 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.Chartreuse; + this.ClientSize = new System.Drawing.Size(812, 501); + this.Controls.Add(this.Клиент); + this.Controls.Add(this.dataGridView1); + this.Font = new System.Drawing.Font("Times New Roman", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + this.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + this.Name = "FORM3"; + this.Text = "FORM3"; + ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.DataGridView dataGridView1; + private System.Windows.Forms.Label Клиент; + } +} \ No newline at end of file diff --git a/FORM3.cs b/FORM3.cs new file mode 100644 index 0000000..9776563 --- /dev/null +++ b/FORM3.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace dem +{ + public partial class FORM3 : Form + { + public FORM3() + { + InitializeComponent(); + } + + private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) + { + + } + } +} diff --git a/FORM3.resx b/FORM3.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/FORM3.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/FORM4.Designer.cs b/FORM4.Designer.cs new file mode 100644 index 0000000..dc033d9 --- /dev/null +++ b/FORM4.Designer.cs @@ -0,0 +1,75 @@ +namespace dem +{ + partial class FORM4 + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.dataGridView1 = new System.Windows.Forms.DataGridView(); + this.label1 = new System.Windows.Forms.Label(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); + this.SuspendLayout(); + // + // dataGridView1 + // + this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dataGridView1.Location = new System.Drawing.Point(24, 77); + this.dataGridView1.Name = "dataGridView1"; + this.dataGridView1.Size = new System.Drawing.Size(765, 359); + this.dataGridView1.TabIndex = 0; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("Times New Roman", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + this.label1.Location = new System.Drawing.Point(66, 35); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(101, 23); + this.label1.TabIndex = 1; + this.label1.Text = "Менеджер"; + // + // FORM4 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.Chartreuse; + this.ClientSize = new System.Drawing.Size(800, 450); + this.Controls.Add(this.label1); + this.Controls.Add(this.dataGridView1); + this.Name = "FORM4"; + this.Text = "FORM4"; + ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.DataGridView dataGridView1; + private System.Windows.Forms.Label label1; + } +} \ No newline at end of file diff --git a/FORM4.cs b/FORM4.cs new file mode 100644 index 0000000..0ac613b --- /dev/null +++ b/FORM4.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace dem +{ + public partial class FORM4 : Form + { + public FORM4() + { + InitializeComponent(); + } + } +} diff --git a/FORM4.resx b/FORM4.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/FORM4.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Form1.cs b/Form1.cs new file mode 100644 index 0000000..f324b09 --- /dev/null +++ b/Form1.cs @@ -0,0 +1,96 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using System; +using System.Windows.Forms; +using MySql.Data.MySqlClient; +using static System.Windows.Forms.VisualStyles.VisualStyleElement.Button; +using static System.Windows.Forms.VisualStyles.VisualStyleElement; +using System.Data.SqlClient; +using NeshinaPolina07_11; + + +namespace dem +{ + public partial class Form1 : Form + { + public Form1() + { + InitializeComponent(); + checkBox1.Checked = false; + } + private void button1_Click(object sender, EventArgs e) + { + + } + + private void checkBox1_CheckedChanged(object sender, EventArgs e) + { + textBox2.UseSystemPasswordChar = !checkBox1.Checked; + } + + private void button1_Click_1(object sender, EventArgs e) + { + string login = textBox1.Text.Trim(); + string password = textBox2.Text; + + if (string.IsNullOrEmpty(login) || string.IsNullOrEmpty(password)) + { + MessageBox.Show("Введите логин и пароль!"); + return; + } + + var db = DB.GetInstance(); + var connection = db.GetConnection(); + + string query = "SELECT role_id FROM users WHERE login = @login AND password_hash = @password"; + + using (var command = new MySqlCommand(query, connection)) + { + command.Parameters.AddWithValue("@login", login); + command.Parameters.AddWithValue("@password", password); + + object result = command.ExecuteScalar(); + + if (result != null && int.TryParse(result.ToString(), out int roleId)) + { + switch (roleId) + { + case 1: + new FORM2().Show(); + break; + case 2: + new FORM3().Show(); + break; + case 3: + new FORM4().Show(); + break; + default: + MessageBox.Show("Неизвестная роль пользователя."); + return; + } + this.Hide(); + } + else + { + MessageBox.Show("Неверный логин или пароль! Попробуйте ещё раз."); + } + } + } + + private void groupBox1_Enter(object sender, EventArgs e) + { + + } + } +} + + + + diff --git a/Form1.designer.cs b/Form1.designer.cs new file mode 100644 index 0000000..9700ad6 --- /dev/null +++ b/Form1.designer.cs @@ -0,0 +1,139 @@ +namespace dem +{ + partial class Form1 + { + /// + /// Обязательная переменная конструктора. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Освободить все используемые ресурсы. + /// + /// истинно, если управляемый ресурс должен быть удален; иначе ложно. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Код, автоматически созданный конструктором форм Windows + + /// + /// Требуемый метод для поддержки конструктора — не изменяйте + /// содержимое этого метода с помощью редактора кода. + /// + private void InitializeComponent() + { + this.textBox1 = new System.Windows.Forms.TextBox(); + this.textBox2 = new System.Windows.Forms.TextBox(); + this.button1 = new System.Windows.Forms.Button(); + this.label1 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.checkBox1 = new System.Windows.Forms.CheckBox(); + this.groupBox1.SuspendLayout(); + this.SuspendLayout(); + // + // textBox1 + // + this.textBox1.Location = new System.Drawing.Point(323, 182); + this.textBox1.Name = "textBox1"; + this.textBox1.Size = new System.Drawing.Size(100, 22); + this.textBox1.TabIndex = 0; + // + // textBox2 + // + this.textBox2.Location = new System.Drawing.Point(323, 104); + this.textBox2.Name = "textBox2"; + this.textBox2.Size = new System.Drawing.Size(100, 22); + this.textBox2.TabIndex = 1; + // + // button1 + // + this.button1.BackColor = System.Drawing.Color.MediumSpringGreen; + this.button1.Location = new System.Drawing.Point(283, 270); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(171, 71); + this.button1.TabIndex = 2; + this.button1.Text = "Вход"; + this.button1.UseVisualStyleBackColor = false; + this.button1.Click += new System.EventHandler(this.button1_Click_1); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(353, 62); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(42, 15); + this.label1.TabIndex = 3; + this.label1.Text = "Логин"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(347, 150); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(48, 15); + this.label2.TabIndex = 4; + this.label2.Text = "Пароль"; + // + // groupBox1 + // + this.groupBox1.BackColor = System.Drawing.Color.Chartreuse; + this.groupBox1.Controls.Add(this.checkBox1); + this.groupBox1.Controls.Add(this.button1); + this.groupBox1.Controls.Add(this.label1); + this.groupBox1.Controls.Add(this.label2); + this.groupBox1.Controls.Add(this.textBox2); + this.groupBox1.Controls.Add(this.textBox1); + this.groupBox1.Font = new System.Drawing.Font("Times New Roman", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + this.groupBox1.Location = new System.Drawing.Point(28, 12); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(746, 416); + this.groupBox1.TabIndex = 5; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "groupBox1"; + this.groupBox1.Enter += new System.EventHandler(this.groupBox1_Enter); + // + // checkBox1 + // + this.checkBox1.AutoSize = true; + this.checkBox1.Location = new System.Drawing.Point(323, 211); + this.checkBox1.Name = "checkBox1"; + this.checkBox1.Size = new System.Drawing.Size(124, 19); + this.checkBox1.TabIndex = 5; + this.checkBox1.Text = "Показать пароль?"; + this.checkBox1.UseVisualStyleBackColor = true; + // + // Form1 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(800, 450); + this.Controls.Add(this.groupBox1); + this.Name = "Form1"; + this.Text = "Form1"; + this.TransparencyKey = System.Drawing.SystemColors.ActiveBorder; + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.TextBox textBox1; + private System.Windows.Forms.TextBox textBox2; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.CheckBox checkBox1; + } +} + diff --git a/Form1.resx b/Form1.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/Form1.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Program.cs b/Program.cs new file mode 100644 index 0000000..086e7c8 --- /dev/null +++ b/Program.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace dem +{ + internal static class Program + { + /// + /// Главная точка входа для приложения. + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new Form1()); + } + } +} diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..1e9862a --- /dev/null +++ b/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Общие сведения об этой сборке предоставляются следующим набором +// набора атрибутов. Измените значения этих атрибутов для изменения сведений, +// связанных со сборкой. +[assembly: AssemblyTitle("dem")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("dem")] +[assembly: AssemblyCopyright("Copyright © 2025")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Установка значения False для параметра ComVisible делает типы в этой сборке невидимыми +// для компонентов COM. Если необходимо обратиться к типу в этой сборке через +// COM, следует установить атрибут ComVisible в TRUE для этого типа. +[assembly: ComVisible(false)] + +// Следующий GUID служит для идентификации библиотеки типов, если этот проект будет видимым для COM +[assembly: Guid("5d054239-5404-47f9-87ac-9d5c45a69faf")] + +// Сведения о версии сборки состоят из указанных ниже четырех значений: +// +// Основной номер версии +// Дополнительный номер версии +// Номер сборки +// Редакция +// +// Можно задать все значения или принять номера сборки и редакции по умолчанию +// используя "*", как показано ниже: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Properties/Resources.Designer.cs b/Properties/Resources.Designer.cs new file mode 100644 index 0000000..61d9ab3 --- /dev/null +++ b/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// Этот код создан программным средством. +// Версия среды выполнения: 4.0.30319.42000 +// +// Изменения в этом файле могут привести к неправильному поведению и будут утрачены, если +// код создан повторно. +// +//------------------------------------------------------------------------------ + +namespace dem.Properties +{ + + + /// + /// Класс ресурсов со строгим типом для поиска локализованных строк и пр. + /// + // Этот класс был автоматически создан при помощи StronglyTypedResourceBuilder + // класс с помощью таких средств, как ResGen или Visual Studio. + // Для добавления или удаления члена измените файл .ResX, а затем перезапустите ResGen + // с параметром /str или заново постройте свой VS-проект. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.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() + { + } + + /// + /// Возврат кэшированного экземпляра ResourceManager, используемого этим классом. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("dem.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Переопределяет свойство CurrentUICulture текущего потока для всех + /// подстановки ресурсов с помощью этого класса ресурсов со строгим типом. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/Properties/Resources.resx b/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Properties/Settings.Designer.cs b/Properties/Settings.Designer.cs new file mode 100644 index 0000000..ed10286 --- /dev/null +++ b/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace dem.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.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; + } + } + } +} diff --git a/Properties/Settings.settings b/Properties/Settings.settings new file mode 100644 index 0000000..3964565 --- /dev/null +++ b/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/bin/Debug/MySql.Data.dll b/bin/Debug/MySql.Data.dll new file mode 100644 index 0000000..a851892 Binary files /dev/null and b/bin/Debug/MySql.Data.dll differ diff --git a/bin/Debug/dem.exe b/bin/Debug/dem.exe new file mode 100644 index 0000000..35c3c9b Binary files /dev/null and b/bin/Debug/dem.exe differ diff --git a/bin/Debug/dem.exe.config b/bin/Debug/dem.exe.config new file mode 100644 index 0000000..56efbc7 --- /dev/null +++ b/bin/Debug/dem.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/bin/Debug/dem.pdb b/bin/Debug/dem.pdb new file mode 100644 index 0000000..3867344 Binary files /dev/null and b/bin/Debug/dem.pdb differ diff --git a/dem.csproj b/dem.csproj new file mode 100644 index 0000000..a81b869 --- /dev/null +++ b/dem.csproj @@ -0,0 +1,114 @@ + + + + + Debug + AnyCPU + {5D054239-5404-47F9-87AC-9D5C45A69FAF} + WinExe + dem + dem + v4.7.2 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\..\..\..\Desktop\MySql.Data.dll + + + + + + + + + + + + + + + + + Form + + + Form1.cs + + + Form + + + FORM2.cs + + + Form + + + FORM3.cs + + + Form + + + FORM4.cs + + + + + Form1.cs + + + FORM2.cs + + + FORM3.cs + + + FORM4.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + \ No newline at end of file diff --git a/dem.sln b/dem.sln new file mode 100644 index 0000000..5bc5307 --- /dev/null +++ b/dem.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.8.34511.84 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "dem", "dem.csproj", "{5D054239-5404-47F9-87AC-9D5C45A69FAF}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {5D054239-5404-47F9-87AC-9D5C45A69FAF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5D054239-5404-47F9-87AC-9D5C45A69FAF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5D054239-5404-47F9-87AC-9D5C45A69FAF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5D054239-5404-47F9-87AC-9D5C45A69FAF}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {006444F0-E46E-489E-83FF-541217CF4BCB} + EndGlobalSection +EndGlobal diff --git a/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs b/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs new file mode 100644 index 0000000..3871b18 --- /dev/null +++ b/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] diff --git a/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/obj/Debug/DesignTimeResolveAssemblyReferences.cache new file mode 100644 index 0000000..8b9b776 Binary files /dev/null and b/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ diff --git a/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..ebf9f50 Binary files /dev/null and b/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/obj/Debug/dem.FORM2.resources b/obj/Debug/dem.FORM2.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/obj/Debug/dem.FORM2.resources differ diff --git a/obj/Debug/dem.FORM3.resources b/obj/Debug/dem.FORM3.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/obj/Debug/dem.FORM3.resources differ diff --git a/obj/Debug/dem.FORM4.resources b/obj/Debug/dem.FORM4.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/obj/Debug/dem.FORM4.resources differ diff --git a/obj/Debug/dem.Form1.resources b/obj/Debug/dem.Form1.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/obj/Debug/dem.Form1.resources differ diff --git a/obj/Debug/dem.Properties.Resources.resources b/obj/Debug/dem.Properties.Resources.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/obj/Debug/dem.Properties.Resources.resources differ diff --git a/obj/Debug/dem.csproj.AssemblyReference.cache b/obj/Debug/dem.csproj.AssemblyReference.cache new file mode 100644 index 0000000..d9a0196 Binary files /dev/null and b/obj/Debug/dem.csproj.AssemblyReference.cache differ diff --git a/obj/Debug/dem.csproj.CopyComplete b/obj/Debug/dem.csproj.CopyComplete new file mode 100644 index 0000000..e69de29 diff --git a/obj/Debug/dem.csproj.CoreCompileInputs.cache b/obj/Debug/dem.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..2d04395 --- /dev/null +++ b/obj/Debug/dem.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +be492fbb606796161ca9f73dfad379f644775f8e4c24b2daec70ae341d321b80 diff --git a/obj/Debug/dem.csproj.FileListAbsolute.txt b/obj/Debug/dem.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..023945a --- /dev/null +++ b/obj/Debug/dem.csproj.FileListAbsolute.txt @@ -0,0 +1,15 @@ +C:\Users\Student\Documents\Git\Calculator_\dem\obj\Debug\dem.csproj.AssemblyReference.cache +C:\Users\Student\Documents\Git\Calculator_\dem\obj\Debug\dem.Form1.resources +C:\Users\Student\Documents\Git\Calculator_\dem\obj\Debug\dem.Properties.Resources.resources +C:\Users\Student\Documents\Git\Calculator_\dem\obj\Debug\dem.csproj.GenerateResource.cache +C:\Users\Student\Documents\Git\Calculator_\dem\obj\Debug\dem.csproj.CoreCompileInputs.cache +C:\Users\Student\Documents\Git\Calculator_\dem\bin\Debug\dem.exe.config +C:\Users\Student\Documents\Git\Calculator_\dem\bin\Debug\dem.exe +C:\Users\Student\Documents\Git\Calculator_\dem\bin\Debug\dem.pdb +C:\Users\Student\Documents\Git\Calculator_\dem\bin\Debug\MySql.Data.dll +C:\Users\Student\Documents\Git\Calculator_\dem\obj\Debug\dem.csproj.CopyComplete +C:\Users\Student\Documents\Git\Calculator_\dem\obj\Debug\dem.exe +C:\Users\Student\Documents\Git\Calculator_\dem\obj\Debug\dem.pdb +C:\Users\Student\Documents\Git\Calculator_\dem\obj\Debug\dem.FORM2.resources +C:\Users\Student\Documents\Git\Calculator_\dem\obj\Debug\dem.FORM3.resources +C:\Users\Student\Documents\Git\Calculator_\dem\obj\Debug\dem.FORM4.resources diff --git a/obj/Debug/dem.csproj.GenerateResource.cache b/obj/Debug/dem.csproj.GenerateResource.cache new file mode 100644 index 0000000..b7c4748 Binary files /dev/null and b/obj/Debug/dem.csproj.GenerateResource.cache differ diff --git a/obj/Debug/dem.exe b/obj/Debug/dem.exe new file mode 100644 index 0000000..35c3c9b Binary files /dev/null and b/obj/Debug/dem.exe differ diff --git a/obj/Debug/dem.pdb b/obj/Debug/dem.pdb new file mode 100644 index 0000000..3867344 Binary files /dev/null and b/obj/Debug/dem.pdb differ diff --git a/obj/Release/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs b/obj/Release/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs new file mode 100644 index 0000000..3871b18 --- /dev/null +++ b/obj/Release/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] diff --git a/obj/Release/dem.csproj.AssemblyReference.cache b/obj/Release/dem.csproj.AssemblyReference.cache new file mode 100644 index 0000000..8bb23c0 Binary files /dev/null and b/obj/Release/dem.csproj.AssemblyReference.cache differ