diff --git a/Desktop/FunGame.Testing.Desktop.csproj b/Desktop/FunGame.Testing.Desktop.csproj new file mode 100644 index 0000000..4480985 --- /dev/null +++ b/Desktop/FunGame.Testing.Desktop.csproj @@ -0,0 +1,26 @@ + + + + WinExe + net7.0-windows + enable + true + enable + ..\bin\ + + + + embedded + + + + embedded + + + + + ..\..\FunGame.Core\bin\Debug\net7.0\FunGame.Core.dll + + + + \ No newline at end of file diff --git a/Desktop/Program.cs b/Desktop/Program.cs new file mode 100644 index 0000000..3ac3c77 --- /dev/null +++ b/Desktop/Program.cs @@ -0,0 +1,17 @@ +namespace Desktop +{ + 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 ChessBoardExample.Form1()); + } + } +} \ No newline at end of file diff --git a/Desktop/Solutions/Form1.Designer.cs b/Desktop/Solutions/Form1.Designer.cs new file mode 100644 index 0000000..a9185e9 --- /dev/null +++ b/Desktop/Solutions/Form1.Designer.cs @@ -0,0 +1,39 @@ +namespace ChessBoardExample +{ + 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() + { + this.components = new System.ComponentModel.Container(); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(800, 450); + this.Text = "Form1"; + } + + #endregion + } +} \ No newline at end of file diff --git a/Solutions/ChessBoardExample.cs b/Desktop/Solutions/Form1.cs similarity index 96% rename from Solutions/ChessBoardExample.cs rename to Desktop/Solutions/Form1.cs index 1d612c6..2167823 100644 --- a/Solutions/ChessBoardExample.cs +++ b/Desktop/Solutions/Form1.cs @@ -1,11 +1,6 @@ -using System; -using System.Collections.Generic; -using System.Drawing; -using System.Windows.Forms; - -namespace ChessBoardExample +namespace ChessBoardExample { - public partial class Form2 : Form + public partial class Form1 : Form { const int gridSize = 12; // 每个小方块大小为40像素 const int step = 3; // 递进 @@ -13,7 +8,7 @@ namespace ChessBoardExample Dictionary chessboardDict = new Dictionary(); HashSet redPanelsSet = new HashSet(); - public Form2() + public Form1() { InitializeComponent(); InitializeChessboard(); diff --git a/Desktop/Solutions/Form1.resx b/Desktop/Solutions/Form1.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/Desktop/Solutions/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/FunGame.Testing.sln b/FunGame.Testing.sln index b737fd3..c4be892 100644 --- a/FunGame.Testing.sln +++ b/FunGame.Testing.sln @@ -3,7 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.5.33516.290 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FunGame.Testing", "FunGame.Testing.csproj", "{6F6B4A21-8F39-4B0D-84E8-98AE3E93F06F}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FunGame.Testing", "Library\FunGame.Testing.csproj", "{6F6B4A21-8F39-4B0D-84E8-98AE3E93F06F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FunGame.Testing.Desktop", "Desktop\FunGame.Testing.Desktop.csproj", "{05FA61CB-22AA-4834-8C45-1161C42DF2C7}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -15,6 +17,10 @@ Global {6F6B4A21-8F39-4B0D-84E8-98AE3E93F06F}.Debug|Any CPU.Build.0 = Debug|Any CPU {6F6B4A21-8F39-4B0D-84E8-98AE3E93F06F}.Release|Any CPU.ActiveCfg = Release|Any CPU {6F6B4A21-8F39-4B0D-84E8-98AE3E93F06F}.Release|Any CPU.Build.0 = Release|Any CPU + {05FA61CB-22AA-4834-8C45-1161C42DF2C7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {05FA61CB-22AA-4834-8C45-1161C42DF2C7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {05FA61CB-22AA-4834-8C45-1161C42DF2C7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {05FA61CB-22AA-4834-8C45-1161C42DF2C7}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/FunGame.Testing.csproj b/Library/FunGame.Testing.csproj similarity index 72% rename from FunGame.Testing.csproj rename to Library/FunGame.Testing.csproj index 90658b8..f9ee13e 100644 --- a/FunGame.Testing.csproj +++ b/Library/FunGame.Testing.csproj @@ -5,11 +5,12 @@ net7.0 enable enable + ..\bin\ - ..\FunGame.Core\bin\Debug\net7.0\FunGame.Core.dll + ..\..\FunGame.Core\bin\Debug\net7.0\FunGame.Core.dll diff --git a/Main.cs b/Library/Main.cs similarity index 100% rename from Main.cs rename to Library/Main.cs diff --git a/Solutions/DataSet.cs b/Library/Solutions/DataSet.cs similarity index 100% rename from Solutions/DataSet.cs rename to Library/Solutions/DataSet.cs diff --git a/Solutions/DataTable.cs b/Library/Solutions/DataTable.cs similarity index 100% rename from Solutions/DataTable.cs rename to Library/Solutions/DataTable.cs diff --git a/Solutions/MyPlugin.cs b/Library/Solutions/MyPlugin.cs similarity index 98% rename from Solutions/MyPlugin.cs rename to Library/Solutions/MyPlugin.cs index 8014871..702f1c5 100644 --- a/Solutions/MyPlugin.cs +++ b/Library/Solutions/MyPlugin.cs @@ -79,6 +79,7 @@ namespace FunGame.Testing.Solutions { WritelnSystemInfo("[" + Name + "] " + e.RoomID + " 的玩家数量为: " + request.GetResult("count")); } + request.Dispose(); } public void FailedIntoRoomEvent(object sender, RoomEventArgs e) diff --git a/Solutions/Person.cs b/Library/Solutions/Person.cs similarity index 100% rename from Solutions/Person.cs rename to Library/Solutions/Person.cs