diff --git a/FunGame.Desktop/FunGame.Desktop.csproj b/FunGame.Desktop/FunGame.Desktop.csproj index 071b5eb..9235522 100644 --- a/FunGame.Desktop/FunGame.Desktop.csproj +++ b/FunGame.Desktop/FunGame.Desktop.csproj @@ -55,13 +55,6 @@ - - - - - - - True diff --git a/FunGame.Desktop/Library/Component/TextArea.cs b/FunGame.Desktop/Library/Component/TextArea.cs index 94333d2..9ce7f6b 100644 --- a/FunGame.Desktop/Library/Component/TextArea.cs +++ b/FunGame.Desktop/Library/Component/TextArea.cs @@ -96,5 +96,20 @@ namespace Milimoe.FunGame.Desktop.Library.Component return prams; } } + + public void AppendImage(string filename) + { + //´´½¨BitmapÀà¶ÔÏó + Bitmap bmp = new(filename); + //½«BitmapÀà¶ÔÏóдÈë¼ôÌù°å + Clipboard.SetImage(bmp); + this.Paste(); + } + + public void AppendImage(Bitmap image) + { + Clipboard.SetImage(image); + this.Paste(); + } } } \ No newline at end of file diff --git a/FunGame.Desktop/UI/Inventory/InventoryUI.Designer.cs b/FunGame.Desktop/UI/Inventory/InventoryUI.Designer.cs new file mode 100644 index 0000000..f5d432a --- /dev/null +++ b/FunGame.Desktop/UI/Inventory/InventoryUI.Designer.cs @@ -0,0 +1,39 @@ +namespace Milimoe.FunGame.Desktop.UI +{ + partial class InventoryUI + { + /// + /// 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 = "InventoryUI"; + } + + #endregion + } +} \ No newline at end of file diff --git a/FunGame.Desktop/UI/Inventory/InventoryUI.cs b/FunGame.Desktop/UI/Inventory/InventoryUI.cs new file mode 100644 index 0000000..cdd7342 --- /dev/null +++ b/FunGame.Desktop/UI/Inventory/InventoryUI.cs @@ -0,0 +1,20 @@ +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 Milimoe.FunGame.Desktop.UI +{ + public partial class InventoryUI : Form + { + public InventoryUI() + { + InitializeComponent(); + } + } +} diff --git a/FunGame.Desktop/UI/Inventory/InventoryUI.resx b/FunGame.Desktop/UI/Inventory/InventoryUI.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/FunGame.Desktop/UI/Inventory/InventoryUI.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.Desktop/UI/Main/Main.cs b/FunGame.Desktop/UI/Main/Main.cs index 27f7f43..7a01108 100644 --- a/FunGame.Desktop/UI/Main/Main.cs +++ b/FunGame.Desktop/UI/Main/Main.cs @@ -337,7 +337,7 @@ namespace Milimoe.FunGame.Desktop.UI /// private void WritelnGameInfo() { - GameInfo.Text += "\n"; + GameInfo.AppendText("\n"); GameInfo.SelectionStart = GameInfo.Text.Length - 1; GameInfo.ScrollToCaret(); } @@ -350,7 +350,7 @@ namespace Milimoe.FunGame.Desktop.UI { if (msg.Trim() != "") { - GameInfo.Text += msg + "\n"; + GameInfo.AppendText(msg + "\n"); GameInfo.SelectionStart = GameInfo.Text.Length - 1; GameInfo.ScrollToCaret(); } @@ -364,7 +364,7 @@ namespace Milimoe.FunGame.Desktop.UI { if (msg.Trim() != "") { - GameInfo.Text += msg; + GameInfo.AppendText(msg); GameInfo.SelectionStart = GameInfo.Text.Length - 1; GameInfo.ScrollToCaret(); } diff --git a/FunGame.Desktop/UI/RoomSetting/RoomSetting.Designer.cs b/FunGame.Desktop/UI/RoomSetting/RoomSetting.Designer.cs new file mode 100644 index 0000000..9426073 --- /dev/null +++ b/FunGame.Desktop/UI/RoomSetting/RoomSetting.Designer.cs @@ -0,0 +1,39 @@ +namespace Milimoe.FunGame.Desktop.UI +{ + partial class RoomSetting + { + /// + /// 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 = "RoomSetting"; + } + + #endregion + } +} \ No newline at end of file diff --git a/FunGame.Desktop/UI/RoomSetting/RoomSetting.cs b/FunGame.Desktop/UI/RoomSetting/RoomSetting.cs new file mode 100644 index 0000000..3d60907 --- /dev/null +++ b/FunGame.Desktop/UI/RoomSetting/RoomSetting.cs @@ -0,0 +1,20 @@ +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 Milimoe.FunGame.Desktop.UI +{ + public partial class RoomSetting : Form + { + public RoomSetting() + { + InitializeComponent(); + } + } +} diff --git a/FunGame.Desktop/UI/RoomSetting/RoomSetting.resx b/FunGame.Desktop/UI/RoomSetting/RoomSetting.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/FunGame.Desktop/UI/RoomSetting/RoomSetting.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.Desktop/UI/Store/Store.Designer.cs b/FunGame.Desktop/UI/Store/Store.Designer.cs new file mode 100644 index 0000000..76d1a9b --- /dev/null +++ b/FunGame.Desktop/UI/Store/Store.Designer.cs @@ -0,0 +1,39 @@ +namespace Milimoe.FunGame.Desktop.UI +{ + partial class StoreUI + { + /// + /// 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 = "Store"; + } + + #endregion + } +} \ No newline at end of file diff --git a/FunGame.Desktop/UI/Store/Store.cs b/FunGame.Desktop/UI/Store/Store.cs new file mode 100644 index 0000000..82ad4a5 --- /dev/null +++ b/FunGame.Desktop/UI/Store/Store.cs @@ -0,0 +1,20 @@ +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 Milimoe.FunGame.Desktop.UI +{ + public partial class StoreUI : Form + { + public StoreUI() + { + InitializeComponent(); + } + } +} diff --git a/FunGame.Desktop/UI/Store/Store.resx b/FunGame.Desktop/UI/Store/Store.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/FunGame.Desktop/UI/Store/Store.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.Desktop/UI/UserCenter/UserCenter.Designer.cs b/FunGame.Desktop/UI/UserCenter/UserCenter.Designer.cs new file mode 100644 index 0000000..ef21500 --- /dev/null +++ b/FunGame.Desktop/UI/UserCenter/UserCenter.Designer.cs @@ -0,0 +1,39 @@ +namespace Milimoe.FunGame.Desktop.UI +{ + partial class UserCenter + { + /// + /// 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 = "UserCenter"; + } + + #endregion + } +} \ No newline at end of file diff --git a/FunGame.Desktop/UI/UserCenter/UserCenter.cs b/FunGame.Desktop/UI/UserCenter/UserCenter.cs new file mode 100644 index 0000000..43fd35d --- /dev/null +++ b/FunGame.Desktop/UI/UserCenter/UserCenter.cs @@ -0,0 +1,20 @@ +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 Milimoe.FunGame.Desktop.UI +{ + public partial class UserCenter : Form + { + public UserCenter() + { + InitializeComponent(); + } + } +} diff --git a/FunGame.Desktop/UI/UserCenter/UserCenter.resx b/FunGame.Desktop/UI/UserCenter/UserCenter.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/FunGame.Desktop/UI/UserCenter/UserCenter.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.Desktop/Utility/OpenForm.cs b/FunGame.Desktop/Utility/OpenForm.cs index 8516fb6..4ab06b4 100644 --- a/FunGame.Desktop/Utility/OpenForm.cs +++ b/FunGame.Desktop/Utility/OpenForm.cs @@ -18,12 +18,16 @@ namespace Milimoe.FunGame.Desktop.Utility form = new Login(); break; case FormType.Inventory: + form = new InventoryUI(); break; case FormType.RoomSetting: + form = new RoomSetting(); break; case FormType.Store: + form = new StoreUI(); break; case FormType.UserCenter: + form = new UserCenter(); break; case FormType.Main: form = new Main();