From c3b6b08a4e2f39faa5d761088d45e0664e16d4fe Mon Sep 17 00:00:00 2001 From: Artyom_Yashin Date: Thu, 5 Sep 2024 18:26:06 +0400 Subject: [PATCH] =?UTF-8?q?=D0=A1=D0=B4=D0=B5=D0=BB=D0=B0=D0=BB=20=D0=B4?= =?UTF-8?q?=D0=B2=D0=B5=20=D1=82=D0=B0=D1=81=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- KOP_Labs/KOP_Labs.sln | 31 +++ .../DateInputBox.Designer.cs | 61 ++++++ KOP_Labs/Library_var_4_lab_1/DateInputBox.cs | 66 ++++++ .../Library_var_4_lab_1/DateInputBox.resx | 123 +++++++++++ .../DropDownList.Designer.cs | 59 ++++++ KOP_Labs/Library_var_4_lab_1/DropDownList.cs | 62 ++++++ .../Library_var_4_lab_1/DropDownList.resx | 120 +++++++++++ .../InvalidArgumentException.cs | 18 ++ .../Library_var_4_lab_1.csproj | 10 + .../TemplateNotSetException.cs | 14 ++ KOP_Labs/TestProj/Form1.Designer.cs | 195 ++++++++++++++++++ KOP_Labs/TestProj/Form1.cs | 64 ++++++ KOP_Labs/TestProj/Form1.resx | 120 +++++++++++ KOP_Labs/TestProj/Program.cs | 17 ++ KOP_Labs/TestProj/TestProj.csproj | 15 ++ 15 files changed, 975 insertions(+) create mode 100644 KOP_Labs/KOP_Labs.sln create mode 100644 KOP_Labs/Library_var_4_lab_1/DateInputBox.Designer.cs create mode 100644 KOP_Labs/Library_var_4_lab_1/DateInputBox.cs create mode 100644 KOP_Labs/Library_var_4_lab_1/DateInputBox.resx create mode 100644 KOP_Labs/Library_var_4_lab_1/DropDownList.Designer.cs create mode 100644 KOP_Labs/Library_var_4_lab_1/DropDownList.cs create mode 100644 KOP_Labs/Library_var_4_lab_1/DropDownList.resx create mode 100644 KOP_Labs/Library_var_4_lab_1/InvalidArgumentException.cs create mode 100644 KOP_Labs/Library_var_4_lab_1/Library_var_4_lab_1.csproj create mode 100644 KOP_Labs/Library_var_4_lab_1/TemplateNotSetException.cs create mode 100644 KOP_Labs/TestProj/Form1.Designer.cs create mode 100644 KOP_Labs/TestProj/Form1.cs create mode 100644 KOP_Labs/TestProj/Form1.resx create mode 100644 KOP_Labs/TestProj/Program.cs create mode 100644 KOP_Labs/TestProj/TestProj.csproj diff --git a/KOP_Labs/KOP_Labs.sln b/KOP_Labs/KOP_Labs.sln new file mode 100644 index 0000000..56aba10 --- /dev/null +++ b/KOP_Labs/KOP_Labs.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.7.34031.279 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Library_var_4_lab_1", "Library_var_4_lab_1\Library_var_4_lab_1.csproj", "{54FEDC65-63CA-474A-9D78-FCACE673AA3F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestProj", "TestProj\TestProj.csproj", "{0FF632B3-8D31-403E-AC25-61283C15D2C9}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {54FEDC65-63CA-474A-9D78-FCACE673AA3F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {54FEDC65-63CA-474A-9D78-FCACE673AA3F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {54FEDC65-63CA-474A-9D78-FCACE673AA3F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {54FEDC65-63CA-474A-9D78-FCACE673AA3F}.Release|Any CPU.Build.0 = Release|Any CPU + {0FF632B3-8D31-403E-AC25-61283C15D2C9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0FF632B3-8D31-403E-AC25-61283C15D2C9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0FF632B3-8D31-403E-AC25-61283C15D2C9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0FF632B3-8D31-403E-AC25-61283C15D2C9}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {0115D661-19A6-4D29-9906-E1EA34CC92B2} + EndGlobalSection +EndGlobal diff --git a/KOP_Labs/Library_var_4_lab_1/DateInputBox.Designer.cs b/KOP_Labs/Library_var_4_lab_1/DateInputBox.Designer.cs new file mode 100644 index 0000000..69d4e1c --- /dev/null +++ b/KOP_Labs/Library_var_4_lab_1/DateInputBox.Designer.cs @@ -0,0 +1,61 @@ +namespace Library_var_4_lab_1 +{ + partial class DateInputBox + { + /// + /// Обязательная переменная конструктора. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Освободить все используемые ресурсы. + /// + /// истинно, если управляемый ресурс должен быть удален; иначе ложно. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Код, автоматически созданный конструктором компонентов + + /// + /// Требуемый метод для поддержки конструктора — не изменяйте + /// содержимое этого метода с помощью редактора кода. + /// + private void InitializeComponent() + { + components = new System.ComponentModel.Container(); + textBoxDateInput = new TextBox(); + toolTip1 = new ToolTip(components); + SuspendLayout(); + // + // textBoxDateInput + // + textBoxDateInput.Location = new Point(3, 3); + textBoxDateInput.Name = "textBoxDateInput"; + textBoxDateInput.Size = new Size(238, 27); + textBoxDateInput.TabIndex = 0; + textBoxDateInput.TextChanged += textBox_ValueChanged; + textBoxDateInput.MouseMove += textBox_MouseMove; + // + // DateInputBox + // + AutoScaleDimensions = new SizeF(8F, 20F); + AutoScaleMode = AutoScaleMode.Font; + Controls.Add(textBoxDateInput); + Name = "DateInputBox"; + Size = new Size(246, 39); + ResumeLayout(false); + PerformLayout(); + } + + #endregion + + private TextBox textBoxDateInput; + private ToolTip toolTip1; + } +} diff --git a/KOP_Labs/Library_var_4_lab_1/DateInputBox.cs b/KOP_Labs/Library_var_4_lab_1/DateInputBox.cs new file mode 100644 index 0000000..d3062e6 --- /dev/null +++ b/KOP_Labs/Library_var_4_lab_1/DateInputBox.cs @@ -0,0 +1,66 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Text.RegularExpressions; +using System.Threading.Tasks; +using System.Windows.Forms; +using static System.Windows.Forms.VisualStyles.VisualStyleElement; + +namespace Library_var_4_lab_1 +{ + public partial class DateInputBox : UserControl + { + public string Template = string.Empty; + private string Example = string.Empty; + public string Date + { + get + { + if (string.IsNullOrEmpty(Template)) + throw new TemplateNotSetException(); + Regex regex = new Regex(Template); + if (regex.IsMatch(textBoxDateInput.Text)) + return textBoxDateInput.Text; + else throw new InvalidArgumentException(); + } + set + { + Regex regex = new Regex(Template); + if (!string.IsNullOrEmpty(Template) && regex.IsMatch(value)) + textBoxDateInput.Text = value; + } + } + + private event EventHandler? _changeValue; + + public event EventHandler ChangeValue + { + add => _changeValue += value; + remove => _changeValue -= value; + } + public DateInputBox() + { + InitializeComponent(); + } + + public void setExample(string example) + { + Example = example; + } + + private void textBox_MouseMove(object sender, MouseEventArgs e) + { + toolTip1.SetToolTip(textBoxDateInput, Example); + } + + private void textBox_ValueChanged(object sender, EventArgs e) + { + _changeValue?.Invoke(this, e); + } + } +} + diff --git a/KOP_Labs/Library_var_4_lab_1/DateInputBox.resx b/KOP_Labs/Library_var_4_lab_1/DateInputBox.resx new file mode 100644 index 0000000..2704a16 --- /dev/null +++ b/KOP_Labs/Library_var_4_lab_1/DateInputBox.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + 17, 17 + + \ No newline at end of file diff --git a/KOP_Labs/Library_var_4_lab_1/DropDownList.Designer.cs b/KOP_Labs/Library_var_4_lab_1/DropDownList.Designer.cs new file mode 100644 index 0000000..9f88c5b --- /dev/null +++ b/KOP_Labs/Library_var_4_lab_1/DropDownList.Designer.cs @@ -0,0 +1,59 @@ +namespace Library_var_4_lab_1 +{ + partial class DropDownList + { + /// + /// Обязательная переменная конструктора. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Освободить все используемые ресурсы. + /// + /// истинно, если управляемый ресурс должен быть удален; иначе ложно. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Код, автоматически созданный конструктором компонентов + + /// + /// Требуемый метод для поддержки конструктора — не изменяйте + /// содержимое этого метода с помощью редактора кода. + /// + private void InitializeComponent() + { + comboBox = new ComboBox(); + SuspendLayout(); + // + // comboBox + // + comboBox.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; + comboBox.DropDownStyle = ComboBoxStyle.DropDownList; + comboBox.FormattingEnabled = true; + comboBox.Location = new Point(3, 3); + comboBox.Name = "comboBox"; + comboBox.Size = new Size(305, 28); + comboBox.TabIndex = 0; + comboBox.SelectedIndexChanged += comboBox_SelectedIndexChanged; + // + // DropDownList + // + AutoScaleDimensions = new SizeF(8F, 20F); + AutoScaleMode = AutoScaleMode.Font; + Controls.Add(comboBox); + Name = "DropDownList"; + Size = new Size(311, 230); + ResumeLayout(false); + } + + #endregion + + private ComboBox comboBox; + } +} diff --git a/KOP_Labs/Library_var_4_lab_1/DropDownList.cs b/KOP_Labs/Library_var_4_lab_1/DropDownList.cs new file mode 100644 index 0000000..c79ba2c --- /dev/null +++ b/KOP_Labs/Library_var_4_lab_1/DropDownList.cs @@ -0,0 +1,62 @@ +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 Library_var_4_lab_1 +{ + public partial class DropDownList : UserControl + { + private event EventHandler? _changeIndex; + + public event EventHandler ChangeIndex + { + add => _changeIndex += value; + remove => _changeIndex -= value; + } + + public DropDownList() + { + InitializeComponent(); + } + + public string SelectedItem + { + get => comboBox.SelectedIndex != -1 ? comboBox.SelectedItem.ToString() ?? string.Empty : string.Empty; + set + { + if (comboBox.Items.Contains(value)) + { + comboBox.SelectedItem = value; + } + else + { + comboBox.SelectedIndex = -1; + } + + } + } + + public void Input(string value) + { + if (string.IsNullOrEmpty(value)) + throw new ArgumentNullException("value"); + comboBox.Items.Add(value); + } + + public void ClearList() + { + comboBox.Items.Clear(); + } + + private void comboBox_SelectedIndexChanged(object sender, EventArgs e) + { + _changeIndex?.Invoke(this, e); + } + } +} diff --git a/KOP_Labs/Library_var_4_lab_1/DropDownList.resx b/KOP_Labs/Library_var_4_lab_1/DropDownList.resx new file mode 100644 index 0000000..af32865 --- /dev/null +++ b/KOP_Labs/Library_var_4_lab_1/DropDownList.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/KOP_Labs/Library_var_4_lab_1/InvalidArgumentException.cs b/KOP_Labs/Library_var_4_lab_1/InvalidArgumentException.cs new file mode 100644 index 0000000..eaae6cf --- /dev/null +++ b/KOP_Labs/Library_var_4_lab_1/InvalidArgumentException.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Threading.Tasks; + +namespace Library_var_4_lab_1 +{ + [Serializable] + internal class InvalidArgumentException : ApplicationException + { + public InvalidArgumentException() : base("Значение не соответсвует шаблону") { } + public InvalidArgumentException(string message) : base(message) { } + public InvalidArgumentException(string message, Exception exception) : base(message, exception) { } + public InvalidArgumentException(SerializationInfo info, StreamingContext context) : base(info, context) { } + } +} diff --git a/KOP_Labs/Library_var_4_lab_1/Library_var_4_lab_1.csproj b/KOP_Labs/Library_var_4_lab_1/Library_var_4_lab_1.csproj new file mode 100644 index 0000000..060aa1c --- /dev/null +++ b/KOP_Labs/Library_var_4_lab_1/Library_var_4_lab_1.csproj @@ -0,0 +1,10 @@ + + + + net6.0-windows + enable + true + enable + + + diff --git a/KOP_Labs/Library_var_4_lab_1/TemplateNotSetException.cs b/KOP_Labs/Library_var_4_lab_1/TemplateNotSetException.cs new file mode 100644 index 0000000..3af7e04 --- /dev/null +++ b/KOP_Labs/Library_var_4_lab_1/TemplateNotSetException.cs @@ -0,0 +1,14 @@ +using Microsoft.VisualBasic; +using System.Runtime.Serialization; + +namespace Library_var_4_lab_1 +{ + [Serializable] + internal class TemplateNotSetException : ApplicationException + { + public TemplateNotSetException() : base("Шаблон не задан") { } + public TemplateNotSetException(string message) : base(message) { } + public TemplateNotSetException(string message, Exception exception) : base(message, exception) { } + public TemplateNotSetException(SerializationInfo info, StreamingContext context) : base(info, context) { } + } +} \ No newline at end of file diff --git a/KOP_Labs/TestProj/Form1.Designer.cs b/KOP_Labs/TestProj/Form1.Designer.cs new file mode 100644 index 0000000..54d8e1b --- /dev/null +++ b/KOP_Labs/TestProj/Form1.Designer.cs @@ -0,0 +1,195 @@ +namespace TestProj +{ + partial class Form1 + { + /// + /// 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() + { + dropDownList1 = new Library_var_4_lab_1.DropDownList(); + textBox1 = new TextBox(); + buttonAdd = new Button(); + buttonGet = new Button(); + buttonSet = new Button(); + buttonClear = new Button(); + checkBox = new CheckBox(); + dateInputBox1 = new Library_var_4_lab_1.DateInputBox(); + buttonSetDate = new Button(); + buttonGetDate = new Button(); + buttonSetExample = new Button(); + buttonSetTemplate = new Button(); + SuspendLayout(); + // + // dropDownList1 + // + dropDownList1.Location = new Point(12, 12); + dropDownList1.Name = "dropDownList1"; + dropDownList1.SelectedItem = ""; + dropDownList1.Size = new Size(329, 44); + dropDownList1.TabIndex = 0; + // + // textBox1 + // + textBox1.Location = new Point(12, 62); + textBox1.Name = "textBox1"; + textBox1.Size = new Size(314, 27); + textBox1.TabIndex = 1; + // + // buttonAdd + // + buttonAdd.Location = new Point(12, 108); + buttonAdd.Name = "buttonAdd"; + buttonAdd.Size = new Size(94, 29); + buttonAdd.TabIndex = 2; + buttonAdd.Text = "Добавить"; + buttonAdd.UseVisualStyleBackColor = true; + buttonAdd.Click += buttonAdd_OnClick; + // + // buttonGet + // + buttonGet.Location = new Point(121, 108); + buttonGet.Name = "buttonGet"; + buttonGet.Size = new Size(94, 29); + buttonGet.TabIndex = 3; + buttonGet.Text = "Get"; + buttonGet.UseVisualStyleBackColor = true; + buttonGet.Click += buttonGet_OnClick; + // + // buttonSet + // + buttonSet.Location = new Point(232, 108); + buttonSet.Name = "buttonSet"; + buttonSet.Size = new Size(94, 29); + buttonSet.TabIndex = 4; + buttonSet.Text = "Set"; + buttonSet.UseVisualStyleBackColor = true; + buttonSet.Click += buttonSet_OnClick; + // + // buttonClear + // + buttonClear.Location = new Point(12, 143); + buttonClear.Name = "buttonClear"; + buttonClear.Size = new Size(94, 29); + buttonClear.TabIndex = 5; + buttonClear.Text = "Очистка"; + buttonClear.UseVisualStyleBackColor = true; + buttonClear.Click += buttonClear_OnClick; + // + // checkBox + // + checkBox.AutoSize = true; + checkBox.Location = new Point(371, 56); + checkBox.Name = "checkBox"; + checkBox.Size = new Size(93, 24); + checkBox.TabIndex = 6; + checkBox.Text = "checkBox"; + checkBox.UseVisualStyleBackColor = true; + // + // dateInputBox1 + // + dateInputBox1.Location = new Point(529, 12); + dateInputBox1.Name = "dateInputBox1"; + dateInputBox1.Size = new Size(245, 49); + dateInputBox1.TabIndex = 7; + // + // buttonSetDate + // + buttonSetDate.Location = new Point(12, 230); + buttonSetDate.Name = "buttonSetDate"; + buttonSetDate.Size = new Size(94, 29); + buttonSetDate.TabIndex = 8; + buttonSetDate.Text = "Ввод даты"; + buttonSetDate.UseVisualStyleBackColor = true; + buttonSetDate.Click += buttonSetDate_OnClick; + // + // buttonGetDate + // + buttonGetDate.Location = new Point(142, 230); + buttonGetDate.Name = "buttonGetDate"; + buttonGetDate.Size = new Size(109, 29); + buttonGetDate.TabIndex = 9; + buttonGetDate.Text = "Вывод даты"; + buttonGetDate.UseVisualStyleBackColor = true; + buttonGetDate.Click += buttonGetDate_OnClick; + // + // buttonSetExample + // + buttonSetExample.Location = new Point(142, 195); + buttonSetExample.Name = "buttonSetExample"; + buttonSetExample.Size = new Size(134, 29); + buttonSetExample.TabIndex = 10; + buttonSetExample.Text = "Ввод примера"; + buttonSetExample.UseVisualStyleBackColor = true; + buttonSetExample.Click += buttonSetExample_OnClick; + // + // buttonSetTemplate + // + buttonSetTemplate.Location = new Point(12, 195); + buttonSetTemplate.Name = "buttonSetTemplate"; + buttonSetTemplate.Size = new Size(124, 29); + buttonSetTemplate.TabIndex = 11; + buttonSetTemplate.Text = "Ввод шаблона"; + buttonSetTemplate.UseVisualStyleBackColor = true; + buttonSetTemplate.Click += buttonSetTemplate_OnClick; + // + // Form1 + // + AutoScaleDimensions = new SizeF(8F, 20F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(922, 549); + Controls.Add(buttonSetTemplate); + Controls.Add(buttonSetExample); + Controls.Add(buttonGetDate); + Controls.Add(buttonSetDate); + Controls.Add(dateInputBox1); + Controls.Add(checkBox); + Controls.Add(buttonClear); + Controls.Add(buttonSet); + Controls.Add(buttonGet); + Controls.Add(buttonAdd); + Controls.Add(textBox1); + Controls.Add(dropDownList1); + Name = "Form1"; + Text = "Form1"; + ResumeLayout(false); + PerformLayout(); + } + + #endregion + + private Library_var_4_lab_1.DropDownList dropDownList1; + private TextBox textBox1; + private Button buttonAdd; + private Button buttonGet; + private Button buttonSet; + private Button buttonClear; + private CheckBox checkBox; + private Library_var_4_lab_1.DateInputBox dateInputBox1; + private Button buttonSetDate; + private Button buttonGetDate; + private Button buttonSetExample; + private Button buttonSetTemplate; + } +} \ No newline at end of file diff --git a/KOP_Labs/TestProj/Form1.cs b/KOP_Labs/TestProj/Form1.cs new file mode 100644 index 0000000..a340f62 --- /dev/null +++ b/KOP_Labs/TestProj/Form1.cs @@ -0,0 +1,64 @@ +using Library_var_4_lab_1; + +namespace TestProj +{ + public partial class Form1 : Form + { + + public Form1() + { + InitializeComponent(); + dropDownList1.ChangeIndex += IsChanged; + dateInputBox1.ChangeValue += IsChanged; + } + + private void buttonAdd_OnClick(object sender, EventArgs e) + { + try + { + dropDownList1.Input(textBox1.Text); + } + catch (Exception ex) + { + MessageBox.Show(ex.Message); + } + } + + private void buttonClear_OnClick(object sender, EventArgs e) + { + dropDownList1.ClearList(); + } + + private void buttonSet_OnClick(object sender, EventArgs e) + { + dropDownList1.SelectedItem = textBox1.Text; + } + private void buttonGet_OnClick(object sender, EventArgs e) + { + textBox1.Text = dropDownList1.SelectedItem; + } + private void IsChanged(object? sender, EventArgs e) + { + checkBox.Checked = true; + } + + private void buttonSetTemplate_OnClick(object sender, EventArgs e) + { + dateInputBox1.Template = textBox1.Text; + } + private void buttonSetExample_OnClick(object sender, EventArgs e) + { + dateInputBox1.setExample(textBox1.Text); + } + + private void buttonSetDate_OnClick(object sender, EventArgs e) + { + dateInputBox1.Date = textBox1.Text; + } + + private void buttonGetDate_OnClick(object sender, EventArgs e) + { + textBox1.Text = dateInputBox1.Date; + } + } +} \ No newline at end of file diff --git a/KOP_Labs/TestProj/Form1.resx b/KOP_Labs/TestProj/Form1.resx new file mode 100644 index 0000000..af32865 --- /dev/null +++ b/KOP_Labs/TestProj/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/KOP_Labs/TestProj/Program.cs b/KOP_Labs/TestProj/Program.cs new file mode 100644 index 0000000..410d7ce --- /dev/null +++ b/KOP_Labs/TestProj/Program.cs @@ -0,0 +1,17 @@ +namespace TestProj +{ + internal static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + // To customize application configuration such as set high DPI settings or default font, + // see https://aka.ms/applicationconfiguration. + ApplicationConfiguration.Initialize(); + Application.Run(new Form1()); + } + } +} \ No newline at end of file diff --git a/KOP_Labs/TestProj/TestProj.csproj b/KOP_Labs/TestProj/TestProj.csproj new file mode 100644 index 0000000..71e53c7 --- /dev/null +++ b/KOP_Labs/TestProj/TestProj.csproj @@ -0,0 +1,15 @@ + + + + WinExe + net6.0-windows + enable + true + enable + + + + + + + \ No newline at end of file