b200db5d68
Add Comment Editor Form, Icon, Menu item, Shortcut Key Fix Debugger shortcut key display for punctuation keys Restore cursor on disassembly window after using Label editor Restore cursor on disassembly window after using Comment editor Allow label editor to focus the Comment field on spawn instead of the label
58 lines
1.2 KiB
C#
58 lines
1.2 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.Text.RegularExpressions;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Forms;
|
|
using Mesen.GUI.Forms;
|
|
|
|
namespace Mesen.GUI.Debugger
|
|
{
|
|
public partial class frmEditComment : BaseConfigForm
|
|
{
|
|
private CodeLabel _originalLabel;
|
|
|
|
public frmEditComment(CodeLabel label, CodeLabel originalLabel = null)
|
|
{
|
|
InitializeComponent();
|
|
_originalLabel = originalLabel;
|
|
Entity = label;
|
|
AddBinding("Comment", txtComment);
|
|
}
|
|
|
|
protected override void OnShown(EventArgs e)
|
|
{
|
|
base.OnShown(e);
|
|
txtComment.Focus();
|
|
}
|
|
|
|
protected override bool ValidateInput()
|
|
{
|
|
UpdateObject();
|
|
return !txtComment.Text.Contains('\x1');
|
|
}
|
|
|
|
protected override void OnFormClosed(FormClosedEventArgs e)
|
|
{
|
|
base.OnFormClosed(e);
|
|
}
|
|
|
|
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
|
|
{
|
|
if(keyData == (Keys.Control | Keys.Enter)) {
|
|
this.DialogResult = DialogResult.OK;
|
|
this.Close();
|
|
}
|
|
return base.ProcessCmdKey(ref msg, keyData);
|
|
}
|
|
|
|
private void frmEditComment_Load(object sender, EventArgs e)
|
|
{
|
|
|
|
}
|
|
}
|
|
}
|