From a46d1fefe87680829628f8bc487f43dcee466e47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=92=D0=BB=D0=B0=D0=B4=D0=B8=D0=BC=D0=B8=D1=80=20=D0=94?= =?UTF-8?q?=D0=B0=D0=BD=D0=B8=D0=BB=D0=BE=D0=B2?= Date: Fri, 20 Sep 2024 08:45:39 +0400 Subject: [PATCH] =?UTF-8?q?=D0=BA=D0=BE=D0=BC=D0=BF=D0=BE=D0=BD=D0=B5?= =?UTF-8?q?=D0=BD=D1=82=20=D0=B2=D1=8B=D0=B1=D0=BE=D1=80=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Components/Components.sln | 8 ++- WinFormsTest/Form1.Designer.cs | 57 +++++++++++++++ WinFormsTest/Form1.cs | 26 +++++++ WinFormsTest/Form1.resx | 120 +++++++++++++++++++++++++++++++ WinFormsTest/Program.cs | 17 +++++ WinFormsTest/WinFormsTest.csproj | 15 ++++ 6 files changed, 242 insertions(+), 1 deletion(-) create mode 100644 WinFormsTest/Form1.Designer.cs create mode 100644 WinFormsTest/Form1.cs create mode 100644 WinFormsTest/Form1.resx create mode 100644 WinFormsTest/Program.cs create mode 100644 WinFormsTest/WinFormsTest.csproj diff --git a/Components/Components.sln b/Components/Components.sln index de68749..d4e8277 100644 --- a/Components/Components.sln +++ b/Components/Components.sln @@ -3,7 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.8.34330.188 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Components", "Components.csproj", "{D813A63B-837E-45AD-8F7D-B6A964F1B794}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Components", "Components.csproj", "{D813A63B-837E-45AD-8F7D-B6A964F1B794}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinFormsTest", "..\WinFormsTest\WinFormsTest.csproj", "{11845B59-2110-4F5C-B470-1AA2741A7F18}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -15,6 +17,10 @@ Global {D813A63B-837E-45AD-8F7D-B6A964F1B794}.Debug|Any CPU.Build.0 = Debug|Any CPU {D813A63B-837E-45AD-8F7D-B6A964F1B794}.Release|Any CPU.ActiveCfg = Release|Any CPU {D813A63B-837E-45AD-8F7D-B6A964F1B794}.Release|Any CPU.Build.0 = Release|Any CPU + {11845B59-2110-4F5C-B470-1AA2741A7F18}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {11845B59-2110-4F5C-B470-1AA2741A7F18}.Debug|Any CPU.Build.0 = Debug|Any CPU + {11845B59-2110-4F5C-B470-1AA2741A7F18}.Release|Any CPU.ActiveCfg = Release|Any CPU + {11845B59-2110-4F5C-B470-1AA2741A7F18}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/WinFormsTest/Form1.Designer.cs b/WinFormsTest/Form1.Designer.cs new file mode 100644 index 0000000..de4ef21 --- /dev/null +++ b/WinFormsTest/Form1.Designer.cs @@ -0,0 +1,57 @@ +namespace WinFormsTest +{ + 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() + { + customListBox = new Components.CustomListBox(); + SuspendLayout(); + // + // customListBox + // + customListBox.Location = new Point(41, 40); + customListBox.Name = "customListBox"; + customListBox.SelectedItem = ""; + customListBox.Size = new Size(150, 150); + customListBox.TabIndex = 0; + // + // Form1 + // + AutoScaleDimensions = new SizeF(7F, 15F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(800, 450); + Controls.Add(customListBox); + Name = "Form1"; + Text = "Form1"; + ResumeLayout(false); + } + + #endregion + + private Components.CustomListBox customListBox; + } +} diff --git a/WinFormsTest/Form1.cs b/WinFormsTest/Form1.cs new file mode 100644 index 0000000..7c2dae8 --- /dev/null +++ b/WinFormsTest/Form1.cs @@ -0,0 +1,26 @@ +using Components; + +namespace WinFormsTest +{ + public partial class Form1 : Form + { + public Form1() + { + InitializeComponent(); + + InitializeListBox(); + } + + private void InitializeListBox() + { + customListBox.SetItems(new List + { + "Hi 1", + "Hi 2", + "Hi 3", + "Hi 4", + "Hi 5", + }); + } + } +} diff --git a/WinFormsTest/Form1.resx b/WinFormsTest/Form1.resx new file mode 100644 index 0000000..af32865 --- /dev/null +++ b/WinFormsTest/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/WinFormsTest/Program.cs b/WinFormsTest/Program.cs new file mode 100644 index 0000000..011c1ba --- /dev/null +++ b/WinFormsTest/Program.cs @@ -0,0 +1,17 @@ +namespace WinFormsTest +{ + 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/WinFormsTest/WinFormsTest.csproj b/WinFormsTest/WinFormsTest.csproj new file mode 100644 index 0000000..4d25b40 --- /dev/null +++ b/WinFormsTest/WinFormsTest.csproj @@ -0,0 +1,15 @@ + + + + WinExe + net8.0-windows + enable + true + enable + + + + + + + \ No newline at end of file