1
0
mirror of https://github.com/fadden/6502bench.git synced 2025-07-16 03:24:08 +00:00

Instruction operand editor rework, part 1

Rearrange the UI elements, and convert the code-behind to a more
XAML-style form.  The basic stuff works, but the old "shortcut"
system is still in the process of being replaced.
This commit is contained in:
Andy McFadden
2019-09-07 13:39:22 -07:00
parent a3b968f025
commit 2633720c82
6 changed files with 613 additions and 465 deletions

View File

@@ -1845,6 +1845,7 @@ namespace SourceGen {
}
private void EditInstructionOperand(int offset) {
#if false
EditInstructionOperand dlg = new EditInstructionOperand(mMainWin, offset,
mProject, mOutputFormatter);
@@ -1912,7 +1913,21 @@ namespace SourceGen {
case WpfGui.EditInstructionOperand.SymbolShortcutAction.None:
break;
}
#else
EditInstructionOperand dlg = new EditInstructionOperand(mMainWin, mProject,
offset, mOutputFormatter);
if (dlg.ShowDialog() != true) {
return;
}
ChangeSet cs = new ChangeSet(1);
mProject.OperandFormats.TryGetValue(offset, out FormatDescriptor dfd);
if (dlg.FormatDescriptorResult != dfd) {
UndoableChange uc = UndoableChange.CreateOperandFormatChange(offset,
dfd, dlg.FormatDescriptorResult);
cs.Add(uc);
}
#endif
if (cs.Count != 0) {
ApplyUndoableChanges(cs);
}