Co-locate the two cockpit-pod projects into a single repository:
- Console/ : TeslaConsole, the net48 WinForms operator console (decompiled
reconstruction) plus its differential + catalog test suite.
- Launcher/ : TeslaLauncher, the net6 pod-side Service + Agent rewrite.
Adds a combined TeslaSuite.sln, root README documenting the shared wire
contract (and its current duplication, the main follow-up), and a root
.gitignore. Histories were not preserved per request; this is a fresh start
from the current working state of both projects.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
67 lines
1.6 KiB
C#
67 lines
1.6 KiB
C#
using System.ComponentModel;
|
|
using System.Drawing;
|
|
using System.Windows.Forms;
|
|
|
|
namespace TeslaConsole;
|
|
|
|
public class LogOutputWindow : Form
|
|
{
|
|
private IContainer components;
|
|
|
|
private TextBox txtOutput;
|
|
|
|
protected override void Dispose(bool disposing)
|
|
{
|
|
if (disposing && components != null)
|
|
{
|
|
components.Dispose();
|
|
}
|
|
base.Dispose(disposing);
|
|
}
|
|
|
|
private void InitializeComponent()
|
|
{
|
|
this.txtOutput = new System.Windows.Forms.TextBox();
|
|
base.SuspendLayout();
|
|
this.txtOutput.Dock = System.Windows.Forms.DockStyle.Fill;
|
|
this.txtOutput.Location = new System.Drawing.Point(0, 0);
|
|
this.txtOutput.Multiline = true;
|
|
this.txtOutput.Name = "txtOutput";
|
|
this.txtOutput.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
|
|
this.txtOutput.Size = new System.Drawing.Size(663, 451);
|
|
this.txtOutput.TabIndex = 0;
|
|
base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 13f);
|
|
base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
|
base.ClientSize = new System.Drawing.Size(663, 451);
|
|
base.Controls.Add(this.txtOutput);
|
|
base.Name = "LogOutputWindow";
|
|
this.Text = "Log Output Window";
|
|
base.ResumeLayout(false);
|
|
base.PerformLayout();
|
|
}
|
|
|
|
public LogOutputWindow()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
public void LogMessage(string message, params object[] args)
|
|
{
|
|
LogMessage(string.Format(message, args));
|
|
}
|
|
|
|
public void LogMessage(string message)
|
|
{
|
|
if (!txtOutput.IsDisposed)
|
|
{
|
|
int textLength = txtOutput.TextLength;
|
|
message = $"\r\n{message}";
|
|
if (textLength + message.Length > txtOutput.MaxLength)
|
|
{
|
|
txtOutput.Text = txtOutput.Text.Substring(message.Length);
|
|
}
|
|
txtOutput.AppendText(message);
|
|
}
|
|
}
|
|
}
|