diff --git a/.vs/Diplom B/v16/.suo b/.vs/Diplom B/v16/.suo index c98c921..9171388 100644 Binary files a/.vs/Diplom B/v16/.suo and b/.vs/Diplom B/v16/.suo differ diff --git a/DB/MainDB.cs b/DB/MainDB.cs index 767a99d..ccc0909 100644 --- a/DB/MainDB.cs +++ b/DB/MainDB.cs @@ -14,8 +14,13 @@ namespace Diplom_B.DB { public DbSet Zakazchiki { get; set; } public DbSet Users { get; set; } + public DbSet Izdeliya { get; set; } - public MainDB() { Database.EnsureCreated(); } + + public MainDB() { + //Database.Migrate(); + Database.EnsureCreated(); + } protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { @@ -32,15 +37,26 @@ namespace Diplom_B.DB public string Name { get; set; } public string Pass { get; set; } } - public class Zakazchik { - [Key] [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)] public int Id { get; set; } public string Name { get; set; } public string Adres { get; set; } public string Phone { get; set; } } - + public class Izdelie + { + [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int Id { get; set; } + public string Name { get; set; } + public string DecNum { get; set; } + public string Shifr { get; set; } + public string Litera { get; set; } + public double Cena { get; set; } + public int OtdelRazrab { get; set; } + public string Ved { get; set; } + public string GlavKonstr { get; set; } + } } diff --git a/Diplom B.csproj b/Diplom B.csproj index 91b3085..94812eb 100644 --- a/Diplom B.csproj +++ b/Diplom B.csproj @@ -242,12 +242,21 @@ FormLogin.cs + + Form + + + IzdForm.cs + FormLogin.cs + + IzdForm.cs + ResXFileCodeGenerator Resources.Designer.cs diff --git a/FormLogin.Designer.cs b/FormLogin.Designer.cs index 55ae196..af80e21 100644 --- a/FormLogin.Designer.cs +++ b/FormLogin.Designer.cs @@ -31,10 +31,10 @@ namespace Diplom_B { this.button1 = new System.Windows.Forms.Button(); this.label1 = new System.Windows.Forms.Label(); - this.textBox1 = new System.Windows.Forms.TextBox(); this.label2 = new System.Windows.Forms.Label(); this.textBox2 = new System.Windows.Forms.TextBox(); this.label3 = new System.Windows.Forms.Label(); + this.comboBox1 = new System.Windows.Forms.ComboBox(); this.SuspendLayout(); // // button1 @@ -42,7 +42,7 @@ namespace Diplom_B this.button1.Location = new System.Drawing.Point(190, 58); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(75, 23); - this.button1.TabIndex = 0; + this.button1.TabIndex = 3; this.button1.Text = "Войти"; this.button1.UseVisualStyleBackColor = true; this.button1.Click += new System.EventHandler(this.button1_Click); @@ -56,13 +56,6 @@ namespace Diplom_B this.label1.TabIndex = 1; this.label1.Text = "Пользователь:"; // - // textBox1 - // - this.textBox1.Location = new System.Drawing.Point(101, 6); - this.textBox1.Name = "textBox1"; - this.textBox1.Size = new System.Drawing.Size(164, 20); - this.textBox1.TabIndex = 3; - // // label2 // this.label2.AutoSize = true; @@ -77,7 +70,7 @@ namespace Diplom_B this.textBox2.Location = new System.Drawing.Point(101, 32); this.textBox2.Name = "textBox2"; this.textBox2.Size = new System.Drawing.Size(164, 20); - this.textBox2.TabIndex = 5; + this.textBox2.TabIndex = 2; this.textBox2.UseSystemPasswordChar = true; // // label3 @@ -90,15 +83,28 @@ namespace Diplom_B this.label3.TabIndex = 6; this.label3.Text = "Отображение ошибки"; // + // comboBox1 + // + this.comboBox1.FormattingEnabled = true; + this.comboBox1.Items.AddRange(new object[] { + "Разработчик", + "Конструктор", + "Монтажник", + "Упаковщик"}); + this.comboBox1.Location = new System.Drawing.Point(101, 6); + this.comboBox1.Name = "comboBox1"; + this.comboBox1.Size = new System.Drawing.Size(161, 21); + this.comboBox1.TabIndex = 1; + // // FormLogin // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(274, 92); + this.Controls.Add(this.comboBox1); this.Controls.Add(this.label3); this.Controls.Add(this.textBox2); this.Controls.Add(this.label2); - this.Controls.Add(this.textBox1); this.Controls.Add(this.label1); this.Controls.Add(this.button1); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; @@ -117,10 +123,10 @@ namespace Diplom_B private System.Windows.Forms.Button button1; private System.Windows.Forms.Label label1; - private System.Windows.Forms.TextBox textBox1; private System.Windows.Forms.Label label2; private System.Windows.Forms.TextBox textBox2; private System.Windows.Forms.Label label3; + private System.Windows.Forms.ComboBox comboBox1; } } diff --git a/FormLogin.cs b/FormLogin.cs index c7242a2..7a5280d 100644 --- a/FormLogin.cs +++ b/FormLogin.cs @@ -22,7 +22,7 @@ namespace Diplom_B private void button1_Click(object sender, EventArgs e) { label3.Text = ""; - var usr = new User(textBox1.Text, textBox2.Text); + var usr = new User(comboBox1.Text, comboBox1.Text); if (!usr.CheckUser()) { label3.Text = "Пользователя нет"; @@ -34,6 +34,10 @@ namespace Diplom_B return; } + this.Hide(); + var izdForm = new IzdForm(); + izdForm.Closed += (s, args) => this.Close(); + izdForm.Show(); } } } diff --git a/IzdForm.Designer.cs b/IzdForm.Designer.cs new file mode 100644 index 0000000..37fcff4 --- /dev/null +++ b/IzdForm.Designer.cs @@ -0,0 +1,385 @@ + +namespace Diplom_B +{ + partial class IzdForm + { + /// + /// 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.searchBox = new System.Windows.Forms.TextBox(); + this.resetSearchButton = new System.Windows.Forms.Button(); + this.label1 = new System.Windows.Forms.Label(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.label5 = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.vedBox = new System.Windows.Forms.TextBox(); + this.otdRazBox = new System.Windows.Forms.TextBox(); + this.cenaBox = new System.Windows.Forms.TextBox(); + this.literaBox = new System.Windows.Forms.TextBox(); + this.shifrBox = new System.Windows.Forms.TextBox(); + this.decBox = new System.Windows.Forms.TextBox(); + this.idBox = new System.Windows.Forms.TextBox(); + this.label2 = new System.Windows.Forms.Label(); + this.label6 = new System.Windows.Forms.Label(); + this.label7 = new System.Windows.Forms.Label(); + this.label8 = new System.Windows.Forms.Label(); + this.glavKonstrBox = new System.Windows.Forms.TextBox(); + this.label9 = new System.Windows.Forms.Label(); + this.createButton = new System.Windows.Forms.Button(); + this.changeButton = new System.Windows.Forms.Button(); + this.deleteButton = new System.Windows.Forms.Button(); + this.selectButton = new System.Windows.Forms.Button(); + this.errorLable = new System.Windows.Forms.Label(); + this.nameBox = new System.Windows.Forms.TextBox(); + this.label10 = new System.Windows.Forms.Label(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); + this.groupBox1.SuspendLayout(); + this.SuspendLayout(); + // + // dataGridView1 + // + this.dataGridView1.AllowUserToAddRows = false; + this.dataGridView1.AllowUserToDeleteRows = false; + this.dataGridView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dataGridView1.ColumnHeadersVisible = false; + this.dataGridView1.Location = new System.Drawing.Point(345, 38); + this.dataGridView1.Name = "dataGridView1"; + this.dataGridView1.ReadOnly = true; + this.dataGridView1.Size = new System.Drawing.Size(470, 384); + this.dataGridView1.TabIndex = 0; + // + // searchBox + // + this.searchBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.searchBox.Location = new System.Drawing.Point(387, 12); + this.searchBox.Name = "searchBox"; + this.searchBox.Size = new System.Drawing.Size(347, 20); + this.searchBox.TabIndex = 3; + this.searchBox.Tag = ""; + // + // resetSearchButton + // + this.resetSearchButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.resetSearchButton.Location = new System.Drawing.Point(740, 10); + this.resetSearchButton.Name = "resetSearchButton"; + this.resetSearchButton.Size = new System.Drawing.Size(75, 23); + this.resetSearchButton.TabIndex = 4; + this.resetSearchButton.Text = "Сбросить"; + this.resetSearchButton.UseVisualStyleBackColor = true; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(342, 15); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(39, 13); + this.label1.TabIndex = 5; + this.label1.Text = "Поиск"; + // + // groupBox1 + // + this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left))); + this.groupBox1.Controls.Add(this.label10); + this.groupBox1.Controls.Add(this.nameBox); + this.groupBox1.Controls.Add(this.errorLable); + this.groupBox1.Controls.Add(this.selectButton); + this.groupBox1.Controls.Add(this.deleteButton); + this.groupBox1.Controls.Add(this.changeButton); + this.groupBox1.Controls.Add(this.createButton); + this.groupBox1.Controls.Add(this.label9); + this.groupBox1.Controls.Add(this.glavKonstrBox); + this.groupBox1.Controls.Add(this.label8); + this.groupBox1.Controls.Add(this.label7); + this.groupBox1.Controls.Add(this.label6); + this.groupBox1.Controls.Add(this.label5); + this.groupBox1.Controls.Add(this.label4); + this.groupBox1.Controls.Add(this.label3); + this.groupBox1.Controls.Add(this.vedBox); + this.groupBox1.Controls.Add(this.otdRazBox); + this.groupBox1.Controls.Add(this.cenaBox); + this.groupBox1.Controls.Add(this.literaBox); + this.groupBox1.Controls.Add(this.shifrBox); + this.groupBox1.Controls.Add(this.decBox); + this.groupBox1.Controls.Add(this.idBox); + this.groupBox1.Controls.Add(this.label2); + this.groupBox1.Location = new System.Drawing.Point(12, 10); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(324, 412); + this.groupBox1.TabIndex = 6; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "Информационное окно"; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(79, 128); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(44, 13); + this.label5.TabIndex = 10; + this.label5.Text = "Литера"; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(87, 102); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(36, 13); + this.label4.TabIndex = 9; + this.label4.Text = "Шифр"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(29, 76); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(94, 13); + this.label3.TabIndex = 8; + this.label3.Text = "Децимальный №"; + // + // vedBox + // + this.vedBox.Location = new System.Drawing.Point(129, 203); + this.vedBox.Name = "vedBox"; + this.vedBox.Size = new System.Drawing.Size(185, 20); + this.vedBox.TabIndex = 7; + // + // otdRazBox + // + this.otdRazBox.Location = new System.Drawing.Point(129, 177); + this.otdRazBox.Name = "otdRazBox"; + this.otdRazBox.Size = new System.Drawing.Size(185, 20); + this.otdRazBox.TabIndex = 6; + // + // cenaBox + // + this.cenaBox.Location = new System.Drawing.Point(129, 151); + this.cenaBox.Name = "cenaBox"; + this.cenaBox.Size = new System.Drawing.Size(185, 20); + this.cenaBox.TabIndex = 5; + // + // literaBox + // + this.literaBox.Location = new System.Drawing.Point(129, 125); + this.literaBox.Name = "literaBox"; + this.literaBox.Size = new System.Drawing.Size(185, 20); + this.literaBox.TabIndex = 4; + // + // shifrBox + // + this.shifrBox.Location = new System.Drawing.Point(129, 99); + this.shifrBox.Name = "shifrBox"; + this.shifrBox.Size = new System.Drawing.Size(185, 20); + this.shifrBox.TabIndex = 3; + // + // decBox + // + this.decBox.Location = new System.Drawing.Point(129, 73); + this.decBox.Name = "decBox"; + this.decBox.Size = new System.Drawing.Size(185, 20); + this.decBox.TabIndex = 2; + // + // idBox + // + this.idBox.Location = new System.Drawing.Point(129, 21); + this.idBox.Name = "idBox"; + this.idBox.Size = new System.Drawing.Size(185, 20); + this.idBox.TabIndex = 1; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(105, 24); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(18, 13); + this.label2.TabIndex = 0; + this.label2.Text = "№"; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Location = new System.Drawing.Point(90, 154); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(33, 13); + this.label6.TabIndex = 11; + this.label6.Text = "Цена"; + // + // label7 + // + this.label7.AutoSize = true; + this.label7.Location = new System.Drawing.Point(18, 180); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(105, 13); + this.label7.TabIndex = 12; + this.label7.Text = "Отдел-разработчик"; + // + // label8 + // + this.label8.AutoSize = true; + this.label8.Location = new System.Drawing.Point(71, 206); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(52, 13); + this.label8.TabIndex = 13; + this.label8.Text = "Ведущий"; + // + // glavKonstrBox + // + this.glavKonstrBox.Location = new System.Drawing.Point(129, 229); + this.glavKonstrBox.Name = "glavKonstrBox"; + this.glavKonstrBox.Size = new System.Drawing.Size(185, 20); + this.glavKonstrBox.TabIndex = 14; + // + // label9 + // + this.label9.AutoSize = true; + this.label9.Location = new System.Drawing.Point(6, 232); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(117, 13); + this.label9.TabIndex = 15; + this.label9.Text = "Главный конструктор"; + // + // createButton + // + this.createButton.Location = new System.Drawing.Point(239, 255); + this.createButton.Name = "createButton"; + this.createButton.Size = new System.Drawing.Size(75, 23); + this.createButton.TabIndex = 16; + this.createButton.Text = "Создать"; + this.createButton.UseVisualStyleBackColor = true; + this.createButton.Click += new System.EventHandler(this.createButton_Click); + // + // changeButton + // + this.changeButton.Location = new System.Drawing.Point(163, 255); + this.changeButton.Name = "changeButton"; + this.changeButton.Size = new System.Drawing.Size(75, 23); + this.changeButton.TabIndex = 17; + this.changeButton.Text = "Изменить"; + this.changeButton.UseVisualStyleBackColor = true; + // + // deleteButton + // + this.deleteButton.Location = new System.Drawing.Point(87, 255); + this.deleteButton.Name = "deleteButton"; + this.deleteButton.Size = new System.Drawing.Size(75, 23); + this.deleteButton.TabIndex = 18; + this.deleteButton.Text = "Удалить"; + this.deleteButton.UseVisualStyleBackColor = true; + // + // selectButton + // + this.selectButton.Location = new System.Drawing.Point(239, 284); + this.selectButton.Name = "selectButton"; + this.selectButton.Size = new System.Drawing.Size(75, 23); + this.selectButton.TabIndex = 19; + this.selectButton.Text = "Выбрать"; + this.selectButton.UseVisualStyleBackColor = true; + // + // errorLable + // + this.errorLable.AutoSize = true; + this.errorLable.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + this.errorLable.ForeColor = System.Drawing.Color.Red; + this.errorLable.Location = new System.Drawing.Point(6, 289); + this.errorLable.Name = "errorLable"; + this.errorLable.Size = new System.Drawing.Size(149, 13); + this.errorLable.TabIndex = 20; + this.errorLable.Text = "Информация об ошибке"; + // + // nameBox + // + this.nameBox.Location = new System.Drawing.Point(129, 47); + this.nameBox.Name = "nameBox"; + this.nameBox.Size = new System.Drawing.Size(185, 20); + this.nameBox.TabIndex = 21; + // + // label10 + // + this.label10.AutoSize = true; + this.label10.Location = new System.Drawing.Point(40, 50); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(83, 13); + this.label10.TabIndex = 22; + this.label10.Text = "Наименование"; + // + // IzdForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(827, 434); + this.Controls.Add(this.groupBox1); + this.Controls.Add(this.label1); + this.Controls.Add(this.resetSearchButton); + this.Controls.Add(this.searchBox); + this.Controls.Add(this.dataGridView1); + this.Name = "IzdForm"; + this.Text = "IzdForm"; + ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit(); + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.DataGridView dataGridView1; + private System.Windows.Forms.TextBox searchBox; + private System.Windows.Forms.Button resetSearchButton; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.TextBox vedBox; + private System.Windows.Forms.TextBox otdRazBox; + private System.Windows.Forms.TextBox cenaBox; + private System.Windows.Forms.TextBox literaBox; + private System.Windows.Forms.TextBox shifrBox; + private System.Windows.Forms.TextBox decBox; + private System.Windows.Forms.TextBox idBox; + private System.Windows.Forms.Label errorLable; + private System.Windows.Forms.Button selectButton; + private System.Windows.Forms.Button deleteButton; + private System.Windows.Forms.Button changeButton; + private System.Windows.Forms.Button createButton; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.TextBox glavKonstrBox; + private System.Windows.Forms.Label label8; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.TextBox nameBox; + } +} \ No newline at end of file diff --git a/IzdForm.cs b/IzdForm.cs new file mode 100644 index 0000000..429247a --- /dev/null +++ b/IzdForm.cs @@ -0,0 +1,130 @@ +using Diplom_B.DB; +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 Diplom_B +{ + public partial class IzdForm : Form + { + public IzdForm() + { + InitializeComponent(); + errorLable.Visible = false; + try + { + using (var db = new MainDB()){ + var res = (from a in db.Izdeliya + select a).ToArray(); + UpdateTable(res); + } + } + catch + { + ShowError(); + } + } + + + private void createButton_Click(object sender, EventArgs e) + { + try + { + if (!double.TryParse(cenaBox.Text, out double cena)) + { + ShowError("Ошибка цены."); + return; + } + if (!int.TryParse(otdRazBox.Text, out int otdRaz)) + { + ShowError("Ошибка отдела-разработчика."); + return; + } + + using (var db = new MainDB()) + { + var r = new Izdelie() + { + Name = nameBox.Text, + DecNum = decBox.Text, + Shifr = shifrBox.Text, + Litera = literaBox.Text, + Cena = cena, + OtdelRazrab = otdRaz, + Ved = vedBox.Text, + GlavKonstr = glavKonstrBox.Text + }; + db.Izdeliya.Add(r); + db.SaveChanges(); + var izd = (from a in db.Izdeliya + select a).ToArray(); + UpdateTable(izd); + } + } + catch (Exception ex) + { + ShowError(ex.Message); + } + } + + + private void UpdateTable(Izdelie[] arr) + { + { + var r = dataGridView1.Rows; + while (r.Count > 0) + r.Remove(r[0]); + var c = dataGridView1.Columns; + while (c.Count > 0) + c.Remove(c[0]); + } + { + var c = dataGridView1.Columns; + c.Add("Id", "№"); + c["Id"].Width = 4; + c.Add("Name", "Наименование"); + c.Add("DecNum", "Децимальный №"); + c.Add("Shifr", "Шифр"); + c.Add("Litera", "Литера"); + c.Add("Cena", "Цена"); + c.Add("OtdelRazrab", "Отдел"); + c.Add("Ved", "Ведущий"); + c.Add("GlavKonstr", "Главный конструктор"); + } + { + var r = dataGridView1.Rows; + foreach(var izd in arr) + r.Add(new object[] { + izd.Id, + izd.Name, + izd.DecNum, + izd.Shifr, + izd.Litera, + izd.Cena, + izd.OtdelRazrab, + izd.Ved, + izd.GlavKonstr + }); + } + } + private void ShowError(string msg = null) + { + errorLable.Text = string.IsNullOrEmpty(msg) ? "Неизвестная ошибка." : msg; + errorLable.Visible = true; + new Task(() => { + Task.Delay(5000).Wait(); + if (InvokeRequired) Invoke((Action)(() => { errorLable.Visible = false; })); + else errorLable.Visible = false; + }).Start(); + } + + + + } +} diff --git a/IzdForm.resx b/IzdForm.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/IzdForm.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 index c64554c..b3bc769 100644 --- a/Program.cs +++ b/Program.cs @@ -15,10 +15,11 @@ namespace Diplom_B [STAThread] static void Main() { - Init(); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); - Application.Run(new FormLogin()); + Init(); + //Application.Run(new FormLogin()); + Application.Run(new IzdForm()); } static void Init() { diff --git a/bin/Debug/Diplom B.exe b/bin/Debug/Diplom B.exe index 6a21e31..6bbecfd 100644 Binary files a/bin/Debug/Diplom B.exe and b/bin/Debug/Diplom B.exe differ diff --git a/bin/Debug/Diplom B.pdb b/bin/Debug/Diplom B.pdb index 8b2de91..c3c1cfd 100644 Binary files a/bin/Debug/Diplom B.pdb and b/bin/Debug/Diplom B.pdb differ diff --git a/bin/Debug/Diplom_B.db b/bin/Debug/Diplom_B.db index f1c8a12..412ceab 100644 Binary files a/bin/Debug/Diplom_B.db and b/bin/Debug/Diplom_B.db differ diff --git a/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/obj/Debug/DesignTimeResolveAssemblyReferences.cache index 6af2086..d5b15b7 100644 Binary files a/obj/Debug/DesignTimeResolveAssemblyReferences.cache and b/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ diff --git a/obj/Debug/Diplom B.csproj.CoreCompileInputs.cache b/obj/Debug/Diplom B.csproj.CoreCompileInputs.cache index a1b4299..3a1e68a 100644 --- a/obj/Debug/Diplom B.csproj.CoreCompileInputs.cache +++ b/obj/Debug/Diplom B.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -b8adb16d2dcef24b62fcb89078d0decb74aab707 +dca0df6c7585e9532b1eb684c0d45286f26b293c diff --git a/obj/Debug/Diplom B.csproj.FileListAbsolute.txt b/obj/Debug/Diplom B.csproj.FileListAbsolute.txt index 52dafdb..1b5c474 100644 --- a/obj/Debug/Diplom B.csproj.FileListAbsolute.txt +++ b/obj/Debug/Diplom B.csproj.FileListAbsolute.txt @@ -49,3 +49,4 @@ D:\GIT\Diplom B\obj\Debug\Diplom B.csproj.CopyComplete D:\GIT\Diplom B\obj\Debug\Diplom B.exe D:\GIT\Diplom B\obj\Debug\Diplom B.pdb D:\GIT\Diplom B\obj\Debug\Diplom_B.FormLogin.resources +D:\GIT\Diplom B\obj\Debug\Diplom_B.IzdForm.resources diff --git a/obj/Debug/Diplom B.csproj.GenerateResource.cache b/obj/Debug/Diplom B.csproj.GenerateResource.cache index eb2495a..fec310a 100644 Binary files a/obj/Debug/Diplom B.csproj.GenerateResource.cache and b/obj/Debug/Diplom B.csproj.GenerateResource.cache differ diff --git a/obj/Debug/Diplom B.exe b/obj/Debug/Diplom B.exe index 6a21e31..6bbecfd 100644 Binary files a/obj/Debug/Diplom B.exe and b/obj/Debug/Diplom B.exe differ diff --git a/obj/Debug/Diplom B.pdb b/obj/Debug/Diplom B.pdb index 8b2de91..c3c1cfd 100644 Binary files a/obj/Debug/Diplom B.pdb and b/obj/Debug/Diplom B.pdb differ diff --git a/obj/Debug/Diplom_B.IzdForm.resources b/obj/Debug/Diplom_B.IzdForm.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/obj/Debug/Diplom_B.IzdForm.resources differ