mirror of
https://github.com/fadden/6502bench.git
synced 2025-01-05 23:30:20 +00:00
Implement the "configure" button in the asm/gen dialog
This commit is contained in:
parent
310ed7649b
commit
0ff2ebefdf
@ -52,6 +52,11 @@ namespace SourceGenWPF.AsmGen.WpfGui {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Main controller object, used to open app settings dialog.
|
||||
/// </summary>
|
||||
private MainController mMainCtrl;
|
||||
|
||||
/// <summary>
|
||||
/// Project with data.
|
||||
/// </summary>
|
||||
@ -107,10 +112,12 @@ namespace SourceGenWPF.AsmGen.WpfGui {
|
||||
/// </summary>
|
||||
/// <param name="project">Project reference.</param>
|
||||
/// <param name="projectPathName">Full path to the project file.</param>
|
||||
public GenAndAsm(Window owner, DisasmProject project, string projectPathName) {
|
||||
public GenAndAsm(Window owner, MainController mainCtrl, DisasmProject project,
|
||||
string projectPathName) {
|
||||
InitializeComponent();
|
||||
Owner = owner;
|
||||
|
||||
mMainCtrl = mainCtrl;
|
||||
mProject = project;
|
||||
mWorkDirectory = Path.GetDirectoryName(projectPathName);
|
||||
mBaseFileName = Path.GetFileNameWithoutExtension(projectPathName);
|
||||
@ -230,10 +237,8 @@ namespace SourceGenWPF.AsmGen.WpfGui {
|
||||
|
||||
private void AssemblerSettingsButton_Click(object sender, RoutedEventArgs e) {
|
||||
// Pop open the app settings dialog, with the appropriate tab selected.
|
||||
#if false
|
||||
mMainCtrl.ShowAppSettings(AppForms.EditAppSettings.Tab.AsmConfig,
|
||||
mMainCtrl.ShowAppSettings(this, EditAppSettings.Tab.AsmConfig,
|
||||
mSelectedAssemblerId);
|
||||
#endif
|
||||
|
||||
// Update the controls based on whether or not the assembler is now available.
|
||||
UpdateAssemblerControls();
|
||||
|
@ -732,8 +732,8 @@ namespace SourceGenWPF {
|
||||
mMainWin.CodeListView_SetTopIndex(topItemIndex);
|
||||
mReanalysisTimer.EndTask("Restore selection and top position");
|
||||
|
||||
// Update the Notes and Symbols windows.
|
||||
// TODO: references?
|
||||
// Update the Notes and Symbols windows. References should refresh automatically
|
||||
// when the selection is restored.
|
||||
PopulateNotesList();
|
||||
PopulateSymbolsList();
|
||||
|
||||
@ -1235,7 +1235,7 @@ namespace SourceGenWPF {
|
||||
}
|
||||
|
||||
AsmGen.WpfGui.GenAndAsm dlg =
|
||||
new AsmGen.WpfGui.GenAndAsm(mMainWin, mProject, mProjectPathName);
|
||||
new AsmGen.WpfGui.GenAndAsm(mMainWin, this, mProject, mProjectPathName);
|
||||
dlg.ShowDialog();
|
||||
}
|
||||
|
||||
@ -1360,8 +1360,14 @@ namespace SourceGenWPF {
|
||||
/// to the AppSettings.Global object.
|
||||
/// </summary>
|
||||
public void EditAppSettings() {
|
||||
EditAppSettings dlg = new EditAppSettings(mMainWin, mMainWin, this,
|
||||
WpfGui.EditAppSettings.Tab.Unknown, AsmGen.AssemblerInfo.Id.Unknown);
|
||||
ShowAppSettings(mMainWin, WpfGui.EditAppSettings.Tab.Unknown,
|
||||
AsmGen.AssemblerInfo.Id.Unknown);
|
||||
}
|
||||
|
||||
public void ShowAppSettings(Window owner, EditAppSettings.Tab initialTab,
|
||||
AsmGen.AssemblerInfo.Id initialAsmId) {
|
||||
EditAppSettings dlg = new EditAppSettings(owner, mMainWin, this,
|
||||
initialTab, initialAsmId);
|
||||
dlg.ShowDialog();
|
||||
}
|
||||
|
||||
|
@ -171,7 +171,9 @@ namespace SourceGenWPF.Sandbox {
|
||||
try {
|
||||
lease.Unregister(this);
|
||||
} catch (InvalidOperationException ex) {
|
||||
// TODO: not expected -- why did this start happening?
|
||||
// TODO(someday): not expected -- why did this start happening? (Might
|
||||
// be related to the timer hack not being enabled during early stages of
|
||||
// WPF port? Seems to have stopped.)
|
||||
Debug.WriteLine("WARNING: lease.Unregister threw " + ex);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user