From 9ee931a7475dba0168cf8c00be20f04369ba3011 Mon Sep 17 00:00:00 2001 From: Andrey Date: Thu, 19 Sep 2024 21:22:23 +0300 Subject: [PATCH] Working (mb need fixes) --- Components/Components.csproj | 10 ++ Components/Components.sln | 31 +++++ .../VisualComponents/Classes/Character.cs | 16 +++ .../Exceptions/WrongRangeException.cs | 16 +++ .../UserCheckedListBox.Designer.cs | 58 +++++++++ .../VisualComponents/UserCheckedListBox.cs | 86 +++++++++++++ .../VisualComponents/UserCheckedListBox.resx | 120 ++++++++++++++++++ .../VisualComponents/UserTextBox.Designer.cs | 58 +++++++++ .../VisualComponents/UserTextBox.cs | 91 +++++++++++++ .../VisualComponents/UserTextBox.resx | 120 ++++++++++++++++++ .../VisualComponents/UserTreeView.Designer.cs | 56 ++++++++ .../VisualComponents/UserTreeView.cs | 105 +++++++++++++++ .../VisualComponents/UserTreeView.resx | 120 ++++++++++++++++++ TestForm/Form1.Designer.cs | 80 ++++++++++++ TestForm/Form1.cs | 35 +++++ TestForm/Form1.resx | 120 ++++++++++++++++++ TestForm/Program.cs | 17 +++ TestForm/TestForm.csproj | 15 +++ 18 files changed, 1154 insertions(+) create mode 100644 Components/Components.csproj create mode 100644 Components/Components.sln create mode 100644 Components/Components/VisualComponents/Classes/Character.cs create mode 100644 Components/Components/VisualComponents/Exceptions/WrongRangeException.cs create mode 100644 Components/Components/VisualComponents/UserCheckedListBox.Designer.cs create mode 100644 Components/Components/VisualComponents/UserCheckedListBox.cs create mode 100644 Components/Components/VisualComponents/UserCheckedListBox.resx create mode 100644 Components/Components/VisualComponents/UserTextBox.Designer.cs create mode 100644 Components/Components/VisualComponents/UserTextBox.cs create mode 100644 Components/Components/VisualComponents/UserTextBox.resx create mode 100644 Components/Components/VisualComponents/UserTreeView.Designer.cs create mode 100644 Components/Components/VisualComponents/UserTreeView.cs create mode 100644 Components/Components/VisualComponents/UserTreeView.resx create mode 100644 TestForm/Form1.Designer.cs create mode 100644 TestForm/Form1.cs create mode 100644 TestForm/Form1.resx create mode 100644 TestForm/Program.cs create mode 100644 TestForm/TestForm.csproj diff --git a/Components/Components.csproj b/Components/Components.csproj new file mode 100644 index 0000000..3e210aa --- /dev/null +++ b/Components/Components.csproj @@ -0,0 +1,10 @@ + + + + net8.0-windows + enable + true + enable + + + diff --git a/Components/Components.sln b/Components/Components.sln new file mode 100644 index 0000000..34b4773 --- /dev/null +++ b/Components/Components.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.11.35222.181 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Components", "Components.csproj", "{81DCA34B-4D91-4C79-A0CC-65F1DB3BCC18}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestForm", "..\TestForm\TestForm.csproj", "{4E72B9A4-3B1A-4699-B103-CBE4558F5E66}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {81DCA34B-4D91-4C79-A0CC-65F1DB3BCC18}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {81DCA34B-4D91-4C79-A0CC-65F1DB3BCC18}.Debug|Any CPU.Build.0 = Debug|Any CPU + {81DCA34B-4D91-4C79-A0CC-65F1DB3BCC18}.Release|Any CPU.ActiveCfg = Release|Any CPU + {81DCA34B-4D91-4C79-A0CC-65F1DB3BCC18}.Release|Any CPU.Build.0 = Release|Any CPU + {4E72B9A4-3B1A-4699-B103-CBE4558F5E66}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4E72B9A4-3B1A-4699-B103-CBE4558F5E66}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4E72B9A4-3B1A-4699-B103-CBE4558F5E66}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4E72B9A4-3B1A-4699-B103-CBE4558F5E66}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {2984512D-D991-4B14-8074-FCDA2BC9A8DF} + EndGlobalSection +EndGlobal diff --git a/Components/Components/VisualComponents/Classes/Character.cs b/Components/Components/VisualComponents/Classes/Character.cs new file mode 100644 index 0000000..2eb61f4 --- /dev/null +++ b/Components/Components/VisualComponents/Classes/Character.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Components.Components.VisualComponents.Classes +{ + public class Character + { + public string? Race { get; set; } + public string? Class { get; set; } + public string? FullName { get; set; } + } + +} diff --git a/Components/Components/VisualComponents/Exceptions/WrongRangeException.cs b/Components/Components/VisualComponents/Exceptions/WrongRangeException.cs new file mode 100644 index 0000000..437cbf7 --- /dev/null +++ b/Components/Components/VisualComponents/Exceptions/WrongRangeException.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Components.Components.VisualComponents.Exceptions +{ + public class WrongRangeException : Exception + { + public WrongRangeException() { } + public WrongRangeException(string message) : base(message) { } + public WrongRangeException(string message, Exception inner) : base(message, inner) { } + } + +} diff --git a/Components/Components/VisualComponents/UserCheckedListBox.Designer.cs b/Components/Components/VisualComponents/UserCheckedListBox.Designer.cs new file mode 100644 index 0000000..1052b51 --- /dev/null +++ b/Components/Components/VisualComponents/UserCheckedListBox.Designer.cs @@ -0,0 +1,58 @@ +namespace Components +{ + partial class UserCheckedListBox + { + /// + /// Обязательная переменная конструктора. + /// + 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() + { + checkedListBox = new CheckedListBox(); + SuspendLayout(); + // + // checkedListBox + // + checkedListBox.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right; + checkedListBox.CheckOnClick = true; + checkedListBox.FormattingEnabled = true; + checkedListBox.Location = new Point(3, 3); + checkedListBox.Name = "checkedListBox"; + checkedListBox.Size = new Size(144, 136); + checkedListBox.TabIndex = 0; + checkedListBox.SelectedIndexChanged += this.checkedListBox_SelectedIndexChanged; + // + // UserCheckedListBox + // + AutoScaleDimensions = new SizeF(8F, 20F); + AutoScaleMode = AutoScaleMode.Font; + Controls.Add(checkedListBox); + Name = "UserCheckedListBox"; + ResumeLayout(false); + } + + #endregion + + private CheckedListBox checkedListBox; + } +} diff --git a/Components/Components/VisualComponents/UserCheckedListBox.cs b/Components/Components/VisualComponents/UserCheckedListBox.cs new file mode 100644 index 0000000..4b982fa --- /dev/null +++ b/Components/Components/VisualComponents/UserCheckedListBox.cs @@ -0,0 +1,86 @@ +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 Components +{ + public partial class UserCheckedListBox : UserControl + { + public UserCheckedListBox() + { + InitializeComponent(); + } + + private EventHandler _changeEvent; + + private void checkedListBox_SelectedIndexChanged(object sender, EventArgs e) + { + if (checkedListBox.CheckedItems.Count > 1) + { + foreach (int index in checkedListBox.CheckedIndices) + { + if (index != checkedListBox.SelectedIndex) + { + checkedListBox.SetItemChecked(index, false); + } + } + + } + _changeEvent?.Invoke(sender, e); + } + + public event EventHandler ChangeEvent + { + add + { + _changeEvent += value; + } + remove + { + _changeEvent -= value; + } + + } + public void Clear() + { + checkedListBox.Items.Clear(); + } + public void AddToList(string Value) + { + if (Value == null) + { + return; + } + checkedListBox.Items.Add(Value); + } + public string SelectedElement + { + get + { + if (checkedListBox.Items.Count == 0) + { + return ""; + } + if (checkedListBox.Items.Count == null) + { + return ""; + } + return checkedListBox.SelectedItem.ToString()!; + } + set + { + if (checkedListBox.Items.Contains(value)) + { + checkedListBox.SelectedItem = value; + } + } + } + + } +} diff --git a/Components/Components/VisualComponents/UserCheckedListBox.resx b/Components/Components/VisualComponents/UserCheckedListBox.resx new file mode 100644 index 0000000..8b2ff64 --- /dev/null +++ b/Components/Components/VisualComponents/UserCheckedListBox.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/Components/Components/VisualComponents/UserTextBox.Designer.cs b/Components/Components/VisualComponents/UserTextBox.Designer.cs new file mode 100644 index 0000000..30caa78 --- /dev/null +++ b/Components/Components/VisualComponents/UserTextBox.Designer.cs @@ -0,0 +1,58 @@ +namespace Components.Components.VisualComponents +{ + partial class UserTextBox + { + /// + /// Обязательная переменная конструктора. + /// + 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() + { + textBox = new TextBox(); + SuspendLayout(); + // + // textBox + // + textBox.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right; + textBox.Location = new Point(5, 15); + textBox.Name = "textBox"; + textBox.Size = new Size(309, 27); + textBox.TabIndex = 0; + textBox.TextChanged += textBox_TextChanged; + // + // UserTextBox + // + AutoScaleDimensions = new SizeF(8F, 20F); + AutoScaleMode = AutoScaleMode.Font; + Controls.Add(textBox); + Name = "UserTextBox"; + Size = new Size(317, 61); + ResumeLayout(false); + PerformLayout(); + } + + #endregion + + private TextBox textBox; + } +} diff --git a/Components/Components/VisualComponents/UserTextBox.cs b/Components/Components/VisualComponents/UserTextBox.cs new file mode 100644 index 0000000..63aaac5 --- /dev/null +++ b/Components/Components/VisualComponents/UserTextBox.cs @@ -0,0 +1,91 @@ +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 Components.Components.VisualComponents.Exceptions; +using static System.Windows.Forms.VisualStyles.VisualStyleElement; + +namespace Components.Components.VisualComponents +{ + public partial class UserTextBox : UserControl + { + public UserTextBox() + { + InitializeComponent(); + } + + public int ?MinValue { get; set; } + public int ?MaxValue { get; set; } + + private EventHandler _changeEvent; + + public event EventHandler ChangeEvent + { + add + { + _changeEvent += value; + } + remove + { + _changeEvent -= value; + } + + } + private void textBox_TextChanged(object sender, EventArgs e) + { + _changeEvent?.Invoke(sender, e); + if (MinValue != null && MaxValue != null) + { + if (textBox.Text.Length < MinValue || textBox.Text.Length > MaxValue) + { + textBox.ForeColor = Color.Red; + } + else + { + textBox.ForeColor = Color.Black; + } + } + + } + /* + private void textBox_Enter(object sender, EventArgs e) + { + ToolTip tt = new ToolTip(); + tt.Show(examp, textBox, 30, -20, 2000); + }*/ + + public string? TextBoxValue + { + get + { + if (MinValue == null && MaxValue == null) + { + throw new WrongRangeException("Диапазон не задан."); + } + if (textBox.Text.Length >= MinValue && textBox.Text.Length <= MaxValue) + { + return textBox.Text; + } + throw new WrongRangeException("Введенное значение не входит в диапазон."); + + } + set + { + if (MinValue != null && MaxValue != null) + { + if (value.Length >= MinValue && value.Length <= MaxValue) + { + textBox.Text = value; + _changeEvent?.Invoke(this, EventArgs.Empty); + } + } + } + } + + } +} diff --git a/Components/Components/VisualComponents/UserTextBox.resx b/Components/Components/VisualComponents/UserTextBox.resx new file mode 100644 index 0000000..8b2ff64 --- /dev/null +++ b/Components/Components/VisualComponents/UserTextBox.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/Components/Components/VisualComponents/UserTreeView.Designer.cs b/Components/Components/VisualComponents/UserTreeView.Designer.cs new file mode 100644 index 0000000..5167c95 --- /dev/null +++ b/Components/Components/VisualComponents/UserTreeView.Designer.cs @@ -0,0 +1,56 @@ +namespace Components.Components.VisualComponents +{ + partial class UserTreeView + { + /// + /// Обязательная переменная конструктора. + /// + 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() + { + treeView = new TreeView(); + SuspendLayout(); + // + // treeView + // + treeView.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right; + treeView.Location = new Point(0, 3); + treeView.Name = "treeView"; + treeView.Size = new Size(440, 257); + treeView.TabIndex = 0; + // + // UserTreeView + // + AutoScaleDimensions = new SizeF(8F, 20F); + AutoScaleMode = AutoScaleMode.Font; + Controls.Add(treeView); + Name = "UserTreeView"; + Size = new Size(440, 263); + ResumeLayout(false); + } + + #endregion + + private TreeView treeView; + } +} diff --git a/Components/Components/VisualComponents/UserTreeView.cs b/Components/Components/VisualComponents/UserTreeView.cs new file mode 100644 index 0000000..756bbb5 --- /dev/null +++ b/Components/Components/VisualComponents/UserTreeView.cs @@ -0,0 +1,105 @@ +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.Reflection; + +namespace Components.Components.VisualComponents +{ + public partial class UserTreeView : UserControl + { + private List hierarchy; + private Dictionary forcedNewBranch; + + public UserTreeView() + { + InitializeComponent(); + hierarchy = new List(); + forcedNewBranch = new Dictionary(); + } + + public void SetHierarchy(List hierarchy, Dictionary forcedNewBranch) + { + this.hierarchy = hierarchy; + this.forcedNewBranch = forcedNewBranch; + } + + public void AddObjectToTree(T obj, string stopAtProperty) + { + TreeNode currentNode = treeView.Nodes.Count > 0 ? treeView.Nodes[0] : treeView.Nodes.Add(""); + + foreach (var property in hierarchy) + { + var value = obj.GetType().GetProperty(property).GetValue(obj, null).ToString(); + bool createNewBranch = forcedNewBranch.ContainsKey(property) && forcedNewBranch[property]; + + var childNode = currentNode.Nodes.Cast().FirstOrDefault(n => n.Text == value); + if (childNode == null || createNewBranch) + { + childNode = currentNode.Nodes.Add(value); + } + + currentNode = childNode; + + if (property == stopAtProperty) + { + break; + } + } + } + + public int SelectedNodeIndex + { + get + { + return treeView.SelectedNode?.Index ?? -1; + } + set + { + if (value >= 0 && value < treeView.Nodes.Count) + { + treeView.SelectedNode = treeView.Nodes[value]; + } + } + } + + public T GetSelectedObject() where T : new() + { + if (treeView.SelectedNode == null) + { + throw new InvalidOperationException("Узел не выбран"); + } + + var node = treeView.SelectedNode; + if (node.Nodes.Count != 0) + { + throw new InvalidOperationException("Узел не конечный, сформировать объект нельзя"); + } + + var obj = new T(); + foreach (var property in hierarchy) + { + var value = node.Text; + var propInfo = typeof(T).GetProperty(property); + if (propInfo == null) + { + throw new InvalidOperationException($"Свойство {property} не найдено в классе {typeof(T).Name}"); + } + propInfo.SetValue(obj, Convert.ChangeType(value, propInfo.PropertyType)); + + node = node.Parent; + if (node == null) + { + break; + } + } + return obj; + } + } + +} diff --git a/Components/Components/VisualComponents/UserTreeView.resx b/Components/Components/VisualComponents/UserTreeView.resx new file mode 100644 index 0000000..8b2ff64 --- /dev/null +++ b/Components/Components/VisualComponents/UserTreeView.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/TestForm/Form1.Designer.cs b/TestForm/Form1.Designer.cs new file mode 100644 index 0000000..8f46066 --- /dev/null +++ b/TestForm/Form1.Designer.cs @@ -0,0 +1,80 @@ +namespace TestForm +{ + 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() + { + userCheckedListBox1 = new Components.UserCheckedListBox(); + userTextBox1 = new Components.Components.VisualComponents.UserTextBox(); + userTreeView1 = new Components.Components.VisualComponents.UserTreeView(); + SuspendLayout(); + // + // userCheckedListBox1 + // + userCheckedListBox1.Location = new Point(12, 163); + userCheckedListBox1.Name = "userCheckedListBox1"; + userCheckedListBox1.SelectedElement = ""; + userCheckedListBox1.Size = new Size(188, 188); + userCheckedListBox1.TabIndex = 0; + // + // userTextBox1 + // + userTextBox1.Location = new Point(301, 12); + userTextBox1.MaxValue = null; + userTextBox1.MinValue = null; + userTextBox1.Name = "userTextBox1"; + userTextBox1.Size = new Size(396, 76); + userTextBox1.TabIndex = 1; + userTextBox1.TextBoxValue = null; + // + // userTreeView1 + // + userTreeView1.Location = new Point(225, 84); + userTreeView1.Name = "userTreeView1"; + userTreeView1.Size = new Size(550, 329); + userTreeView1.TabIndex = 2; + // + // Form1 + // + AutoScaleDimensions = new SizeF(8F, 20F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(800, 450); + Controls.Add(userTreeView1); + Controls.Add(userTextBox1); + Controls.Add(userCheckedListBox1); + Name = "Form1"; + Text = "Form1"; + ResumeLayout(false); + } + + #endregion + + private Components.UserCheckedListBox userCheckedListBox1; + private Components.Components.VisualComponents.UserTextBox userTextBox1; + private Components.Components.VisualComponents.UserTreeView userTreeView1; + } +} diff --git a/TestForm/Form1.cs b/TestForm/Form1.cs new file mode 100644 index 0000000..7484cbf --- /dev/null +++ b/TestForm/Form1.cs @@ -0,0 +1,35 @@ +using Components.Components.VisualComponents.Classes; + +namespace TestForm +{ + public partial class Form1 : Form + { + public Form1() + { + InitializeComponent(); + + userCheckedListBox1.AddToList("Item 1"); + userCheckedListBox1.AddToList("Item 2"); + userCheckedListBox1.AddToList("Item 3"); + + userTextBox1.MinValue = 5; + userTextBox1.MaxValue = 15; + + var hierarchy = new List { "Race", "Class", "FullName" }; + var forcedNewBranch = new Dictionary { { "FullName", true } }; + userTreeView1.SetHierarchy(hierarchy, forcedNewBranch); + + var characters = new List() { + new Character { Race = "Dwarf", Class = "Warrior", FullName = "Gimli" }, + new Character { Race = "Elf", Class = "Archer", FullName = "Legolas" }, + new Character { Race = "Human", Class = "Ranger", FullName = "Aragorn" }, + new Character { Race = "Human", Class = "Paladin", FullName = "Boromir" } + }; + + foreach (var character in characters) + { + userTreeView1.AddObjectToTree(character, hierarchy.Last()); + } + } + } +} diff --git a/TestForm/Form1.resx b/TestForm/Form1.resx new file mode 100644 index 0000000..8b2ff64 --- /dev/null +++ b/TestForm/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/TestForm/Program.cs b/TestForm/Program.cs new file mode 100644 index 0000000..85edeba --- /dev/null +++ b/TestForm/Program.cs @@ -0,0 +1,17 @@ +namespace TestForm +{ + 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/TestForm/TestForm.csproj b/TestForm/TestForm.csproj new file mode 100644 index 0000000..4d25b40 --- /dev/null +++ b/TestForm/TestForm.csproj @@ -0,0 +1,15 @@ + + + + WinExe + net8.0-windows + enable + true + enable + + + + + + + \ No newline at end of file