diff --git a/SourceGenWPF/AsmGen/WpfGui/GenAndAsm.xaml.cs b/SourceGenWPF/AsmGen/WpfGui/GenAndAsm.xaml.cs
index d5c70ea..92ef51b 100644
--- a/SourceGenWPF/AsmGen/WpfGui/GenAndAsm.xaml.cs
+++ b/SourceGenWPF/AsmGen/WpfGui/GenAndAsm.xaml.cs
@@ -250,8 +250,8 @@ namespace SourceGenWPF.AsmGen.WpfGui {
mGenerator = gen;
}
public object DoWork(BackgroundWorker worker) {
- worker.ReportProgress(50, "Halfway there!");
- System.Threading.Thread.Sleep(3000);
+ //worker.ReportProgress(50, "Halfway there!");
+ //System.Threading.Thread.Sleep(5000);
return mGenerator.GenerateSource(worker);
}
public void RunWorkerCompleted(object results) {
diff --git a/SourceGenWPF/MainController.cs b/SourceGenWPF/MainController.cs
index 6f29952..c52435d 100644
--- a/SourceGenWPF/MainController.cs
+++ b/SourceGenWPF/MainController.cs
@@ -1148,6 +1148,16 @@ namespace SourceGenWPF {
dlg.ShowDialog();
}
+ ///
+ /// Opens the application settings dialog. All changes to settings are made directly
+ /// to the AppSettings.Global object.
+ ///
+ public void EditSettings() {
+ EditAppSettings dlg = new EditAppSettings(mMainWin, EditAppSettings.Tab.Unknown,
+ AsmGen.AssemblerInfo.Id.Unknown);
+ dlg.ShowDialog();
+ }
+
public void HandleCodeListDoubleClick(int row, int col) {
Debug.WriteLine("DCLICK: row=" + row + " col=" + col);
diff --git a/SourceGenWPF/SourceGenWPF.csproj b/SourceGenWPF/SourceGenWPF.csproj
index d9c3b6f..fc06842 100644
--- a/SourceGenWPF/SourceGenWPF.csproj
+++ b/SourceGenWPF/SourceGenWPF.csproj
@@ -73,6 +73,9 @@
+
+ EditAppSettings.xaml
+
WorkProgress.xaml
@@ -164,6 +167,10 @@
+
+ Designer
+ MSBuild:Compile
+
Designer
MSBuild:Compile
diff --git a/SourceGenWPF/WpfGui/EditAppSettings.xaml b/SourceGenWPF/WpfGui/EditAppSettings.xaml
new file mode 100644
index 0000000..44ae269
--- /dev/null
+++ b/SourceGenWPF/WpfGui/EditAppSettings.xaml
@@ -0,0 +1,364 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Current font:
+ Constantia, 10pt
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Format for lines copied to clipboard:
+
+ Assembler Source
+ Disassembly
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ C:\something
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SourceGenWPF/WpfGui/EditAppSettings.xaml.cs b/SourceGenWPF/WpfGui/EditAppSettings.xaml.cs
new file mode 100644
index 0000000..ad9aa33
--- /dev/null
+++ b/SourceGenWPF/WpfGui/EditAppSettings.xaml.cs
@@ -0,0 +1,59 @@
+/*
+ * Copyright 2019 faddenSoft
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+using System;
+using System.Windows;
+
+using AssemblerInfo = SourceGenWPF.AsmGen.AssemblerInfo;
+using AssemblerConfig = SourceGenWPF.AsmGen.AssemblerConfig;
+using ExpressionMode = Asm65.Formatter.FormatConfig.ExpressionMode;
+
+namespace SourceGenWPF.WpfGui {
+ ///
+ /// Application settings dialog.
+ ///
+ public partial class EditAppSettings : Window {
+ ///
+ /// Tab page enumeration. Numbers must match page indices in designer.
+ ///
+ public enum Tab {
+ Unknown = -1,
+ CodeView = 0,
+ AsmConfig = 1,
+ DisplayFormat = 2,
+ PseudoOp = 3
+ }
+
+ ///
+ /// Tab to show when dialog is first opened.
+ ///
+ private Tab mInitialTab;
+
+ ///
+ /// Assembler to initially select in combo boxes.
+ ///
+ private AssemblerInfo.Id mInitialAsmId;
+
+
+ public EditAppSettings(Window owner, Tab initialTab,
+ AsmGen.AssemblerInfo.Id initialAsmId) {
+ InitializeComponent();
+ Owner = owner;
+
+ mInitialTab = initialTab;
+ mInitialAsmId = initialAsmId;
+ }
+ }
+}
diff --git a/SourceGenWPF/WpfGui/MainWindow.xaml b/SourceGenWPF/WpfGui/MainWindow.xaml
index c84b862..1e09d5a 100644
--- a/SourceGenWPF/WpfGui/MainWindow.xaml
+++ b/SourceGenWPF/WpfGui/MainWindow.xaml
@@ -47,6 +47,7 @@ limitations under the License.
+
Ctrl+Shift+A
@@ -98,6 +99,8 @@ limitations under the License.
+
-
+