├── .gitattributes ├── .gitignore ├── 00_Docu ├── screenshot.png └── screenshot_light.png ├── Backup └── XmlExplorerWpf.zip ├── LICENSE ├── README.md └── source ├── CleanAll.bat ├── Components ├── Settings │ ├── Settings │ │ ├── AppCore.cs │ │ ├── Interfaces │ │ │ ├── IAppCore.cs │ │ │ ├── IOptions.cs │ │ │ ├── IOptionsPanel.cs │ │ │ ├── IProfile.cs │ │ │ ├── ISettingsManager.cs │ │ │ └── IViewPosSizeModel.cs │ │ ├── Internal │ │ │ └── SettingsManagerImpl.cs │ │ ├── Module │ │ │ └── Installers.cs │ │ ├── ProgramSettings │ │ │ ├── LanguageCollection.cs │ │ │ └── OptionsPanel.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── SerializableDictionary.cs │ │ ├── Settings.csproj │ │ ├── SettingsManager.cs │ │ ├── UserProfile │ │ │ ├── IViewSize.cs │ │ │ ├── LocalizabilityAttribute.cs │ │ │ ├── Profile.cs │ │ │ ├── ViewPosSizeModel.cs │ │ │ └── ViewSize.cs │ │ └── packages.config │ └── SettingsModel │ │ ├── ExtensionMethods │ │ └── SecureStringExtensionMethod.cs │ │ ├── Interfaces │ │ ├── IEngine.cs │ │ ├── IOptionGroup.cs │ │ └── IOptionsSchema.cs │ │ ├── Models │ │ ├── Engine.cs │ │ ├── Factory.cs │ │ ├── FileReference.cs │ │ ├── OptionGroup.cs │ │ ├── OptionsSchema.cs │ │ └── XML │ │ │ ├── Converters │ │ │ ├── AlternativeDataTypeHandler.cs │ │ │ ├── IAlternativeDataTypeHandler.cs │ │ │ └── SecureStringHandler.cs │ │ │ └── XMLLayer.cs │ │ ├── Overview.cd │ │ ├── Properties │ │ └── AssemblyInfo.cs │ │ ├── SettingsModel.csproj │ │ └── packages.config ├── XmlExplorerLib │ ├── Controls │ │ ├── TreeViewStyleItems.xaml │ │ ├── XPathTreeView.xaml │ │ ├── XPathTreeView.xaml.cs │ │ ├── XPathTreeViewItem.xaml │ │ └── XPathTreeViewItem.xaml.cs │ ├── Converters │ │ ├── InvertedBooleanToVisibilityConverter.cs │ │ ├── XPathNavigatorAttributesConverter.cs │ │ └── XPathNavigatorItemsConverter.cs │ ├── Interfaces │ │ └── IXPathNavigator.cs │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ ├── Resources.Designer.cs │ │ ├── Resources.resx │ │ ├── Settings.Designer.cs │ │ └── Settings.settings │ ├── Templates │ │ └── XPathNodeTypeDataTemplateSelector.cs │ ├── Themes │ │ ├── DarkBrushs.xaml │ │ ├── Generic.xaml │ │ ├── LightBrushs.xaml │ │ └── ResourceKeys.cs │ └── XmlExplorerLib.csproj └── XmlExplorerVMLib │ ├── Behaviors │ └── DialogCloser.cs │ ├── Interfaces │ └── IDocumentViewModel.cs │ ├── Models │ ├── Error.cs │ └── Events │ │ └── EventArgs.cs │ ├── Modul │ └── Installer.cs │ ├── Properties │ └── AssemblyInfo.cs │ ├── ViewModels │ ├── Base │ │ ├── BaseViewModel.cs │ │ └── RelayCommand.cs │ ├── DocumentViewModel.cs │ ├── XML │ │ ├── NamespaceDefinition.cs │ │ └── XPathNavigatoreTreeViewModel.cs │ └── XPathNavigatorViewModel .cs │ ├── Views │ └── BindingProxy.cs │ ├── XmlExplorerVMLib.csproj │ └── packages.config ├── GenericXmlExplorerDemo ├── 00_DataSamples │ └── XmlDataSampleDemo.xml ├── App.xaml ├── App.xaml.cs ├── GenericXmlExplorerDemo.csproj ├── Installers.cs ├── Interfaces │ └── IGenericAppViewModel.cs ├── MainWindow.xaml ├── MainWindow.xaml.cs ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── Settings.Designer.cs │ └── Settings.settings ├── Resources │ └── App.ico ├── ViewModels │ ├── Base │ │ ├── BaseViewModel.cs │ │ └── RelayCommand.cs │ └── GenericAppViewModel.cs ├── app.config └── packages.config ├── XmlExplorerDemo.sln ├── XmlExplorerDemo ├── 00_DataSamples │ └── XmlDataSampleDemo.xml ├── App.config ├── App.xaml ├── App.xaml.cs ├── Behaviors │ ├── MergeStyleBehaviour.cs │ └── TreeViewSelectionChangedBehavior.cs ├── BindToMLib │ ├── MWindowLib_DarkLightBrushs.xaml │ ├── UnitComboLib_DarkLightBrushs.xaml │ └── XmlExplorerLib_DarkLightBrushs.xaml ├── Installers.cs ├── Interfaces │ ├── IAppLifeCycleViewModel.cs │ ├── IAppViewModel.cs │ └── IThemesManagerViewModel.cs ├── MainWindow.xaml ├── MainWindow.xaml.cs ├── Models │ └── SettingDefaults.cs ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── Settings.Designer.cs │ └── Settings.settings ├── Resources │ ├── App.ico │ └── ProjectXML_16x.svg ├── ViewModels │ ├── AppLifeCycleViewModel.cs │ ├── AppViewModel.cs │ ├── Base │ │ ├── BaseViewModel.cs │ │ └── RelayCommand.cs │ ├── MRUViewModel.cs │ └── Themes │ │ ├── ThemeDefinitionViewModel.cs │ │ └── ThemesManagerViewModel.cs ├── XmlExplorerDemo.csproj └── packages.config └── packages ├── Castle.Core.4.3.1 ├── .signature.p7s ├── ASL - Apache Software Foundation License.txt ├── CHANGELOG.md ├── Castle.Core.4.3.1.nupkg ├── LICENSE ├── lib │ ├── net35 │ │ ├── Castle.Core.dll │ │ └── Castle.Core.xml │ ├── net40 │ │ ├── Castle.Core.dll │ │ └── Castle.Core.xml │ ├── net45 │ │ ├── Castle.Core.dll │ │ └── Castle.Core.xml │ ├── netstandard1.3 │ │ ├── Castle.Core.dll │ │ └── Castle.Core.xml │ └── netstandard1.5 │ │ ├── Castle.Core.dll │ │ └── Castle.Core.xml └── readme.txt ├── Castle.Windsor.4.1.1 ├── .signature.p7s ├── ASL - Apache Software Foundation License.txt ├── CHANGELOG.md ├── Castle.Windsor.4.1.1.nupkg ├── LICENSE └── lib │ ├── net45 │ ├── Castle.Windsor.dll │ └── Castle.Windsor.xml │ └── netstandard1.6 │ ├── Castle.Windsor.dll │ └── Castle.Windsor.xml ├── Dirkster.FileSystemModels.3.1.0 ├── Dirkster.FileSystemModels.3.1.0.nupkg └── lib │ └── net452 │ ├── FileSystemModels.dll │ ├── FileSystemModels.pdb │ ├── FileSystemModels.xml │ ├── de-DE │ └── FileSystemModels.resources.dll │ ├── es-ES │ └── FileSystemModels.resources.dll │ ├── fr-FR │ └── FileSystemModels.resources.dll │ ├── hi-IN │ └── FileSystemModels.resources.dll │ ├── it-IT │ └── FileSystemModels.resources.dll │ ├── ja-JP │ └── FileSystemModels.resources.dll │ ├── log4net.dll │ ├── log4net.xml │ ├── ru-RU │ └── FileSystemModels.resources.dll │ └── zh-CHS │ └── FileSystemModels.resources.dll ├── Dirkster.MLib.1.0.9.1 ├── .signature.p7s ├── Behavior_64x.png ├── Dirkster.MLib.1.0.9.1.nupkg ├── lib │ └── net4 │ │ ├── MLib.dll │ │ ├── MLib.pdb │ │ └── MLib.xml ├── license │ └── license.txt └── readme.txt ├── Dirkster.MRULib.1.0.2 ├── .signature.p7s ├── Dirkster.MRULib.1.0.2.nupkg ├── lib │ └── net451 │ │ ├── MRULib.dll │ │ ├── MRULib.pdb │ │ └── MRULib.xml └── readme.txt ├── Dirkster.MWindowLib.1.0.4.2 ├── Application_64x.png ├── Dirkster.MWindowLib.1.0.4.2.nupkg └── lib │ └── net452 │ ├── MWindowInterfacesLib.dll │ ├── MWindowInterfacesLib.pdb │ ├── MWindowInterfacesLib.xml │ ├── MWindowLib.dll │ ├── MWindowLib.pdb │ ├── MWindowLib.xml │ ├── Microsoft.Expression.Interactions.dll │ ├── Microsoft.Expression.Interactions.xml │ ├── System.Windows.Interactivity.dll │ └── System.Windows.Interactivity.xml ├── Dirkster.UnitComboLib.1.0.1 ├── Dirkster.UnitComboLib.1.0.1.nupkg ├── lib │ └── net4 │ │ ├── UnitComboLib.dll │ │ ├── UnitComboLib.pdb │ │ ├── de-DE │ │ └── UnitComboLib.resources.dll │ │ ├── es-ES │ │ └── UnitComboLib.resources.dll │ │ ├── fr-FR │ │ └── UnitComboLib.resources.dll │ │ ├── hi-IN │ │ └── UnitComboLib.resources.dll │ │ ├── id-ID │ │ └── UnitComboLib.resources.dll │ │ ├── it-IT │ │ └── UnitComboLib.resources.dll │ │ ├── ja-JP │ │ └── UnitComboLib.resources.dll │ │ ├── pt-PT │ │ └── UnitComboLib.resources.dll │ │ ├── ru-RU │ │ └── UnitComboLib.resources.dll │ │ └── zh-Hans │ │ └── UnitComboLib.resources.dll └── readme.txt └── log4net.2.0.8 ├── .signature.p7s ├── lib ├── net20-full │ ├── log4net.dll │ └── log4net.xml ├── net35-client │ ├── log4net.dll │ └── log4net.xml ├── net35-full │ ├── log4net.dll │ └── log4net.xml ├── net40-client │ ├── log4net.dll │ └── log4net.xml ├── net40-full │ ├── log4net.dll │ └── log4net.xml ├── net45-full │ ├── log4net.dll │ └── log4net.xml └── netstandard1.3 │ └── log4net.dll └── log4net.2.0.8.nupkg /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Visual Studio 2015 cache/options directory 3 | .vs/ 4 | 5 | 00_Release/ 6 | 01_Nuget/ 7 | debug/ 8 | release/ 9 | build/ 10 | bin/ 11 | obj/ 12 | cache/ 13 | log/ 14 | tmp/ 15 | 16 | *~ 17 | *.lock 18 | *.DS_Store 19 | *.swp 20 | *.out 21 | *.sou 22 | *.suo 23 | *.sqlite 24 | -------------------------------------------------------------------------------- /00_Docu/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/00_Docu/screenshot.png -------------------------------------------------------------------------------- /00_Docu/screenshot_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/00_Docu/screenshot_light.png -------------------------------------------------------------------------------- /Backup/XmlExplorerWpf.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/Backup/XmlExplorerWpf.zip -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Dirkster99 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![Build status](https://ci.appveyor.com/api/projects/status/n3byoyit7jvwxewn?svg=true)](https://ci.appveyor.com/project/Dirkster99/xmlexplorer) [Continues Integration](https://ci.appveyor.com/project/Dirkster99/xmlexplorer/build/artifacts) 2 | # XmlExplorer 3 | 4 | ![Screenshot](https://github.com/Dirkster99/XmlExplorer/blob/master/00_Docu/screenshot.png?raw=true) 5 | ![Screenshot](https://github.com/Dirkster99/XmlExplorer/blob/master/00_Docu/screenshot_light.png?raw=true) 6 | 7 | The XmlExplorer is a clone from a CodePlex project back in 2009: 8 | https://xmlexplorer.codeplex.com/ 9 | 10 | The GitHub project here applies the MVVM pattern and unlocks therefore 11 | advanced theming and configuration features (re-usability patterns). 12 | 13 | The project is currently in Alpha state (do NOT expext a fully developed 14 | application), but the available refactoring is very interesting. 15 | 16 | A tool for editing Xml is XmlNotepad 17 | https://github.com/Microsoft/XmlNotepad 18 | -------------------------------------------------------------------------------- /source/CleanAll.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | pushd "%~dp0" 3 | ECHO. 4 | ECHO. 5 | ECHO This script deletes all temporary build files in their 6 | ECHO corresponding BIN and OBJ Folder contained in the following projects 7 | ECHO. 8 | ECHO XmlExplorerDemo 9 | ECHO GenericXmlExplorerDemo 10 | ECHO 11 | ECHO Components\Settings\Settings 12 | ECHO Components\Settings\SettingsModel 13 | ECHO Components\XmlExplorerLib 14 | ECHO Components\XmlExplorerVMLib 15 | ECHO. 16 | REM Ask the user if hes really sure to continue beyond this point XXXXXXXX 17 | set /p choice=Are you sure to continue (Y/N)? 18 | if not '%choice%'=='Y' Goto EndOfBatch 19 | REM Script does not continue unless user types 'Y' in upper case letter 20 | ECHO. 21 | ECHO XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 22 | ECHO. 23 | RMDIR .vs /S /Q 24 | ECHO. 25 | ECHO XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 26 | 27 | ECHO. 28 | ECHO Deleting .vs and BIN, OBJ Folders in XmlExplorerDemo project folder 29 | ECHO. 30 | 31 | RMDIR /S /Q XmlExplorerDemo\bin 32 | RMDIR /S /Q XmlExplorerDemo\obj 33 | 34 | ECHO. 35 | ECHO Deleting .vs and BIN, OBJ Folders in GenericXmlExplorerDemo project folder 36 | ECHO. 37 | 38 | RMDIR /S /Q GenericXmlExplorerDemo\bin 39 | RMDIR /S /Q GenericXmlExplorerDemo\obj 40 | 41 | ECHO. 42 | ECHO Deleting .vs and BIN, OBJ Folders in Components\XmlExplorerLib project folder 43 | ECHO. 44 | 45 | RMDIR /S /Q Components\XmlExplorerLib\bin 46 | RMDIR /S /Q Components\XmlExplorerLib\obj 47 | 48 | ECHO. 49 | ECHO Deleting .vs and BIN, OBJ Folders in Components\XmlExplorerVMLib project folder 50 | ECHO. 51 | 52 | RMDIR /S /Q Components\XmlExplorerVMLib\bin 53 | RMDIR /S /Q Components\XmlExplorerVMLib\obj 54 | 55 | ECHO. 56 | ECHO Deleting .vs and BIN, OBJ Folders in Components\Settings\Settings project folder 57 | ECHO. 58 | 59 | RMDIR /S /Q Components\Settings\Settings\bin 60 | RMDIR /S /Q Components\Settings\Settings\obj 61 | 62 | ECHO. 63 | ECHO Deleting .vs and BIN, OBJ Folders in Components\Settings\SettingsModel project folder 64 | ECHO. 65 | 66 | RMDIR /S /Q Components\Settings\SettingsModel\bin 67 | RMDIR /S /Q Components\Settings\SettingsModel\obj 68 | 69 | ECHO. 70 | ECHO Deleting .vs and BIN, OBJ Folders in project folder 71 | ECHO. 72 | 73 | RMDIR /S /Q Components\XmlExplorerLib\bin 74 | RMDIR /S /Q Components\XmlExplorerLib\obj 75 | 76 | ECHO. 77 | ECHO Deleting .vs and BIN, OBJ Folders in project folder 78 | ECHO. 79 | 80 | RMDIR /S /Q Components\XmlExplorerVMLib\bin 81 | RMDIR /S /Q Components\XmlExplorerVMLib\obj 82 | 83 | PAUSE 84 | 85 | :EndOfBatch 86 | -------------------------------------------------------------------------------- /source/Components/Settings/Settings/AppCore.cs: -------------------------------------------------------------------------------- 1 | namespace Settings 2 | { 3 | using System; 4 | using System.Globalization; 5 | using System.Reflection; 6 | using Settings.Interfaces; 7 | 8 | /// 9 | /// Class supplies a set of common static helper methodes that help 10 | /// localizing application specific items such as setting folders etc. 11 | /// 12 | internal class AppCore : IAppCore 13 | { 14 | #region properties 15 | /// 16 | /// Get the name of the executing assembly (usually name of *.exe file) 17 | /// 18 | public string AssemblyTitle 19 | { 20 | get 21 | { 22 | return Assembly.GetEntryAssembly().GetName().Name; 23 | } 24 | } 25 | 26 | // 27 | // Summary: 28 | // Gets the path or UNC location of the loaded file that contains the manifest. 29 | // 30 | // Returns: 31 | // The location of the loaded file that contains the manifest. If the loaded 32 | // file was shadow-copied, the location is that of the file after being shadow-copied. 33 | // If the assembly is loaded from a byte array, such as when using the System.Reflection.Assembly.Load(System.Byte[]) 34 | // method overload, the value returned is an empty string (""). 35 | public string AssemblyEntryLocation 36 | { 37 | get 38 | { 39 | return System.IO.Path.GetDirectoryName(Assembly.GetEntryAssembly().Location); 40 | } 41 | } 42 | 43 | /// 44 | /// Get a path to the directory where the user store his documents 45 | /// 46 | public string MyDocumentsUserDir 47 | { 48 | get 49 | { 50 | return Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments); 51 | } 52 | } 53 | 54 | public string Company 55 | { 56 | get 57 | { 58 | return "XmlExplorerDemo"; 59 | } 60 | } 61 | 62 | public string Application_Title 63 | { 64 | get 65 | { 66 | return "ThemedDemo"; 67 | } 68 | } 69 | 70 | /// 71 | /// Get a path to the directory where the application 72 | /// can persist/load user data on session exit and re-start. 73 | /// 74 | public string DirAppData 75 | { 76 | get 77 | { 78 | return Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + 79 | System.IO.Path.DirectorySeparatorChar + 80 | Company; 81 | } 82 | } 83 | 84 | //// /// 85 | //// /// Get path and file name to application specific settings file 86 | //// /// 87 | //// public static string DirFileAppSettingsData 88 | //// { 89 | //// get 90 | //// { 91 | //// return System.IO.Path.Combine(AppCore.DirAppData, 92 | //// string.Format(CultureInfo.InvariantCulture, "{0}.App.settings", AppCore.AssemblyTitle)); 93 | //// } 94 | //// } 95 | 96 | /// 97 | /// Get path and file name to application specific session file 98 | /// 99 | public string DirFileAppSessionData 100 | { 101 | get 102 | { 103 | return System.IO.Path.Combine(DirAppData, 104 | string.Format(CultureInfo.InvariantCulture, "{0}.App.session", AssemblyTitle)); 105 | } 106 | } 107 | #endregion properties 108 | 109 | #region methods 110 | /// 111 | /// Create a dedicated directory to store program settings and session data 112 | /// 113 | /// 114 | public bool CreateAppDataFolder() 115 | { 116 | try 117 | { 118 | if (System.IO.Directory.Exists(DirAppData) == false) 119 | System.IO.Directory.CreateDirectory(DirAppData); 120 | } 121 | catch 122 | { 123 | return false; 124 | } 125 | 126 | return true; 127 | } 128 | #endregion methods 129 | } 130 | } 131 | -------------------------------------------------------------------------------- /source/Components/Settings/Settings/Interfaces/IAppCore.cs: -------------------------------------------------------------------------------- 1 | namespace Settings.Interfaces 2 | { 3 | public interface IAppCore 4 | { 5 | #region properties 6 | /// 7 | /// Get the name of the executing assembly (usually name of *.exe file) 8 | /// 9 | string AssemblyTitle { get; } 10 | 11 | // 12 | // Summary: 13 | // Gets the path or UNC location of the loaded file that contains the manifest. 14 | // 15 | // Returns: 16 | // The location of the loaded file that contains the manifest. If the loaded 17 | // file was shadow-copied, the location is that of the file after being shadow-copied. 18 | // If the assembly is loaded from a byte array, such as when using the System.Reflection.Assembly.Load(System.Byte[]) 19 | // method overload, the value returned is an empty string (""). 20 | string AssemblyEntryLocation { get; } 21 | 22 | /// 23 | /// Get a path to the directory where the user store his documents 24 | /// 25 | string MyDocumentsUserDir { get; } 26 | 27 | string Company { get; } 28 | 29 | string Application_Title { get; } 30 | 31 | /// 32 | /// Get a path to the directory where the application 33 | /// can persist/load user data on session exit and re-start. 34 | /// 35 | string DirAppData { get; } 36 | 37 | //// /// 38 | //// /// Get path and file name to application specific settings file 39 | //// /// 40 | //// public static string DirFileAppSettingsData 41 | //// { 42 | //// get 43 | //// { 44 | //// return System.IO.Path.Combine(AppCore.DirAppData, 45 | //// string.Format(CultureInfo.InvariantCulture, "{0}.App.settings", AppCore.AssemblyTitle)); 46 | //// } 47 | //// } 48 | 49 | /// 50 | /// Get path and file name to application specific session file 51 | /// 52 | string DirFileAppSessionData { get; } 53 | #endregion properties 54 | 55 | #region methods 56 | /// 57 | /// Create a dedicated directory to store program settings and session data 58 | /// 59 | /// 60 | bool CreateAppDataFolder(); 61 | #endregion methods 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /source/Components/Settings/Settings/Interfaces/IOptions.cs: -------------------------------------------------------------------------------- 1 | namespace Settings.Interfaces 2 | { 3 | using Settings.ProgramSettings; 4 | using System.Collections.Generic; 5 | 6 | public interface IOptions 7 | { 8 | #region properties 9 | bool IsDirty { get; set; } 10 | string LanguageSelected { get; set; } 11 | bool ReloadOpenFilesOnAppStart { get; set; } 12 | string SourceFilePath { get; set; } 13 | 14 | string DefaultSourceLanguage { get; set; } 15 | string DefaultTargetLanguage { get; set; } 16 | 17 | string DefaultDefaultSourceLanguage { get; } 18 | string DefaultDefaultTargetLanguage { get; } 19 | 20 | int DefaultIconSize { get; } 21 | int IconSizeMin { get; } 22 | int IconSizeMax { get; } 23 | 24 | int DefaultFontSize { get; } 25 | int FontSizeMin { get; } 26 | int FontSizeMax { get; } 27 | #endregion properties 28 | 29 | #region methods 30 | /// 31 | /// Reset the dirty flag (e.g. after saving program options when they where edit). 32 | /// 33 | /// 34 | void SetDirtyFlag(bool flag); 35 | 36 | void SetIconSize(int size); 37 | void SetFontSize(int size); 38 | #endregion methods 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /source/Components/Settings/Settings/Interfaces/IOptionsPanel.cs: -------------------------------------------------------------------------------- 1 | namespace Settings.Interfaces 2 | { 3 | using SettingsModel.Interfaces; 4 | 5 | public interface IOptionsPanel 6 | { 7 | IEngine Options { get; } 8 | } 9 | } -------------------------------------------------------------------------------- /source/Components/Settings/Settings/Interfaces/IProfile.cs: -------------------------------------------------------------------------------- 1 | namespace Settings.Interfaces 2 | { 3 | using Settings.UserProfile; 4 | using SettingsModel.Models; 5 | using System.Collections.Generic; 6 | 7 | public interface IProfile 8 | { 9 | #region properties 10 | string GetLastActivePath(); 11 | 12 | List LastActiveSourceFiles { get; set; } 13 | 14 | /// 15 | /// Gets the key name of the MainWindow item in the collection. 16 | /// Ths name can be used as key in the WindowPosSz property 17 | /// to read and write MainWindow position and size information. 18 | /// 19 | string MainWindowName { get; } 20 | 21 | /// 22 | /// Gets a collection of window position and size items. 23 | /// 24 | SerializableDictionary WindowPosSz { get; } 25 | 26 | int FontSizeScreenPoints { get; set; } 27 | #endregion properties 28 | 29 | #region methods 30 | /// 31 | /// Checks the MainWindow for visibility when re-starting application 32 | /// (with different screen configuration). 33 | /// 34 | /// 35 | /// 36 | void CheckSettingsOnLoad(double SystemParameters_VirtualScreenLeft, double SystemParameters_VirtualScreenTop); 37 | 38 | /// 39 | /// Updates or inserts the requested window pos size item in the collection. 40 | /// 41 | /// 42 | /// 43 | /// 44 | void UpdateInsertWindowPosSize(string windowName, ViewPosSizeModel model); 45 | #endregion methods 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /source/Components/Settings/Settings/Interfaces/ISettingsManager.cs: -------------------------------------------------------------------------------- 1 | namespace Settings.Interfaces 2 | { 3 | using Settings.ProgramSettings; 4 | using MLib.Interfaces; 5 | using System.Collections.Generic; 6 | using System.Xml.Serialization; 7 | 8 | public interface ISettingsManager : IOptionsPanel 9 | { 10 | void CheckSettingsOnLoad(double SystemParameters_VirtualScreenLeft, double SystemParameters_VirtualScreenTop); 11 | 12 | ////void LoadOptions(string settingsFileName); 13 | void LoadSessionData(string sessionDataFileName); 14 | 15 | ////bool SaveOptions(string settingsFileName, Settings.Interfaces.IOptions optionsModel); 16 | bool SaveSessionData(string sessionDataFileName, Settings.Interfaces.IProfile model); 17 | 18 | /// 19 | /// Get a list of all supported languages in Edi. 20 | /// 21 | /// 22 | IEnumerable GetSupportedLanguages(); 23 | 24 | #region properties 25 | Settings.Interfaces.IProfile SessionData { get; } 26 | 27 | int IconSizeMin { get; } 28 | int IconSizeMax { get; } 29 | 30 | int FontSizeMin { get; } 31 | int FontSizeMax { get; } 32 | 33 | /// 34 | /// Gets the default icon size for the application. 35 | /// 36 | int DefaultIconSize { get; } 37 | 38 | /// 39 | /// Gets the default font size for the application. 40 | /// 41 | int DefaultFontSize { get; } 42 | 43 | /// 44 | /// Gets the default fixed font size for the application. 45 | /// 46 | int DefaultFixedFontSize { get; } 47 | 48 | /// 49 | /// Gets the internal name and Uri source for all available themes. 50 | /// 51 | [XmlIgnore] 52 | IThemeInfos Themes { get; } 53 | #endregion properties 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /source/Components/Settings/Settings/Interfaces/IViewPosSizeModel.cs: -------------------------------------------------------------------------------- 1 | namespace Settings.Interfaces 2 | { 3 | using System; 4 | 5 | public interface IViewPosSizeModel 6 | { 7 | bool DefaultConstruct { get; } 8 | double Height { get; set; } 9 | bool IsMaximized { get; set; } 10 | double Width { get; set; } 11 | double X { get; set; } 12 | double Y { get; set; } 13 | 14 | void SetValidPos(double SystemParameters_VirtualScreenLeft, double SystemParameters_VirtualScreenTop); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /source/Components/Settings/Settings/Module/Installers.cs: -------------------------------------------------------------------------------- 1 | namespace Settings.Module 2 | { 3 | using Castle.MicroKernel.Registration; 4 | using Castle.MicroKernel.SubSystems.Configuration; 5 | using Castle.Windsor; 6 | using Settings.Interfaces; 7 | using Settings.Internal; 8 | 9 | /// 10 | /// This class gets picked up by from Castle.Windsor because 11 | /// it implements the interface. 12 | /// 13 | /// The interface is used by the 14 | /// container to resolve installers when calling 15 | /// .Install(FromAssembly.This()); 16 | /// 17 | public class Installers : IWindsorInstaller 18 | { 19 | #region fields 20 | protected static readonly log4net.ILog Logger = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); 21 | #endregion fields 22 | 23 | /// 24 | /// Performs the installation in the Castle.Windsor.IWindsorContainer. 25 | /// 26 | /// 27 | /// 28 | public void Install(IWindsorContainer container, 29 | IConfigurationStore store) 30 | { 31 | container 32 | .Register(Component.For() 33 | .ImplementedBy().LifestyleSingleton()); 34 | 35 | // Register settings service component to help castle satisfy dependencies on it 36 | container 37 | .Register(Component.For() 38 | .ImplementedBy().LifestyleSingleton()); 39 | } 40 | } 41 | } -------------------------------------------------------------------------------- /source/Components/Settings/Settings/ProgramSettings/LanguageCollection.cs: -------------------------------------------------------------------------------- 1 | namespace Settings.ProgramSettings 2 | { 3 | using System; 4 | 5 | /// 6 | /// Base class for enumeration over languages (and their locale) that 7 | /// are supported with specific (non-English) button and tool tip strings. 8 | /// 9 | /// The class definition is based on BCP 47 which in turn is used to 10 | /// set the UI and thread culture (which in turn selects the correct 11 | /// string resource in MsgBox assembly). 12 | /// 13 | public class LanguageCollection 14 | { 15 | public string Language { get; set; } 16 | public string Locale { get; set; } 17 | public string Name { get; set; } 18 | 19 | /// 20 | /// Get BCP47 language tag for this language 21 | /// See also http://en.wikipedia.org/wiki/IETF_language_tag 22 | /// 23 | public string BCP47 24 | { 25 | get 26 | { 27 | if (string.IsNullOrEmpty(Locale) == false) 28 | return String.Format("{0}-{1}", Language, Locale); 29 | else 30 | return String.Format("{0}", Language); 31 | } 32 | } 33 | 34 | /// 35 | /// Get BCP47 language tag for this language 36 | /// See also http://en.wikipedia.org/wiki/IETF_language_tag 37 | /// 38 | public string DisplayName 39 | { 40 | get 41 | { 42 | return String.Format("{0} {1}", Name, BCP47); 43 | } 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /source/Components/Settings/Settings/ProgramSettings/OptionsPanel.cs: -------------------------------------------------------------------------------- 1 | namespace Settings.ProgramSettings 2 | { 3 | using Settings.Interfaces; 4 | using SettingsModel.Interfaces; 5 | using SettingsModel.Models; 6 | 7 | internal class OptionsPanel : IOptionsPanel 8 | { 9 | private IEngine mQuery = null; 10 | 11 | public OptionsPanel() 12 | { 13 | mQuery = Factory.CreateEngine(); 14 | } 15 | 16 | /// 17 | /// Gets the options that used to manage program options. 18 | /// 19 | public IEngine Options 20 | { 21 | get 22 | { 23 | return mQuery; 24 | } 25 | 26 | private set 27 | { 28 | mQuery = value; 29 | } 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /source/Components/Settings/Settings/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Settings")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("HP")] 12 | [assembly: AssemblyProduct("Settings")] 13 | [assembly: AssemblyCopyright("The MIT License (MIT) Copyright © 2013 - 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("7f13f2b5-a017-4045-8ead-f5496101a616")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /source/Components/Settings/Settings/SerializableDictionary.cs: -------------------------------------------------------------------------------- 1 | namespace Settings 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Globalization; 6 | using System.Runtime.Serialization; 7 | using System.Xml; 8 | using System.Xml.Serialization; 9 | 10 | /// 11 | /// This class represents a serializable dictionary implementation 12 | /// of the standard generic dictionary class in .Net. 13 | /// 14 | /// Source: http://www.jankowskimichal.pl/en/2010/10/serializabledictionary/ 15 | /// 16 | [Serializable] 17 | public class SerializableDictionary : Dictionary, IXmlSerializable, ISerializable 18 | { 19 | #region Private Members 20 | private XmlSerializer _keySerializer; 21 | private XmlSerializer _valueSerializer; 22 | #endregion 23 | 24 | #region Constructors 25 | public SerializableDictionary() 26 | { 27 | } 28 | 29 | public SerializableDictionary(IDictionary dictionary) 30 | : base(dictionary) 31 | { 32 | } 33 | 34 | public SerializableDictionary(IEqualityComparer comparer) 35 | : base(comparer) 36 | { 37 | } 38 | 39 | public SerializableDictionary(int capacity) 40 | : base(capacity) 41 | { 42 | } 43 | 44 | public SerializableDictionary(IDictionary dictionary, IEqualityComparer comparer) 45 | : base(dictionary, comparer) 46 | { 47 | } 48 | 49 | public SerializableDictionary(int capacity, IEqualityComparer comparer) 50 | : base(capacity, comparer) 51 | { 52 | } 53 | 54 | #endregion 55 | 56 | #region Private Properties 57 | protected XmlSerializer ValueSerializer 58 | { 59 | get { return _valueSerializer ?? (_valueSerializer = new XmlSerializer(typeof(TVal))); } 60 | } 61 | 62 | private XmlSerializer KeySerializer 63 | { 64 | get { return _keySerializer ?? (_keySerializer = new XmlSerializer(typeof(TKey))); } 65 | } 66 | #endregion 67 | 68 | #region ISerializable Members 69 | protected SerializableDictionary(SerializationInfo info, StreamingContext context) 70 | { 71 | int itemCount = info.GetInt32("itemsCount"); 72 | for (int i = 0; i < itemCount; i++) 73 | { 74 | KeyValuePair kvp = (KeyValuePair)info.GetValue(String.Format(CultureInfo.InvariantCulture, "Item{0}", i), typeof(KeyValuePair)); 75 | Add(kvp.Key, kvp.Value); 76 | } 77 | } 78 | 79 | void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context) 80 | { 81 | info.AddValue("itemsCount", Count); 82 | int itemIdx = 0; 83 | foreach (KeyValuePair kvp in this) 84 | { 85 | info.AddValue(String.Format(CultureInfo.InvariantCulture, "Item{0}", itemIdx), kvp, typeof(KeyValuePair)); 86 | itemIdx++; 87 | } 88 | } 89 | #endregion 90 | 91 | #region IXmlSerializable Members 92 | void IXmlSerializable.WriteXml(XmlWriter writer) 93 | { 94 | foreach (KeyValuePair kvp in this) 95 | { 96 | writer.WriteStartElement("item"); 97 | writer.WriteStartElement("key"); 98 | KeySerializer.Serialize(writer, kvp.Key); 99 | writer.WriteEndElement(); 100 | writer.WriteStartElement("value"); 101 | ValueSerializer.Serialize(writer, kvp.Value); 102 | writer.WriteEndElement(); 103 | writer.WriteEndElement(); 104 | } 105 | } 106 | 107 | void IXmlSerializable.ReadXml(XmlReader reader) 108 | { 109 | if (reader.IsEmptyElement) 110 | { 111 | return; 112 | } 113 | // Move past container 114 | if (reader.NodeType == XmlNodeType.Element && !reader.Read()) 115 | { 116 | throw new XmlException("Error in Deserialization of SerializableDictionary"); 117 | } 118 | while (reader.NodeType != XmlNodeType.EndElement) 119 | { 120 | reader.ReadStartElement("item"); 121 | reader.ReadStartElement("key"); 122 | TKey key = (TKey)KeySerializer.Deserialize(reader); 123 | reader.ReadEndElement(); 124 | reader.ReadStartElement("value"); 125 | TVal value = (TVal)ValueSerializer.Deserialize(reader); 126 | reader.ReadEndElement(); 127 | reader.ReadEndElement(); 128 | Add(key, value); 129 | reader.MoveToContent(); 130 | } 131 | // Move past container 132 | if (reader.NodeType == XmlNodeType.EndElement) 133 | { 134 | reader.ReadEndElement(); 135 | } 136 | else 137 | { 138 | throw new XmlException("Error in Deserialization of SerializableDictionary"); 139 | } 140 | } 141 | 142 | System.Xml.Schema.XmlSchema IXmlSerializable.GetSchema() 143 | { 144 | return null; 145 | } 146 | #endregion 147 | } 148 | } 149 | -------------------------------------------------------------------------------- /source/Components/Settings/Settings/SettingsManager.cs: -------------------------------------------------------------------------------- 1 | namespace Settings 2 | { 3 | using MLib.Interfaces; 4 | using Settings.Interfaces; 5 | using Settings.Internal; 6 | 7 | /// 8 | /// Helper class to initialize an 9 | /// service interface. 10 | /// 11 | public sealed class SettingsManager 12 | { 13 | /// 14 | /// Hidden default constructor. 15 | /// 16 | private SettingsManager() 17 | { 18 | } 19 | 20 | /// 21 | /// Gets an instance of an object that implements the 22 | /// interface. 23 | /// 24 | /// 25 | public static ISettingsManager GetInstance(IAppearanceManager appearanceManager) 26 | { 27 | return new SettingsManagerImpl(appearanceManager); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /source/Components/Settings/Settings/UserProfile/IViewSize.cs: -------------------------------------------------------------------------------- 1 | namespace Settings.UserProfile 2 | { 3 | using System.Windows; 4 | 5 | /// 6 | /// Provide an interface to implement saving and loading/repositioning of Window or view. 7 | /// 8 | public interface IViewSize 9 | { 10 | // 11 | // Zusammenfassung: 12 | // Ruft die Position des linken Fensterrands im Verhältnis zum Desktop ab oder legt 13 | // diese fest. 14 | // 15 | // Rückgabewerte: 16 | // Die Position des linken Fensterrands in logischen Einheiten (1/96 Zoll). 17 | double Left { get; set; } 18 | 19 | // 20 | // Zusammenfassung: 21 | // Ruft die Position des oberen Fensterrands im Verhältnis zum Desktop ab oder legt 22 | // diese fest. 23 | // 24 | // Rückgabewerte: 25 | // Die Position des oberen Fensterrands in logischen Einheiten (1/96 "). 26 | double Top { get; set; } 27 | 28 | // 29 | // Zusammenfassung: 30 | // Ruft die Breite des Elements ab bzw. legt diese fest. 31 | // 32 | // Rückgabewerte: 33 | // Die Breite des Elements in geräteunabhängige Einheiten (1/96th inch per unit).Der 34 | // Standardwert ist System.Double.NaN.Dieser Wert muss größer oder gleich 0,0 sein.In 35 | // den Hinweisen finden Sie Informationen über obere Grenzen. 36 | double Width { get; set; } 37 | 38 | // 39 | // Zusammenfassung: 40 | // Ruft die vorgeschlagene Höhe des Elements ab oder legt diese fest. 41 | // 42 | // Rückgabewerte: 43 | // Die Höhe des Elements in geräteunabhängige Einheiten (1/96th inch per unit).Der 44 | // Standardwert ist System.Double.NaN.Dieser Wert muss größer oder gleich 0,0 sein.In 45 | // den Hinweisen finden Sie Informationen über obere Grenzen. 46 | double Height { get; set; } 47 | 48 | // 49 | // Zusammenfassung: 50 | // Ruft einen Wert ab, der angibt, ob ein Fenster wiederhergestellt, minimiert oder 51 | // maximiert ist, oder legt diesen fest. 52 | // 53 | // Rückgabewerte: 54 | // Ein System.Windows.WindowState, der bestimmt, ob ein Fenster wiederhergestellt, 55 | // minimiert oder maximiert ist.Der Standardwert ist System.Windows.WindowState.Normal 56 | // (wiederhergestellt). 57 | WindowState WindowState { get; set; } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /source/Components/Settings/Settings/UserProfile/LocalizabilityAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Settings.UserProfile 4 | { 5 | internal class LocalizabilityAttribute : Attribute 6 | { 7 | } 8 | } -------------------------------------------------------------------------------- /source/Components/Settings/Settings/UserProfile/ViewSize.cs: -------------------------------------------------------------------------------- 1 | namespace Settings.UserProfile 2 | { 3 | // 50, 50, 800, 550 4 | public class ViewSize 5 | { 6 | public ViewSize(double x, double y, double width, double height) 7 | { 8 | X = x; 9 | Y = y; 10 | Width = width; 11 | Height = height; 12 | } 13 | 14 | public double X { get; private set; } 15 | public double Y { get; private set; } 16 | public double Width { get; private set; } 17 | public double Height { get; private set; } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /source/Components/Settings/Settings/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /source/Components/Settings/SettingsModel/ExtensionMethods/SecureStringExtensionMethod.cs: -------------------------------------------------------------------------------- 1 | namespace SettingsModel.ExtensionMethods 2 | { 3 | using System; 4 | using System.Runtime.InteropServices; 5 | using System.Security; 6 | 7 | /// 8 | /// Source: http://blogs.msdn.com/b/fpintos/archive/2009/06/12/how-to-properly-convert-securestring-to-string.aspx 9 | /// 10 | internal static class SecureStringExtensionMethod 11 | { 12 | public static string ConvertToUnsecureString(this SecureString securePassword) 13 | { 14 | if (securePassword == null) 15 | throw new ArgumentNullException("securePassword"); 16 | 17 | IntPtr unmanagedString = IntPtr.Zero; 18 | try 19 | { 20 | unmanagedString = Marshal.SecureStringToGlobalAllocUnicode(securePassword); 21 | return Marshal.PtrToStringUni(unmanagedString); 22 | } 23 | finally 24 | { 25 | Marshal.ZeroFreeGlobalAllocUnicode(unmanagedString); 26 | } 27 | } 28 | 29 | public static SecureString ConvertToSecureString(this string password) 30 | { 31 | if (password == null) 32 | throw new ArgumentNullException("password"); 33 | 34 | var securePassword = new SecureString(); 35 | foreach (char c in password) 36 | securePassword.AppendChar(c); 37 | 38 | securePassword.MakeReadOnly(); 39 | return securePassword; 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /source/Components/Settings/SettingsModel/Interfaces/IOptionGroup.cs: -------------------------------------------------------------------------------- 1 | namespace SettingsModel.Interfaces 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | 6 | /// 7 | /// An option group is a logical group of options 8 | /// (setting values or preferences) of an application. 9 | /// 10 | public interface IOptionGroup 11 | { 12 | /// 13 | /// Gets the name of this options group. This name is used to 14 | /// cluster related options around a technically relevant name. 15 | /// 16 | string Name { get; } 17 | 18 | /// 19 | /// Retrieves the schema of each option in this optiongroup. 20 | /// 21 | /// 22 | IEnumerable GetOptionDefinitions(); 23 | 24 | /// 25 | /// Retrieves the schema of an option in this optiongroup. 26 | /// 27 | /// 28 | IOptionsSchema GetOptionDefinition(string optionName); 29 | 30 | /// 31 | /// Gets the value of an option in a given or null 32 | /// if either option or does not exist. 33 | /// 34 | /// Method returns false if option or are not known. 35 | /// 36 | /// 37 | /// Indicates whether option and exist or not. 38 | /// 39 | bool GetValue(string optionName, out object optValue); 40 | 41 | /// 42 | /// Gets the value of an option in a given or 43 | /// throws an exception if either option or 44 | /// does not exist. 45 | /// 46 | /// Method the requested option value if option and are known. 47 | /// 48 | /// 49 | /// 50 | object GetValue(string optionName); 51 | 52 | /// 53 | /// Gets the requested option and returns it as typed <T> value. 54 | /// The method throws an exception if: 55 | /// - requested option value is not stored as typed <T> or 56 | /// - the and option name does not exist. 57 | /// 58 | /// 59 | /// current value of this option. 60 | T GetValue(string optionName); 61 | 62 | /// 63 | /// Sets the value of a given option in this option table. 64 | /// 65 | /// 66 | /// 67 | /// 68 | bool SetValue(string optionName, object newValue); 69 | 70 | /// 71 | /// Add a list item in a list schema 72 | /// 73 | /// 74 | /// 75 | /// 76 | /// 77 | /// Returns true if item was succesfully added or false 78 | /// if schema is not a list schema. 79 | /// 80 | bool List_AddValue(string optionName, string keyName, object value); 81 | 82 | /// 83 | /// Clear all items contained in a list. 84 | /// 85 | /// 86 | /// 87 | bool List_Clear(string optionName); 88 | 89 | /// 90 | /// Create a new option that can hold a list of items. 91 | /// 92 | /// 93 | /// 94 | /// 95 | /// 96 | /// 97 | /// 98 | IOptionsSchema List_CreateOption(string optionName, Type type, bool isOptional, List list); 99 | 100 | /// 101 | /// Gets a list of current values if this schema descripes a List. 102 | /// Return a single value schema as a list of 1 item. 103 | /// 104 | /// 105 | /// 106 | IEnumerable List_GetListOfValues(string optionName); 107 | 108 | /// 109 | /// Gets a list of current keys and values if this schema 110 | /// descripes a List. 111 | /// 112 | /// Return a single value schema as a list of 1 item. 113 | /// 114 | /// 115 | /// 116 | IEnumerable> List_GetListOfKeyValues(string optionName); 117 | 118 | /// 119 | /// Resets the IsDirty flag to false to indicate that the current 120 | /// data was not changed/edited by a user request, yet. This is 121 | /// useful after defining a new options model and starting to work 122 | /// with it, as well, as after reading options from persistance... 123 | /// 124 | /// 125 | void SetUndirty(bool isDirty); 126 | } 127 | } -------------------------------------------------------------------------------- /source/Components/Settings/SettingsModel/Interfaces/IOptionsSchema.cs: -------------------------------------------------------------------------------- 1 | namespace SettingsModel.Interfaces 2 | { 3 | using SettingsModel.Models; 4 | using System; 5 | using System.Collections.Generic; 6 | 7 | /// 8 | /// Defines available schema information for 1 option. 9 | /// 10 | public interface IOptionsSchema 11 | { 12 | /// 13 | /// Gets the type of schema (list or single value) 14 | /// 15 | OptionSchemaType SchemaType { get; } 16 | 17 | /// 18 | /// Gets the name of an option. 19 | /// 20 | string OptionName { get; } 21 | 22 | /// 23 | /// Gets the type of the option being defined here. 24 | /// 25 | Type TypeOfValue { get; } 26 | 27 | /// 28 | /// Gets whether this options is optional or required. 29 | /// This is important when perisiting data and when reading 30 | /// data from persistance. 31 | /// 32 | bool IsOptional { get; } 33 | 34 | /// 35 | /// Gets the value of this option. 36 | /// 37 | object Value { get; } 38 | 39 | /// 40 | /// Gets/sets the default value of this option. 41 | /// 42 | object DefaultValue { get; } 43 | 44 | #region methods 45 | /// 46 | /// Removes the value with the specified key 47 | /// from the internal dictionary. 48 | /// 49 | /// The key of the element to remove. 50 | /// 51 | /// true if the element is successfully found and removed; otherwise, false. 52 | /// This method returns false if key is not found in 53 | /// the System.Collections.Generic.Dictionary<TKey,TValue>. 54 | /// 55 | /// Exceptions: 56 | /// System.ArgumentNullException: 57 | /// key is null. 58 | /// 59 | bool List_Remove(string key); 60 | 61 | /// 62 | /// Gets the value associated with the specified key. 63 | /// 64 | /// 65 | /// The key of the value to get. 66 | /// 67 | /// 68 | /// When this method returns, contains the value associated with the specified 69 | /// key, if the key is found; otherwise, the default value for the type of the 70 | /// value parameter. This parameter is passed uninitialized. 71 | /// 72 | /// 73 | /// true if the System.Collections.Generic.Dictionary<TKey,TValue> contains an 74 | /// element with the specified key; otherwise, false. 75 | /// 76 | /// Exceptions: 77 | /// System.ArgumentNullException: 78 | /// key is null. 79 | /// 80 | bool List_TryGetValue(string key, out object value); 81 | 82 | /// 83 | /// Sets the value of a given option in this option object. 84 | /// 85 | /// true if data actually changed (for dirty state tracking). 86 | /// Otherwise, false if requested value was already present. 87 | /// 88 | bool SetValue(object newValue); 89 | 90 | /// 91 | /// Add a list item in a list schema 92 | /// 93 | /// 94 | /// 95 | /// 96 | /// Returns true if item was succesfully added or false 97 | /// if schema is not a list schema. 98 | /// 99 | bool List_AddValue(string name, object value); 100 | 101 | /// 102 | /// Clear all items contained in a list. 103 | /// 104 | /// 105 | bool List_Clear(); 106 | 107 | /// 108 | /// Gets a list of current values if this schema descripes a List. 109 | /// Return a single value schema as a list of 1 item. 110 | /// 111 | /// 112 | IEnumerable List_GetListOfValues(); 113 | 114 | /// 115 | /// Gets a list of current keys and values if this schema 116 | /// descripes a List. 117 | /// 118 | /// Return a single value schema as a list of 1 item. 119 | /// 120 | /// 121 | IEnumerable> List_GetListOfKeyValues(); 122 | #endregion methods 123 | } 124 | } 125 | -------------------------------------------------------------------------------- /source/Components/Settings/SettingsModel/Models/Factory.cs: -------------------------------------------------------------------------------- 1 | namespace SettingsModel.Models 2 | { 3 | using SettingsModel.Interfaces; 4 | 5 | /// 6 | /// Factory class to create an 7 | /// object from a class that is otherwise unknown to the outside world. 8 | /// 9 | public static class Factory 10 | { 11 | /// 12 | /// Create a new engine object that provides all root functions required 13 | /// to model, track, persist, and load data at run-time. 14 | /// 15 | /// 16 | public static IEngine CreateEngine() 17 | { 18 | return new OptionsEngine(); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /source/Components/Settings/SettingsModel/Models/FileReference.cs: -------------------------------------------------------------------------------- 1 | namespace SettingsModel.Models 2 | { 3 | using System; 4 | using System.Xml.Serialization; 5 | 6 | /// 7 | /// Implement a simple file reverence model to allow XML persistence 8 | /// of a List via this class. 9 | /// 10 | public class FileReference 11 | { 12 | /// 13 | /// Gets/sets the path to a file. 14 | /// 15 | [XmlAttribute(AttributeName = "path")] 16 | public string path { get; set; } 17 | 18 | /// 19 | /// Gets/sets the date and time when this entry was updated for the last time. 20 | /// 21 | [XmlAttribute(AttributeName = "lastupdate")] 22 | public DateTime LastTimeOfEdit { get; set; } 23 | 24 | /// 25 | /// 26 | /// 27 | [XmlAttribute(AttributeName = "ispinned")] 28 | public int IsPinned { get; set; } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /source/Components/Settings/SettingsModel/Models/XML/Converters/AlternativeDataTypeHandler.cs: -------------------------------------------------------------------------------- 1 | namespace SettingsModel.Models.XML.Converters 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Security; 6 | 7 | /// 8 | /// Holds a collection of alternative datatype 9 | /// handlers to handle datatypes that are not supported through equivalent conversion 10 | /// in alternative datatypes. 11 | /// 12 | internal class AlternativeDataTypeHandler 13 | { 14 | #region fields 15 | private readonly Dictionary converters = null; 16 | #endregion fields 17 | 18 | public AlternativeDataTypeHandler() 19 | { 20 | converters = new Dictionary(); 21 | 22 | converters.Add(typeof(SecureString), new SecureStringHandler()); 23 | } 24 | 25 | /// 26 | /// Finds an alternative datatype handler to handle datatypes that are not 27 | /// supported through equivalent conversion in alternative datatypes. 28 | /// 29 | /// 30 | /// 31 | public IAlternativeDataTypeHandler FindHandler(Type typeOfDataType2Handle) 32 | { 33 | IAlternativeDataTypeHandler ret = null; 34 | 35 | try 36 | { 37 | converters.TryGetValue(typeOfDataType2Handle, out ret); 38 | } 39 | catch 40 | { 41 | } 42 | 43 | return ret; 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /source/Components/Settings/SettingsModel/Models/XML/Converters/IAlternativeDataTypeHandler.cs: -------------------------------------------------------------------------------- 1 | namespace SettingsModel.Models.XML.Converters 2 | { 3 | using System; 4 | 5 | internal interface IAlternativeDataTypeHandler 6 | { 7 | Type SourceDataType { get; } 8 | Type TargetDataType { get; } 9 | 10 | object Convert(object objectInput); 11 | object ConvertBack(object objectEncryptedData); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /source/Components/Settings/SettingsModel/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("SettingsModel")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("SettingsModel")] 13 | [assembly: AssemblyCopyright("The MIT License (MIT) Copyright © 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("9b0ba841-5a2f-4ed3-a908-253dbca70e77")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /source/Components/Settings/SettingsModel/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /source/Components/XmlExplorerLib/Controls/XPathTreeView.xaml: -------------------------------------------------------------------------------- 1 |  7 | 8 | 38 | 39 | -------------------------------------------------------------------------------- /source/Components/XmlExplorerLib/Controls/XPathTreeView.xaml.cs: -------------------------------------------------------------------------------- 1 | namespace XmlExplorerLib.Controls 2 | { 3 | using System.Windows; 4 | using System.Windows.Controls; 5 | 6 | /// 7 | /// 8 | /// 9 | public class XPathTreeView : TreeView 10 | { 11 | static XPathTreeView() 12 | { 13 | DefaultStyleKeyProperty.OverrideMetadata(typeof(XPathTreeView), 14 | new FrameworkPropertyMetadata(typeof(XPathTreeView))); 15 | } 16 | 17 | /// 18 | /// Creates the element that is used to display a . 19 | /// 20 | /// A new object instance. 21 | protected override DependencyObject GetContainerForItemOverride() 22 | { 23 | return new XPathTreeViewItem() { }; 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /source/Components/XmlExplorerLib/Controls/XPathTreeViewItem.xaml.cs: -------------------------------------------------------------------------------- 1 | namespace XmlExplorerLib.Controls 2 | { 3 | using System.Windows; 4 | using System.Windows.Controls; 5 | 6 | public class XPathTreeViewItem : TreeViewItem 7 | { 8 | #region Constructor 9 | /// 10 | /// Static constructor 11 | /// 12 | static XPathTreeViewItem() 13 | { 14 | DefaultStyleKeyProperty.OverrideMetadata(typeof(XPathTreeViewItem), 15 | new FrameworkPropertyMetadata(typeof(XPathTreeViewItem))); 16 | } 17 | 18 | /// 19 | /// Class constructor 20 | /// 21 | public XPathTreeViewItem() 22 | { 23 | } 24 | #endregion 25 | 26 | #region methods 27 | protected override DependencyObject GetContainerForItemOverride() 28 | { 29 | return new XPathTreeViewItem(); 30 | } 31 | #endregion methods 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /source/Components/XmlExplorerLib/Converters/InvertedBooleanToVisibilityConverter.cs: -------------------------------------------------------------------------------- 1 | namespace XmlExplorerLib.Converters 2 | { 3 | using System; 4 | using System.Windows; 5 | using System.Windows.Data; 6 | 7 | public class InvertedBooleanToVisibilityConverter : IValueConverter 8 | { 9 | #region IValueConverter Members 10 | 11 | public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) 12 | { 13 | if (!(value is bool)) 14 | return null; 15 | 16 | bool boolValue = (bool)value; 17 | 18 | if (boolValue) 19 | return Visibility.Collapsed; 20 | else 21 | return Visibility.Visible; 22 | } 23 | 24 | public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) 25 | { 26 | throw new NotImplementedException(); 27 | } 28 | 29 | #endregion 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /source/Components/XmlExplorerLib/Converters/XPathNavigatorAttributesConverter.cs: -------------------------------------------------------------------------------- 1 | namespace XmlExplorerLib.Converters 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Windows.Data; 6 | using System.Xml.XPath; 7 | using XmlExplorerLib.interfaces; 8 | 9 | public class XPathNavigatorAttributesConverter : IValueConverter 10 | { 11 | #region IValueConverter Members 12 | 13 | public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) 14 | { 15 | XPathNavigator navigator; 16 | 17 | IXPathNavigator view = value as IXPathNavigator; 18 | 19 | if (view != null) 20 | navigator = view.XPathNavigator; 21 | else 22 | navigator = value as XPathNavigator; 23 | 24 | if (navigator == null) 25 | return null; 26 | 27 | if (!navigator.HasAttributes) 28 | return null; 29 | 30 | List attributes = new List(); 31 | 32 | // clone the node's navigator (cursor), so it doesn't lose it's position 33 | XPathNavigator attributeNavigator = navigator.Clone(); 34 | if (attributeNavigator.MoveToFirstAttribute()) 35 | { 36 | do 37 | { 38 | attributes.Add(attributeNavigator.Clone()); 39 | } 40 | while (attributeNavigator.MoveToNextAttribute()); 41 | } 42 | 43 | return attributes; 44 | } 45 | 46 | public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) 47 | { 48 | throw new NotImplementedException(); 49 | } 50 | 51 | #endregion 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /source/Components/XmlExplorerLib/Converters/XPathNavigatorItemsConverter.cs: -------------------------------------------------------------------------------- 1 | namespace XmlExplorerLib.Converters 2 | { 3 | /*** 4 | using XmlExplorerDemo.ViewModels; 5 | using System; 6 | using System.Collections.Generic; 7 | using System.Windows.Data; 8 | using System.Xml.XPath; 9 | 10 | public class XPathNavigatorItemsConverter : IValueConverter 11 | { 12 | #region IValueConverter Members 13 | 14 | public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) 15 | { 16 | List childNavigatorViews; 17 | 18 | XPathNodeIterator iterator = value as XPathNodeIterator; 19 | if (iterator != null) 20 | { 21 | childNavigatorViews = new List(); 22 | 23 | foreach (XPathNavigator childNavigator in iterator) 24 | { 25 | childNavigatorViews.Add(new XPathNavigatorViewModel(childNavigator)); 26 | } 27 | 28 | return childNavigatorViews; 29 | } 30 | 31 | XPathNavigator navigator; 32 | 33 | XPathNavigatorViewModel view = value as XPathNavigatorViewModel; 34 | 35 | if (view != null) 36 | navigator = view.XPathNavigator; 37 | else 38 | navigator = value as XPathNavigator; 39 | 40 | if (navigator == null) 41 | return null; 42 | 43 | childNavigatorViews = new List(); 44 | 45 | foreach (XPathNavigator childNavigator in navigator.SelectChildren(XPathNodeType.All)) 46 | { 47 | childNavigatorViews.Add(new XPathNavigatorViewModel(childNavigator)); 48 | } 49 | 50 | return childNavigatorViews; 51 | } 52 | 53 | public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) 54 | { 55 | throw new NotImplementedException(); 56 | } 57 | #endregion 58 | } 59 | ***/ 60 | } 61 | -------------------------------------------------------------------------------- /source/Components/XmlExplorerLib/Interfaces/IXPathNavigator.cs: -------------------------------------------------------------------------------- 1 | namespace XmlExplorerLib.interfaces 2 | { 3 | using System.Collections.Generic; 4 | using System.Xml.XPath; 5 | 6 | public interface IXPathNavigator 7 | { 8 | #region properties 9 | XPathNavigator XPathNavigator { get; } 10 | 11 | bool HasNamespace { get; } 12 | bool IsExpanded { get; set; } 13 | bool IsSelected { get; set; } 14 | string Name { get; } 15 | string Value { get; } 16 | IEnumerable Children { get; } 17 | #endregion properties 18 | 19 | #region methods 20 | void CollapseAll(); 21 | void ExpandAll(); 22 | 23 | /// 24 | /// Gets the formated Xml that represents this Xml node and all its children. 25 | /// 26 | /// 27 | /// 28 | string GetXPathNavigatorFormattedXml(XPathNavigator navigator); 29 | 30 | /// 31 | /// Returns a string representing the full path of an XPathNavigator. 32 | /// 33 | /// An XPathNavigator. 34 | /// 35 | string GetXmlNodeFullPath(XPathNavigator navigator); 36 | #endregion methods 37 | } 38 | } -------------------------------------------------------------------------------- /source/Components/XmlExplorerLib/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Resources; 3 | using System.Runtime.CompilerServices; 4 | using System.Runtime.InteropServices; 5 | using System.Windows; 6 | 7 | // General Information about an assembly is controlled through the following 8 | // set of attributes. Change these attribute values to modify the information 9 | // associated with an assembly. 10 | [assembly: AssemblyTitle("XmlExplorerLib")] 11 | [assembly: AssemblyDescription("")] 12 | [assembly: AssemblyConfiguration("")] 13 | [assembly: AssemblyCompany("")] 14 | [assembly: AssemblyProduct("XmlExplorerLib")] 15 | [assembly: AssemblyCopyright("Copyright © 2018")] 16 | [assembly: AssemblyTrademark("")] 17 | [assembly: AssemblyCulture("")] 18 | 19 | // Setting ComVisible to false makes the types in this assembly not visible 20 | // to COM components. If you need to access a type in this assembly from 21 | // COM, set the ComVisible attribute to true on that type. 22 | [assembly: ComVisible(false)] 23 | 24 | //In order to begin building localizable applications, set 25 | //CultureYouAreCodingWith in your .csproj file 26 | //inside a . For example, if you are using US english 27 | //in your source files, set the to en-US. Then uncomment 28 | //the NeutralResourceLanguage attribute below. Update the "en-US" in 29 | //the line below to match the UICulture setting in the project file. 30 | 31 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] 32 | 33 | 34 | [assembly:ThemeInfo( 35 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located 36 | //(used if a resource is not found in the page, 37 | // or application resource dictionaries) 38 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located 39 | //(used if a resource is not found in the page, 40 | // app, or any theme specific resource dictionaries) 41 | )] 42 | 43 | 44 | // Version information for an assembly consists of the following four values: 45 | // 46 | // Major Version 47 | // Minor Version 48 | // Build Number 49 | // Revision 50 | // 51 | // You can specify all the values or you can default the Build and Revision Numbers 52 | // by using the '*' as shown below: 53 | // [assembly: AssemblyVersion("1.0.*")] 54 | [assembly: AssemblyVersion("1.0.0.0")] 55 | [assembly: AssemblyFileVersion("1.0.0.0")] 56 | -------------------------------------------------------------------------------- /source/Components/XmlExplorerLib/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace XmlExplorerLib.Properties { 12 | 13 | 14 | /// 15 | /// A strongly-typed resource class, for looking up localized strings, etc. 16 | /// 17 | // This class was auto-generated by the StronglyTypedResourceBuilder 18 | // class via a tool like ResGen or Visual Studio. 19 | // To add or remove a member, edit your .ResX file then rerun ResGen 20 | // with the /str option, or rebuild your VS project. 21 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 22 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 23 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 24 | internal class Resources { 25 | 26 | private static global::System.Resources.ResourceManager resourceMan; 27 | 28 | private static global::System.Globalization.CultureInfo resourceCulture; 29 | 30 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 31 | internal Resources() { 32 | } 33 | 34 | /// 35 | /// Returns the cached ResourceManager instance used by this class. 36 | /// 37 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 38 | internal static global::System.Resources.ResourceManager ResourceManager { 39 | get { 40 | if ((resourceMan == null)) { 41 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("XmlExplorerLib.Properties.Resources", typeof(Resources).Assembly); 42 | resourceMan = temp; 43 | } 44 | return resourceMan; 45 | } 46 | } 47 | 48 | /// 49 | /// Overrides the current thread's CurrentUICulture property for all 50 | /// resource lookups using this strongly typed resource class. 51 | /// 52 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 53 | internal static global::System.Globalization.CultureInfo Culture { 54 | get { 55 | return resourceCulture; 56 | } 57 | set { 58 | resourceCulture = value; 59 | } 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /source/Components/XmlExplorerLib/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace XmlExplorerLib.Properties 12 | { 13 | 14 | 15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] 17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase 18 | { 19 | 20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 21 | 22 | public static Settings Default 23 | { 24 | get 25 | { 26 | return defaultInstance; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /source/Components/XmlExplorerLib/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /source/Components/XmlExplorerLib/Templates/XPathNodeTypeDataTemplateSelector.cs: -------------------------------------------------------------------------------- 1 | namespace XmlExplorerLib.Templates 2 | { 3 | using System.Windows; 4 | using System.Windows.Controls; 5 | using System.Xml.XPath; 6 | using XmlExplorerLib.interfaces; 7 | 8 | public class XPathNodeTypeDataTemplateSelector : DataTemplateSelector 9 | { 10 | public override System.Windows.DataTemplate SelectTemplate(object item, 11 | DependencyObject container) 12 | { 13 | IXPathNavigator view = item as IXPathNavigator; 14 | 15 | if (view != null) 16 | { 17 | XPathNavigator navigator = view.XPathNavigator; 18 | var presenter = container as FrameworkElement; 19 | if (navigator != null && presenter != null) 20 | { 21 | switch (navigator.NodeType) 22 | { 23 | case XPathNodeType.Root: 24 | return presenter.FindResource("elementXPathNavigatorTemplate") as DataTemplate; //xmlDeclarationXmlNodeTemplate 25 | 26 | case XPathNodeType.ProcessingInstruction: 27 | return presenter.FindResource("processingInstructionXPathNavigatorTemplate") as DataTemplate; 28 | 29 | case XPathNodeType.Comment: 30 | return presenter.FindResource("commentXPathNavigatorTemplate") as DataTemplate; 31 | 32 | case XPathNodeType.Element: 33 | return presenter.FindResource("elementXPathNavigatorTemplate") as DataTemplate; 34 | 35 | case XPathNodeType.Text: 36 | return presenter.FindResource("textXPathNavigatorTemplate") as DataTemplate; 37 | 38 | case XPathNodeType.Attribute: 39 | return presenter.FindResource("attributeXPathNavigatorTemplate") as DataTemplate; 40 | } 41 | } 42 | } 43 | 44 | return base.SelectTemplate(item, container); 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /source/Components/XmlExplorerLib/Themes/DarkBrushs.xaml: -------------------------------------------------------------------------------- 1 |  6 | 7 | 9 | #1ba1e2 10 | 11 | 13 | 14 | 15 | 16 | 18 | 20 | 21 | 23 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /source/Components/XmlExplorerLib/Themes/Generic.xaml: -------------------------------------------------------------------------------- 1 |  3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /source/Components/XmlExplorerLib/Themes/LightBrushs.xaml: -------------------------------------------------------------------------------- 1 |  6 | 7 | 9 | #007acc 10 | 11 | 13 | 14 | 15 | 17 | 19 | 20 | 22 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /source/Components/XmlExplorerLib/XmlExplorerLib.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {E363FC08-6AB1-4D43-B708-EDA7F467BB2E} 8 | library 9 | XmlExplorerLib 10 | XmlExplorerLib 11 | v4.0 12 | 512 13 | {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 14 | 4 15 | true 16 | 17 | 18 | true 19 | full 20 | false 21 | bin\Debug\ 22 | DEBUG;TRACE 23 | prompt 24 | 4 25 | 26 | 27 | pdbonly 28 | true 29 | bin\Release\ 30 | TRACE 31 | prompt 32 | 4 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 4.0 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | MSBuild:Compile 53 | Designer 54 | 55 | 56 | XPathTreeView.xaml 57 | Code 58 | 59 | 60 | XPathTreeViewItem.xaml 61 | Code 62 | 63 | 64 | Designer 65 | MSBuild:Compile 66 | 67 | 68 | MSBuild:Compile 69 | Designer 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | MSBuild:Compile 78 | Designer 79 | 80 | 81 | MSBuild:Compile 82 | Designer 83 | 84 | 85 | Designer 86 | MSBuild:Compile 87 | 88 | 89 | 90 | 91 | Code 92 | 93 | 94 | True 95 | True 96 | Resources.resx 97 | 98 | 99 | True 100 | Settings.settings 101 | True 102 | 103 | 104 | ResXFileCodeGenerator 105 | Resources.Designer.cs 106 | 107 | 108 | SettingsSingleFileGenerator 109 | Settings.Designer.cs 110 | 111 | 112 | 113 | -------------------------------------------------------------------------------- /source/Components/XmlExplorerVMLib/Behaviors/DialogCloser.cs: -------------------------------------------------------------------------------- 1 | namespace XmlExplorerVMLib.Behaviors 2 | { 3 | using System.Windows; 4 | 5 | public static class DialogCloser 6 | { 7 | /// 8 | /// Dependency property for attached behaviour in NON-dialog windows. 9 | /// This can be is used to close a NON-dialog window via ViewModel. 10 | /// 11 | public static readonly DependencyProperty DialogResultProperty = 12 | DependencyProperty.RegisterAttached( 13 | "DialogResult", 14 | typeof(bool?), 15 | typeof(DialogCloser), 16 | new PropertyMetadata(DialogResultChanged)); 17 | 18 | /// 19 | /// Setter of corresponding dependency property 20 | /// 21 | /// 22 | /// 23 | public static void SetDialogResult(Window target, bool? value) 24 | { 25 | target.SetValue(DialogResultProperty, value); 26 | } 27 | 28 | private static void DialogResultChanged(DependencyObject d, 29 | DependencyPropertyChangedEventArgs e) 30 | { 31 | var window = d as Window; 32 | 33 | // If a shutdown request was cancelled. 34 | if (e.NewValue == null) // Do not react on this ([re-]initialization) event. 35 | return; 36 | 37 | if (window?.Visibility != Visibility.Visible) 38 | return; 39 | 40 | // Setting the DialogResult property invokes the close method of the corresponding dialog 41 | //// window.DialogResult = e.NewValue as bool?; 42 | 43 | // Dialog mResult cannot be set on windows that are no shown as dialogs. 44 | // Therefore, we close directly via calling the corresponding close method of the view 45 | try 46 | { 47 | window.Close(); 48 | } 49 | catch 50 | { // ignored 51 | } 52 | } 53 | } 54 | } -------------------------------------------------------------------------------- /source/Components/XmlExplorerVMLib/Interfaces/IDocumentViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace XmlExplorerVMLib.Interfaces 2 | { 3 | using System.Windows.Input; 4 | 5 | /// 6 | /// Defines an interface to a viewmodel object that keeps and manages all 7 | /// core states relevant to appliaction. This viewmodel is typically bound 8 | /// to the MainWindow. 9 | /// 10 | public interface IDocumentViewModel 11 | { 12 | #region properties 13 | /// 14 | /// Gets an object tree that represents the nodes of an XML tree. 15 | /// 16 | object XmlTree { get; } 17 | 18 | /// 19 | /// Gets the complete path of the currently open file. 20 | /// 21 | string CurrentXmlFile { get; } 22 | 23 | /// 24 | /// Gets a command that will expand all currently visible XML nodes (if any). 25 | /// 26 | ICommand ExpandAllNodesCommand { get; } 27 | 28 | /// 29 | /// Gets a command that will collapse all currently visible XML nodes (if any). 30 | /// 31 | ICommand CollapseAllNodesCommand { get; } 32 | #endregion properties 33 | 34 | #region methods 35 | 36 | /// 37 | /// Method opens an XML file and attempts to load the XML 38 | /// into the internal viewmodel representation. 39 | /// 40 | /// 41 | /// 42 | bool FileOpenXml(string file); 43 | 44 | /// 45 | /// Determines whether a Save Xml command can currently performed or not. 46 | /// 47 | /// 48 | bool SaveXml_CanExecut(); 49 | 50 | /// 51 | /// Method saves the current Xml content into an XML formated text file. 52 | /// 53 | /// 54 | /// 55 | bool SaveXml(string file); 56 | 57 | /// 58 | /// Determines whether the application can currently close without problems or not. 59 | /// 60 | /// 61 | /// True if application is ready to close otherwise, false. 62 | /// 63 | bool Closing_CanExecute(); 64 | #endregion methods 65 | } 66 | } -------------------------------------------------------------------------------- /source/Components/XmlExplorerVMLib/Models/Error.cs: -------------------------------------------------------------------------------- 1 | namespace XmlExplorerVMLib.Models 2 | { 3 | using System.Xml.Schema; 4 | 5 | public class Error 6 | { 7 | public XmlSeverityType Category { get; set; } 8 | public int DefaultOrder { get; set; } 9 | public string Description { get; set; } 10 | public string File { get; set; } 11 | //public int Line { get; set; } 12 | //public int Column { get; set; } 13 | //public ValidationEventArgs ValidationEventArgs { get; set; } 14 | public object SourceObject { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /source/Components/XmlExplorerVMLib/Models/Events/EventArgs.cs: -------------------------------------------------------------------------------- 1 | namespace XmlExplorerVMLib.Models.Events 2 | { 3 | using System; 4 | 5 | public class EventArgs : EventArgs 6 | { 7 | public T Item { get; private set; } 8 | 9 | public EventArgs(T item) 10 | : base() 11 | { 12 | this.Item = item; 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /source/Components/XmlExplorerVMLib/Modul/Installer.cs: -------------------------------------------------------------------------------- 1 | namespace XmlExplorerVMLib.Module 2 | { 3 | using Castle.MicroKernel.Registration; 4 | using Castle.MicroKernel.SubSystems.Configuration; 5 | using Castle.Windsor; 6 | using XmlExplorerVMLib.Interfaces; 7 | using XmlExplorerVMLib.ViewModels; 8 | 9 | /// 10 | /// This class gets picked up by from Castle.Windsor because 11 | /// it implements the interface. 12 | /// 13 | /// The interface is used by the 14 | /// container to resolve installers when calling 15 | /// .Install(FromAssembly.This()); 16 | /// 17 | public class Installers : IWindsorInstaller 18 | { 19 | /// 20 | /// Performs the installation in the Castle.Windsor.IWindsorContainer. 21 | /// 22 | /// 23 | /// 24 | void IWindsorInstaller.Install(IWindsorContainer container, 25 | IConfigurationStore store) 26 | { 27 | // resolve this viewmodel class via its interface 28 | container 29 | .Register(Component.For() 30 | .ImplementedBy().LifestyleSingleton()); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /source/Components/XmlExplorerVMLib/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("XmlExplorerVMLib")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("XmlExplorerVMLib")] 13 | [assembly: AssemblyCopyright("Copyright © 2018")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("f0c7f0e0-0f12-4c33-a8b9-8e3cc4321d54")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /source/Components/XmlExplorerVMLib/ViewModels/Base/BaseViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace XmlExplorerVMLib.ViewModels.Base 2 | { 3 | using System; 4 | using System.ComponentModel; 5 | using System.Linq.Expressions; 6 | 7 | /// 8 | /// Every ViewModel class is required to implement the INotifyPropertyChanged 9 | /// interface in order to tell WPF when a property changed (for instance, when 10 | /// a method or setter is executed). 11 | /// 12 | /// Therefore, the PropertyChanged methode has to be called when data changes, 13 | /// because the relevant properties may or may not be bound to GUI elements, 14 | /// which in turn have to refresh their display. 15 | /// 16 | /// The PropertyChanged method is to be called by the members and properties of 17 | /// the class that derives from this class. Each call contains the name of the 18 | /// property that has to be refreshed. 19 | /// 20 | /// The BaseViewModel is derived from from System.Windows.DependencyObject to allow 21 | /// resulting ViewModels the implemantion of dependency properties. Dependency properties 22 | /// in turn are useful when working with IValueConverter and ConverterParameters. 23 | /// 24 | internal class BaseViewModel : INotifyPropertyChanged 25 | { 26 | /// 27 | /// Standard event handler of the interface 28 | /// 29 | public event PropertyChangedEventHandler PropertyChanged; 30 | 31 | /// 32 | /// Tell bound controls (via WPF binding) to refresh their display. 33 | /// 34 | /// Sample call: this.NotifyPropertyChanged(() => this.IsSelected); 35 | /// where 'this' is derived from 36 | /// and IsSelected is a property. 37 | /// 38 | /// 39 | /// 40 | public void NotifyPropertyChanged(Expression> property) 41 | { 42 | var lambda = (LambdaExpression)property; 43 | MemberExpression memberExpression; 44 | 45 | if (lambda.Body is UnaryExpression) 46 | { 47 | var unaryExpression = (UnaryExpression)lambda.Body; 48 | memberExpression = (MemberExpression)unaryExpression.Operand; 49 | } 50 | else 51 | memberExpression = (MemberExpression)lambda.Body; 52 | 53 | this.OnPropertyChanged(memberExpression.Member.Name); 54 | } 55 | 56 | /// 57 | /// Tell bound controls (via WPF binding) to refresh their display. 58 | /// 59 | /// Sample call: this.OnPropertyChanged("IsSelected"); 60 | /// where 'this' is derived from 61 | /// and IsSelected is a property. 62 | /// 63 | /// Name of property to refresh 64 | public void OnPropertyChanged(string propertyName) 65 | { 66 | try 67 | { 68 | if (this.PropertyChanged != null) 69 | this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); 70 | } 71 | catch 72 | { 73 | } 74 | } 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /source/Components/XmlExplorerVMLib/ViewModels/Base/RelayCommand.cs: -------------------------------------------------------------------------------- 1 | namespace XmlExplorerVMLib.ViewModels.Base 2 | { 3 | using System; 4 | using System.Diagnostics; 5 | using System.Windows.Input; 6 | 7 | /// 8 | /// A command whose sole purpose is to 9 | /// relay its functionality to other 10 | /// objects by invoking delegates. The 11 | /// default return value for the CanExecute 12 | /// method is 'true'. 13 | /// 14 | /// Source: http://www.codeproject.com/Articles/31837/Creating-an-Internationalized-Wizard-in-WPF 15 | /// 16 | internal class RelayCommand : ICommand 17 | { 18 | #region Fields 19 | private readonly Action mExecute = null; 20 | private readonly Predicate mCanExecute = null; 21 | #endregion // Fields 22 | 23 | #region Constructors 24 | /// 25 | /// Class constructor 26 | /// 27 | /// 28 | public RelayCommand(Action execute) 29 | : this(execute, null) 30 | { 31 | } 32 | 33 | /// 34 | /// Creates a new command. 35 | /// 36 | /// The execution logic. 37 | /// The execution status logic. 38 | public RelayCommand(Action execute, Predicate canExecute) 39 | { 40 | if (execute == null) 41 | throw new ArgumentNullException("execute"); 42 | 43 | this.mExecute = execute; 44 | this.mCanExecute = canExecute; 45 | } 46 | 47 | #endregion // Constructors 48 | 49 | #region events 50 | /// 51 | /// Eventhandler to re-evaluate whether this command can execute or not 52 | /// 53 | public event EventHandler CanExecuteChanged 54 | { 55 | add 56 | { 57 | if (this.mCanExecute != null) 58 | CommandManager.RequerySuggested += value; 59 | } 60 | 61 | remove 62 | { 63 | if (this.mCanExecute != null) 64 | CommandManager.RequerySuggested -= value; 65 | } 66 | } 67 | #endregion 68 | 69 | #region methods 70 | /// 71 | /// Determine whether this pre-requisites to execute this command are given or not. 72 | /// 73 | /// 74 | /// 75 | [DebuggerStepThrough] 76 | public bool CanExecute(object parameter) 77 | { 78 | return this.mCanExecute == null ? true : this.mCanExecute((T)parameter); 79 | } 80 | 81 | /// 82 | /// Execute the command method managed in this class. 83 | /// 84 | /// 85 | public void Execute(object parameter) 86 | { 87 | this.mExecute((T)parameter); 88 | } 89 | #endregion methods 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /source/Components/XmlExplorerVMLib/ViewModels/XML/NamespaceDefinition.cs: -------------------------------------------------------------------------------- 1 | namespace XmlExplorerVMLib.ViewModels.XML 2 | { 3 | internal class NamespaceDefinition : Base.BaseViewModel 4 | { 5 | #region fields 6 | private string _namespace; 7 | private string _oldPrefix; 8 | private string _newPrefix; 9 | #endregion fields 10 | 11 | #region properties 12 | public string Namespace 13 | { 14 | get { return _namespace; } 15 | set 16 | { 17 | _namespace = value; 18 | base.NotifyPropertyChanged(() => Namespace); 19 | } 20 | } 21 | 22 | public string OldPrefix 23 | { 24 | get { return _oldPrefix; } 25 | set 26 | { 27 | _oldPrefix = value; 28 | base.NotifyPropertyChanged(() => OldPrefix); 29 | } 30 | } 31 | 32 | public string NewPrefix 33 | { 34 | get { return _newPrefix; } 35 | set 36 | { 37 | _newPrefix = value; 38 | base.NotifyPropertyChanged(() => NewPrefix); 39 | } 40 | } 41 | #endregion properties 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /source/Components/XmlExplorerVMLib/Views/BindingProxy.cs: -------------------------------------------------------------------------------- 1 | namespace XmlExplorerVMLib.Views 2 | { 3 | using System.Windows; 4 | 5 | /// 6 | /// Implements an XAML proxy which can be used to bind items (TreeViewItem, ListViewItem etc) 7 | /// with a viewmodel that manages the collecrions. 8 | /// 9 | /// Source: http://www.thomaslevesque.com/2011/03/21/wpf-how-to-bind-to-data-when-the-datacontext-is-not-inherited/ 10 | /// Issue: http://stackoverflow.com/questions/9994241/mvvm-binding-command-to-contextmenu-item 11 | /// 12 | public class BindingProxy : Freezable 13 | { 14 | public static readonly DependencyProperty DataProperty = 15 | DependencyProperty.Register("Data", typeof(object), typeof(BindingProxy), new UIPropertyMetadata(null)); 16 | 17 | /// 18 | /// Gets the data object this class is forwarding to everyone 19 | /// who has a reference to this object. 20 | /// 21 | public object Data 22 | { 23 | get { return GetValue(DataProperty); } 24 | set { SetValue(DataProperty, value); } 25 | } 26 | 27 | /// 28 | /// Overrides of Freezable 29 | /// 30 | /// 31 | protected override Freezable CreateInstanceCore() 32 | { 33 | return new BindingProxy(); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /source/Components/XmlExplorerVMLib/XmlExplorerVMLib.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {F0C7F0E0-0F12-4C33-A8B9-8E3CC4321D54} 8 | Library 9 | Properties 10 | XmlExplorerVMLib 11 | XmlExplorerVMLib 12 | v4.5.2 13 | 512 14 | true 15 | 16 | 17 | 18 | true 19 | full 20 | false 21 | bin\Debug\ 22 | DEBUG;TRACE 23 | prompt 24 | 4 25 | false 26 | 27 | 28 | pdbonly 29 | true 30 | bin\Release\ 31 | TRACE 32 | prompt 33 | 4 34 | false 35 | 36 | 37 | 38 | ..\..\packages\Castle.Core.4.3.1\lib\net45\Castle.Core.dll 39 | 40 | 41 | ..\..\packages\Castle.Windsor.4.1.1\lib\net45\Castle.Windsor.dll 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | {e363fc08-6ab1-4d43-b708-eda7f467bb2e} 76 | XmlExplorerLib 77 | 78 | 79 | 80 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /source/Components/XmlExplorerVMLib/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /source/GenericXmlExplorerDemo/00_DataSamples/XmlDataSampleDemo.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {BA1C7851-45F1-41D5-B9FC-486D89424B20} 8 | WinExe 9 | XmlExplorerDemo 10 | XmlExplorerDemo 11 | v4.6.1 12 | 512 13 | {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 14 | 4 15 | true 16 | 17 | 18 | AnyCPU 19 | true 20 | full 21 | false 22 | bin\Debug\ 23 | DEBUG;TRACE 24 | prompt 25 | 4 26 | 27 | 28 | AnyCPU 29 | pdbonly 30 | true 31 | bin\Release\ 32 | TRACE 33 | prompt 34 | 4 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 4.0 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | MSBuild:Compile 55 | Designer 56 | 57 | 58 | 59 | 60 | 61 | 62 | MSBuild:Compile 63 | Designer 64 | 65 | 66 | App.xaml 67 | Code 68 | 69 | 70 | MainWindow.xaml 71 | Code 72 | 73 | 74 | 75 | 76 | Code 77 | 78 | 79 | True 80 | True 81 | Resources.resx 82 | 83 | 84 | True 85 | Settings.settings 86 | True 87 | 88 | 89 | ResXFileCodeGenerator 90 | Resources.Designer.cs 91 | 92 | 93 | SettingsSingleFileGenerator 94 | Settings.Designer.cs 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | -------------------------------------------------------------------------------- /source/GenericXmlExplorerDemo/App.xaml: -------------------------------------------------------------------------------- 1 |  4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /source/GenericXmlExplorerDemo/App.xaml.cs: -------------------------------------------------------------------------------- 1 | namespace GenericXmlExplorerDemo 2 | { 3 | using Castle.Windsor; 4 | using Castle.Windsor.Installer; 5 | using GenericXmlExplorerDemo.Interfaces; 6 | using log4net; 7 | using log4net.Config; 8 | using System.Globalization; 9 | using System.Windows; 10 | using System.Windows.Threading; 11 | using XmlExplorerVMLib.Interfaces; 12 | 13 | /// 14 | /// Interaction logic for App.xaml 15 | /// 16 | public partial class App : Application 17 | { 18 | #region fields 19 | private IWindsorContainer _Container; 20 | protected static log4net.ILog Logger; 21 | #endregion fields 22 | 23 | #region constructors 24 | /// 25 | /// Static class constructor 26 | /// 27 | static App() 28 | { 29 | XmlConfigurator.Configure(); 30 | Logger = LogManager.GetLogger("default"); 31 | } 32 | 33 | /// 34 | /// Class constructor 35 | /// 36 | public App() 37 | { 38 | InitializeComponent(); 39 | 40 | SessionEnding += App_SessionEnding; 41 | DispatcherUnhandledException += App_DispatcherUnhandledException; 42 | } 43 | #endregion constructors 44 | 45 | #region methods 46 | /// 47 | /// Method executes as application entry point - that is - 48 | /// this bit of code executes before anything else in this 49 | /// class and application. 50 | /// 51 | /// 52 | protected override void OnStartup(StartupEventArgs e) 53 | { 54 | base.OnStartup(e); 55 | 56 | _Container = new WindsorContainer(); 57 | 58 | // This allows castle to look at the current assembly and look for implementations 59 | // of the IWindsorInstaller interface 60 | _Container.Install(FromAssembly.This()); // Register 61 | 62 | var window = new MainWindow(); 63 | var appVM = _Container.Resolve(); 64 | window.DataContext = appVM; 65 | 66 | // subscribe to close event messing to application viewmodel 67 | window.Closing += appVM.OnClosing; 68 | 69 | // When the ViewModel asks to be closed, close the window. 70 | // Source: http://msdn.microsoft.com/en-us/magazine/dd419663.aspx 71 | appVM.RequestClose += delegate 72 | { 73 | // Save session data and close application 74 | appVM.OnClosed(window); 75 | }; 76 | 77 | window.Show(); 78 | } 79 | 80 | /// 81 | /// Handle unhandled exception here 82 | /// 83 | /// 84 | /// 85 | private void App_DispatcherUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e) 86 | { 87 | string message = string.Empty; 88 | 89 | try 90 | { 91 | if (e.Exception != null) 92 | { 93 | message = string.Format(CultureInfo.CurrentCulture, "{0}\n\n{1}", e.Exception.Message, e.Exception.ToString()); 94 | } 95 | else 96 | message = "An unknown error occurred."; 97 | 98 | MessageBox.Show(message, "An unexpected error occurred."); 99 | 100 | e.Handled = true; 101 | } 102 | catch 103 | { 104 | } 105 | } 106 | 107 | /// 108 | /// Method executes event based when the user ends the Windows 109 | /// session by logging off or shutting down the operating system. 110 | /// 111 | /// 112 | /// 113 | private void App_SessionEnding(object sender, SessionEndingCancelEventArgs e) 114 | { 115 | } 116 | #endregion methods 117 | } 118 | } 119 | -------------------------------------------------------------------------------- /source/GenericXmlExplorerDemo/Installers.cs: -------------------------------------------------------------------------------- 1 | namespace GenericXmlExplorerDemo 2 | { 3 | using Castle.MicroKernel.Registration; 4 | using Castle.MicroKernel.SubSystems.Configuration; 5 | using Castle.Windsor; 6 | using Castle.Windsor.Installer; 7 | using GenericXmlExplorerDemo.Interfaces; 8 | using GenericXmlExplorerDemo.ViewModels; 9 | using System; 10 | 11 | /// 12 | /// This class gets picked up by from Castle.Windsor because 13 | /// it implements the interface. 14 | /// 15 | /// The interface is used by the 16 | /// container to resolve installers when calling 17 | /// .Install(FromAssembly.This()); 18 | /// 19 | public class Installers : IWindsorInstaller 20 | { 21 | #region fields 22 | protected static readonly log4net.ILog Logger = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); 23 | #endregion fields 24 | 25 | /// 26 | /// Performs the installation in the Castle.Windsor.IWindsorContainer. 27 | /// 28 | /// 29 | /// 30 | public void Install(IWindsorContainer container, 31 | IConfigurationStore store) 32 | { 33 | 34 | try 35 | { 36 | string fullPath = System.Reflection.Assembly.GetAssembly(typeof(Installers)).Location; 37 | string dir = System.IO.Path.GetDirectoryName(fullPath); 38 | 39 | // register components in this DLL and make them available here 40 | container.Install(FromAssembly.Named(System.IO.Path.Combine(dir, "XmlExplorerVMLib.dll"))); 41 | 42 | // Register application viewmodel to help castle satisfy dependencies on it 43 | container 44 | .Register(Component.For() 45 | .ImplementedBy().LifestyleSingleton()); 46 | } 47 | catch (Exception exp) 48 | { 49 | Logger.Error(exp); 50 | } 51 | } 52 | } 53 | } -------------------------------------------------------------------------------- /source/GenericXmlExplorerDemo/Interfaces/IGenericAppViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace GenericXmlExplorerDemo.Interfaces 2 | { 3 | using System; 4 | using System.Windows; 5 | using System.Windows.Input; 6 | 7 | public interface IGenericAppViewModel 8 | { 9 | /// 10 | /// Raised when this workspace should be removed from the UI. 11 | /// 12 | event EventHandler RequestClose; 13 | 14 | #region properties 15 | /// 16 | /// Gets the demo viewmodel and all its properties and commands 17 | /// 18 | XmlExplorerVMLib.Interfaces.IDocumentViewModel Demo { get; } 19 | 20 | /// 21 | /// Gets a command that will collapse all currently visible XML nodes (if any). 22 | /// 23 | ICommand ApplicationExitCommand { get; } 24 | 25 | /// 26 | /// This can be used to close the attached view via ViewModel 27 | /// 28 | /// Source: http://stackoverflow.com/questions/501886/wpf-mvvm-newbie-how-should-the-viewmodel-close-the-form 29 | /// 30 | bool? DialogCloseResult { get; } 31 | #endregion properties 32 | 33 | #region methods 34 | /// 35 | /// Method to be executed when user (or program) tries to close the application 36 | /// 37 | void OnRequestClose(); 38 | 39 | /// 40 | /// Save session data on closing 41 | /// 42 | /// 43 | /// 44 | void OnClosing(object sender, System.ComponentModel.CancelEventArgs e); 45 | 46 | /// 47 | /// Execute closing function and persist session data to be reloaded on next restart 48 | /// 49 | /// 50 | void OnClosed(Window win); 51 | #endregion methods 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /source/GenericXmlExplorerDemo/MainWindow.xaml: -------------------------------------------------------------------------------- 1 |  16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 37 | 39 | 40 | 42 | 43 | 44 | 45 | 49 | 50 | 54 | 55 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 70 | 71 | 72 | 76 | 77 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | -------------------------------------------------------------------------------- /source/GenericXmlExplorerDemo/MainWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Windows; 6 | using System.Windows.Controls; 7 | using System.Windows.Data; 8 | using System.Windows.Documents; 9 | using System.Windows.Input; 10 | using System.Windows.Media; 11 | using System.Windows.Media.Imaging; 12 | using System.Windows.Navigation; 13 | using System.Windows.Shapes; 14 | 15 | namespace GenericXmlExplorerDemo 16 | { 17 | /// 18 | /// Interaction logic for MainWindow.xaml 19 | /// 20 | public partial class MainWindow : Window 21 | { 22 | public MainWindow() 23 | { 24 | InitializeComponent(); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /source/GenericXmlExplorerDemo/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Resources; 3 | using System.Runtime.CompilerServices; 4 | using System.Runtime.InteropServices; 5 | using System.Windows; 6 | 7 | // General Information about an assembly is controlled through the following 8 | // set of attributes. Change these attribute values to modify the information 9 | // associated with an assembly. 10 | [assembly: AssemblyTitle("GenericXmlExplorerDemo")] 11 | [assembly: AssemblyDescription("")] 12 | [assembly: AssemblyConfiguration("")] 13 | [assembly: AssemblyCompany("")] 14 | [assembly: AssemblyProduct("GenericXmlExplorerDemo")] 15 | [assembly: AssemblyCopyright("Copyright © 2018")] 16 | [assembly: AssemblyTrademark("")] 17 | [assembly: AssemblyCulture("")] 18 | 19 | // Setting ComVisible to false makes the types in this assembly not visible 20 | // to COM components. If you need to access a type in this assembly from 21 | // COM, set the ComVisible attribute to true on that type. 22 | [assembly: ComVisible(false)] 23 | 24 | //In order to begin building localizable applications, set 25 | //CultureYouAreCodingWith in your .csproj file 26 | //inside a . For example, if you are using US english 27 | //in your source files, set the to en-US. Then uncomment 28 | //the NeutralResourceLanguage attribute below. Update the "en-US" in 29 | //the line below to match the UICulture setting in the project file. 30 | 31 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] 32 | 33 | 34 | [assembly: ThemeInfo( 35 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located 36 | //(used if a resource is not found in the page, 37 | // or application resource dictionaries) 38 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located 39 | //(used if a resource is not found in the page, 40 | // app, or any theme specific resource dictionaries) 41 | )] 42 | 43 | 44 | // Version information for an assembly consists of the following four values: 45 | // 46 | // Major Version 47 | // Minor Version 48 | // Build Number 49 | // Revision 50 | // 51 | // You can specify all the values or you can default the Build and Revision Numbers 52 | // by using the '*' as shown below: 53 | // [assembly: AssemblyVersion("1.0.*")] 54 | [assembly: AssemblyVersion("1.3.0.0")] 55 | [assembly: AssemblyFileVersion("1.3.0.0")] 56 | -------------------------------------------------------------------------------- /source/GenericXmlExplorerDemo/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace GenericXmlExplorerDemo.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("GenericXmlExplorerDemo.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /source/GenericXmlExplorerDemo/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace GenericXmlExplorerDemo.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /source/GenericXmlExplorerDemo/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /source/GenericXmlExplorerDemo/Resources/App.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/source/GenericXmlExplorerDemo/Resources/App.ico -------------------------------------------------------------------------------- /source/GenericXmlExplorerDemo/ViewModels/Base/BaseViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace GenericXmlExplorerDemo.ViewModels.Base 2 | { 3 | using System; 4 | using System.ComponentModel; 5 | using System.Linq.Expressions; 6 | 7 | /// 8 | /// Every ViewModel class is required to implement the INotifyPropertyChanged 9 | /// interface in order to tell WPF when a property changed (for instance, when 10 | /// a method or setter is executed). 11 | /// 12 | /// Therefore, the PropertyChanged methode has to be called when data changes, 13 | /// because the relevant properties may or may not be bound to GUI elements, 14 | /// which in turn have to refresh their display. 15 | /// 16 | /// The PropertyChanged method is to be called by the members and properties of 17 | /// the class that derives from this class. Each call contains the name of the 18 | /// property that has to be refreshed. 19 | /// 20 | /// The BaseViewModel is derived from from System.Windows.DependencyObject to allow 21 | /// resulting ViewModels the implemantion of dependency properties. Dependency properties 22 | /// in turn are useful when working with IValueConverter and ConverterParameters. 23 | /// 24 | internal class BaseViewModel : INotifyPropertyChanged 25 | { 26 | /// 27 | /// Standard event handler of the interface 28 | /// 29 | public event PropertyChangedEventHandler PropertyChanged; 30 | 31 | /// 32 | /// Tell bound controls (via WPF binding) to refresh their display. 33 | /// 34 | /// Sample call: this.NotifyPropertyChanged(() => this.IsSelected); 35 | /// where 'this' is derived from 36 | /// and IsSelected is a property. 37 | /// 38 | /// 39 | /// 40 | public void NotifyPropertyChanged(Expression> property) 41 | { 42 | var lambda = (LambdaExpression)property; 43 | MemberExpression memberExpression; 44 | 45 | if (lambda.Body is UnaryExpression) 46 | { 47 | var unaryExpression = (UnaryExpression)lambda.Body; 48 | memberExpression = (MemberExpression)unaryExpression.Operand; 49 | } 50 | else 51 | memberExpression = (MemberExpression)lambda.Body; 52 | 53 | this.OnPropertyChanged(memberExpression.Member.Name); 54 | } 55 | 56 | /// 57 | /// Tell bound controls (via WPF binding) to refresh their display. 58 | /// 59 | /// Sample call: this.OnPropertyChanged("IsSelected"); 60 | /// where 'this' is derived from 61 | /// and IsSelected is a property. 62 | /// 63 | /// Name of property to refresh 64 | public void OnPropertyChanged(string propertyName) 65 | { 66 | try 67 | { 68 | if (this.PropertyChanged != null) 69 | this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); 70 | } 71 | catch 72 | { 73 | } 74 | } 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /source/GenericXmlExplorerDemo/ViewModels/Base/RelayCommand.cs: -------------------------------------------------------------------------------- 1 | namespace GenericXmlExplorerDemo.ViewModels.Base 2 | { 3 | using System; 4 | using System.Diagnostics; 5 | using System.Windows.Input; 6 | 7 | /// 8 | /// A command whose sole purpose is to 9 | /// relay its functionality to other 10 | /// objects by invoking delegates. The 11 | /// default return value for the CanExecute 12 | /// method is 'true'. 13 | /// 14 | /// Source: http://www.codeproject.com/Articles/31837/Creating-an-Internationalized-Wizard-in-WPF 15 | /// 16 | internal class RelayCommand : ICommand 17 | { 18 | #region Fields 19 | private readonly Action mExecute = null; 20 | private readonly Predicate mCanExecute = null; 21 | #endregion // Fields 22 | 23 | #region Constructors 24 | /// 25 | /// Class constructor 26 | /// 27 | /// 28 | public RelayCommand(Action execute) 29 | : this(execute, null) 30 | { 31 | } 32 | 33 | /// 34 | /// Creates a new command. 35 | /// 36 | /// The execution logic. 37 | /// The execution status logic. 38 | public RelayCommand(Action execute, Predicate canExecute) 39 | { 40 | if (execute == null) 41 | throw new ArgumentNullException("execute"); 42 | 43 | this.mExecute = execute; 44 | this.mCanExecute = canExecute; 45 | } 46 | 47 | #endregion // Constructors 48 | 49 | #region events 50 | /// 51 | /// Eventhandler to re-evaluate whether this command can execute or not 52 | /// 53 | public event EventHandler CanExecuteChanged 54 | { 55 | add 56 | { 57 | if (this.mCanExecute != null) 58 | CommandManager.RequerySuggested += value; 59 | } 60 | 61 | remove 62 | { 63 | if (this.mCanExecute != null) 64 | CommandManager.RequerySuggested -= value; 65 | } 66 | } 67 | #endregion 68 | 69 | #region methods 70 | /// 71 | /// Determine whether this pre-requisites to execute this command are given or not. 72 | /// 73 | /// 74 | /// 75 | [DebuggerStepThrough] 76 | public bool CanExecute(object parameter) 77 | { 78 | return this.mCanExecute == null ? true : this.mCanExecute((T)parameter); 79 | } 80 | 81 | /// 82 | /// Execute the command method managed in this class. 83 | /// 84 | /// 85 | public void Execute(object parameter) 86 | { 87 | this.mExecute((T)parameter); 88 | } 89 | #endregion methods 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /source/GenericXmlExplorerDemo/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /source/GenericXmlExplorerDemo/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /source/XmlExplorerDemo/00_DataSamples/XmlDataSampleDemo.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {BA1C7851-45F1-41D5-B9FC-486D89424B20} 8 | WinExe 9 | XmlExplorerDemo 10 | XmlExplorerDemo 11 | v4.6.1 12 | 512 13 | {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 14 | 4 15 | true 16 | 17 | 18 | AnyCPU 19 | true 20 | full 21 | false 22 | bin\Debug\ 23 | DEBUG;TRACE 24 | prompt 25 | 4 26 | 27 | 28 | AnyCPU 29 | pdbonly 30 | true 31 | bin\Release\ 32 | TRACE 33 | prompt 34 | 4 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 4.0 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | MSBuild:Compile 55 | Designer 56 | 57 | 58 | 59 | 60 | 61 | 62 | MSBuild:Compile 63 | Designer 64 | 65 | 66 | App.xaml 67 | Code 68 | 69 | 70 | MainWindow.xaml 71 | Code 72 | 73 | 74 | 75 | 76 | Code 77 | 78 | 79 | True 80 | True 81 | Resources.resx 82 | 83 | 84 | True 85 | Settings.settings 86 | True 87 | 88 | 89 | ResXFileCodeGenerator 90 | Resources.Designer.cs 91 | 92 | 93 | SettingsSingleFileGenerator 94 | Settings.Designer.cs 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | -------------------------------------------------------------------------------- /source/XmlExplorerDemo/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /source/XmlExplorerDemo/App.xaml: -------------------------------------------------------------------------------- 1 |  4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /source/XmlExplorerDemo/App.xaml.cs: -------------------------------------------------------------------------------- 1 | namespace XmlExplorerDemo 2 | { 3 | using Castle.Windsor; 4 | using Castle.Windsor.Installer; 5 | using log4net; 6 | using log4net.Config; 7 | using MLib.Interfaces; 8 | using Settings.Interfaces; 9 | using System.Globalization; 10 | using System.Windows; 11 | using System.Windows.Threading; 12 | using XmlExplorerDemo.Interfaces; 13 | 14 | /// 15 | /// Interaction logic for App.xaml 16 | /// 17 | public partial class App : Application 18 | { 19 | #region fields 20 | private IWindsorContainer _Container; 21 | protected static log4net.ILog Logger; 22 | #endregion fields 23 | 24 | #region constructors 25 | /// 26 | /// Static class constructor 27 | /// 28 | static App() 29 | { 30 | XmlConfigurator.Configure(); 31 | Logger = LogManager.GetLogger("default"); 32 | } 33 | 34 | /// 35 | /// Class constructor 36 | /// 37 | public App() 38 | { 39 | InitializeComponent(); 40 | 41 | SessionEnding += App_SessionEnding; 42 | DispatcherUnhandledException += App_DispatcherUnhandledException; 43 | } 44 | #endregion constructors 45 | 46 | #region methods 47 | /// 48 | /// Method executes as application entry point - that is - 49 | /// this bit of code executes before anything else in this 50 | /// class and application. 51 | /// 52 | /// 53 | protected override void OnStartup(StartupEventArgs e) 54 | { 55 | base.OnStartup(e); 56 | 57 | _Container = new WindsorContainer(); 58 | 59 | // This allows castle to look at the current assembly and look for implementations 60 | // of the IWindsorInstaller interface 61 | _Container.Install(FromAssembly.This()); // Register 62 | 63 | ISettingsManager settings = null; 64 | try 65 | { 66 | // Apply the selected theme (either default or reloaded from options) 67 | var themeManager = _Container.Resolve(); 68 | 69 | settings = _Container.Resolve(); 70 | var appearance = _Container.Resolve(); 71 | 72 | var lifeCycle = _Container.Resolve(); 73 | lifeCycle.LoadConfigOnAppStartup(settings, appearance); 74 | 75 | themeManager.ApplyTheme(settings.Options.GetOptionValue("Appearance", "ThemeDisplayName")); 76 | 77 | themeManager.ApplyTheme(themeManager.SelectedTheme.Model.Name); 78 | } 79 | catch (System.Exception exp) 80 | { 81 | Logger.Error(exp); 82 | } 83 | 84 | var window = new MainWindow(); 85 | var appVM = _Container.Resolve(); 86 | appVM.SetSessionData(settings.SessionData, window); 87 | window.DataContext = appVM; 88 | 89 | // subscribe to close event messaging to application viewmodel 90 | window.Closing += appVM.OnClosing; 91 | 92 | window.Closed += delegate 93 | { 94 | // Save session data and close application 95 | appVM.OnClosed(window); 96 | }; 97 | 98 | // When the ViewModel asks to be closed, close the window. 99 | // Source: http://msdn.microsoft.com/en-us/magazine/dd419663.aspx 100 | appVM.RequestClose += delegate 101 | { 102 | // Save session data and close application 103 | appVM.OnClosed(window); 104 | }; 105 | 106 | window.Show(); 107 | } 108 | 109 | /// 110 | /// Handle unhandled exception here 111 | /// 112 | /// 113 | /// 114 | private void App_DispatcherUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e) 115 | { 116 | string message = string.Empty; 117 | 118 | try 119 | { 120 | if (e.Exception != null) 121 | { 122 | message = string.Format(CultureInfo.CurrentCulture, "{0}\n\n{1}", e.Exception.Message, e.Exception.ToString()); 123 | } 124 | else 125 | message = "An unknown error occurred."; 126 | 127 | MessageBox.Show(message, "An unexpected error occurred."); 128 | 129 | e.Handled = true; 130 | } 131 | catch 132 | { 133 | } 134 | } 135 | 136 | /// 137 | /// Method executes event based when the user ends the Windows 138 | /// session by logging off or shutting down the operating system. 139 | /// 140 | /// 141 | /// 142 | private void App_SessionEnding(object sender, SessionEndingCancelEventArgs e) 143 | { 144 | } 145 | #endregion methods 146 | } 147 | } 148 | -------------------------------------------------------------------------------- /source/XmlExplorerDemo/BindToMLib/MWindowLib_DarkLightBrushs.xaml: -------------------------------------------------------------------------------- 1 |  9 | 11 | Blue 13 | 14 | 17 | 18 | 19 | #FFF4F4F5 21 | 22 | #FF2D2D30 24 | 25 | 28 | 29 | 32 | 33 | 34 | #FF3F3F41 36 | 37 | 40 | 41 | -------------------------------------------------------------------------------- /source/XmlExplorerDemo/BindToMLib/UnitComboLib_DarkLightBrushs.xaml: -------------------------------------------------------------------------------- 1 |  6 | 7 | 9 | #FF1888b8 11 | 12 | 15 | 16 | 17 | 20 | 21 | 33 | 34 | 37 | 38 | -------------------------------------------------------------------------------- /source/XmlExplorerDemo/BindToMLib/XmlExplorerLib_DarkLightBrushs.xaml: -------------------------------------------------------------------------------- 1 |  7 | 8 | 10 | 11 | 13 | 14 | -------------------------------------------------------------------------------- /source/XmlExplorerDemo/Installers.cs: -------------------------------------------------------------------------------- 1 | namespace XmlExplorerDemo 2 | { 3 | using Castle.MicroKernel.Registration; 4 | using Castle.MicroKernel.SubSystems.Configuration; 5 | using Castle.Windsor; 6 | using Castle.Windsor.Installer; 7 | using MLib; 8 | using MLib.Interfaces; 9 | using System; 10 | using XmlExplorerDemo.Interfaces; 11 | using XmlExplorerDemo.Models; 12 | using XmlExplorerDemo.ViewModels; 13 | using XmlExplorerDemo.ViewModels.Themes; 14 | using XmlExplorerVMLib.Interfaces; 15 | 16 | /// 17 | /// This class gets picked up by from Castle.Windsor because 18 | /// it implements the interface. 19 | /// 20 | /// The interface is used by the 21 | /// container to resolve installers when calling 22 | /// .Install(FromAssembly.This()); 23 | /// 24 | public class Installers : IWindsorInstaller 25 | { 26 | #region fields 27 | protected static readonly log4net.ILog Logger = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); 28 | #endregion fields 29 | 30 | /// 31 | /// Performs the installation in the Castle.Windsor.IWindsorContainer. 32 | /// 33 | /// 34 | /// 35 | public void Install(IWindsorContainer container, 36 | IConfigurationStore store) 37 | { 38 | try 39 | { 40 | string fullPath = System.Reflection.Assembly.GetAssembly(typeof(Installers)).Location; 41 | string dir = System.IO.Path.GetDirectoryName(fullPath); 42 | 43 | // register components in this DLL and make them available here 44 | container.Install(FromAssembly.Named(System.IO.Path.Combine(dir, "Settings.dll"))); 45 | container.Install(FromAssembly.Named(System.IO.Path.Combine(dir, "XmlExplorerVMLib.dll"))); 46 | } 47 | catch (Exception exp) 48 | { 49 | Logger.Error(exp); 50 | } 51 | 52 | container.Register(Component.For() 53 | .Instance(AppearanceManager.GetInstance()).LifestyleSingleton()); 54 | 55 | // Register settings service component to help castle satisfy dependencies on it 56 | container 57 | .Register(Component.For() 58 | .ImplementedBy().LifestyleSingleton()); 59 | 60 | // Register settings service component to help castle satisfy dependencies on it 61 | container 62 | .Register(Component.For() 63 | .ImplementedBy().LifestyleSingleton()); 64 | 65 | // Register application viewmodel to help castle satisfy dependencies on it 66 | container 67 | .Register(Component.For() 68 | .ImplementedBy().LifestyleSingleton()); 69 | } 70 | } 71 | } -------------------------------------------------------------------------------- /source/XmlExplorerDemo/Interfaces/IAppLifeCycleViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace XmlExplorerDemo.Interfaces 2 | { 3 | using System.Windows.Input; 4 | using MLib.Interfaces; 5 | using Settings.Interfaces; 6 | using Settings.UserProfile; 7 | 8 | /// 9 | /// Implements application life cycle relevant properties and methods, 10 | /// such as: state for shutdown, shutdown_cancel, command for shutdown, 11 | /// and methods for save and load application configuration. 12 | /// 13 | internal interface IAppLifeCycleViewModel 14 | { 15 | #region properties 16 | /// 17 | /// Gets a string for display of the application title. 18 | /// 19 | string Application_Title { get; } 20 | 21 | /// 22 | /// Get path and file name to application specific settings file 23 | /// 24 | string DirFileAppSettingsData { get; } 25 | 26 | /// 27 | /// This can be used to close the attached view via ViewModel 28 | /// 29 | /// Source: http://stackoverflow.com/questions/501886/wpf-mvvm-newbie-how-should-the-viewmodel-close-the-form 30 | /// 31 | bool? DialogCloseResult { get; } 32 | 33 | /// 34 | /// Gets a command to exit (end) the application. 35 | /// 36 | ICommand ExitApp { get; } 37 | 38 | bool ShutDownInProgress_Cancel { get; set; } 39 | #endregion properties 40 | 41 | #region methods 42 | 43 | #region Save Load Application configuration 44 | /// 45 | /// Save application settings when the application is being closed down 46 | /// 47 | void SaveConfigOnAppClosed(IViewSize win); 48 | 49 | /// 50 | /// Load configuration from persistence on startup of application 51 | /// 52 | void LoadConfigOnAppStartup(ISettingsManager settings 53 | ,IAppearanceManager appearance); 54 | #endregion Save Load Application configuration 55 | 56 | #region StartUp/ShutDown 57 | /// 58 | /// Check if pre-requisites for closing application are available. 59 | /// Save session data on closing and cancel closing process if necessary. 60 | /// 61 | /// true if application is OK to proceed closing with closed, otherwise false. 62 | bool Exit_CheckConditions(object sender); 63 | 64 | #region RequestClose [event] 65 | /// 66 | /// Raised when this workspace should be removed from the UI. 67 | /// 68 | ////public event EventHandler ApplicationClosed; 69 | 70 | /// 71 | /// Method to be executed when user (or program) tries to close the application 72 | /// 73 | void OnRequestClose(bool ShutDownAfterClosing = true); 74 | 75 | void CancelShutDown(); 76 | #endregion // RequestClose [event] 77 | #endregion StartUp/ShutDown 78 | #endregion methods 79 | } 80 | } -------------------------------------------------------------------------------- /source/XmlExplorerDemo/Interfaces/IAppViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace XmlExplorerDemo.Interfaces 2 | { 3 | using System; 4 | using System.Windows; 5 | using System.Windows.Input; 6 | using MLib.Interfaces; 7 | using Settings.Interfaces; 8 | using Settings.UserProfile; 9 | using XmlExplorerVMLib.Interfaces; 10 | 11 | internal interface IAppViewModel 12 | { 13 | /// 14 | /// Raised when this workspace should be removed from the UI. 15 | /// 16 | event EventHandler RequestClose; 17 | 18 | #region properties 19 | /// 20 | /// Gets an object that Implements application life cycle relevant properties 21 | /// and methods, such as: state for shutdown, shutdown_cancel, 22 | /// command for shutdown, and methods for save and load application configuration. 23 | /// 24 | IAppLifeCycleViewModel AppLifeCycle { get; } 25 | 26 | /// 27 | /// Command executes when the user has selected 28 | /// a different UI theme to display. 29 | /// 30 | /// Command Parameter is the object 31 | /// that should be selected next. This object can be handed over as: 32 | /// 1> an object[] array at object[0] or as simple object 33 | /// 2> p 34 | /// 35 | ICommand ThemeSelectionChangedCommand { get; } 36 | 37 | /// 38 | /// Gets the currently selected application theme object. 39 | /// 40 | IThemesManagerViewModel AppTheme { get; } 41 | 42 | /// 43 | /// Gets the demo viewmodel and all its properties and commands 44 | /// 45 | IDocumentViewModel XmlDoc { get; } 46 | #endregion properties 47 | 48 | #region methods 49 | void GetSessionData(IProfile sessionData, IViewSize window); 50 | 51 | void SetSessionData(IProfile sessionData, IViewSize window); 52 | 53 | /// 54 | /// Standard dispose method of the interface. 55 | /// 56 | void Dispose(); 57 | 58 | /// 59 | /// Call this to initialize application specific items that should be initialized 60 | /// before loading and display of mainWindow. 61 | /// 62 | /// Invocation of This method is REQUIRED if UI is used in this application instance. 63 | /// 64 | /// Method should not be called after 65 | /// 66 | void InitForMainWindow(IAppearanceManager appearance, string themeDisplayName); 67 | 68 | /// 69 | /// Call this method if you want to initialize a headless 70 | /// (command line) application. This method will initialize only 71 | /// Non-WPF related items. 72 | /// 73 | /// Method should not be called after 74 | /// 75 | void InitWithoutMainWindow(); 76 | 77 | /// 78 | /// Save session data on closing 79 | /// 80 | /// 81 | /// 82 | void OnClosing(object sender, 83 | System.ComponentModel.CancelEventArgs e); 84 | 85 | /// 86 | /// Execute closing function and persist session data to be reloaded on next restart 87 | /// 88 | /// 89 | void OnClosed(Window window); 90 | #endregion methods 91 | } 92 | } -------------------------------------------------------------------------------- /source/XmlExplorerDemo/Interfaces/IThemesManagerViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace XmlExplorerDemo.Interfaces 2 | { 3 | using System.Collections.Generic; 4 | using XmlExplorerDemo.ViewModels.Themes; 5 | 6 | internal interface IThemesManagerViewModel 7 | { 8 | ThemeDefinitionViewModel DefaultTheme { get; } 9 | bool IsEnabled { get; } 10 | List ListOfThemes { get; } 11 | ThemeDefinitionViewModel SelectedTheme { get; } 12 | 13 | /// 14 | /// Applies a new theme based on the supplied theme name. 15 | /// 16 | /// 17 | bool ApplyTheme(string themeName); 18 | } 19 | } -------------------------------------------------------------------------------- /source/XmlExplorerDemo/MainWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | namespace XmlExplorerDemo 2 | { 3 | using Settings.UserProfile; 4 | using System.Windows.Input; 5 | 6 | /// 7 | /// Interaction logic for MainWindow.xaml 8 | /// 9 | public partial class MainWindow : MWindowLib.MetroWindow 10 | , IViewSize // Implements saving and loading/repositioning of Window 11 | { 12 | public MainWindow() 13 | { 14 | InitializeComponent(); 15 | 16 | Loaded += MainWindow_Loaded; 17 | } 18 | 19 | private void MainWindow_Loaded(object sender, System.Windows.RoutedEventArgs e) 20 | { 21 | this.PreviewMouseWheel += textEditor_PreviewMouseWheel; 22 | } 23 | 24 | /// 25 | /// This method is triggered on a MouseWheel preview event to check if the user 26 | /// is also holding down the CTRL Key and adjust the current font size if so. 27 | /// 28 | /// 29 | /// 30 | private void textEditor_PreviewMouseWheel(object sender, System.Windows.Input.MouseWheelEventArgs e) 31 | { 32 | if (Keyboard.Modifiers == ModifierKeys.Control) 33 | { 34 | double fontSize = XPathTreeView.FontSize + e.Delta / 25.0; 35 | 36 | if (fontSize < 6) 37 | XPathTreeView.FontSize = 6; 38 | else 39 | { 40 | if (fontSize > 200) 41 | XPathTreeView.FontSize = 200; 42 | else 43 | XPathTreeView.FontSize = fontSize; 44 | } 45 | 46 | e.Handled = true; 47 | } 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /source/XmlExplorerDemo/Models/SettingDefaults.cs: -------------------------------------------------------------------------------- 1 | namespace XmlExplorerDemo.Models 2 | { 3 | using Settings.Interfaces; 4 | using SettingsModel.Interfaces; 5 | using System.Windows.Media; 6 | 7 | /// 8 | /// Class contains all methods necessary to initialize the applications settings model. 9 | /// 10 | internal static class SettingDefaults 11 | { 12 | /// 13 | /// Create the minimal settings model that should be used for every application. 14 | /// This model does not include advanced features like theming etc... 15 | /// 16 | /// 17 | public static void CreateGeneralSettings(IEngine options) 18 | { 19 | const string groupName = "Options"; 20 | 21 | options.AddOption(groupName, "ReloadOpenFilesFromLastSession", typeof(bool), false, true); 22 | options.AddOption(groupName, "SourceFilePath", typeof(string), false, @"C:\temp\source\"); 23 | options.AddOption(groupName, "LanguageSelected", typeof(string), false, "en-US"); 24 | 25 | // var schema = optsEngine.AddListOption(groupName, "BookmarkedFolders", typeof(string), false, new List()); 26 | // schema.List_AddValue(@"C:\TEMP", @"C:\TEMP"); 27 | // schema.List_AddValue(@"C:\Windows", @"C:\Windows"); 28 | } 29 | 30 | /// 31 | /// Create the minimal settings model that should be used for every application. 32 | /// 33 | /// 34 | public static void CreateAppearanceSettings(IEngine options, ISettingsManager settings) 35 | { 36 | const string groupName = "Appearance"; 37 | 38 | options.AddOption(groupName, "ThemeDisplayName", typeof(string), false, "Dark"); 39 | options.AddOption(groupName, "ApplyWindowsDefaultAccent", typeof(bool), false, true); 40 | options.AddOption(groupName, "AccentColor", typeof(Color), false, Color.FromRgb(0x33, 0x99, 0xff)); 41 | 42 | // options.AddOption(groupName, "DefaultIconSize", typeof(int), false, settings.DefaultIconSize); 43 | // options.AddOption(groupName, "DefaultFontSize", typeof(int), false, settings.DefaultFontSize); 44 | // options.AddOption(groupName, "FixedFontSize", typeof(int), false, settings.DefaultFixedFontSize); 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /source/XmlExplorerDemo/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Resources; 3 | using System.Runtime.CompilerServices; 4 | using System.Runtime.InteropServices; 5 | using System.Windows; 6 | 7 | // General Information about an assembly is controlled through the following 8 | // set of attributes. Change these attribute values to modify the information 9 | // associated with an assembly. 10 | [assembly: AssemblyTitle("XmlExplorerDemo")] 11 | [assembly: AssemblyDescription("")] 12 | [assembly: AssemblyConfiguration("")] 13 | [assembly: AssemblyCompany("")] 14 | [assembly: AssemblyProduct("XmlExplorerDemo")] 15 | [assembly: AssemblyCopyright("Copyright © 2017")] 16 | [assembly: AssemblyTrademark("")] 17 | [assembly: AssemblyCulture("")] 18 | 19 | // Setting ComVisible to false makes the types in this assembly not visible 20 | // to COM components. If you need to access a type in this assembly from 21 | // COM, set the ComVisible attribute to true on that type. 22 | [assembly: ComVisible(false)] 23 | 24 | //In order to begin building localizable applications, set 25 | //CultureYouAreCodingWith in your .csproj file 26 | //inside a . For example, if you are using US english 27 | //in your source files, set the to en-US. Then uncomment 28 | //the NeutralResourceLanguage attribute below. Update the "en-US" in 29 | //the line below to match the UICulture setting in the project file. 30 | 31 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] 32 | 33 | 34 | [assembly: ThemeInfo( 35 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located 36 | //(used if a resource is not found in the page, 37 | // or application resource dictionaries) 38 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located 39 | //(used if a resource is not found in the page, 40 | // app, or any theme specific resource dictionaries) 41 | )] 42 | 43 | 44 | // Version information for an assembly consists of the following four values: 45 | // 46 | // Major Version 47 | // Minor Version 48 | // Build Number 49 | // Revision 50 | // 51 | // You can specify all the values or you can default the Build and Revision Numbers 52 | // by using the '*' as shown below: 53 | // [assembly: AssemblyVersion("1.0.*")] 54 | [assembly: AssemblyVersion("1.3.1.0")] 55 | [assembly: AssemblyFileVersion("1.3.1.0")] 56 | -------------------------------------------------------------------------------- /source/XmlExplorerDemo/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace XmlExplorerDemo.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("XmlExplorerDemo.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /source/XmlExplorerDemo/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace XmlExplorerDemo.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /source/XmlExplorerDemo/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /source/XmlExplorerDemo/Resources/App.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/source/XmlExplorerDemo/Resources/App.ico -------------------------------------------------------------------------------- /source/XmlExplorerDemo/Resources/ProjectXML_16x.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /source/XmlExplorerDemo/ViewModels/Base/BaseViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace XmlExplorerDemo.ViewModels.Base 2 | { 3 | using System; 4 | using System.ComponentModel; 5 | using System.Linq.Expressions; 6 | 7 | /// 8 | /// Every ViewModel class is required to implement the INotifyPropertyChanged 9 | /// interface in order to tell WPF when a property changed (for instance, when 10 | /// a method or setter is executed). 11 | /// 12 | /// Therefore, the PropertyChanged methode has to be called when data changes, 13 | /// because the relevant properties may or may not be bound to GUI elements, 14 | /// which in turn have to refresh their display. 15 | /// 16 | /// The PropertyChanged method is to be called by the members and properties of 17 | /// the class that derives from this class. Each call contains the name of the 18 | /// property that has to be refreshed. 19 | /// 20 | /// The BaseViewModel is derived from from System.Windows.DependencyObject to allow 21 | /// resulting ViewModels the implemantion of dependency properties. Dependency properties 22 | /// in turn are useful when working with IValueConverter and ConverterParameters. 23 | /// 24 | internal class BaseViewModel : INotifyPropertyChanged 25 | { 26 | /// 27 | /// Standard event handler of the interface 28 | /// 29 | public event PropertyChangedEventHandler PropertyChanged; 30 | 31 | /// 32 | /// Tell bound controls (via WPF binding) to refresh their display. 33 | /// 34 | /// Sample call: this.NotifyPropertyChanged(() => this.IsSelected); 35 | /// where 'this' is derived from 36 | /// and IsSelected is a property. 37 | /// 38 | /// 39 | /// 40 | public void NotifyPropertyChanged(Expression> property) 41 | { 42 | var lambda = (LambdaExpression)property; 43 | MemberExpression memberExpression; 44 | 45 | if (lambda.Body is UnaryExpression) 46 | { 47 | var unaryExpression = (UnaryExpression)lambda.Body; 48 | memberExpression = (MemberExpression)unaryExpression.Operand; 49 | } 50 | else 51 | memberExpression = (MemberExpression)lambda.Body; 52 | 53 | this.OnPropertyChanged(memberExpression.Member.Name); 54 | } 55 | 56 | /// 57 | /// Tell bound controls (via WPF binding) to refresh their display. 58 | /// 59 | /// Sample call: this.OnPropertyChanged("IsSelected"); 60 | /// where 'this' is derived from 61 | /// and IsSelected is a property. 62 | /// 63 | /// Name of property to refresh 64 | public void OnPropertyChanged(string propertyName) 65 | { 66 | try 67 | { 68 | if (this.PropertyChanged != null) 69 | this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); 70 | } 71 | catch 72 | { 73 | } 74 | } 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /source/XmlExplorerDemo/ViewModels/Base/RelayCommand.cs: -------------------------------------------------------------------------------- 1 | namespace XmlExplorerDemo.ViewModels.Base 2 | { 3 | using System; 4 | using System.Diagnostics; 5 | using System.Windows.Input; 6 | 7 | /// 8 | /// A command whose sole purpose is to 9 | /// relay its functionality to other 10 | /// objects by invoking delegates. The 11 | /// default return value for the CanExecute 12 | /// method is 'true'. 13 | /// 14 | /// Source: http://www.codeproject.com/Articles/31837/Creating-an-Internationalized-Wizard-in-WPF 15 | /// 16 | internal class RelayCommand : ICommand 17 | { 18 | #region Fields 19 | private readonly Action mExecute = null; 20 | private readonly Predicate mCanExecute = null; 21 | #endregion // Fields 22 | 23 | #region Constructors 24 | /// 25 | /// Class constructor 26 | /// 27 | /// 28 | public RelayCommand(Action execute) 29 | : this(execute, null) 30 | { 31 | } 32 | 33 | /// 34 | /// Creates a new command. 35 | /// 36 | /// The execution logic. 37 | /// The execution status logic. 38 | public RelayCommand(Action execute, Predicate canExecute) 39 | { 40 | if (execute == null) 41 | throw new ArgumentNullException("execute"); 42 | 43 | this.mExecute = execute; 44 | this.mCanExecute = canExecute; 45 | } 46 | 47 | #endregion // Constructors 48 | 49 | #region events 50 | /// 51 | /// Eventhandler to re-evaluate whether this command can execute or not 52 | /// 53 | public event EventHandler CanExecuteChanged 54 | { 55 | add 56 | { 57 | if (this.mCanExecute != null) 58 | CommandManager.RequerySuggested += value; 59 | } 60 | 61 | remove 62 | { 63 | if (this.mCanExecute != null) 64 | CommandManager.RequerySuggested -= value; 65 | } 66 | } 67 | #endregion 68 | 69 | #region methods 70 | /// 71 | /// Determine whether this pre-requisites to execute this command are given or not. 72 | /// 73 | /// 74 | /// 75 | [DebuggerStepThrough] 76 | public bool CanExecute(object parameter) 77 | { 78 | return this.mCanExecute == null ? true : this.mCanExecute((T)parameter); 79 | } 80 | 81 | /// 82 | /// Execute the command method managed in this class. 83 | /// 84 | /// 85 | public void Execute(object parameter) 86 | { 87 | this.mExecute((T)parameter); 88 | } 89 | #endregion methods 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /source/XmlExplorerDemo/ViewModels/MRUViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace XmlExplorerDemo.ViewModels 2 | { 3 | using MRULib.MRU.Interfaces; 4 | using Settings.Interfaces; 5 | using SettingsModel.Models; 6 | using System; 7 | 8 | internal class MRUViewModel : Base.BaseViewModel 9 | { 10 | #region private fields 11 | protected static readonly log4net.ILog logger = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); 12 | 13 | private readonly IMRUListViewModel _MRUFilelist = null; 14 | #endregion private fields 15 | 16 | #region constructors 17 | public MRUViewModel() 18 | { 19 | _MRUFilelist = MRULib.MRU_Service.Create_List(); 20 | } 21 | #endregion constructors 22 | 23 | #region properties 24 | /// 25 | /// Gets the MRU File list hosted in this viewmodel. 26 | /// 27 | public IMRUListViewModel List 28 | { 29 | get { return _MRUFilelist; } 30 | } 31 | #endregion properties 32 | 33 | #region methods 34 | /// 35 | /// Method should be called on application shut down 36 | /// to write MRU Data into persistence and make it 37 | /// available on next start-up. 38 | /// 39 | /// 40 | public void WriteMruToSession(IProfile sessionData) 41 | { 42 | try // Write back MRU data information 43 | { 44 | sessionData.LastActiveSourceFiles.Clear(); 45 | foreach (var item in List.Entries) 46 | { 47 | var fileRef = new FileReference(); 48 | fileRef.path = item.Key; 49 | fileRef.LastTimeOfEdit = item.Value.LastUpdate; 50 | fileRef.IsPinned = item.Value.IsPinned; 51 | sessionData.LastActiveSourceFiles.Add(fileRef); 52 | } 53 | } 54 | catch 55 | { 56 | } 57 | } 58 | 59 | /// 60 | /// Method should be called on application start-up to read MRU 61 | /// data from persisted session object into its associated viewmodel. 62 | /// 63 | /// 64 | public void ReadMruFromSession(IProfile sessionData) 65 | { 66 | try // Read back MRU data information 67 | { 68 | List.Entries.Clear(); 69 | foreach (var item in sessionData.LastActiveSourceFiles) 70 | { 71 | IMRUEntryViewModel mruItem = 72 | MRULib.MRU_Service.Create_Entry(item.path, 73 | item.LastTimeOfEdit); 74 | mruItem.SetIsPinned(item.IsPinned); 75 | 76 | List.UpdateEntry(mruItem); 77 | } 78 | } 79 | catch 80 | { 81 | } 82 | } 83 | #endregion methods 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /source/XmlExplorerDemo/ViewModels/Themes/ThemeDefinitionViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace XmlExplorerDemo.ViewModels.Themes 2 | { 3 | using MLib.Themes; 4 | 5 | internal class ThemeDefinitionViewModel : XmlExplorerDemo.ViewModels.Base.BaseViewModel 6 | { 7 | #region private fields 8 | readonly private ThemeDefinition _model; 9 | 10 | private bool _IsSelected; 11 | #endregion private fields 12 | 13 | #region constructors 14 | public ThemeDefinitionViewModel(ThemeDefinition model) 15 | : this() 16 | { 17 | _model = model; 18 | } 19 | 20 | protected ThemeDefinitionViewModel() 21 | { 22 | _model = null; 23 | _IsSelected = false; 24 | } 25 | #endregion constructors 26 | 27 | #region properties 28 | /// 29 | /// Gets the static theme model based data items. 30 | /// 31 | public ThemeDefinition Model 32 | { 33 | get 34 | { 35 | return _model; 36 | } 37 | } 38 | 39 | /// 40 | /// Determines whether this theme is currently selected or not. 41 | /// 42 | public bool IsSelected 43 | { 44 | get { return _IsSelected; } 45 | 46 | set 47 | { 48 | if (_IsSelected != value) 49 | { 50 | _IsSelected = value; 51 | } 52 | } 53 | } 54 | #endregion properties 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /source/XmlExplorerDemo/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /source/packages/Castle.Core.4.3.1/.signature.p7s: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/source/packages/Castle.Core.4.3.1/.signature.p7s -------------------------------------------------------------------------------- /source/packages/Castle.Core.4.3.1/Castle.Core.4.3.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/source/packages/Castle.Core.4.3.1/Castle.Core.4.3.1.nupkg -------------------------------------------------------------------------------- /source/packages/Castle.Core.4.3.1/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2004-2016 Castle Project - http://www.castleproject.org/ 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. -------------------------------------------------------------------------------- /source/packages/Castle.Core.4.3.1/lib/net35/Castle.Core.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/source/packages/Castle.Core.4.3.1/lib/net35/Castle.Core.dll -------------------------------------------------------------------------------- /source/packages/Castle.Core.4.3.1/lib/net40/Castle.Core.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/source/packages/Castle.Core.4.3.1/lib/net40/Castle.Core.dll -------------------------------------------------------------------------------- /source/packages/Castle.Core.4.3.1/lib/net45/Castle.Core.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/source/packages/Castle.Core.4.3.1/lib/net45/Castle.Core.dll -------------------------------------------------------------------------------- /source/packages/Castle.Core.4.3.1/lib/netstandard1.3/Castle.Core.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/source/packages/Castle.Core.4.3.1/lib/netstandard1.3/Castle.Core.dll -------------------------------------------------------------------------------- /source/packages/Castle.Core.4.3.1/lib/netstandard1.5/Castle.Core.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/source/packages/Castle.Core.4.3.1/lib/netstandard1.5/Castle.Core.dll -------------------------------------------------------------------------------- /source/packages/Castle.Core.4.3.1/readme.txt: -------------------------------------------------------------------------------- 1 | Thanks for downloading this Castle package. 2 | You can find full list of changes in CHANGELOG.md 3 | 4 | Documentation (work in progress, contributions appreciated): 5 | DictionaryAdapter: https://github.com/castleproject/Core/blob/master/docs/dictionaryadapter.md 6 | DynamicProxy: https://github.com/castleproject/Core/blob/master/docs/dynamicproxy.md 7 | Discussion group: http://groups.google.com/group/castle-project-users 8 | StackOverflow tags: castle-dynamicproxy, castle-dictionaryadapter, castle 9 | 10 | Issue tracker: https://github.com/castleproject/Core/issues -------------------------------------------------------------------------------- /source/packages/Castle.Windsor.4.1.1/.signature.p7s: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/source/packages/Castle.Windsor.4.1.1/.signature.p7s -------------------------------------------------------------------------------- /source/packages/Castle.Windsor.4.1.1/Castle.Windsor.4.1.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/source/packages/Castle.Windsor.4.1.1/Castle.Windsor.4.1.1.nupkg -------------------------------------------------------------------------------- /source/packages/Castle.Windsor.4.1.1/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2004-2017 Castle Project - http://www.castleproject.org/ 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /source/packages/Castle.Windsor.4.1.1/lib/net45/Castle.Windsor.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/source/packages/Castle.Windsor.4.1.1/lib/net45/Castle.Windsor.dll -------------------------------------------------------------------------------- /source/packages/Castle.Windsor.4.1.1/lib/netstandard1.6/Castle.Windsor.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/source/packages/Castle.Windsor.4.1.1/lib/netstandard1.6/Castle.Windsor.dll -------------------------------------------------------------------------------- /source/packages/Dirkster.FileSystemModels.3.1.0/Dirkster.FileSystemModels.3.1.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/source/packages/Dirkster.FileSystemModels.3.1.0/Dirkster.FileSystemModels.3.1.0.nupkg -------------------------------------------------------------------------------- /source/packages/Dirkster.FileSystemModels.3.1.0/lib/net452/FileSystemModels.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/source/packages/Dirkster.FileSystemModels.3.1.0/lib/net452/FileSystemModels.dll -------------------------------------------------------------------------------- /source/packages/Dirkster.FileSystemModels.3.1.0/lib/net452/FileSystemModels.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/source/packages/Dirkster.FileSystemModels.3.1.0/lib/net452/FileSystemModels.pdb -------------------------------------------------------------------------------- /source/packages/Dirkster.FileSystemModels.3.1.0/lib/net452/de-DE/FileSystemModels.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/source/packages/Dirkster.FileSystemModels.3.1.0/lib/net452/de-DE/FileSystemModels.resources.dll -------------------------------------------------------------------------------- /source/packages/Dirkster.FileSystemModels.3.1.0/lib/net452/es-ES/FileSystemModels.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/source/packages/Dirkster.FileSystemModels.3.1.0/lib/net452/es-ES/FileSystemModels.resources.dll -------------------------------------------------------------------------------- /source/packages/Dirkster.FileSystemModels.3.1.0/lib/net452/fr-FR/FileSystemModels.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/source/packages/Dirkster.FileSystemModels.3.1.0/lib/net452/fr-FR/FileSystemModels.resources.dll -------------------------------------------------------------------------------- /source/packages/Dirkster.FileSystemModels.3.1.0/lib/net452/hi-IN/FileSystemModels.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/source/packages/Dirkster.FileSystemModels.3.1.0/lib/net452/hi-IN/FileSystemModels.resources.dll -------------------------------------------------------------------------------- /source/packages/Dirkster.FileSystemModels.3.1.0/lib/net452/it-IT/FileSystemModels.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/source/packages/Dirkster.FileSystemModels.3.1.0/lib/net452/it-IT/FileSystemModels.resources.dll -------------------------------------------------------------------------------- /source/packages/Dirkster.FileSystemModels.3.1.0/lib/net452/ja-JP/FileSystemModels.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/source/packages/Dirkster.FileSystemModels.3.1.0/lib/net452/ja-JP/FileSystemModels.resources.dll -------------------------------------------------------------------------------- /source/packages/Dirkster.FileSystemModels.3.1.0/lib/net452/log4net.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/source/packages/Dirkster.FileSystemModels.3.1.0/lib/net452/log4net.dll -------------------------------------------------------------------------------- /source/packages/Dirkster.FileSystemModels.3.1.0/lib/net452/ru-RU/FileSystemModels.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/source/packages/Dirkster.FileSystemModels.3.1.0/lib/net452/ru-RU/FileSystemModels.resources.dll -------------------------------------------------------------------------------- /source/packages/Dirkster.FileSystemModels.3.1.0/lib/net452/zh-CHS/FileSystemModels.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/source/packages/Dirkster.FileSystemModels.3.1.0/lib/net452/zh-CHS/FileSystemModels.resources.dll -------------------------------------------------------------------------------- /source/packages/Dirkster.MLib.1.0.9.1/.signature.p7s: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/source/packages/Dirkster.MLib.1.0.9.1/.signature.p7s -------------------------------------------------------------------------------- /source/packages/Dirkster.MLib.1.0.9.1/Behavior_64x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/source/packages/Dirkster.MLib.1.0.9.1/Behavior_64x.png -------------------------------------------------------------------------------- /source/packages/Dirkster.MLib.1.0.9.1/Dirkster.MLib.1.0.9.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/source/packages/Dirkster.MLib.1.0.9.1/Dirkster.MLib.1.0.9.1.nupkg -------------------------------------------------------------------------------- /source/packages/Dirkster.MLib.1.0.9.1/lib/net4/MLib.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/source/packages/Dirkster.MLib.1.0.9.1/lib/net4/MLib.dll -------------------------------------------------------------------------------- /source/packages/Dirkster.MLib.1.0.9.1/lib/net4/MLib.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/source/packages/Dirkster.MLib.1.0.9.1/lib/net4/MLib.pdb -------------------------------------------------------------------------------- /source/packages/Dirkster.MLib.1.0.9.1/license/license.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Dirkster99 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /source/packages/Dirkster.MLib.1.0.9.1/readme.txt: -------------------------------------------------------------------------------- 1 | # MLib 2 | 3 | MLib is a set of WPF theming libraries based on MahApps.Metro, MUI, 4 | and Infragistics Themes For Microsoft Controls. 5 | 6 | This set of theming libraries is used to power several Windows WPF Dektop app projects: 7 | 8 | - Edi 9 | https://github.com/Dirkster99/Edi 10 | 11 | - File System Controls (TestExplorerMLib and ThemedExplorer projects) 12 | https://github.com/Dirkster99/fsc/wiki/FSC-Themeable-Explorer-(Clone) 13 | 14 | MLib supports styling of different Window controls (MainWindow, ContentDialog, or Dialog) 15 | but does not implement this function in the core theming library. 16 | 17 | 1) The Window and Dialog implementation for MLib is implemented in a seperate NuGet 18 | package MWindowLib (comes without ContentDialog support) 19 | 20 | 2) The ContentDialog implementation is available in a seperate NuGet library package: 21 | MWindowDialogLib (Includes MWindowLib and ContentDialog support) 22 | 23 | 24 | ## Features 25 | 26 | All styles are available with a Light and Dark theme. 27 | 28 | The framework supports a dialog service that supports ContentDialogs and 29 | Modal Dialogs using one seemless API: 30 | https://www.codeproject.com/Articles/1170500/A-ContentDialog-in-a-WPF-Desktop-Application 31 | 32 | ## Supported OS 33 | 34 | This framework is designed with Windows 10 UI guidelines in mind but it should 35 | also work for Windows 7 or 8. -------------------------------------------------------------------------------- /source/packages/Dirkster.MRULib.1.0.2/.signature.p7s: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/source/packages/Dirkster.MRULib.1.0.2/.signature.p7s -------------------------------------------------------------------------------- /source/packages/Dirkster.MRULib.1.0.2/Dirkster.MRULib.1.0.2.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/source/packages/Dirkster.MRULib.1.0.2/Dirkster.MRULib.1.0.2.nupkg -------------------------------------------------------------------------------- /source/packages/Dirkster.MRULib.1.0.2/lib/net451/MRULib.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/source/packages/Dirkster.MRULib.1.0.2/lib/net451/MRULib.dll -------------------------------------------------------------------------------- /source/packages/Dirkster.MRULib.1.0.2/lib/net451/MRULib.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/source/packages/Dirkster.MRULib.1.0.2/lib/net451/MRULib.pdb -------------------------------------------------------------------------------- /source/packages/Dirkster.MRULib.1.0.2/readme.txt: -------------------------------------------------------------------------------- 1 | MRULib 2 | 3 | This library Implements a WPF/MVVM Control libray (with backend) that manages a Most Recently Used list of files: 4 | - with saving/loading settings from to XML 5 | - List can be grouped by last access (Pinned, Today, Yesterday, Last Week) 6 | - A recently documents menu entry sorted by last access (without grouping is also supported) 7 | - Pinned entries can be moved up and don in the list 8 | - List entries can be removed based on their age (e.g. Remove all entries older than 1 week) 9 | - Support for Light/Black theming is build in 10 | 11 | There is a demo application and unit test project to demonstrate usage of the control 12 | and document each feature, such as, the ability to configure a minimum and maximum value 13 | that can be used to keep the resulting number of list entries within defined bounds. 14 | -------------------------------------------------------------------------------- /source/packages/Dirkster.MWindowLib.1.0.4.2/Application_64x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/source/packages/Dirkster.MWindowLib.1.0.4.2/Application_64x.png -------------------------------------------------------------------------------- /source/packages/Dirkster.MWindowLib.1.0.4.2/Dirkster.MWindowLib.1.0.4.2.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/source/packages/Dirkster.MWindowLib.1.0.4.2/Dirkster.MWindowLib.1.0.4.2.nupkg -------------------------------------------------------------------------------- /source/packages/Dirkster.MWindowLib.1.0.4.2/lib/net452/MWindowInterfacesLib.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/source/packages/Dirkster.MWindowLib.1.0.4.2/lib/net452/MWindowInterfacesLib.dll -------------------------------------------------------------------------------- /source/packages/Dirkster.MWindowLib.1.0.4.2/lib/net452/MWindowInterfacesLib.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/source/packages/Dirkster.MWindowLib.1.0.4.2/lib/net452/MWindowInterfacesLib.pdb -------------------------------------------------------------------------------- /source/packages/Dirkster.MWindowLib.1.0.4.2/lib/net452/MWindowLib.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/source/packages/Dirkster.MWindowLib.1.0.4.2/lib/net452/MWindowLib.dll -------------------------------------------------------------------------------- /source/packages/Dirkster.MWindowLib.1.0.4.2/lib/net452/MWindowLib.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/source/packages/Dirkster.MWindowLib.1.0.4.2/lib/net452/MWindowLib.pdb -------------------------------------------------------------------------------- /source/packages/Dirkster.MWindowLib.1.0.4.2/lib/net452/Microsoft.Expression.Interactions.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/source/packages/Dirkster.MWindowLib.1.0.4.2/lib/net452/Microsoft.Expression.Interactions.dll -------------------------------------------------------------------------------- /source/packages/Dirkster.MWindowLib.1.0.4.2/lib/net452/System.Windows.Interactivity.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/source/packages/Dirkster.MWindowLib.1.0.4.2/lib/net452/System.Windows.Interactivity.dll -------------------------------------------------------------------------------- /source/packages/Dirkster.UnitComboLib.1.0.1/Dirkster.UnitComboLib.1.0.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/source/packages/Dirkster.UnitComboLib.1.0.1/Dirkster.UnitComboLib.1.0.1.nupkg -------------------------------------------------------------------------------- /source/packages/Dirkster.UnitComboLib.1.0.1/lib/net4/UnitComboLib.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/source/packages/Dirkster.UnitComboLib.1.0.1/lib/net4/UnitComboLib.dll -------------------------------------------------------------------------------- /source/packages/Dirkster.UnitComboLib.1.0.1/lib/net4/UnitComboLib.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/source/packages/Dirkster.UnitComboLib.1.0.1/lib/net4/UnitComboLib.pdb -------------------------------------------------------------------------------- /source/packages/Dirkster.UnitComboLib.1.0.1/lib/net4/de-DE/UnitComboLib.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/source/packages/Dirkster.UnitComboLib.1.0.1/lib/net4/de-DE/UnitComboLib.resources.dll -------------------------------------------------------------------------------- /source/packages/Dirkster.UnitComboLib.1.0.1/lib/net4/es-ES/UnitComboLib.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/source/packages/Dirkster.UnitComboLib.1.0.1/lib/net4/es-ES/UnitComboLib.resources.dll -------------------------------------------------------------------------------- /source/packages/Dirkster.UnitComboLib.1.0.1/lib/net4/fr-FR/UnitComboLib.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/source/packages/Dirkster.UnitComboLib.1.0.1/lib/net4/fr-FR/UnitComboLib.resources.dll -------------------------------------------------------------------------------- /source/packages/Dirkster.UnitComboLib.1.0.1/lib/net4/hi-IN/UnitComboLib.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/source/packages/Dirkster.UnitComboLib.1.0.1/lib/net4/hi-IN/UnitComboLib.resources.dll -------------------------------------------------------------------------------- /source/packages/Dirkster.UnitComboLib.1.0.1/lib/net4/id-ID/UnitComboLib.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/source/packages/Dirkster.UnitComboLib.1.0.1/lib/net4/id-ID/UnitComboLib.resources.dll -------------------------------------------------------------------------------- /source/packages/Dirkster.UnitComboLib.1.0.1/lib/net4/it-IT/UnitComboLib.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/source/packages/Dirkster.UnitComboLib.1.0.1/lib/net4/it-IT/UnitComboLib.resources.dll -------------------------------------------------------------------------------- /source/packages/Dirkster.UnitComboLib.1.0.1/lib/net4/ja-JP/UnitComboLib.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/source/packages/Dirkster.UnitComboLib.1.0.1/lib/net4/ja-JP/UnitComboLib.resources.dll -------------------------------------------------------------------------------- /source/packages/Dirkster.UnitComboLib.1.0.1/lib/net4/pt-PT/UnitComboLib.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/source/packages/Dirkster.UnitComboLib.1.0.1/lib/net4/pt-PT/UnitComboLib.resources.dll -------------------------------------------------------------------------------- /source/packages/Dirkster.UnitComboLib.1.0.1/lib/net4/ru-RU/UnitComboLib.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/source/packages/Dirkster.UnitComboLib.1.0.1/lib/net4/ru-RU/UnitComboLib.resources.dll -------------------------------------------------------------------------------- /source/packages/Dirkster.UnitComboLib.1.0.1/lib/net4/zh-Hans/UnitComboLib.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/source/packages/Dirkster.UnitComboLib.1.0.1/lib/net4/zh-Hans/UnitComboLib.resources.dll -------------------------------------------------------------------------------- /source/packages/Dirkster.UnitComboLib.1.0.1/readme.txt: -------------------------------------------------------------------------------- 1 | UnitComboLib 2 | 3 | The WPF UnitComboBox Control implements a combobox that allows the selection of values from different lists based on different units. Each list can represent a different unit (eg.: Celsius, Farenheit) and the viewmodel takes care of always converting to one unit (e.g. Celsius). This conversion is independent of what the user selected unit or value actually was. 4 | 5 | https://github.com/Dirkster99/UnitComboLib 6 | 7 | More Details and samples: 8 | https://www.codeproject.com/Articles/575645/Inheriting-from-a-Look-Less-WPF-Control -------------------------------------------------------------------------------- /source/packages/log4net.2.0.8/.signature.p7s: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/source/packages/log4net.2.0.8/.signature.p7s -------------------------------------------------------------------------------- /source/packages/log4net.2.0.8/lib/net20-full/log4net.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/source/packages/log4net.2.0.8/lib/net20-full/log4net.dll -------------------------------------------------------------------------------- /source/packages/log4net.2.0.8/lib/net35-client/log4net.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/source/packages/log4net.2.0.8/lib/net35-client/log4net.dll -------------------------------------------------------------------------------- /source/packages/log4net.2.0.8/lib/net35-full/log4net.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/source/packages/log4net.2.0.8/lib/net35-full/log4net.dll -------------------------------------------------------------------------------- /source/packages/log4net.2.0.8/lib/net40-client/log4net.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/source/packages/log4net.2.0.8/lib/net40-client/log4net.dll -------------------------------------------------------------------------------- /source/packages/log4net.2.0.8/lib/net40-full/log4net.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/source/packages/log4net.2.0.8/lib/net40-full/log4net.dll -------------------------------------------------------------------------------- /source/packages/log4net.2.0.8/lib/net45-full/log4net.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/source/packages/log4net.2.0.8/lib/net45-full/log4net.dll -------------------------------------------------------------------------------- /source/packages/log4net.2.0.8/lib/netstandard1.3/log4net.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/source/packages/log4net.2.0.8/lib/netstandard1.3/log4net.dll -------------------------------------------------------------------------------- /source/packages/log4net.2.0.8/log4net.2.0.8.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/XmlExplorer/0bc806835c19738cee098e1a8803a634ce27c63a/source/packages/log4net.2.0.8/log4net.2.0.8.nupkg --------------------------------------------------------------------------------