From 8d78ce028a1bfcfdd6bbbf1383d647b0766c06e2 Mon Sep 17 00:00:00 2001 From: Andy McFadden Date: Fri, 5 Jul 2019 16:20:31 -0700 Subject: [PATCH] Implement remaining properties tabs ("Symbol Files", "Extension Scripts") Simple ListBox controls with strings. --- SourceGenWPF/Res/Strings.xaml | 3 + SourceGenWPF/Res/Strings.xaml.cs | 6 + .../WpfGui/EditProjectProperties.xaml | 34 +-- .../WpfGui/EditProjectProperties.xaml.cs | 207 +++++++----------- 4 files changed, 108 insertions(+), 142 deletions(-) diff --git a/SourceGenWPF/Res/Strings.xaml b/SourceGenWPF/Res/Strings.xaml index 16bcfc0..5878b3a 100644 --- a/SourceGenWPF/Res/Strings.xaml +++ b/SourceGenWPF/Res/Strings.xaml @@ -53,6 +53,8 @@ limitations under the License. Unable to load project file Unable to save project file [File was too large for preview window] + Symbol files and extension scripts must live in the application runtime directory ({0}) or project directory ({1}). File {2} lives elsewhere. + File Not In Runtime Directory All files (*.*)|*.* C# Source Files(*.cs)|*.cs SourceGen projects(*.dis65)|*.dis65 @@ -102,4 +104,5 @@ limitations under the License. Symbol Import Imported {0} global symbols. No global+export symbols were found. + [unset] \ No newline at end of file diff --git a/SourceGenWPF/Res/Strings.xaml.cs b/SourceGenWPF/Res/Strings.xaml.cs index c8dacb5..74dddbf 100644 --- a/SourceGenWPF/Res/Strings.xaml.cs +++ b/SourceGenWPF/Res/Strings.xaml.cs @@ -91,6 +91,10 @@ namespace SourceGenWPF.Res { (string)Application.Current.FindResource("str_ErrProjectSaveFail"); public static string ERR_TOO_LARGE_FOR_PREVIEW = (string)Application.Current.FindResource("str_ErrTooLargeForPreview"); + public static string EXTERNAL_FILE_BAD_DIR_FMT = + (string)Application.Current.FindResource("str_ExternalFileBadDirFmt"); + public static string EXTERNAL_FILE_BAD_DIR_CAPTION = + (string)Application.Current.FindResource("str_ExternalFileBadDirCaption"); public static string FILE_FILTER_ALL = (string)Application.Current.FindResource("str_FileFilterAll"); public static string FILE_FILTER_CS = @@ -189,5 +193,7 @@ namespace SourceGenWPF.Res { (string)Application.Current.FindResource("str_SymbolImportGoodFmt"); public static string SYMBOL_IMPORT_NONE = (string)Application.Current.FindResource("str_SymbolImportNone"); + public static string UNSET = + (string)Application.Current.FindResource("str_Unset"); } } diff --git a/SourceGenWPF/WpfGui/EditProjectProperties.xaml b/SourceGenWPF/WpfGui/EditProjectProperties.xaml index 981426c..7d9a84c 100644 --- a/SourceGenWPF/WpfGui/EditProjectProperties.xaml +++ b/SourceGenWPF/WpfGui/EditProjectProperties.xaml @@ -124,7 +124,7 @@ limitations under the License. FontFamily="{StaticResource GeneralMonoFont}" ItemsSource="{Binding ProjectSymbols}" SnapsToDevicePixels="True" SelectionMode="Single" - SelectionChanged="ProjectSymbolsListView_SelectionChanged" + SelectionChanged="List_SelectionChanged" MouseDoubleClick="ProjectSymbolsListView_MouseDoubleClick">