mirror of
https://github.com/project-redbud/FunGame-Core.git
synced 2025-12-05 16:16:33 +00:00
修复BUG
This commit is contained in:
parent
ef2476e421
commit
d830709706
@ -33,13 +33,6 @@
|
|||||||
//
|
//
|
||||||
// Title
|
// Title
|
||||||
//
|
//
|
||||||
this.Title.Font = new System.Drawing.Font("LanaPixel", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
|
|
||||||
this.Title.Location = new System.Drawing.Point(3, 3);
|
|
||||||
this.Title.Name = "Title";
|
|
||||||
this.Title.Size = new System.Drawing.Size(387, 47);
|
|
||||||
this.Title.TabIndex = 9;
|
|
||||||
this.Title.Text = "Please Override";
|
|
||||||
this.Title.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
|
||||||
this.Title.MouseDown += new System.Windows.Forms.MouseEventHandler(this.Title_MouseDown);
|
this.Title.MouseDown += new System.Windows.Forms.MouseEventHandler(this.Title_MouseDown);
|
||||||
this.Title.MouseMove += new System.Windows.Forms.MouseEventHandler(this.Title_MouseMove);
|
this.Title.MouseMove += new System.Windows.Forms.MouseEventHandler(this.Title_MouseMove);
|
||||||
//
|
//
|
||||||
|
|||||||
@ -35,7 +35,6 @@
|
|||||||
this.Exit = new FunGame.Desktop.Library.Component.ExitButton(this.components);
|
this.Exit = new FunGame.Desktop.Library.Component.ExitButton(this.components);
|
||||||
this.RightButton = new System.Windows.Forms.Button();
|
this.RightButton = new System.Windows.Forms.Button();
|
||||||
this.MidButton = new System.Windows.Forms.Button();
|
this.MidButton = new System.Windows.Forms.Button();
|
||||||
this.Title = new System.Windows.Forms.Label();
|
|
||||||
this.TransparentRect = new FunGame.Desktop.Library.Component.TransparentRect();
|
this.TransparentRect = new FunGame.Desktop.Library.Component.TransparentRect();
|
||||||
this.InputButton = new System.Windows.Forms.Button();
|
this.InputButton = new System.Windows.Forms.Button();
|
||||||
this.InputText = new System.Windows.Forms.TextBox();
|
this.InputText = new System.Windows.Forms.TextBox();
|
||||||
@ -187,7 +186,6 @@
|
|||||||
private ExitButton Exit;
|
private ExitButton Exit;
|
||||||
private Button RightButton;
|
private Button RightButton;
|
||||||
private Button MidButton;
|
private Button MidButton;
|
||||||
private Label Title;
|
|
||||||
private TransparentRect TransparentRect;
|
private TransparentRect TransparentRect;
|
||||||
private Button InputButton;
|
private Button InputButton;
|
||||||
private TextBox InputText;
|
private TextBox InputText;
|
||||||
|
|||||||
@ -11,9 +11,8 @@ using Milimoe.FunGame.Core.Library.Constant;
|
|||||||
|
|
||||||
namespace Milimoe.FunGame.Desktop.Library.Component
|
namespace Milimoe.FunGame.Desktop.Library.Component
|
||||||
{
|
{
|
||||||
public partial class ShowMessage : Form
|
public partial class ShowMessage : GeneralForm
|
||||||
{
|
{
|
||||||
private int Location_x, Location_y;
|
|
||||||
private MessageResult MessageResult = MessageResult.Cancel;
|
private MessageResult MessageResult = MessageResult.Cancel;
|
||||||
private string InputResult = "";
|
private string InputResult = "";
|
||||||
private int AutoClose = 0;
|
private int AutoClose = 0;
|
||||||
@ -35,8 +34,6 @@ namespace Milimoe.FunGame.Desktop.Library.Component
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
Opacity = 0.85; // 透明度
|
Opacity = 0.85; // 透明度
|
||||||
Title.MouseDown += new MouseEventHandler(Title_MouseDown);
|
|
||||||
Title.MouseMove += new MouseEventHandler(Title_MouseMove);
|
|
||||||
if (objs != null)
|
if (objs != null)
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
@ -167,37 +164,6 @@ namespace Milimoe.FunGame.Desktop.Library.Component
|
|||||||
Dispose();
|
Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 设置窗口可拖动
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="sender"></param>
|
|
||||||
/// <param name="e"></param>
|
|
||||||
private void Title_MouseDown(object? sender, MouseEventArgs e)
|
|
||||||
{
|
|
||||||
//判断是否为鼠标左键
|
|
||||||
if (e.Button == MouseButtons.Left)
|
|
||||||
{
|
|
||||||
//获取鼠标左键按下时的位置
|
|
||||||
this.Location_x = e.Location.X;
|
|
||||||
this.Location_y = e.Location.Y;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 设置窗口移动时的偏移距离
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="sender"></param>
|
|
||||||
/// <param name="e"></param>
|
|
||||||
private void Title_MouseMove(object? sender, MouseEventArgs e)
|
|
||||||
{
|
|
||||||
if (e.Button == MouseButtons.Left)
|
|
||||||
{
|
|
||||||
//计算鼠标移动距离
|
|
||||||
this.Left += e.Location.X - this.Location_x;
|
|
||||||
this.Top += e.Location.Y - this.Location_y;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static MessageResult Message(string msg, string title, int autoclose = 0)
|
public static MessageResult Message(string msg, string title, int autoclose = 0)
|
||||||
{
|
{
|
||||||
object[] objs = { title, msg, autoclose, MessageButtonType.OK, BUTTON_OK};
|
object[] objs = { title, msg, autoclose, MessageButtonType.OK, BUTTON_OK};
|
||||||
|
|||||||
3
FunGame.Desktop/UI/Login/Login.Designer.cs
generated
3
FunGame.Desktop/UI/Login/Login.Designer.cs
generated
@ -32,7 +32,6 @@
|
|||||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Login));
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Login));
|
||||||
this.ExitButton = new Milimoe.FunGame.Desktop.Library.Component.ExitButton(this.components);
|
this.ExitButton = new Milimoe.FunGame.Desktop.Library.Component.ExitButton(this.components);
|
||||||
this.MinButton = new Milimoe.FunGame.Desktop.Library.Component.MinButton(this.components);
|
this.MinButton = new Milimoe.FunGame.Desktop.Library.Component.MinButton(this.components);
|
||||||
this.Title = new System.Windows.Forms.Label();
|
|
||||||
this.Username = new System.Windows.Forms.Label();
|
this.Username = new System.Windows.Forms.Label();
|
||||||
this.Password = new System.Windows.Forms.Label();
|
this.Password = new System.Windows.Forms.Label();
|
||||||
this.UsernameText = new System.Windows.Forms.TextBox();
|
this.UsernameText = new System.Windows.Forms.TextBox();
|
||||||
@ -94,8 +93,6 @@
|
|||||||
this.Title.TabIndex = 8;
|
this.Title.TabIndex = 8;
|
||||||
this.Title.Text = "Welcome to FunGame!";
|
this.Title.Text = "Welcome to FunGame!";
|
||||||
this.Title.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
this.Title.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
this.Title.MouseDown += new System.Windows.Forms.MouseEventHandler(this.Title_MouseDown);
|
|
||||||
this.Title.MouseMove += new System.Windows.Forms.MouseEventHandler(this.Title_MouseMove);
|
|
||||||
//
|
//
|
||||||
// Username
|
// Username
|
||||||
//
|
//
|
||||||
|
|||||||
3
FunGame.Desktop/UI/Main/Main.Designer.cs
generated
3
FunGame.Desktop/UI/Main/Main.Designer.cs
generated
@ -34,7 +34,6 @@ namespace Milimoe.FunGame.Desktop.UI
|
|||||||
this.components = new System.ComponentModel.Container();
|
this.components = new System.ComponentModel.Container();
|
||||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Main));
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Main));
|
||||||
this.Exit = new FunGame.Desktop.Library.Component.ExitButton(this.components);
|
this.Exit = new FunGame.Desktop.Library.Component.ExitButton(this.components);
|
||||||
this.Title = new System.Windows.Forms.Label();
|
|
||||||
this.MinForm = new Library.Component.MinButton();
|
this.MinForm = new Library.Component.MinButton();
|
||||||
this.Connection = new System.Windows.Forms.Label();
|
this.Connection = new System.Windows.Forms.Label();
|
||||||
this.Light = new System.Windows.Forms.Label();
|
this.Light = new System.Windows.Forms.Label();
|
||||||
@ -103,8 +102,6 @@ namespace Milimoe.FunGame.Desktop.UI
|
|||||||
this.Title.TabIndex = 96;
|
this.Title.TabIndex = 96;
|
||||||
this.Title.Text = "FunGame By Mili.cyou";
|
this.Title.Text = "FunGame By Mili.cyou";
|
||||||
this.Title.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
this.Title.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
this.Title.MouseDown += new System.Windows.Forms.MouseEventHandler(this.Title_MouseDown);
|
|
||||||
this.Title.MouseMove += new System.Windows.Forms.MouseEventHandler(this.Title_MouseMove);
|
|
||||||
//
|
//
|
||||||
// MinForm
|
// MinForm
|
||||||
//
|
//
|
||||||
|
|||||||
3
FunGame.Desktop/UI/Register/Register.Designer.cs
generated
3
FunGame.Desktop/UI/Register/Register.Designer.cs
generated
@ -32,7 +32,6 @@
|
|||||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Register));
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Register));
|
||||||
this.ExitButton = new Milimoe.FunGame.Desktop.Library.Component.ExitButton(this.components);
|
this.ExitButton = new Milimoe.FunGame.Desktop.Library.Component.ExitButton(this.components);
|
||||||
this.MinButton = new Milimoe.FunGame.Desktop.Library.Component.MinButton(this.components);
|
this.MinButton = new Milimoe.FunGame.Desktop.Library.Component.MinButton(this.components);
|
||||||
this.Title = new System.Windows.Forms.Label();
|
|
||||||
this.Username = new System.Windows.Forms.Label();
|
this.Username = new System.Windows.Forms.Label();
|
||||||
this.Password = new System.Windows.Forms.Label();
|
this.Password = new System.Windows.Forms.Label();
|
||||||
this.CheckPassword = new System.Windows.Forms.Label();
|
this.CheckPassword = new System.Windows.Forms.Label();
|
||||||
@ -95,8 +94,6 @@
|
|||||||
this.Title.TabIndex = 8;
|
this.Title.TabIndex = 8;
|
||||||
this.Title.Text = "FunGame Register";
|
this.Title.Text = "FunGame Register";
|
||||||
this.Title.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
this.Title.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
this.Title.MouseDown += new System.Windows.Forms.MouseEventHandler(this.Title_MouseDown);
|
|
||||||
this.Title.MouseMove += new System.Windows.Forms.MouseEventHandler(this.Title_MouseMove);
|
|
||||||
//
|
//
|
||||||
// Username
|
// Username
|
||||||
//
|
//
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user