├── .gitattributes ├── .gitignore ├── Build.bat ├── Clean.bat ├── LICENSE.txt ├── Libs ├── AvalonDock.Themes.VS2012.dll ├── ICSharpCode.AvalonEdit.dll ├── MahApps.Metro.dll ├── Microsoft.Practices.Prism.Interactivity.dll ├── Microsoft.Practices.Prism.UnityExtensions.dll ├── Microsoft.Practices.Prism.dll ├── Microsoft.Practices.ServiceLocation.dll ├── Microsoft.Practices.Unity.dll ├── NLog.dll ├── System.IO.Abstractions.dll ├── System.Windows.Interactivity.dll ├── Xceed.Wpf.AvalonDock.Themes.VS2010.dll ├── Xceed.Wpf.AvalonDock.dll └── Xceed.Wpf.Toolkit.dll ├── README.md ├── Src ├── Test │ ├── Lib │ │ ├── MarkdownSharp.dll │ │ └── MarkdownSharp.pdb │ ├── Wide-MD │ │ ├── App.config │ │ ├── App.xaml │ │ ├── App.xaml.cs │ │ ├── AppSplash.xaml │ │ ├── AppSplash.xaml.cs │ │ ├── Icon.png │ │ ├── MDBootstrapper.cs │ │ ├── MDWorkspace.cs │ │ ├── MultiDirectoryCatalog.cs │ │ ├── Properties │ │ │ ├── AssemblyInfo.cs │ │ │ ├── Resources.Designer.cs │ │ │ ├── Resources.resx │ │ │ ├── Settings.Designer.cs │ │ │ └── Settings.settings │ │ └── WideMD.csproj │ └── WideMD.Core │ │ ├── BrowserBehavior.cs │ │ ├── CoreModule.cs │ │ ├── Icons │ │ ├── Copy_6524.png │ │ ├── Cut_6523.png │ │ ├── MDType.png │ │ ├── NewRequest_8796.png │ │ ├── OpenFileDialog_692.png │ │ ├── Paste_6520.png │ │ ├── Play.png │ │ ├── Redo_16x.png │ │ ├── Save_6530.png │ │ └── Undo_16x.png │ │ ├── MDHandler.cs │ │ ├── MDModel.cs │ │ ├── MDView.xaml │ │ ├── MDView.xaml.cs │ │ ├── MDViewModel.cs │ │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ ├── Resources.Designer.cs │ │ ├── Resources.resx │ │ ├── Settings.Designer.cs │ │ └── Settings.settings │ │ ├── SaveAsMenuItemViewModel.cs │ │ ├── Settings │ │ ├── EditorOptions.cs │ │ └── MDSettingsItem.cs │ │ └── WideMD.Core.csproj ├── Wide.Tools.Logger │ ├── LoggerModel.cs │ ├── LoggerModule.cs │ ├── LoggerView.xaml │ ├── LoggerView.xaml.cs │ ├── LoggerViewModel.cs │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ ├── Resources.Designer.cs │ │ ├── Resources.resx │ │ ├── Settings.Designer.cs │ │ └── Settings.settings │ └── Wide.Tools.Logger.csproj └── Wide │ ├── Core │ ├── Attributes │ │ ├── FileContentAttribute.cs │ │ └── NewContentAttribute.cs │ ├── CoreModule.cs │ ├── Icons │ │ └── Textfile.png │ ├── NLog.config │ ├── Services │ │ ├── AllFileHandler.cs │ │ ├── CommandManager.cs │ │ ├── ContentHandlerRegistry.cs │ │ ├── NLogService.cs │ │ ├── NewFileWindow.xaml │ │ ├── NewFileWindow.xaml.cs │ │ ├── OpenDocumentService.cs │ │ ├── ThemeManager.cs │ │ └── ToolbarService.cs │ ├── Settings │ │ ├── RecentViewItem.cs │ │ ├── RecentViewSettings.cs │ │ ├── SettingsManager.cs │ │ ├── SettingsWindow.xaml │ │ ├── SettingsWindow.xaml.cs │ │ ├── ThemeSettings.cs │ │ ├── ToolbarPositionSettings.cs │ │ ├── ToolbarSettingItem.cs │ │ └── WindowPositionSettings.cs │ ├── TextDocument │ │ ├── TextModel.cs │ │ ├── TextView.xaml │ │ ├── TextView.xaml.cs │ │ └── TextViewModel.cs │ └── Workspace.cs │ ├── Interfaces │ ├── AbstractWorkspace.cs │ ├── Base │ │ ├── AbstractPrioritizedTree.cs │ │ ├── ICommandable.cs │ │ └── IPrioritizedTree.cs │ ├── ContentModel.cs │ ├── ContentViewModel.cs │ ├── Controls │ │ ├── AbstractCommandable.cs │ │ ├── AbstractMenuItem.cs │ │ ├── AbstractToolbar.cs │ │ ├── IToolbar.cs │ │ ├── MenuItemViewModel.cs │ │ ├── ToolBarItemTemplateSelector.cs │ │ ├── ToolbarViewModel.cs │ │ └── WideStatusbar.cs │ ├── Converters │ │ ├── BoolToInsertModeConverter.cs │ │ ├── DocumentContextMenuMixingConverter.cs │ │ ├── MenuVisibilityConverter.cs │ │ ├── NullObjectToVisibiltyConverter.cs │ │ ├── NullToBooleanConverter.cs │ │ └── PercentToFontSizeConverter.cs │ ├── Events │ │ ├── ActiveContentChangedEvent.cs │ │ ├── ClosedContentEvent.cs │ │ ├── LogEvent.cs │ │ ├── OpenContentEvent.cs │ │ ├── SplashCloseEvent.cs │ │ ├── SplashMessageUpdatedEvent.cs │ │ ├── ThemeChangeEvent.cs │ │ └── WindowClosingEvent.cs │ ├── IContentView.cs │ ├── IShell.cs │ ├── ITheme.cs │ ├── ITool.cs │ ├── IWorkspace.cs │ ├── Services │ │ ├── ICommandManager.cs │ │ ├── IContentHandler.cs │ │ ├── IContentHandlerRegistry.cs │ │ ├── ILoggerService.cs │ │ ├── IMenuService.cs │ │ ├── IOpenDocumentService.cs │ │ ├── IStatusbarService.cs │ │ ├── IThemeManager.cs │ │ ├── IToolbarService.cs │ │ └── PaneLocation.cs │ ├── Settings │ │ ├── AbstractSettings.cs │ │ ├── AbstractSettingsItem.cs │ │ ├── IRecentViewItem.cs │ │ ├── IRecentViewSettings.cs │ │ ├── ISettingsManager.cs │ │ ├── IThemeSettings.cs │ │ ├── IToolbarPositionSettings.cs │ │ └── IWindowPositionSettings.cs │ ├── Styles │ │ ├── Controls.xaml │ │ ├── ControlsMetro.xaml │ │ ├── ToolbarBinding.xaml │ │ ├── VS2010 │ │ │ ├── Brushes.xaml │ │ │ ├── StatusBar.xaml │ │ │ ├── Theme.xaml │ │ │ └── Toolbar.xaml │ │ └── VS2012 │ │ │ ├── DarkColors.xaml │ │ │ ├── DarkTheme.xaml │ │ │ ├── LightColors.xaml │ │ │ ├── LightTheme.xaml │ │ │ ├── Menu.xaml │ │ │ ├── SplitButton.xaml │ │ │ ├── Toolbar.xaml │ │ │ ├── Tooltip.xaml │ │ │ └── WindowCommands.xaml │ ├── Themes │ │ ├── DarkTheme.cs │ │ ├── DefaultTheme.cs │ │ ├── LightTheme.cs │ │ └── VS2010.cs │ ├── ToolModel.cs │ ├── ToolViewModel.cs │ └── ViewModelBase.cs │ ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── Settings.Designer.cs │ └── Settings.settings │ ├── Shell │ ├── ActiveDocumentConverter.cs │ ├── LayoutInitializer.cs │ ├── PanesStyleSelector.cs │ ├── PanesTemplateSelector.cs │ ├── ShellView.xaml │ ├── ShellView.xaml.cs │ ├── ShellViewMetro.xaml │ ├── ShellViewMetro.xaml.cs │ ├── WideBootstrapper.cs │ └── app.config │ ├── Splash │ ├── Behaviours │ │ └── SplashBehaviour.cs │ ├── ISplashView.cs │ ├── Module.cs │ ├── SplashView.xaml │ ├── SplashView.xaml.cs │ └── SplashViewModel.cs │ ├── Utils │ ├── DatabindingDebugConverter.cs │ └── PropertyChangedEvent.cs │ └── Wide.csproj └── Wide.sln /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | #OS junk files 2 | [Tt]humbs.db 3 | *.DS_Store 4 | 5 | #Visual Studio files 6 | *.[Oo]bj 7 | *.DotSettings 8 | *.user 9 | *.aps 10 | *.pch 11 | *.vspscc 12 | *.vssscc 13 | *_i.c 14 | *_p.c 15 | *.ncb 16 | *.suo 17 | *.tlb 18 | *.tlh 19 | *.bak 20 | *.[Cc]ache 21 | *.ilk 22 | *.log 23 | *.lib 24 | *.sbr 25 | *.sdf 26 | *.opensdf 27 | *.nupkg 28 | *.unsuccessfulbuild 29 | ipch/ 30 | obj/ 31 | Build/ 32 | [Bb]in 33 | [Dd]ebug*/ 34 | [Rr]elease*/ 35 | Ankh.NoLoad 36 | 37 | #Tooling 38 | _ReSharper*/ 39 | *.resharper 40 | [Tt]est[Rr]esult* 41 | 42 | #Subversion files 43 | .svn 44 | 45 | # Office Temp Files 46 | ~$* 47 | 48 | 49 | *.ncrunch* 50 | 51 | packages 52 | *sln.*.xml 53 | *.dic 54 | -------------------------------------------------------------------------------- /Build.bat: -------------------------------------------------------------------------------- 1 | msbuild Wide.sln /t:clean 2 | FOR /D %%p IN ("Build\*.*") DO rmdir "%%p" /s /q 3 | rmdir Build /s /q 4 | msbuild Wide.sln /p:Configuration=Release 5 | xcopy "Libs" "Build\External" /E /Y /I /R -------------------------------------------------------------------------------- /Clean.bat: -------------------------------------------------------------------------------- 1 | msbuild Wide.sln /t:clean 2 | FOR /D %%p IN ("Build\*.*") DO rmdir "%%p" /s /q 3 | rmdir Build /s /q -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013 Chandramouleswaran Ravichandran 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /Libs/AvalonDock.Themes.VS2012.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandramouleswaran/Wide/6796b0f9c9b75a56884d3e23c87ff8d3884f82e1/Libs/AvalonDock.Themes.VS2012.dll -------------------------------------------------------------------------------- /Libs/ICSharpCode.AvalonEdit.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandramouleswaran/Wide/6796b0f9c9b75a56884d3e23c87ff8d3884f82e1/Libs/ICSharpCode.AvalonEdit.dll -------------------------------------------------------------------------------- /Libs/MahApps.Metro.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandramouleswaran/Wide/6796b0f9c9b75a56884d3e23c87ff8d3884f82e1/Libs/MahApps.Metro.dll -------------------------------------------------------------------------------- /Libs/Microsoft.Practices.Prism.Interactivity.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandramouleswaran/Wide/6796b0f9c9b75a56884d3e23c87ff8d3884f82e1/Libs/Microsoft.Practices.Prism.Interactivity.dll -------------------------------------------------------------------------------- /Libs/Microsoft.Practices.Prism.UnityExtensions.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandramouleswaran/Wide/6796b0f9c9b75a56884d3e23c87ff8d3884f82e1/Libs/Microsoft.Practices.Prism.UnityExtensions.dll -------------------------------------------------------------------------------- /Libs/Microsoft.Practices.Prism.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandramouleswaran/Wide/6796b0f9c9b75a56884d3e23c87ff8d3884f82e1/Libs/Microsoft.Practices.Prism.dll -------------------------------------------------------------------------------- /Libs/Microsoft.Practices.ServiceLocation.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandramouleswaran/Wide/6796b0f9c9b75a56884d3e23c87ff8d3884f82e1/Libs/Microsoft.Practices.ServiceLocation.dll -------------------------------------------------------------------------------- /Libs/Microsoft.Practices.Unity.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandramouleswaran/Wide/6796b0f9c9b75a56884d3e23c87ff8d3884f82e1/Libs/Microsoft.Practices.Unity.dll -------------------------------------------------------------------------------- /Libs/NLog.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandramouleswaran/Wide/6796b0f9c9b75a56884d3e23c87ff8d3884f82e1/Libs/NLog.dll -------------------------------------------------------------------------------- /Libs/System.IO.Abstractions.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandramouleswaran/Wide/6796b0f9c9b75a56884d3e23c87ff8d3884f82e1/Libs/System.IO.Abstractions.dll -------------------------------------------------------------------------------- /Libs/System.Windows.Interactivity.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandramouleswaran/Wide/6796b0f9c9b75a56884d3e23c87ff8d3884f82e1/Libs/System.Windows.Interactivity.dll -------------------------------------------------------------------------------- /Libs/Xceed.Wpf.AvalonDock.Themes.VS2010.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandramouleswaran/Wide/6796b0f9c9b75a56884d3e23c87ff8d3884f82e1/Libs/Xceed.Wpf.AvalonDock.Themes.VS2010.dll -------------------------------------------------------------------------------- /Libs/Xceed.Wpf.AvalonDock.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandramouleswaran/Wide/6796b0f9c9b75a56884d3e23c87ff8d3884f82e1/Libs/Xceed.Wpf.AvalonDock.dll -------------------------------------------------------------------------------- /Libs/Xceed.Wpf.Toolkit.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandramouleswaran/Wide/6796b0f9c9b75a56884d3e23c87ff8d3884f82e1/Libs/Xceed.Wpf.Toolkit.dll -------------------------------------------------------------------------------- /Src/Test/Lib/MarkdownSharp.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandramouleswaran/Wide/6796b0f9c9b75a56884d3e23c87ff8d3884f82e1/Src/Test/Lib/MarkdownSharp.dll -------------------------------------------------------------------------------- /Src/Test/Lib/MarkdownSharp.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandramouleswaran/Wide/6796b0f9c9b75a56884d3e23c87ff8d3884f82e1/Src/Test/Lib/MarkdownSharp.pdb -------------------------------------------------------------------------------- /Src/Test/Wide-MD/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Src/Test/Wide-MD/App.xaml: -------------------------------------------------------------------------------- 1 |  3 | -------------------------------------------------------------------------------- /Src/Test/Wide-MD/App.xaml.cs: -------------------------------------------------------------------------------- 1 | #region License 2 | 3 | // Copyright (c) 2013 Chandramouleswaran Ravichandran 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | // 7 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | // 9 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | 11 | #endregion 12 | 13 | using System.Windows; 14 | using Microsoft.Practices.Unity; 15 | using Wide.Interfaces; 16 | 17 | namespace WideMD 18 | { 19 | /// 20 | /// Interaction logic for App.xaml 21 | /// 22 | public partial class App : Application 23 | { 24 | private MDBootstrapper b; 25 | 26 | protected override void OnStartup(StartupEventArgs e) 27 | { 28 | base.OnStartup(e); 29 | b = new MDBootstrapper(); 30 | b.Run(); 31 | var shell = b.Container.Resolve(); 32 | (shell as Window).Loaded += App_Loaded; 33 | (shell as Window).Unloaded += App_Unloaded; 34 | } 35 | 36 | void App_Unloaded(object sender, System.EventArgs e) 37 | { 38 | var shell = b.Container.Resolve(); 39 | shell.SaveLayout(); 40 | } 41 | 42 | void App_Loaded(object sender, RoutedEventArgs e) 43 | { 44 | var shell = b.Container.Resolve(); 45 | shell.LoadLayout(); 46 | } 47 | } 48 | } -------------------------------------------------------------------------------- /Src/Test/Wide-MD/AppSplash.xaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 25 | 26 | 27 | 28 | 29 | 30 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /Src/Test/Wide-MD/AppSplash.xaml.cs: -------------------------------------------------------------------------------- 1 | #region License 2 | 3 | // Copyright (c) 2013 Chandramouleswaran Ravichandran 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | // 7 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | // 9 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | 11 | #endregion 12 | 13 | using System.Windows; 14 | using Wide.Splash; 15 | 16 | namespace WideMD 17 | { 18 | /// 19 | /// Interaction logic for AppSplash.xaml 20 | /// 21 | public partial class AppSplash : Window, ISplashView 22 | { 23 | public AppSplash(SplashViewModel model) 24 | { 25 | InitializeComponent(); 26 | DataContext = model; 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /Src/Test/Wide-MD/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandramouleswaran/Wide/6796b0f9c9b75a56884d3e23c87ff8d3884f82e1/Src/Test/Wide-MD/Icon.png -------------------------------------------------------------------------------- /Src/Test/Wide-MD/MDBootstrapper.cs: -------------------------------------------------------------------------------- 1 | #region License 2 | 3 | // Copyright (c) 2013 Chandramouleswaran Ravichandran 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | // 7 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | // 9 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | 11 | #endregion 12 | 13 | using System.Collections.Generic; 14 | using Microsoft.Practices.Prism.Modularity; 15 | using Microsoft.Practices.Unity; 16 | using Wide.Interfaces; 17 | using Wide.Shell; 18 | using Wide.Splash; 19 | 20 | namespace WideMD 21 | { 22 | internal class MDBootstrapper : WideBootstrapper 23 | { 24 | public MDBootstrapper(bool isMetro = true) 25 | : base(isMetro) 26 | { 27 | } 28 | 29 | protected override void InitializeModules() 30 | { 31 | //Register your splash view or else the default splash will load 32 | Container.RegisterType(); 33 | 34 | //Register your workspace here - if you have any 35 | Container.RegisterType(new ContainerControlledLifetimeManager()); 36 | 37 | // You can also override the logger service. Currently, NLog is used. 38 | // Since the config file is there in the output location, text files should be available in the Logs folder. 39 | 40 | //Initialize the original bootstrapper which will load modules from the probing path. Check app.config for probing path. 41 | base.InitializeModules(); 42 | } 43 | 44 | protected override IModuleCatalog CreateModuleCatalog() 45 | { 46 | var catalog = new MultipleDirectoryModuleCatalog(new List() {@".", @".\External", @".\Internal"}); 47 | return catalog; 48 | } 49 | } 50 | } -------------------------------------------------------------------------------- /Src/Test/Wide-MD/MultiDirectoryCatalog.cs: -------------------------------------------------------------------------------- 1 | #region License 2 | 3 | // Copyright (c) 2013 Chandramouleswaran Ravichandran 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | // 7 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | // 9 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | 11 | #endregion 12 | 13 | using System.Collections.Generic; 14 | using System.IO; 15 | using Microsoft.Practices.Prism.Modularity; 16 | 17 | namespace WideMD 18 | { 19 | /// 20 | /// Allows our shell to probe multiple directories for module assemblies 21 | /// 22 | public class MultipleDirectoryModuleCatalog : DirectoryModuleCatalog 23 | { 24 | private readonly IList _pathsToProbe; 25 | 26 | /// 27 | /// Initializes a new instance of the MultipleDirectoryModuleCatalog class. 28 | /// 29 | /// An IList of paths to probe for modules. 30 | public MultipleDirectoryModuleCatalog(IList pathsToProbe) 31 | { 32 | _pathsToProbe = pathsToProbe; 33 | } 34 | 35 | /// 36 | /// Provides multiple-path loading of modules over the default method. 37 | /// 38 | protected override void InnerLoad() 39 | { 40 | foreach (string path in _pathsToProbe) 41 | { 42 | if (Directory.Exists(path)) 43 | { 44 | this.ModulePath = path; 45 | base.InnerLoad(); 46 | } 47 | } 48 | } 49 | } 50 | } -------------------------------------------------------------------------------- /Src/Test/Wide-MD/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.18033 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 WideMD.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", "4.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("WideMD.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 | -------------------------------------------------------------------------------- /Src/Test/Wide-MD/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.18033 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 WideMD.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.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 | -------------------------------------------------------------------------------- /Src/Test/Wide-MD/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Src/Test/WideMD.Core/BrowserBehavior.cs: -------------------------------------------------------------------------------- 1 | #region License 2 | 3 | // Copyright (c) 2013 Chandramouleswaran Ravichandran 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | // 7 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | // 9 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | 11 | #endregion 12 | 13 | using System.Windows; 14 | using System.Windows.Controls; 15 | 16 | namespace WideMD.Core 17 | { 18 | public class BrowserBehavior 19 | { 20 | public static readonly DependencyProperty HtmlProperty = DependencyProperty.RegisterAttached( 21 | "Html", 22 | typeof (string), 23 | typeof (BrowserBehavior), 24 | new FrameworkPropertyMetadata(OnHtmlChanged)); 25 | 26 | [AttachedPropertyBrowsableForType(typeof (WebBrowser))] 27 | public static string GetHtml(WebBrowser d) 28 | { 29 | return (string) d.GetValue(HtmlProperty); 30 | } 31 | 32 | public static void SetHtml(WebBrowser d, string value) 33 | { 34 | d.SetValue(HtmlProperty, value); 35 | } 36 | 37 | private static void OnHtmlChanged(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs e) 38 | { 39 | WebBrowser webBrowser = dependencyObject as WebBrowser; 40 | string value = e.NewValue as string; 41 | if (webBrowser != null && string.IsNullOrEmpty(value) == false) 42 | webBrowser.NavigateToString(value); 43 | } 44 | } 45 | } -------------------------------------------------------------------------------- /Src/Test/WideMD.Core/Icons/Copy_6524.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandramouleswaran/Wide/6796b0f9c9b75a56884d3e23c87ff8d3884f82e1/Src/Test/WideMD.Core/Icons/Copy_6524.png -------------------------------------------------------------------------------- /Src/Test/WideMD.Core/Icons/Cut_6523.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandramouleswaran/Wide/6796b0f9c9b75a56884d3e23c87ff8d3884f82e1/Src/Test/WideMD.Core/Icons/Cut_6523.png -------------------------------------------------------------------------------- /Src/Test/WideMD.Core/Icons/MDType.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandramouleswaran/Wide/6796b0f9c9b75a56884d3e23c87ff8d3884f82e1/Src/Test/WideMD.Core/Icons/MDType.png -------------------------------------------------------------------------------- /Src/Test/WideMD.Core/Icons/NewRequest_8796.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandramouleswaran/Wide/6796b0f9c9b75a56884d3e23c87ff8d3884f82e1/Src/Test/WideMD.Core/Icons/NewRequest_8796.png -------------------------------------------------------------------------------- /Src/Test/WideMD.Core/Icons/OpenFileDialog_692.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandramouleswaran/Wide/6796b0f9c9b75a56884d3e23c87ff8d3884f82e1/Src/Test/WideMD.Core/Icons/OpenFileDialog_692.png -------------------------------------------------------------------------------- /Src/Test/WideMD.Core/Icons/Paste_6520.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandramouleswaran/Wide/6796b0f9c9b75a56884d3e23c87ff8d3884f82e1/Src/Test/WideMD.Core/Icons/Paste_6520.png -------------------------------------------------------------------------------- /Src/Test/WideMD.Core/Icons/Play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandramouleswaran/Wide/6796b0f9c9b75a56884d3e23c87ff8d3884f82e1/Src/Test/WideMD.Core/Icons/Play.png -------------------------------------------------------------------------------- /Src/Test/WideMD.Core/Icons/Redo_16x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandramouleswaran/Wide/6796b0f9c9b75a56884d3e23c87ff8d3884f82e1/Src/Test/WideMD.Core/Icons/Redo_16x.png -------------------------------------------------------------------------------- /Src/Test/WideMD.Core/Icons/Save_6530.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandramouleswaran/Wide/6796b0f9c9b75a56884d3e23c87ff8d3884f82e1/Src/Test/WideMD.Core/Icons/Save_6530.png -------------------------------------------------------------------------------- /Src/Test/WideMD.Core/Icons/Undo_16x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandramouleswaran/Wide/6796b0f9c9b75a56884d3e23c87ff8d3884f82e1/Src/Test/WideMD.Core/Icons/Undo_16x.png -------------------------------------------------------------------------------- /Src/Test/WideMD.Core/MDModel.cs: -------------------------------------------------------------------------------- 1 | #region License 2 | 3 | // Copyright (c) 2013 Chandramouleswaran Ravichandran 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | // 7 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | // 9 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | 11 | #endregion 12 | 13 | using Wide.Core.TextDocument; 14 | using Wide.Interfaces.Services; 15 | 16 | namespace WideMD.Core 17 | { 18 | /// 19 | /// Class TextModel which contains the text of the document 20 | /// 21 | public class MDModel : TextModel 22 | { 23 | /// 24 | /// Initializes a new instance of the class. 25 | /// 26 | /// The injected command manager. 27 | /// The menu service. 28 | public MDModel(ICommandManager commandManager, IMenuService menuService) : base(commandManager, menuService) 29 | { 30 | } 31 | 32 | internal void SetLocation(object location) 33 | { 34 | this.Location = location; 35 | RaisePropertyChanged("Location"); 36 | } 37 | 38 | internal void SetDirty(bool value) 39 | { 40 | this.IsDirty = value; 41 | } 42 | 43 | public string HTMLResult { get; set; } 44 | 45 | public void SetHtml(string transform) 46 | { 47 | this.HTMLResult = transform; 48 | RaisePropertyChanged("HTMLResult"); 49 | } 50 | } 51 | } -------------------------------------------------------------------------------- /Src/Test/WideMD.Core/MDView.xaml: -------------------------------------------------------------------------------- 1 |  10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Src/Test/WideMD.Core/MDView.xaml.cs: -------------------------------------------------------------------------------- 1 | #region License 2 | 3 | // Copyright (c) 2013 Chandramouleswaran Ravichandran 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | // 7 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | // 9 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | 11 | #endregion 12 | 13 | using System; 14 | using MarkdownSharp; 15 | using Wide.Interfaces; 16 | using Wide.Interfaces.Services; 17 | using System.Threading; 18 | 19 | namespace WideMD.Core 20 | { 21 | /// 22 | /// Interaction logic for MDView.xaml 23 | /// 24 | public partial class MDView : IContentView 25 | { 26 | private Markdown _md; 27 | private IStatusbarService _statusbar; 28 | private Thread t; 29 | 30 | public MDView(IStatusbarService statusbar) 31 | { 32 | _md = new Markdown(); 33 | this._statusbar = statusbar; 34 | InitializeComponent(); 35 | textEditor.TextArea.Caret.PositionChanged += Caret_PositionChanged; 36 | } 37 | 38 | private void Caret_PositionChanged(object sender, EventArgs e) 39 | { 40 | Update(); 41 | } 42 | 43 | private void textEditor_TextChanged(object sender, EventArgs e) 44 | { 45 | var model = this.DataContext as MDModel; 46 | if (model != null) 47 | { 48 | model.SetHtml(_md.Transform(textEditor.Text)); 49 | } 50 | } 51 | 52 | private void Update() 53 | { 54 | _statusbar.LineNumber = textEditor.Document.GetLineByOffset(textEditor.CaretOffset).LineNumber; 55 | _statusbar.ColPosition = textEditor.TextArea.Caret.VisualColumn + 1; 56 | _statusbar.CharPosition = textEditor.CaretOffset; 57 | _statusbar.InsertMode = false; 58 | if (t == null || !t.IsAlive) 59 | Run(); 60 | } 61 | 62 | private void Run() 63 | { 64 | t = new Thread(SimpleRun); 65 | t.Start(); 66 | } 67 | 68 | private void SimpleRun(object obj) 69 | { 70 | uint i = 0; 71 | while (i < 1000) 72 | { 73 | _statusbar.Progress(true, i, 1000); 74 | Thread.Sleep(10); 75 | i++; 76 | } 77 | _statusbar.Progress(false, i, 1000); 78 | } 79 | } 80 | } -------------------------------------------------------------------------------- /Src/Test/WideMD.Core/MDViewModel.cs: -------------------------------------------------------------------------------- 1 | #region License 2 | 3 | // Copyright (c) 2013 Chandramouleswaran Ravichandran 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | // 7 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | // 9 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | 11 | #endregion 12 | 13 | using System.Windows.Controls; 14 | using Wide.Core.TextDocument; 15 | using Wide.Interfaces; 16 | using Wide.Interfaces.Services; 17 | 18 | namespace WideMD.Core 19 | { 20 | internal class MDViewModel : TextViewModel 21 | { 22 | public MDViewModel(AbstractWorkspace workspace, ICommandManager commandManager, ILoggerService logger, 23 | IMenuService menuService) 24 | : base(workspace, commandManager, logger, menuService) 25 | { 26 | } 27 | 28 | internal void SetModel(ContentModel model) 29 | { 30 | base.Model = model; 31 | } 32 | 33 | internal void SetView(UserControl view) 34 | { 35 | base.View = view; 36 | } 37 | 38 | internal void SetHandler(IContentHandler handler) 39 | { 40 | base.Handler = handler; 41 | } 42 | } 43 | } -------------------------------------------------------------------------------- /Src/Test/WideMD.Core/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.18051 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 WideMD.Core.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", "4.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("WideMD.Core.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 | -------------------------------------------------------------------------------- /Src/Test/WideMD.Core/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.18051 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 WideMD.Core.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.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 | -------------------------------------------------------------------------------- /Src/Test/WideMD.Core/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Src/Test/WideMD.Core/Settings/MDSettingsItem.cs: -------------------------------------------------------------------------------- 1 | #region License 2 | 3 | // Copyright (c) 2013 Chandramouleswaran Ravichandran 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | // 7 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | // 9 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | 11 | #endregion 12 | 13 | using Wide.Interfaces.Settings; 14 | 15 | namespace WideMD.Core.Settings 16 | { 17 | public class MDSettingsItem : AbstractSettingsItem 18 | { 19 | public MDSettingsItem(string title, int priority, AbstractSettings settings) : base(title, settings) 20 | { 21 | this.Priority = priority; 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /Src/Wide.Tools.Logger/LoggerModel.cs: -------------------------------------------------------------------------------- 1 | #region License 2 | 3 | // Copyright (c) 2013 Chandramouleswaran Ravichandran 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | // 7 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | // 9 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | 11 | #endregion 12 | 13 | using System.ComponentModel; 14 | using Wide.Interfaces; 15 | using Wide.Interfaces.Services; 16 | 17 | namespace Wide.Tools.Logger 18 | { 19 | internal class LoggerModel : ToolModel 20 | { 21 | private string _text; 22 | 23 | public string Text 24 | { 25 | get { return _text; } 26 | } 27 | 28 | public void AddLog(ILoggerService logger) 29 | { 30 | _text = logger.Message + "\n" + _text; 31 | RaisePropertyChanged("Text"); 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /Src/Wide.Tools.Logger/LoggerModule.cs: -------------------------------------------------------------------------------- 1 | #region License 2 | 3 | // Copyright (c) 2013 Chandramouleswaran Ravichandran 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | // 7 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | // 9 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | 11 | #endregion 12 | 13 | using Microsoft.Practices.Prism.Events; 14 | using Microsoft.Practices.Prism.Modularity; 15 | using Microsoft.Practices.Unity; 16 | using Wide.Interfaces; 17 | using Wide.Interfaces.Events; 18 | 19 | namespace Wide.Tools.Logger 20 | { 21 | [Module(ModuleName = "Wide.Tools.Logger")] 22 | public sealed class LoggerModule : IModule 23 | { 24 | private readonly IUnityContainer _container; 25 | 26 | public LoggerModule(IUnityContainer container) 27 | { 28 | _container = container; 29 | } 30 | 31 | private IEventAggregator EventAggregator 32 | { 33 | get { return _container.Resolve(); } 34 | } 35 | 36 | #region IModule Members 37 | 38 | public void Initialize() 39 | { 40 | EventAggregator.GetEvent().Publish(new SplashMessageUpdateEvent 41 | {Message = "Loading Logger Module"}); 42 | _container.RegisterType(); 43 | IWorkspace workspace = _container.Resolve(); 44 | workspace.Tools.Add(_container.Resolve()); 45 | } 46 | 47 | #endregion 48 | } 49 | } -------------------------------------------------------------------------------- /Src/Wide.Tools.Logger/LoggerView.xaml: -------------------------------------------------------------------------------- 1 |  5 | 6 | 7 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Src/Wide.Tools.Logger/LoggerView.xaml.cs: -------------------------------------------------------------------------------- 1 | #region License 2 | 3 | // Copyright (c) 2013 Chandramouleswaran Ravichandran 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | // 7 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | // 9 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | 11 | #endregion 12 | 13 | using System.ComponentModel; 14 | using System.Windows.Controls; 15 | using Wide.Interfaces; 16 | 17 | namespace Wide.Tools.Logger 18 | { 19 | /// 20 | /// Interaction logic for LoggerView.xaml 21 | /// 22 | internal partial class LoggerView : UserControl, IContentView, INotifyPropertyChanged 23 | { 24 | public LoggerView() 25 | { 26 | InitializeComponent(); 27 | } 28 | 29 | /// 30 | /// Should be called when a property value has changed 31 | /// 32 | /// The property name 33 | protected virtual void RaisePropertyChanged(string propertyName) 34 | { 35 | if (PropertyChanged != null) 36 | PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); 37 | } 38 | 39 | public event PropertyChangedEventHandler PropertyChanged; 40 | } 41 | } -------------------------------------------------------------------------------- /Src/Wide.Tools.Logger/LoggerViewModel.cs: -------------------------------------------------------------------------------- 1 | #region License 2 | 3 | // Copyright (c) 2013 Chandramouleswaran Ravichandran 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | // 7 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | // 9 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | 11 | #endregion 12 | 13 | using Microsoft.Practices.Prism.Events; 14 | using Microsoft.Practices.Unity; 15 | using Wide.Interfaces; 16 | using Wide.Interfaces.Events; 17 | using Wide.Interfaces.Services; 18 | 19 | namespace Wide.Tools.Logger 20 | { 21 | internal class LoggerViewModel : ToolViewModel 22 | { 23 | private readonly IEventAggregator _aggregator; 24 | private readonly IUnityContainer _container; 25 | private readonly LoggerModel _model; 26 | private readonly LoggerView _view; 27 | private IWorkspace _workspace; 28 | 29 | public LoggerViewModel(IUnityContainer container, AbstractWorkspace workspace) 30 | { 31 | _workspace = workspace; 32 | _container = container; 33 | Name = "Logger"; 34 | Title = "Logger"; 35 | ContentId = "Logger"; 36 | _model = new LoggerModel(); 37 | Model = _model; 38 | IsVisible = false; 39 | 40 | _view = new LoggerView(); 41 | _view.DataContext = _model; 42 | View = _view; 43 | 44 | _aggregator = _container.Resolve(); 45 | _aggregator.GetEvent().Subscribe(AddLog); 46 | } 47 | 48 | private void AddLog(ILoggerService logger) 49 | { 50 | _model.AddLog(logger); 51 | } 52 | 53 | public override PaneLocation PreferredLocation 54 | { 55 | get { return PaneLocation.Bottom; } 56 | } 57 | } 58 | } -------------------------------------------------------------------------------- /Src/Wide.Tools.Logger/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.18051 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 Wide.Tools.Logger.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", "4.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("Wide.Tools.Logger.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 | -------------------------------------------------------------------------------- /Src/Wide.Tools.Logger/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.18051 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 Wide.Tools.Logger.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.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 | -------------------------------------------------------------------------------- /Src/Wide.Tools.Logger/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Src/Wide/Core/Attributes/FileContentAttribute.cs: -------------------------------------------------------------------------------- 1 | #region License 2 | 3 | // Copyright (c) 2013 Chandramouleswaran Ravichandran 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | // 7 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | // 9 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | 11 | #endregion 12 | 13 | using System; 14 | 15 | namespace Wide.Core.Attributes 16 | { 17 | [AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = false)] 18 | public class FileContentAttribute : Attribute 19 | { 20 | public FileContentAttribute(string display, string extension, int priority) 21 | { 22 | this.Display = display; 23 | this.Extension = extension; 24 | this.Priority = priority; 25 | } 26 | 27 | public string Display { get; private set; } 28 | 29 | public string Extension { get; private set; } 30 | 31 | public int Priority { get; private set; } 32 | } 33 | } -------------------------------------------------------------------------------- /Src/Wide/Core/Attributes/NewContentAttribute.cs: -------------------------------------------------------------------------------- 1 | #region License 2 | 3 | // Copyright (c) 2013 Chandramouleswaran Ravichandran 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | // 7 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | // 9 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | 11 | #endregion 12 | 13 | using System; 14 | using System.Windows.Media; 15 | using System.Windows.Media.Imaging; 16 | 17 | namespace Wide.Core.Attributes 18 | { 19 | [AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = false)] 20 | public class NewContentAttribute : Attribute 21 | { 22 | public NewContentAttribute(string display, int priority, string description = "", string imageSource = "") 23 | { 24 | this.Display = display; 25 | if(!string.IsNullOrEmpty(imageSource)) 26 | { 27 | this.ImageSource = new BitmapImage(new Uri(imageSource)); 28 | } 29 | this.Priority = priority; 30 | this.Description = description; 31 | } 32 | 33 | public string Display { get; private set; } 34 | 35 | public ImageSource ImageSource { get; private set; } 36 | 37 | public int Priority { get; private set; } 38 | 39 | public string Description { get; private set; } 40 | } 41 | } -------------------------------------------------------------------------------- /Src/Wide/Core/Icons/Textfile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandramouleswaran/Wide/6796b0f9c9b75a56884d3e23c87ff8d3884f82e1/Src/Wide/Core/Icons/Textfile.png -------------------------------------------------------------------------------- /Src/Wide/Core/NLog.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Src/Wide/Core/Services/NewFileWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | #region License 2 | 3 | // Copyright (c) 2013 Chandramouleswaran Ravichandran 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | // 7 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | // 9 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | 11 | #endregion 12 | 13 | using System.Windows.Input; 14 | using MahApps.Metro.Controls; 15 | using Wide.Core.Attributes; 16 | using System.Windows.Controls; 17 | using System.Windows; 18 | 19 | namespace Wide.Core.Services 20 | { 21 | /// 22 | /// Interaction logic for NewFileWindow.xaml 23 | /// 24 | internal partial class NewFileWindow : Window 25 | { 26 | public NewFileWindow() 27 | { 28 | InitializeComponent(); 29 | } 30 | 31 | private void listBoxItem_DoubleClick(object sender, MouseButtonEventArgs e) 32 | { 33 | this.NewContent = (sender as ListBoxItem).DataContext as NewContentAttribute; 34 | this.DialogResult = true; 35 | } 36 | 37 | public NewContentAttribute NewContent { get; private set; } 38 | 39 | private void Button_Click(object sender, System.Windows.RoutedEventArgs e) 40 | { 41 | this.NewContent = this.listView.SelectedItem as NewContentAttribute; 42 | this.DialogResult = true; 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /Src/Wide/Core/Settings/RecentViewItem.cs: -------------------------------------------------------------------------------- 1 | #region License 2 | 3 | // Copyright (c) 2013 Chandramouleswaran Ravichandran 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | // 7 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | // 9 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | 11 | #endregion 12 | 13 | using System; 14 | using System.ComponentModel; 15 | using Wide.Interfaces.Settings; 16 | 17 | namespace Wide.Core.Settings 18 | { 19 | [Serializable] 20 | [Browsable(false)] 21 | public class RecentViewItem : IRecentViewItem 22 | { 23 | public RecentViewItem() 24 | { 25 | this.DisplayValue = ""; 26 | this.ContentID = ""; 27 | } 28 | 29 | public string DisplayValue { get; set; } 30 | public string ContentID { get; set; } 31 | 32 | public override bool Equals(object obj) 33 | { 34 | RecentViewItem item = obj as RecentViewItem; 35 | return (item != null) && ContentID.Equals(item.ContentID); 36 | } 37 | 38 | public override int GetHashCode() 39 | { 40 | return ContentID.GetHashCode(); 41 | } 42 | 43 | public override string ToString() 44 | { 45 | return ContentID.ToString(); 46 | } 47 | } 48 | } -------------------------------------------------------------------------------- /Src/Wide/Core/Settings/SettingsManager.cs: -------------------------------------------------------------------------------- 1 | #region License 2 | 3 | // Copyright (c) 2013 Chandramouleswaran Ravichandran 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | // 7 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | // 9 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | 11 | #endregion 12 | 13 | using System.Windows.Input; 14 | using Microsoft.Practices.Prism.Commands; 15 | using Wide.Interfaces.Settings; 16 | 17 | namespace Wide.Core.Settings 18 | { 19 | /// 20 | /// Class WideSettingsManager 21 | /// 22 | internal class SettingsManager : AbstractSettingsItem, ISettingsManager 23 | { 24 | /// 25 | /// Initializes a new instance of the class. 26 | /// 27 | public SettingsManager() : base("", null) 28 | { 29 | SettingsCommand = new DelegateCommand(OpenSettings); 30 | } 31 | 32 | /// 33 | /// Gets the settings menu. 34 | /// 35 | /// The settings menu. 36 | public ICommand SettingsCommand { get; private set; } 37 | 38 | private void OpenSettings() 39 | { 40 | SettingsWindow window = new SettingsWindow(); 41 | window.DataContext = this; 42 | bool? result = window.ShowDialog(); 43 | if (result == true) 44 | { 45 | this.Save(); 46 | } 47 | else 48 | { 49 | this.Reset(); 50 | } 51 | } 52 | } 53 | } -------------------------------------------------------------------------------- /Src/Wide/Core/Settings/SettingsWindow.xaml: -------------------------------------------------------------------------------- 1 |  5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 |