Fix Change language after log expansion issue

This commit is contained in:
2022-05-18 15:04:21 +08:00
parent fcfef2317b
commit 7155ecd05d

View File

@ -1008,28 +1008,33 @@ namespace GrasscutterTools
private TextBox TxtCommandRunLog; private TextBox TxtCommandRunLog;
private void ExpandCommandRunLog() private void ExpandCommandRunLog()
{ {
if (TxtCommandRunLog != null) if (SCBase.IsSplitterFixed)
return;
if (WindowState == FormWindowState.Maximized)
WindowState = FormWindowState.Normal;
TxtCommandRunLog = new TextBox
{ {
Anchor = AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Right | AnchorStyles.Bottom, if (WindowState == FormWindowState.Maximized)
Multiline = true, WindowState = FormWindowState.Normal;
Font = new Font("Consolas", 10F), SCBase.FixedPanel = FixedPanel.Panel1;
Location = new Point(BtnInvokeOpenCommand.Left, BtnInvokeOpenCommand.Bottom + 6), Size = new Size(Width, Height + TxtCommandRunLogMinHeight);
Size = new Size(GrpCommand.Width - BtnInvokeOpenCommand.Left * 2, TxtCommandRunLogMinHeight), MinimumSize = new Size(MinimumSize.Width, MinimumSize.Height + TxtCommandRunLogMinHeight);
ReadOnly = true, SCBase.Panel2MinSize += TxtCommandRunLogMinHeight;
BackColor = Color.White, SCBase.FixedPanel = FixedPanel.None;
ScrollBars = ScrollBars.Vertical, SCBase.IsSplitterFixed = false;
}; }
SCBase.FixedPanel = FixedPanel.Panel1;
Size = new Size(Width, Height + TxtCommandRunLogMinHeight); if (TxtCommandRunLog == null)
MinimumSize = new Size(MinimumSize.Width, MinimumSize.Height + TxtCommandRunLogMinHeight); {
SCBase.Panel2MinSize += TxtCommandRunLogMinHeight; TxtCommandRunLog = new TextBox
SCBase.FixedPanel = FixedPanel.None; {
SCBase.IsSplitterFixed = false; Anchor = AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Right | AnchorStyles.Bottom,
GrpCommand.Controls.Add(TxtCommandRunLog); Multiline = true,
Font = new Font("Consolas", 10F),
Location = new Point(BtnInvokeOpenCommand.Left, BtnInvokeOpenCommand.Bottom + 6),
Size = new Size(GrpCommand.Width - BtnInvokeOpenCommand.Left * 2, TxtCommandRunLogMinHeight),
ReadOnly = true,
BackColor = Color.White,
ScrollBars = ScrollBars.Vertical,
};
GrpCommand.Controls.Add(TxtCommandRunLog);
}
} }
#endregion - - #endregion - -