Fix UI issue

This commit is contained in:
2022-05-18 17:11:12 +08:00
commit 21ac4151a7
5 changed files with 2629 additions and 1397 deletions

View File

@ -29,7 +29,6 @@ namespace GrasscutterTools
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormMain));
this.TxtCommand = new System.Windows.Forms.TextBox();
this.BtnCopy = new System.Windows.Forms.Button();
@ -205,8 +204,6 @@ namespace GrasscutterTools
this.TxtHost = new System.Windows.Forms.TextBox();
this.BtnQueryServerStatus = new System.Windows.Forms.Button();
this.LblHost = new System.Windows.Forms.Label();
this.TTip = new System.Windows.Forms.ToolTip(this.components);
this.SCBase = new System.Windows.Forms.SplitContainer();
this.GrpCommand.SuspendLayout();
this.TCMain.SuspendLayout();
this.TPHome.SuspendLayout();
@ -261,10 +258,6 @@ namespace GrasscutterTools
((System.ComponentModel.ISupportInitialize)(this.NUDRemotePlayerId)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.NUDVerificationCode)).BeginInit();
this.TPConsoleCheck.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.SCBase)).BeginInit();
this.SCBase.Panel1.SuspendLayout();
this.SCBase.Panel2.SuspendLayout();
this.SCBase.SuspendLayout();
this.SuspendLayout();
//
// TxtCommand
@ -1604,13 +1597,13 @@ namespace GrasscutterTools
//
// GrpServerStatus
//
resources.ApplyResources(this.GrpServerStatus, "GrpServerStatus");
this.GrpServerStatus.Controls.Add(this.LnkOpenCommandLabel);
this.GrpServerStatus.Controls.Add(this.LblOpenCommandSupport);
this.GrpServerStatus.Controls.Add(this.LblServerVersion);
this.GrpServerStatus.Controls.Add(this.LblPlayerCount);
this.GrpServerStatus.Controls.Add(this.LblServerVersionLabel);
this.GrpServerStatus.Controls.Add(this.LblPlayerCountLabel);
resources.ApplyResources(this.GrpServerStatus, "GrpServerStatus");
this.GrpServerStatus.Name = "GrpServerStatus";
this.GrpServerStatus.TabStop = false;
//
@ -1789,25 +1782,12 @@ namespace GrasscutterTools
resources.ApplyResources(this.LblHost, "LblHost");
this.LblHost.Name = "LblHost";
//
// SCBase
//
resources.ApplyResources(this.SCBase, "SCBase");
this.SCBase.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.SCBase.Name = "SCBase";
//
// SCBase.Panel1
//
this.SCBase.Panel1.Controls.Add(this.TCMain);
//
// SCBase.Panel2
//
this.SCBase.Panel2.Controls.Add(this.GrpCommand);
//
// FormMain
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.SCBase);
this.Controls.Add(this.TCMain);
this.Controls.Add(this.GrpCommand);
this.KeyPreview = true;
this.Name = "FormMain";
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.FormMain_FormClosed);
@ -1890,10 +1870,6 @@ namespace GrasscutterTools
((System.ComponentModel.ISupportInitialize)(this.NUDVerificationCode)).EndInit();
this.TPConsoleCheck.ResumeLayout(false);
this.TPConsoleCheck.PerformLayout();
this.SCBase.Panel1.ResumeLayout(false);
this.SCBase.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.SCBase)).EndInit();
this.SCBase.ResumeLayout(false);
this.ResumeLayout(false);
}
@ -2047,7 +2023,6 @@ namespace GrasscutterTools
private System.Windows.Forms.Label LblVerificationCode;
private System.Windows.Forms.Button BtnInvokeOpenCommand;
private System.Windows.Forms.LinkLabel LnkRCHelp;
private System.Windows.Forms.ToolTip TTip;
private System.Windows.Forms.Label LblTpZ;
private System.Windows.Forms.Label LblTpY;
private System.Windows.Forms.Button BtnTeleport;
@ -2075,7 +2050,6 @@ namespace GrasscutterTools
private System.Windows.Forms.TextBox TxtToken;
private System.Windows.Forms.Label LblToken;
private System.Windows.Forms.Label LblConsoleTip;
private System.Windows.Forms.SplitContainer SCBase;
}
}

View File

