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:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user