mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-19 20:39:01 +00:00
50 lines
1.4 KiB
C#
50 lines
1.4 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Drawing;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Windows.Forms;
|
|
|
|
namespace Cosmos.Debug.GDB {
|
|
public partial class FormLog : Form {
|
|
public FormLog() {
|
|
InitializeComponent();
|
|
}
|
|
|
|
public void Log(string aMsg) {
|
|
lboxDebug.SelectedIndex = lboxDebug.Items.Add(aMsg);
|
|
Application.DoEvents();
|
|
}
|
|
|
|
private void mitmCopyToClipboard_Click(object sender, EventArgs e) {
|
|
var xSB = new StringBuilder();
|
|
foreach (string x in lboxDebug.Items) {
|
|
xSB.AppendLine(x);
|
|
}
|
|
Clipboard.SetText(xSB.ToString());
|
|
}
|
|
|
|
private void mitmClear_Click(object sender, EventArgs e) {
|
|
lboxDebug.Items.Clear();
|
|
}
|
|
|
|
private void FormLog_FormClosing(object sender, FormClosingEventArgs e) {
|
|
e.Cancel = true;
|
|
Hide();
|
|
}
|
|
|
|
private void butnSendCmd_Click(object sender, EventArgs e) {
|
|
GDB.SendCmd(textSendCmd.Text);
|
|
textSendCmd.Clear();
|
|
}
|
|
|
|
private void textSendCmd_KeyPress(object sender, KeyPressEventArgs e) {
|
|
if (e.KeyChar == '\r') {
|
|
butnSendCmd.PerformClick();
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|