From fa6498b47de8f9ebbdcae0c297ee653b6463bad7 Mon Sep 17 00:00:00 2001 From: ksenianeva <95441235+ksenianeva@users.noreply.github.com> Date: Fri, 20 Oct 2023 09:23:18 +0400 Subject: [PATCH] 1st lab --- NevaevaLibrary/NevaevaLibrary.sln | 8 +- .../Components/ComboBoxControl.cs | 9 +- .../Components/ListBoxControl.cs | 8 +- .../Components/MailControl.Designer.cs | 33 +--- .../NevaevaLibrary/Components/MailControl.cs | 49 ++--- NevaevaLibrary/TestApp/FormTest.Designer.cs | 173 ++++++++++++++++++ NevaevaLibrary/TestApp/FormTest.cs | 70 +++++++ NevaevaLibrary/TestApp/FormTest.resx | 60 ++++++ NevaevaLibrary/TestApp/Program.cs | 17 ++ NevaevaLibrary/TestApp/TestApp.csproj | 15 ++ NevaevaLibrary/TestApp/Worker.cs | 25 +++ 11 files changed, 409 insertions(+), 58 deletions(-) create mode 100644 NevaevaLibrary/TestApp/FormTest.Designer.cs create mode 100644 NevaevaLibrary/TestApp/FormTest.cs create mode 100644 NevaevaLibrary/TestApp/FormTest.resx create mode 100644 NevaevaLibrary/TestApp/Program.cs create mode 100644 NevaevaLibrary/TestApp/TestApp.csproj create mode 100644 NevaevaLibrary/TestApp/Worker.cs diff --git a/NevaevaLibrary/NevaevaLibrary.sln b/NevaevaLibrary/NevaevaLibrary.sln index f04aeec..f2c2405 100644 --- a/NevaevaLibrary/NevaevaLibrary.sln +++ b/NevaevaLibrary/NevaevaLibrary.sln @@ -3,7 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.3.32825.248 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NevaevaLibrary", "NevaevaLibrary\NevaevaLibrary.csproj", "{E7CA58DB-9F0F-4380-96F7-EAFDA623CE84}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NevaevaLibrary", "NevaevaLibrary\NevaevaLibrary.csproj", "{E7CA58DB-9F0F-4380-96F7-EAFDA623CE84}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestApp", "TestApp\TestApp.csproj", "{38BE5966-BF1C-4D26-AC7A-74EDDD25A6B3}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -15,6 +17,10 @@ Global {E7CA58DB-9F0F-4380-96F7-EAFDA623CE84}.Debug|Any CPU.Build.0 = Debug|Any CPU {E7CA58DB-9F0F-4380-96F7-EAFDA623CE84}.Release|Any CPU.ActiveCfg = Release|Any CPU {E7CA58DB-9F0F-4380-96F7-EAFDA623CE84}.Release|Any CPU.Build.0 = Release|Any CPU + {38BE5966-BF1C-4D26-AC7A-74EDDD25A6B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {38BE5966-BF1C-4D26-AC7A-74EDDD25A6B3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {38BE5966-BF1C-4D26-AC7A-74EDDD25A6B3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {38BE5966-BF1C-4D26-AC7A-74EDDD25A6B3}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/NevaevaLibrary/NevaevaLibrary/Components/ComboBoxControl.cs b/NevaevaLibrary/NevaevaLibrary/Components/ComboBoxControl.cs index b3d6d2f..a1ec4ed 100644 --- a/NevaevaLibrary/NevaevaLibrary/Components/ComboBoxControl.cs +++ b/NevaevaLibrary/NevaevaLibrary/Components/ComboBoxControl.cs @@ -21,11 +21,14 @@ namespace NevaevaLibrary { get { - return comboBoxCustom.SelectedValue.ToString() ?? ""; + return comboBoxCustom.SelectedItem != null ? comboBoxCustom.SelectedItem.ToString() : ""; } set { - comboBoxCustom.SelectedValue = value; + if(comboBoxCustom.Items.Contains(value)) //если есть такой элемент, то помечаем, если нет, ничего не делаем + { + comboBoxCustom.SelectedItem = value; + } } } @@ -46,7 +49,7 @@ namespace NevaevaLibrary private void comboBoxCustom_SelectedIndexChanged(object sender, EventArgs e) { - SelectedValueChange.Invoke(comboBoxCustom.SelectedItem.ToString()); + SelectedValueChange?.Invoke(comboBoxCustom.SelectedItem.ToString()); } } } diff --git a/NevaevaLibrary/NevaevaLibrary/Components/ListBoxControl.cs b/NevaevaLibrary/NevaevaLibrary/Components/ListBoxControl.cs index 67982ee..cb110dd 100644 --- a/NevaevaLibrary/NevaevaLibrary/Components/ListBoxControl.cs +++ b/NevaevaLibrary/NevaevaLibrary/Components/ListBoxControl.cs @@ -42,7 +42,7 @@ namespace NevaevaLibrary } } - public T? getSelectedItems() + public T? getSelectedItem() { if (template == null || !fromChar.HasValue || !toChar.HasValue || listBox.SelectedIndex == -1) throw new ArgumentException("Не хватает данных!"); var type = typeof(T); @@ -60,10 +60,10 @@ namespace NevaevaLibrary string fieldName = word.Substring(1, word.Length - 2); var field = fields.FirstOrDefault(x => x.Name == fieldName); if (field == null) continue; - int indexBefore = i > 0 ? Array.IndexOf(words, wordsTemplate[i-1]) : 0; + int indexBefore = i > 0 ? Array.IndexOf(words, wordsTemplate[i-1]) : -1; int indexAfter = i < wordsTemplate.Length - 1 ? Array.IndexOf(words, wordsTemplate[i+1]) : wordsTemplate.Length - 1; - var fieldValue = String.Join(' ', words.Skip(indexBefore).Take(indexAfter - indexBefore - 1).ToArray()); - field.SetValue(item, fieldValue); + var fieldValue = String.Join(' ', words.Skip(indexBefore + 1).Take(indexAfter - indexBefore - 1).ToArray()); + field.SetValue(item, Convert.ChangeType(fieldValue, field.FieldType)); } } diff --git a/NevaevaLibrary/NevaevaLibrary/Components/MailControl.Designer.cs b/NevaevaLibrary/NevaevaLibrary/Components/MailControl.Designer.cs index 4c95b14..249656e 100644 --- a/NevaevaLibrary/NevaevaLibrary/Components/MailControl.Designer.cs +++ b/NevaevaLibrary/NevaevaLibrary/Components/MailControl.Designer.cs @@ -30,8 +30,6 @@ { this.components = new System.ComponentModel.Container(); this.textBoxMail = new System.Windows.Forms.TextBox(); - this.checkBoxNull = new System.Windows.Forms.CheckBox(); - this.labelCheckAddress = new System.Windows.Forms.Label(); this.toolTipEmail = new System.Windows.Forms.ToolTip(this.components); this.SuspendLayout(); // @@ -42,41 +40,20 @@ this.textBoxMail.Size = new System.Drawing.Size(257, 27); this.textBoxMail.TabIndex = 0; this.textBoxMail.TextChanged += new System.EventHandler(this.textBoxMail_TextChanged); - // - // checkBoxNull - // - this.checkBoxNull.AutoSize = true; - this.checkBoxNull.Location = new System.Drawing.Point(3, 36); - this.checkBoxNull.Name = "checkBoxNull"; - this.checkBoxNull.Size = new System.Drawing.Size(126, 24); - this.checkBoxNull.TabIndex = 1; - this.checkBoxNull.Text = "Не заполнять"; - this.checkBoxNull.UseVisualStyleBackColor = true; - this.checkBoxNull.CheckedChanged += new System.EventHandler(this.checkBoxNull_CheckedChanged); - // - // labelCheckAddress - // - this.labelCheckAddress.AutoSize = true; - this.labelCheckAddress.BackColor = System.Drawing.SystemColors.Control; - this.labelCheckAddress.ForeColor = System.Drawing.Color.Firebrick; - this.labelCheckAddress.Location = new System.Drawing.Point(5, 69); - this.labelCheckAddress.Name = "labelCheckAddress"; - this.labelCheckAddress.Size = new System.Drawing.Size(0, 20); - this.labelCheckAddress.TabIndex = 2; + this.textBoxMail.MouseEnter += new System.EventHandler(this.textBoxMail_MouseEnter); // // toolTipEmail // - this.toolTipEmail.Popup += new System.Windows.Forms.PopupEventHandler(this.toolTipEmail_Popup); + this.toolTipEmail.ToolTipIcon = System.Windows.Forms.ToolTipIcon.Info; + this.toolTipEmail.ToolTipTitle = "Пример ввода"; // // MailControl // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.labelCheckAddress); - this.Controls.Add(this.checkBoxNull); this.Controls.Add(this.textBoxMail); this.Name = "MailControl"; - this.Size = new System.Drawing.Size(264, 102); + this.Size = new System.Drawing.Size(264, 34); this.ResumeLayout(false); this.PerformLayout(); @@ -85,8 +62,6 @@ #endregion private TextBox textBoxMail; - private CheckBox checkBoxNull; - private Label labelCheckAddress; private ToolTip toolTipEmail; } } \ No newline at end of file diff --git a/NevaevaLibrary/NevaevaLibrary/Components/MailControl.cs b/NevaevaLibrary/NevaevaLibrary/Components/MailControl.cs index c2a1653..c158fba 100644 --- a/NevaevaLibrary/NevaevaLibrary/Components/MailControl.cs +++ b/NevaevaLibrary/NevaevaLibrary/Components/MailControl.cs @@ -18,46 +18,53 @@ namespace NevaevaLibrary } public event Action TextChange; + private string? tooltipText; + public string errorMessage = ""; - public string Email + public string? Email { get { - return textBoxMail.Text; + //не забыл ли пользователь ввести регулярку и соответствует ли она + if (validateEmailRegex == null) + { + errorMessage = "Пустой шаблон!"; + return null; + } + else if (!validateEmailRegex.IsMatch(textBoxMail.Text)) + { + errorMessage = "Некорректный адрес эл. почты!"; + return null; + } + else return textBoxMail.Text; } set { - if (validateEmailRegex == null) throw new NullSampleException("Пустой шаблон!"); - if (!validateEmailRegex.IsMatch(value)) labelCheckAddress.Text = "Некорректный адрес эл. почты!"; - else textBoxMail.Text = value; + if (validateEmailRegex == null) errorMessage = "Пустой шаблон!"; + else if (!validateEmailRegex.IsMatch(value)) errorMessage = "Некорректный адрес эл. почты!"; + else + { + textBoxMail.Text = value; + } } } - private void checkBoxNull_CheckedChanged(object sender, EventArgs e) //enable entering a text + clean text area + private void textBoxMail_TextChanged(object sender, EventArgs e) { - if (checkBoxNull.Checked) - { - textBoxMail.Enabled = false; - } - else - { - textBoxMail.Enabled = true; - textBoxMail.Text = ""; - } + TextChange?.Invoke(textBoxMail.Text); + Email = textBoxMail.Text; } - private void textBoxMail_TextChanged(object sender, EventArgs e) + public void setTooltipText(string text) { - TextChange.Invoke(textBoxMail.Text); + tooltipText = text; } - public void toolTipEmail_Popup(object sender, PopupEventArgs e) + private void textBoxMail_MouseEnter(object sender, EventArgs e) { - toolTipEmail.ToolTipTitle = "qwerty@gmail.com"; + toolTipEmail.Show(tooltipText ?? "", textBoxMail); } - - //new Regex("^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"); } } \ No newline at end of file diff --git a/NevaevaLibrary/TestApp/FormTest.Designer.cs b/NevaevaLibrary/TestApp/FormTest.Designer.cs new file mode 100644 index 0000000..0b71350 --- /dev/null +++ b/NevaevaLibrary/TestApp/FormTest.Designer.cs @@ -0,0 +1,173 @@ +namespace TestApp +{ + partial class FormTest + { + /// + /// 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.comboBoxControl = new NevaevaLibrary.ComboBoxControl(); + this.buttonInsert = new System.Windows.Forms.Button(); + this.buttonClear = new System.Windows.Forms.Button(); + this.buttonGetSelected = new System.Windows.Forms.Button(); + this.buttonSetSelected = new System.Windows.Forms.Button(); + this.mailControl = new NevaevaLibrary.MailControl(); + this.buttonAddTemplate = new System.Windows.Forms.Button(); + this.listBoxControl = new NevaevaLibrary.ListBoxControl(); + this.buttonInsertList = new System.Windows.Forms.Button(); + this.buttonGetSelectedList = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // comboBoxControl + // + this.comboBoxControl.Location = new System.Drawing.Point(12, 12); + this.comboBoxControl.Name = "comboBoxControl"; + this.comboBoxControl.SelectedValue = ""; + this.comboBoxControl.Size = new System.Drawing.Size(366, 44); + this.comboBoxControl.TabIndex = 0; + this.comboBoxControl.SelectedValueChange += new System.Action(this.comboBoxControl_SelectedValueChange); + // + // buttonInsert + // + this.buttonInsert.Location = new System.Drawing.Point(12, 48); + this.buttonInsert.Name = "buttonInsert"; + this.buttonInsert.Size = new System.Drawing.Size(94, 29); + this.buttonInsert.TabIndex = 1; + this.buttonInsert.Text = "Заполнить"; + this.buttonInsert.UseVisualStyleBackColor = true; + this.buttonInsert.Click += new System.EventHandler(this.buttonInsert_Click); + // + // buttonClear + // + this.buttonClear.Location = new System.Drawing.Point(112, 48); + this.buttonClear.Name = "buttonClear"; + this.buttonClear.Size = new System.Drawing.Size(94, 29); + this.buttonClear.TabIndex = 2; + this.buttonClear.Text = "Очистить"; + this.buttonClear.UseVisualStyleBackColor = true; + this.buttonClear.Click += new System.EventHandler(this.buttonClear_Click); + // + // buttonGetSelected + // + this.buttonGetSelected.Location = new System.Drawing.Point(212, 48); + this.buttonGetSelected.Name = "buttonGetSelected"; + this.buttonGetSelected.Size = new System.Drawing.Size(94, 29); + this.buttonGetSelected.TabIndex = 3; + this.buttonGetSelected.Text = "Получить"; + this.buttonGetSelected.UseVisualStyleBackColor = true; + this.buttonGetSelected.Click += new System.EventHandler(this.buttonGetSelected_Click); + // + // buttonSetSelected + // + this.buttonSetSelected.Location = new System.Drawing.Point(312, 48); + this.buttonSetSelected.Name = "buttonSetSelected"; + this.buttonSetSelected.Size = new System.Drawing.Size(99, 29); + this.buttonSetSelected.TabIndex = 4; + this.buttonSetSelected.Text = "Установить"; + this.buttonSetSelected.UseVisualStyleBackColor = true; + this.buttonSetSelected.Click += new System.EventHandler(this.buttonSetSelected_Click); + // + // mailControl + // + this.mailControl.Email = ""; + this.mailControl.Location = new System.Drawing.Point(11, 95); + this.mailControl.Name = "mailControl"; + this.mailControl.Size = new System.Drawing.Size(312, 94); + this.mailControl.TabIndex = 5; + this.mailControl.validateEmailRegex = null; + // + // buttonAddTemplate + // + this.buttonAddTemplate.Location = new System.Drawing.Point(12, 160); + this.buttonAddTemplate.Name = "buttonAddTemplate"; + this.buttonAddTemplate.Size = new System.Drawing.Size(143, 29); + this.buttonAddTemplate.TabIndex = 6; + this.buttonAddTemplate.Text = "Передать шаблон"; + this.buttonAddTemplate.UseVisualStyleBackColor = true; + this.buttonAddTemplate.Click += new System.EventHandler(this.buttonAddTemplate_Click); + // + // listBoxControl + // + this.listBoxControl.Location = new System.Drawing.Point(479, 12); + this.listBoxControl.Name = "listBoxControl"; + this.listBoxControl.SelectedIndex = -1; + this.listBoxControl.Size = new System.Drawing.Size(608, 237); + this.listBoxControl.TabIndex = 7; + // + // buttonInsertList + // + this.buttonInsertList.Location = new System.Drawing.Point(483, 268); + this.buttonInsertList.Name = "buttonInsertList"; + this.buttonInsertList.Size = new System.Drawing.Size(94, 29); + this.buttonInsertList.TabIndex = 8; + this.buttonInsertList.Text = "Заполнить"; + this.buttonInsertList.UseVisualStyleBackColor = true; + this.buttonInsertList.Click += new System.EventHandler(this.buttonInsertList_Click); + // + // buttonGetSelectedList + // + this.buttonGetSelectedList.Location = new System.Drawing.Point(596, 268); + this.buttonGetSelectedList.Name = "buttonGetSelectedList"; + this.buttonGetSelectedList.Size = new System.Drawing.Size(94, 29); + this.buttonGetSelectedList.TabIndex = 9; + this.buttonGetSelectedList.Text = "Получить"; + this.buttonGetSelectedList.UseVisualStyleBackColor = true; + this.buttonGetSelectedList.Click += new System.EventHandler(this.buttonGetSelectedList_Click); + // + // FormTest + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(1109, 316); + this.Controls.Add(this.buttonGetSelectedList); + this.Controls.Add(this.buttonInsertList); + this.Controls.Add(this.listBoxControl); + this.Controls.Add(this.buttonAddTemplate); + this.Controls.Add(this.mailControl); + this.Controls.Add(this.buttonSetSelected); + this.Controls.Add(this.buttonGetSelected); + this.Controls.Add(this.buttonClear); + this.Controls.Add(this.buttonInsert); + this.Controls.Add(this.comboBoxControl); + this.Name = "FormTest"; + this.Text = "FormTest"; + this.ResumeLayout(false); + + } + + #endregion + + private NevaevaLibrary.ComboBoxControl comboBoxControl; + private Button buttonInsert; + private Button buttonClear; + private Button buttonGetSelected; + private Button buttonSetSelected; + private NevaevaLibrary.MailControl mailControl; + private Button buttonAddTemplate; + private NevaevaLibrary.ListBoxControl listBoxControl; + private Button buttonInsertList; + private Button buttonGetSelectedList; + } +} \ No newline at end of file diff --git a/NevaevaLibrary/TestApp/FormTest.cs b/NevaevaLibrary/TestApp/FormTest.cs new file mode 100644 index 0000000..d4dc2f9 --- /dev/null +++ b/NevaevaLibrary/TestApp/FormTest.cs @@ -0,0 +1,70 @@ +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; + +namespace TestApp +{ + public partial class FormTest : Form + { + public FormTest() + { + InitializeComponent(); + } + + private void buttonInsert_Click(object sender, EventArgs e) + { + List testStrings = new List() { "str1", "str2", "str3" }; + comboBoxControl.addItems(testStrings); + } + + private void buttonClear_Click(object sender, EventArgs e) + { + comboBoxControl.clear(); + } + + private void buttonGetSelected_Click(object sender, EventArgs e) + { + MessageBox.Show(comboBoxControl.SelectedValue, "Полученное значение"); + } + + private void buttonSetSelected_Click(object sender, EventArgs e) + { + comboBoxControl.SelectedValue = "str2"; + } + + private void comboBoxControl_SelectedValueChange(string obj) + { + MessageBox.Show(obj, "event"); + } + + private void buttonAddTemplate_Click(object sender, EventArgs e) + { + mailControl.validateEmailRegex = new Regex("^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"); + mailControl.setTooltipText("qwerty@gmail.com"); + } + + private void buttonInsertList_Click(object sender, EventArgs e) + { + listBoxControl.setParams("{name} works in {department} for {workYears} year(s)", '{', '}'); + Worker w1 = new Worker("Vasya", "Management", 5); + Worker w2 = new Worker("Vasya Utkin", "Tech department cool stuff", 1); + Worker w3 = new Worker("Ivan", "Management", 2); + + List workers = new List { w1, w2, w3 }; + listBoxControl.setItems(workers); + } + + private void buttonGetSelectedList_Click(object sender, EventArgs e) + { + Worker? worker = listBoxControl.getSelectedItem(); + if (worker is not null) MessageBox.Show(worker.ToString() + $"\n{worker.name}, {worker.department}, {worker.workYears}"); + } + } +} diff --git a/NevaevaLibrary/TestApp/FormTest.resx b/NevaevaLibrary/TestApp/FormTest.resx new file mode 100644 index 0000000..f298a7b --- /dev/null +++ b/NevaevaLibrary/TestApp/FormTest.resx @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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/NevaevaLibrary/TestApp/Program.cs b/NevaevaLibrary/TestApp/Program.cs new file mode 100644 index 0000000..626d24e --- /dev/null +++ b/NevaevaLibrary/TestApp/Program.cs @@ -0,0 +1,17 @@ +namespace TestApp +{ + 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 FormTest()); + } + } +} \ No newline at end of file diff --git a/NevaevaLibrary/TestApp/TestApp.csproj b/NevaevaLibrary/TestApp/TestApp.csproj new file mode 100644 index 0000000..9e5d392 --- /dev/null +++ b/NevaevaLibrary/TestApp/TestApp.csproj @@ -0,0 +1,15 @@ + + + + WinExe + net6.0-windows + enable + true + enable + + + + + + + \ No newline at end of file diff --git a/NevaevaLibrary/TestApp/Worker.cs b/NevaevaLibrary/TestApp/Worker.cs new file mode 100644 index 0000000..b881be0 --- /dev/null +++ b/NevaevaLibrary/TestApp/Worker.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace TestApp +{ + public class Worker + { + public string name; + public string department; + public int workYears; + + public Worker(string name, string department, int workYears) + { + this.name = name; + this.department = department; + this.workYears = workYears; + } + + public Worker() + { } + } +}