@ -1004,20 +1004,20 @@ namespace GrasscutterTools
btn.Enabled = true;
}
private const int TxtCommandRunLogMinHeight = 100;
private const int TxtCommandRunLogMinHeight = 150;
private TextBox TxtCommandRunLog;
private void ExpandCommandRunLog()
{
if (SCBase.IsSplitterFixed)
if (GrpCommand.Height < TxtCommandRunLogMinHeight)
{
if (WindowState == FormWindowState.Maximized)
WindowState = FormWindowState.Normal;
SCBase.FixedPanel = FixedPanel.Panel1;
TCMain.Anchor &= ~AnchorStyles.Bottom;
GrpCommand.Anchor |= AnchorStyles.Top;
Size = new Size(Width, Height + TxtCommandRunLogMinHeight);
MinimumSize = new Size(MinimumSize.Width, MinimumSize.Height + TxtCommandRunLogMinHeight);
SCBase.Panel2MinSize += TxtCommandRunLogMinHeight;
SCBase.FixedPanel = FixedPanel.None;
SCBase.IsSplitterFixed = false;
TCMain.Anchor |= AnchorStyles.Bottom;
GrpCommand.Anchor &= ~AnchorStyles.Top;
}
if (TxtCommandRunLog == null)
@ -1059,6 +1059,7 @@ namespace GrasscutterTools
}
}
private readonly ToolTip TTip = new ToolTip();
private void ShowTip(string message, Control control)
{
TTip.Show(message, control, 0, control.Size.Height, 3000);

View File

@ -136,6 +136,15 @@
<data name="TPHome.Text" xml:space="preserve">
<value>Home</value>
</data>
<data name="LblAbout.Location" type="System.Drawing.Point, System.Drawing">
<value>74, 38</value>
</data>
<data name="LblAbout.Size" type="System.Drawing.Size, System.Drawing">
<value>158, 24</value>
</data>
<data name="LblAbout.Text" xml:space="preserve">
<value>Have a nice time!</value>
</data>
<data name="BtnOpenTextMap.Size" type="System.Drawing.Size, System.Drawing">
<value>120, 23</value>
</data>
@ -154,15 +163,6 @@
<data name="ChkIncludeUID.Text" xml:space="preserve">
<value>Include UID</value>
</data>
<data name="LblAbout.Location" type="System.Drawing.Point, System.Drawing">
<value>74, 38</value>
</data>
<data name="LblAbout.Size" type="System.Drawing.Size, System.Drawing">
<value>158, 24</value>
</data>
<data name="LblAbout.Text" xml:space="preserve">
<value>Have a nice time!</value>
</data>
<data name="TPCustom.Text" xml:space="preserve">
<value>Custom</value>
</data>
@ -357,10 +357,6 @@ Therefore, the quest can be add and finish, but not necessarily can be work</val
<data name="LblSpawnDescription.Text" xml:space="preserve">
<value>Spawn entity</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="LblEntityAmount.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Bottom, Left</value>
</data>
<data name="LblEntityAmount.Size" type="System.Drawing.Size, System.Drawing">
<value>53, 17</value>
</data>
@ -519,6 +515,7 @@ The data may not be cleared even if the account is recreated.</value>
<data name="TPItem.Text" xml:space="preserve">
<value>Items</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="BtnSaveGiveItemLog.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Left</value>
</data>
@ -576,9 +573,6 @@ The data may not be cleared even if the account is recreated.</value>
<data name="ListGameItems.Size" type="System.Drawing.Size, System.Drawing">
<value>250, 208</value>
</data>
<data name="LblGameItemAmount.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Bottom, Left</value>
</data>
<data name="LblGameItemAmount.Size" type="System.Drawing.Size, System.Drawing">
<value>53, 17</value>
</data>
@ -829,17 +823,20 @@ Tip: Most of the scenes have no effect and cannot be entered.</value>
<data name="TPConsoleCheck.Text" xml:space="preserve">
<value>Console</value>
</data>
<data name="BtnConsoleConnect.Text" xml:space="preserve">
<value>Connect</value>
</data>
<data name="LblConsoleTip.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="LblConsoleTip.Text" xml:space="preserve">
<value>Note that normal commands in the console state must specify the target (set include UID)</value>
</data>
<data name="BtnConsoleConnect.Text" xml:space="preserve">
<value>Connect</value>
<data name="TxtHost.Location" type="System.Drawing.Point, System.Drawing">
<value>86, 36</value>
</data>
<data name="TxtHost.Size" type="System.Drawing.Size, System.Drawing">
<value>167, 23</value>
<value>200, 23</value>
</data>
<data name="BtnQueryServerStatus.Location" type="System.Drawing.Point, System.Drawing">
<value>292, 36</value>
@ -856,4 +853,7 @@ Tip: Most of the scenes have no effect and cannot be entered.</value>
<data name="LblHost.Text" xml:space="preserve">
<value>Host</value>
</data>
<data name="$this.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>Inherit</value>
</data>
</root>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff