mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2025-02-16 22:08:26 +00:00
More console fixes
This commit is contained in:
parent
10f3b9741e
commit
25ae179a05
7 changed files with 23 additions and 10 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -11,7 +11,19 @@ namespace Switch_Toolbox.Library
|
|||
public class STConsole : RichTextBox
|
||||
{
|
||||
private static STConsole console;
|
||||
public static STConsole Instance { get { return console == null || console.IsDisposed ? console = new STConsole() : console; } }
|
||||
public static STConsole Instance
|
||||
{
|
||||
get
|
||||
{
|
||||
if (console == null || console.IsDisposed)
|
||||
{
|
||||
console = new STConsole();
|
||||
console.Text = ConsoleText;
|
||||
}
|
||||
|
||||
return console;
|
||||
}
|
||||
}
|
||||
|
||||
private static string ConsoleText = "";
|
||||
|
||||
|
@ -68,10 +80,10 @@ namespace Switch_Toolbox.Library
|
|||
|
||||
Color ForeColor = color ?? FormThemes.BaseTheme.TextForeColor;
|
||||
|
||||
if (console != null || !console.Disposing || !console.IsDisposed)
|
||||
console.AppendTextData($"{Line}", ForeColor);
|
||||
ConsoleText += $"{Line}\n";
|
||||
|
||||
ConsoleText += $"{Line}/n";
|
||||
if (console != null && !console.Disposing && !console.IsDisposed)
|
||||
console.AppendTextData($"{Line}", ForeColor);
|
||||
}
|
||||
|
||||
private void AppendTextData(string Text, Color color)
|
||||
|
|
|
@ -31,28 +31,30 @@
|
|||
this.stPanel1 = new Switch_Toolbox.Library.Forms.STPanel();
|
||||
this.stButton1 = new Switch_Toolbox.Library.Forms.STButton();
|
||||
this.contentContainer.SuspendLayout();
|
||||
this.stPanel1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// contentContainer
|
||||
//
|
||||
this.contentContainer.Controls.Add(this.stButton1);
|
||||
this.contentContainer.Controls.Add(this.stPanel1);
|
||||
this.contentContainer.Controls.SetChildIndex(this.stPanel1, 0);
|
||||
this.contentContainer.Controls.SetChildIndex(this.stButton1, 0);
|
||||
//
|
||||
// stPanel1
|
||||
//
|
||||
this.stPanel1.Controls.Add(this.stButton1);
|
||||
this.stPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.stPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.stPanel1.Location = new System.Drawing.Point(0, 25);
|
||||
this.stPanel1.Name = "stPanel1";
|
||||
this.stPanel1.Size = new System.Drawing.Size(543, 368);
|
||||
this.stPanel1.Size = new System.Drawing.Size(543, 336);
|
||||
this.stPanel1.TabIndex = 11;
|
||||
//
|
||||
// stButton1
|
||||
//
|
||||
this.stButton1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.stButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.stButton1.Location = new System.Drawing.Point(459, 336);
|
||||
this.stButton1.Location = new System.Drawing.Point(465, 367);
|
||||
this.stButton1.Name = "stButton1";
|
||||
this.stButton1.Size = new System.Drawing.Size(75, 23);
|
||||
this.stButton1.TabIndex = 0;
|
||||
|
@ -67,7 +69,6 @@
|
|||
this.Name = "STConsoleForm";
|
||||
this.Text = "STConsoleForm";
|
||||
this.contentContainer.ResumeLayout(false);
|
||||
this.stPanel1.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue