From 5beae8f92632c08712ac04428d33c62e99adc636 Mon Sep 17 00:00:00 2001 From: Andy McFadden Date: Thu, 27 Jun 2019 15:15:45 -0700 Subject: [PATCH] Implement second settings tab ("Asm Config") Relatively straightforward, thanks to the way WPF ComboBoxes work. Spent some time fiddling with the column width text boxes, but ended up with essentially the WinForms approach. --- SourceGenWPF/AsmGen/AssemblerInfo.cs | 3 +- SourceGenWPF/Res/Strings.xaml | 1 + SourceGenWPF/Res/Strings.xaml.cs | 2 + SourceGenWPF/WpfGui/EditAppSettings.xaml | 39 ++- SourceGenWPF/WpfGui/EditAppSettings.xaml.cs | 248 +++++++++++++++++--- SourceGenWPF/WpfGui/MainWindow.xaml.cs | 2 +- 6 files changed, 250 insertions(+), 45 deletions(-) diff --git a/SourceGenWPF/AsmGen/AssemblerInfo.cs b/SourceGenWPF/AsmGen/AssemblerInfo.cs index 6904195..40e5ea9 100644 --- a/SourceGenWPF/AsmGen/AssemblerInfo.cs +++ b/SourceGenWPF/AsmGen/AssemblerInfo.cs @@ -26,7 +26,8 @@ namespace SourceGenWPF.AsmGen { /// public class AssemblerInfo { /// - /// Enumeration of supported assemblers. Alphabetical order looks nicest. + /// Enumeration of supported assemblers. Sorted alphabetically by human-readable name + /// looks nicest. /// public enum Id { Unknown = 0, diff --git a/SourceGenWPF/Res/Strings.xaml b/SourceGenWPF/Res/Strings.xaml index 1fdc950..af863c9 100644 --- a/SourceGenWPF/Res/Strings.xaml +++ b/SourceGenWPF/Res/Strings.xaml @@ -75,6 +75,7 @@ limitations under the License. The file is {0:N0} bytes long, but the project expected {1:N0}. The file has CRC {0}, but the project expected {1}. Failed + (none) Failed while preparing the plugin directory {0} Failed Preparing Plugin Directory Executing assembler... diff --git a/SourceGenWPF/Res/Strings.xaml.cs b/SourceGenWPF/Res/Strings.xaml.cs index faa57c2..69ee952 100644 --- a/SourceGenWPF/Res/Strings.xaml.cs +++ b/SourceGenWPF/Res/Strings.xaml.cs @@ -135,6 +135,8 @@ namespace SourceGenWPF.Res { (string)Application.Current.FindResource("str_OpenDataWrongLengthFmt"); public static string OPERATION_FAILED = (string)Application.Current.FindResource("str_OperationFailed"); + public static string PARENTHETICAL_NONE = + (string)Application.Current.FindResource("str_ParentheticalNone"); public static string PLUGIN_DIR_FAIL_FMT = (string)Application.Current.FindResource("str_PluginDirFailFmt"); public static string PLUGIN_DIR_FAIL_CAPTION = diff --git a/SourceGenWPF/WpfGui/EditAppSettings.xaml b/SourceGenWPF/WpfGui/EditAppSettings.xaml index a448595..782fb9c 100644 --- a/SourceGenWPF/WpfGui/EditAppSettings.xaml +++ b/SourceGenWPF/WpfGui/EditAppSettings.xaml @@ -147,34 +147,49 @@ limitations under the License. - +