├── .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 |
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/Src/Wide/Core/Settings/SettingsWindow.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 |
15 | namespace Wide.Core.Settings
16 | {
17 | ///
18 | /// Interaction logic for SettingsWindow.xaml
19 | ///
20 | internal partial class SettingsWindow : Window
21 | {
22 | public SettingsWindow()
23 | {
24 | InitializeComponent();
25 | }
26 |
27 | private void Button_Click(object sender, RoutedEventArgs e)
28 | {
29 | this.DialogResult = true;
30 | }
31 | }
32 | }
--------------------------------------------------------------------------------
/Src/Wide/Core/Settings/ThemeSettings.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.Configuration;
14 | using Microsoft.Practices.Prism.Events;
15 | using Wide.Interfaces;
16 | using Wide.Interfaces.Events;
17 | using Wide.Interfaces.Settings;
18 |
19 | namespace Wide.Core.Settings
20 | {
21 | internal class ThemeSettings : AbstractSettings, IThemeSettings
22 | {
23 | public ThemeSettings(IEventAggregator eventAggregator)
24 | {
25 | eventAggregator.GetEvent().Subscribe(NewSelectedTheme);
26 | }
27 |
28 | private void NewSelectedTheme(ITheme theme)
29 | {
30 | this.SelectedTheme = theme.Name;
31 | this.Save();
32 | }
33 |
34 | [UserScopedSetting()]
35 | [DefaultSettingValue("Dark")]
36 | public string SelectedTheme
37 | {
38 | get { return (string) this["SelectedTheme"]; }
39 | set { this["SelectedTheme"] = value; }
40 | }
41 | }
42 | }
--------------------------------------------------------------------------------
/Src/Wide/Core/Settings/ToolbarSettingItem.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.Controls;
16 |
17 | namespace Wide.Core.Settings
18 | {
19 | [Serializable]
20 | [Browsable(false)]
21 | public sealed class ToolbarSettingItem : IToolbar
22 | {
23 | public ToolbarSettingItem()
24 | {
25 | }
26 |
27 | public ToolbarSettingItem(IToolbar toolbar)
28 | {
29 | this.BandIndex = toolbar.BandIndex;
30 | this.Band = toolbar.Band;
31 | this.Header = toolbar.Header;
32 | this.IsChecked = toolbar.IsChecked;
33 | }
34 |
35 | public int Band { get; set; }
36 |
37 | public int BandIndex { get; set; }
38 |
39 | public string Header { get; set; }
40 |
41 | public bool IsChecked { get; set; }
42 |
43 | public override bool Equals(object obj)
44 | {
45 | ToolbarSettingItem item = obj as ToolbarSettingItem;
46 | return (item != null) && Header.Equals(item.Header);
47 | }
48 |
49 | public override int GetHashCode()
50 | {
51 | return Header.GetHashCode();
52 | }
53 |
54 | public override string ToString()
55 | {
56 | return Header.ToString();
57 | }
58 | }
59 | }
--------------------------------------------------------------------------------
/Src/Wide/Core/Settings/WindowPositionSettings.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.Configuration;
14 | using System.Windows;
15 | using Microsoft.Practices.Prism.Events;
16 | using Wide.Interfaces.Events;
17 | using Wide.Interfaces.Settings;
18 |
19 | namespace Wide.Core.Settings
20 | {
21 | internal class WindowPositionSettings : AbstractSettings, IWindowPositionSettings
22 | {
23 | public WindowPositionSettings(IEventAggregator eventAggregator)
24 | {
25 | eventAggregator.GetEvent().Subscribe(SaveWindowPositions);
26 | }
27 |
28 | private void SaveWindowPositions(Window window)
29 | {
30 | if (window.WindowState == WindowState.Normal)
31 | {
32 | Left = window.Left;
33 | Top = window.Top;
34 | Height = window.Height;
35 | Width = window.Width;
36 | }
37 | State = window.WindowState;
38 | Save();
39 | }
40 |
41 | [UserScopedSetting()]
42 | [DefaultSettingValue("0")]
43 | public double Left
44 | {
45 | get { return (double) this["Left"]; }
46 | set { this["Left"] = value; }
47 | }
48 |
49 | [UserScopedSetting()]
50 | [DefaultSettingValue("0")]
51 | public double Top
52 | {
53 | get { return (double) this["Top"]; }
54 | set { this["Top"] = value; }
55 | }
56 |
57 | [UserScopedSetting()]
58 | [DefaultSettingValue("600")]
59 | public double Height
60 | {
61 | get { return (double) this["Height"]; }
62 | set { this["Height"] = value; }
63 | }
64 |
65 | [UserScopedSetting()]
66 | [DefaultSettingValue("800")]
67 | public double Width
68 | {
69 | get { return (double) this["Width"]; }
70 | set { this["Width"] = value; }
71 | }
72 |
73 | [UserScopedSetting()]
74 | [DefaultSettingValue("Maximized")]
75 | public WindowState State
76 | {
77 | get { return (WindowState) this["State"]; }
78 | set { this["State"] = value; }
79 | }
80 | }
81 | }
--------------------------------------------------------------------------------
/Src/Wide/Core/TextDocument/TextView.xaml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
--------------------------------------------------------------------------------
/Src/Wide/Core/TextDocument/TextView.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.Controls;
14 | using Wide.Interfaces;
15 |
16 | namespace Wide.Core.TextDocument
17 | {
18 | ///
19 | /// Class TextView
20 | ///
21 | public partial class TextView : IContentView
22 | {
23 | public TextView()
24 | {
25 | InitializeComponent();
26 | }
27 | }
28 | }
--------------------------------------------------------------------------------
/Src/Wide/Core/TextDocument/TextViewModel.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 Wide.Interfaces;
15 | using Wide.Interfaces.Services;
16 |
17 | namespace Wide.Core.TextDocument
18 | {
19 | ///
20 | /// Class TextViewModel
21 | ///
22 | public class TextViewModel : ContentViewModel
23 | {
24 | ///
25 | /// Initializes a new instance of the class.
26 | ///
27 | /// The injected workspace.
28 | /// The injected command manager.
29 | /// The injected logger.
30 | /// The menu service.
31 | public TextViewModel(AbstractWorkspace workspace, ICommandManager commandManager, ILoggerService logger,
32 | IMenuService menuService)
33 | : base(workspace, commandManager, logger, menuService)
34 | {
35 | }
36 |
37 | ///
38 | /// The title of the document
39 | ///
40 | /// The tool tip.
41 | public override string Tooltip
42 | {
43 | get { return Model.Location as String; }
44 | protected set { base.Tooltip = value; }
45 | }
46 |
47 | ///
48 | /// The content ID - unique value for each document. For TextViewModels, the contentID is "FILE:##:" + location of the file.
49 | ///
50 | /// The content id.
51 | public override string ContentId
52 | {
53 | get { return "FILE:##:" + Tooltip; }
54 | }
55 | }
56 | }
--------------------------------------------------------------------------------
/Src/Wide/Core/Workspace.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.Services;
17 |
18 | namespace Wide.Core
19 | {
20 | ///
21 | /// Class Workspace
22 | ///
23 | internal class Workspace : AbstractWorkspace
24 | {
25 | ///
26 | /// The generic workspace that will be used if the application does not have its workspace
27 | ///
28 | /// The injected container - can be used by custom flavors of workspace
29 | /// The event aggregator.
30 | public Workspace(IUnityContainer container, IEventAggregator eventAggregator)
31 | : base(container, eventAggregator)
32 | {
33 | }
34 | }
35 | }
--------------------------------------------------------------------------------
/Src/Wide/Interfaces/Base/ICommandable.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 |
15 | namespace Wide.Interfaces
16 | {
17 | ///
18 | /// Interface ICommandable
19 | ///
20 | internal interface ICommandable
21 | {
22 | ///
23 | /// Gets the command.
24 | ///
25 | /// The command.
26 | ICommand Command { get; }
27 |
28 | ///
29 | /// Gets the command parameter.
30 | ///
31 | /// The command parameter.
32 | object CommandParameter { get; }
33 |
34 | ///
35 | /// Gets the input gesture text.
36 | ///
37 | /// The input gesture text.
38 | string InputGestureText { get; }
39 | }
40 | }
--------------------------------------------------------------------------------
/Src/Wide/Interfaces/Base/IPrioritizedTree.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.ObjectModel;
14 |
15 | namespace Wide.Interfaces
16 | {
17 | ///
18 | /// Interface IPrioritizedTree
19 | ///
20 | ///
21 | internal interface IPrioritizedTree
22 | {
23 | ///
24 | /// Gets the children.
25 | ///
26 | /// The children.
27 | ReadOnlyObservableCollection Children { get; }
28 |
29 | ///
30 | /// Gets the priority of this instance.
31 | ///
32 | /// The priority.
33 | int Priority { get; }
34 |
35 | ///
36 | /// Adds the specified item.
37 | ///
38 | /// The item.
39 | /// A GUID string for the menu
40 | string Add(T item);
41 |
42 | ///
43 | /// Removes the item with the GUID.
44 | ///
45 | /// The unique GUID set for the menu available for the creator.
46 | /// true if successfully removed, false otherwise
47 | bool Remove(string GuidString);
48 |
49 | ///
50 | /// Gets the specified node in the tree with this key.
51 | ///
52 | /// The key.
53 | /// `0.
54 | T Get(string key);
55 | }
56 | }
--------------------------------------------------------------------------------
/Src/Wide/Interfaces/ContentModel.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 System.Runtime.Serialization;
16 |
17 | namespace Wide.Interfaces
18 | {
19 | [DataContract]
20 | [Serializable]
21 | public abstract class ContentModel : ViewModelBase
22 | {
23 | protected bool _isDirty;
24 | protected object _location;
25 |
26 | ///
27 | /// The document location - could be a file location/server object etc.
28 | ///
29 | [Browsable(false)]
30 | public virtual object Location
31 | {
32 | get { return _location; }
33 | protected set { _location = value; RaisePropertyChanged("Location"); }
34 | }
35 |
36 | ///
37 | /// Is the document dirty - does it need to be saved?
38 | ///
39 | [Browsable(false)]
40 | public virtual bool IsDirty
41 | {
42 | get { return _isDirty; }
43 | protected internal set
44 | {
45 | _isDirty = value;
46 | RaisePropertyChanged("IsDirty");
47 | }
48 | }
49 | }
50 | }
--------------------------------------------------------------------------------
/Src/Wide/Interfaces/Controls/AbstractCommandable.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 |
15 | namespace Wide.Interfaces
16 | {
17 | ///
18 | /// Class AbstractCommandable
19 | ///
20 | public class AbstractCommandable : AbstractPrioritizedTree, ICommandable
21 | {
22 | #region CTOR
23 |
24 | ///
25 | /// Initializes a new instance of the class.
26 | ///
27 | protected AbstractCommandable() : base()
28 | {
29 | }
30 |
31 | #endregion
32 |
33 | #region ICommandable
34 |
35 | ///
36 | /// Gets the command.
37 | ///
38 | /// The command.
39 | public virtual ICommand Command { get; protected internal set; }
40 |
41 | ///
42 | /// Gets or sets the command parameter.
43 | ///
44 | /// The command parameter.
45 | public virtual object CommandParameter { get; set; }
46 |
47 | ///
48 | /// Gets the input gesture text.
49 | ///
50 | /// The input gesture text.
51 | public string InputGestureText { get; internal set; }
52 |
53 | #endregion
54 | }
55 | }
--------------------------------------------------------------------------------
/Src/Wide/Interfaces/Controls/IToolbar.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.Interfaces.Controls
16 | {
17 | public interface IToolbar
18 | {
19 | ///
20 | /// Gets the header of the toolbar.
21 | ///
22 | /// The header.
23 | string Header { get; }
24 |
25 | ///
26 | /// Gets the band number for the toolbar in the toolbar tray.
27 | ///
28 | /// The band.
29 | int Band { get; }
30 |
31 | ///
32 | /// Gets the band index of the toolbar in the toolbar tray.
33 | ///
34 | /// The index of the band.
35 | int BandIndex { get; }
36 |
37 | ///
38 | /// Gets a value indicating whether this toolbar is visible.
39 | ///
40 | /// true if this toolbar is visible; otherwise, false.
41 | bool IsChecked { get; }
42 | }
43 | }
--------------------------------------------------------------------------------
/Src/Wide/Interfaces/Controls/ToolBarItemTemplateSelector.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.Diagnostics;
14 | using System.Windows;
15 | using System.Windows.Controls;
16 |
17 | namespace Wide.Interfaces.Controls
18 | {
19 | ///
20 | /// Class ToolBarItemTemplateSelector
21 | ///
22 | internal class ToolBarItemTemplateSelector : DataTemplateSelector
23 | {
24 | ///
25 | /// Gets or sets the button template.
26 | ///
27 | /// The button template.
28 | public DataTemplate ButtonTemplate { get; set; }
29 |
30 | ///
31 | /// Gets or sets the combo box template.
32 | ///
33 | /// The combo box template.
34 | public DataTemplate ComboBoxTemplate { get; set; }
35 |
36 | ///
37 | /// Gets or sets the separator template.
38 | ///
39 | /// The separator template.
40 | public DataTemplate SeparatorTemplate { get; set; }
41 |
42 | ///
43 | /// When overridden in a derived class, returns a based on custom logic.
44 | /// Here, it looks at the item definition and determines if the toolbar item needs to be a button or combo box or a separator.
45 | ///
46 | /// The data object for which to select the template.
47 | /// The data-bound object.
48 | /// Returns a or null. The default value is null.
49 | public override DataTemplate SelectTemplate(object item, DependencyObject container)
50 | {
51 | var toolBarItem = item as AbstractMenuItem;
52 | if (toolBarItem != null && !toolBarItem.IsSeparator)
53 | {
54 | if (toolBarItem.Children.Count > 0)
55 | return ComboBoxTemplate;
56 |
57 | return ButtonTemplate;
58 | }
59 | return SeparatorTemplate;
60 | }
61 | }
62 | }
--------------------------------------------------------------------------------
/Src/Wide/Interfaces/Controls/ToolbarViewModel.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 System.Windows.Media;
15 | using Microsoft.Practices.Unity;
16 | using Wide.Interfaces.Controls;
17 |
18 | namespace Wide.Interfaces.Controls
19 | {
20 | ///
21 | /// Class ToolbarViewModel
22 | ///
23 | public sealed class ToolbarViewModel : AbstractToolbar
24 | {
25 | #region CTOR
26 |
27 | ///
28 | /// Initializes a new instance of the class.
29 | ///
30 | /// The header.
31 | /// The priority.
32 | /// The icon.
33 | /// The command.
34 | /// if set to true does nothing in the case of toolbar - default value is false.
35 | /// The container.
36 | /// Header cannot be SEP for a Toolbar
37 | public ToolbarViewModel(string header, int priority, ImageSource icon = null, ICommand command = null,
38 | bool isCheckable = false, IUnityContainer container = null)
39 | : base(header, priority, icon, command, isCheckable, container)
40 | {
41 | }
42 |
43 | #endregion
44 | }
45 | }
--------------------------------------------------------------------------------
/Src/Wide/Interfaces/Converters/BoolToInsertModeConverter.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.Data;
15 |
16 | namespace Wide.Interfaces.Converters
17 | {
18 | public class BoolToInsertModeConverter : IValueConverter
19 | {
20 | #region IValueConverter Members
21 |
22 | public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
23 | {
24 | bool? actValue = value as bool?;
25 | if (actValue == null)
26 | return null;
27 |
28 | return actValue == false ? "INS" : "OVR";
29 | }
30 |
31 | public object ConvertBack(object value, Type targetType, object parameter,
32 | System.Globalization.CultureInfo culture)
33 | {
34 | throw new NotImplementedException();
35 | }
36 |
37 | #endregion
38 | }
39 | }
--------------------------------------------------------------------------------
/Src/Wide/Interfaces/Converters/MenuVisibilityConverter.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;
15 | using System.Windows.Data;
16 | using Wide.Interfaces.Controls;
17 |
18 | namespace Wide.Interfaces.Converters
19 | {
20 | public class MenuVisibilityConverter : IValueConverter
21 | {
22 | #region IValueConverter Members
23 |
24 | public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
25 | {
26 | AbstractMenuItem menu = value as AbstractMenuItem;
27 |
28 | if (menu == null)
29 | return Visibility.Hidden;
30 |
31 | if (menu.Command != null && menu.Command.CanExecute(null) == false && menu.HideDisabled == true)
32 | return Visibility.Collapsed;
33 |
34 | if (menu.Children.Count > 0 || menu.Command != null || menu.IsCheckable == true)
35 | return Visibility.Visible;
36 |
37 | return Visibility.Collapsed;
38 | }
39 |
40 | public object ConvertBack(object value, Type targetType, object parameter,
41 | System.Globalization.CultureInfo culture)
42 | {
43 | throw new NotImplementedException();
44 | }
45 |
46 | #endregion
47 | }
48 | }
--------------------------------------------------------------------------------
/Src/Wide/Interfaces/Converters/NullObjectToVisibiltyConverter.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.Globalization;
15 | using System.Windows;
16 | using System.Windows.Data;
17 |
18 | namespace Wide.Interfaces.Converters
19 | {
20 | public class NullObjectToVisibiltyConverter : IValueConverter
21 | {
22 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
23 | {
24 | return (value == null) ? Visibility.Collapsed : Visibility.Visible;
25 | }
26 |
27 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
28 | {
29 | return null;
30 | }
31 | }
32 | }
--------------------------------------------------------------------------------
/Src/Wide/Interfaces/Converters/NullToBooleanConverter.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.Globalization;
15 | using System.Windows;
16 | using System.Windows.Data;
17 |
18 | namespace Wide.Interfaces.Converters
19 | {
20 | public class NullToBooleanConverter : IValueConverter
21 | {
22 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
23 | {
24 | return (value != null);
25 | }
26 |
27 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
28 | {
29 | return null;
30 | }
31 | }
32 | }
--------------------------------------------------------------------------------
/Src/Wide/Interfaces/Converters/PercentToFontSizeConverter.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.Globalization;
15 | using System.Windows.Data;
16 |
17 | namespace Wide.Interfaces.Converters
18 | {
19 | ///
20 | /// Class PercentToFontSizeConverter
21 | ///
22 | public class PercentToFontSizeConverter : IValueConverter
23 | {
24 | #region IValueConverter Members
25 |
26 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
27 | {
28 | //For now lets assume 12.00 to be 100%
29 | var fsize = value as double?;
30 | if (fsize != null)
31 | {
32 | return ((fsize/12.00)*100) + " %";
33 | }
34 | return "100 %";
35 | }
36 |
37 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
38 | {
39 | double rValue = 12.0;
40 | if (value != null)
41 | {
42 | var final = value as string;
43 | final = final.Replace("%", "");
44 | if (double.TryParse(final, out rValue))
45 | {
46 | rValue = (rValue/100.0)*12;
47 | }
48 | else
49 | {
50 | rValue = 12.0;
51 | }
52 | }
53 | return rValue;
54 | }
55 |
56 | #endregion
57 | }
58 | }
--------------------------------------------------------------------------------
/Src/Wide/Interfaces/Events/ActiveContentChangedEvent.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 |
15 | namespace Wide.Interfaces.Events
16 | {
17 | ///
18 | /// Class ActiveContentChangedEvent - This event is used when the active content is changed in Avalon Dock.
19 | ///
20 | public class ActiveContentChangedEvent : CompositePresentationEvent
21 | {
22 | }
23 | }
--------------------------------------------------------------------------------
/Src/Wide/Interfaces/Events/ClosedContentEvent.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 |
15 | namespace Wide.Interfaces.Events
16 | {
17 | ///
18 | /// Class OpenContentEvent - This event happens when a new document is opened.
19 | ///
20 | public class ClosedContentEvent : CompositePresentationEvent
21 | {
22 | }
23 | }
--------------------------------------------------------------------------------
/Src/Wide/Interfaces/Events/LogEvent.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 Wide.Interfaces.Services;
15 |
16 | namespace Wide.Interfaces.Events
17 | {
18 | ///
19 | /// Class LogEvent - This event is used when a logging operation happens.
20 | ///
21 | public class LogEvent : CompositePresentationEvent
22 | {
23 | }
24 | }
--------------------------------------------------------------------------------
/Src/Wide/Interfaces/Events/OpenContentEvent.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 |
15 | namespace Wide.Interfaces.Events
16 | {
17 | ///
18 | /// Class OpenContentEvent - This event happens when a new document is opened.
19 | ///
20 | public class OpenContentEvent : CompositePresentationEvent
21 | {
22 | }
23 | }
--------------------------------------------------------------------------------
/Src/Wide/Interfaces/Events/SplashCloseEvent.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 |
15 | namespace Wide.Interfaces.Events
16 | {
17 | ///
18 | /// Class SplashCloseEvent - This event happens when the splash window is closed
19 | ///
20 | public class SplashCloseEvent : CompositePresentationEvent
21 | {
22 | }
23 | }
--------------------------------------------------------------------------------
/Src/Wide/Interfaces/Events/SplashMessageUpdatedEvent.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 |
15 | namespace Wide.Interfaces.Events
16 | {
17 | ///
18 | /// Class SplashMessageUpdateEvent - This event happens a new module is loaded and wants to display a message on the splash window
19 | ///
20 | public class SplashMessageUpdateEvent : CompositePresentationEvent
21 | {
22 | public string Message { get; set; }
23 | }
24 | }
--------------------------------------------------------------------------------
/Src/Wide/Interfaces/Events/ThemeChangeEvent.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 |
15 | namespace Wide.Interfaces.Events
16 | {
17 | ///
18 | /// Class ThemeChangeEvent - This event happens when a theme is changed.
19 | ///
20 | public class ThemeChangeEvent : CompositePresentationEvent
21 | {
22 | }
23 | }
--------------------------------------------------------------------------------
/Src/Wide/Interfaces/Events/WindowClosingEvent.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.Prism.Events;
15 | using Wide.Interfaces.Services;
16 |
17 | namespace Wide.Interfaces.Events
18 | {
19 | ///
20 | /// Class LogEvent - This event is used when a logging operation happens.
21 | ///
22 | public class WindowClosingEvent : CompositePresentationEvent
23 | {
24 | }
25 | }
--------------------------------------------------------------------------------
/Src/Wide/Interfaces/IContentView.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 | namespace Wide.Interfaces
14 | {
15 | ///
16 | /// Interface IContentView
17 | ///
18 | public interface IContentView
19 | {
20 | }
21 | }
--------------------------------------------------------------------------------
/Src/Wide/Interfaces/IShell.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 | namespace Wide.Interfaces
14 | {
15 | ///
16 | /// Interface IShell
17 | ///
18 | public interface IShell
19 | {
20 | ///
21 | /// Closes this instance of the shell.
22 | ///
23 | void Close();
24 |
25 | ///
26 | /// Shows this instance of the shell
27 | ///
28 | void Show();
29 |
30 | ///
31 | /// Loads the layout of the shell from previous run.
32 | ///
33 | void LoadLayout();
34 |
35 | ///
36 | /// Saves the layout of the shell.
37 | ///
38 | void SaveLayout();
39 |
40 |
41 | ///
42 | /// Gets the top.
43 | ///
44 | /// The top.
45 | double Top { get; }
46 |
47 | ///
48 | /// Gets the left.
49 | ///
50 | /// The left.
51 | double Left { get; }
52 |
53 | ///
54 | /// Gets the width.
55 | ///
56 | /// The width.
57 | double Width { get; }
58 |
59 | ///
60 | /// Gets the height.
61 | ///
62 | /// The height.
63 | double Height { get; }
64 | }
65 | }
--------------------------------------------------------------------------------
/Src/Wide/Interfaces/ITheme.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.Collections.Generic;
15 |
16 | namespace Wide.Interfaces
17 | {
18 | ///
19 | /// Interface ITheme - You can register a theme adding it to the list of themes in theme manager
20 | ///
21 | public interface ITheme
22 | {
23 | ///
24 | /// Lists of valid URIs which will be loaded in the theme dictionary
25 | ///
26 | IList UriList { get; }
27 |
28 | ///
29 | /// The name of the theme
30 | ///
31 | string Name { get; }
32 | }
33 | }
--------------------------------------------------------------------------------
/Src/Wide/Interfaces/ITool.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using Wide.Interfaces.Services;
7 |
8 | namespace Wide.Interfaces
9 | {
10 | public interface ITool
11 | {
12 | PaneLocation PreferredLocation { get; }
13 | double PreferredWidth { get; }
14 | double PreferredHeight { get; }
15 |
16 | bool IsVisible { get; set; }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Src/Wide/Interfaces/IWorkspace.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.ObjectModel;
14 | using System.ComponentModel;
15 | using System.Windows.Media;
16 |
17 | namespace Wide.Interfaces
18 | {
19 | public interface IWorkspace
20 | {
21 | ///
22 | /// The list of documents which are open in the workspace
23 | ///
24 | ObservableCollection Documents { get; set; }
25 |
26 | ///
27 | /// The list of tools that are available in the workspace
28 | ///
29 | ObservableCollection Tools { get; set; }
30 |
31 | ///
32 | /// The current document which is active in the workspace
33 | ///
34 | ContentViewModel ActiveDocument { get; set; }
35 |
36 | ///
37 | /// Gets the title of the application.
38 | ///
39 | /// The title.
40 | string Title { get; }
41 |
42 | ///
43 | /// Gets the icon of the application.
44 | ///
45 | /// The icon.
46 | ImageSource Icon { get; }
47 |
48 | ///
49 | /// Closing this instance.
50 | ///
51 | /// The instance containing the event data.
52 | /// true if the application is closing, false otherwise
53 | bool Closing(CancelEventArgs e);
54 | }
55 | }
--------------------------------------------------------------------------------
/Src/Wide/Interfaces/Services/ICommandManager.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 |
15 | namespace Wide.Interfaces.Services
16 | {
17 | ///
18 | /// Interface ICommandManager
19 | ///
20 | public interface ICommandManager
21 | {
22 | ///
23 | /// Registers the command.
24 | ///
25 | /// The name.
26 | /// The command.
27 | /// true if successfully added the command, false otherwise
28 | bool RegisterCommand(string name, ICommand command);
29 |
30 | ///
31 | /// Gets the command.
32 | ///
33 | /// The name.
34 | /// ICommand.
35 | ICommand GetCommand(string name);
36 |
37 | ///
38 | /// Refreshes this instance.
39 | ///
40 | void Refresh();
41 | }
42 | }
--------------------------------------------------------------------------------
/Src/Wide/Interfaces/Services/IContentHandlerRegistry.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 | namespace Wide.Interfaces.Services
15 | {
16 | ///
17 | /// Interface IContentHandlerRegistry
18 | ///
19 | public interface IContentHandlerRegistry
20 | {
21 | ///
22 | /// Register a content handler with the registry
23 | ///
24 | /// The content handler
25 | /// true if successful, false otherwise
26 | bool Register(IContentHandler handler);
27 |
28 | ///
29 | /// Unregisters a content handler
30 | ///
31 | /// The handler to remove
32 | /// true if successfully unregistered, false otherwise
33 | bool Unregister(IContentHandler handler);
34 |
35 | ///
36 | /// Returns a content view model for the specified object which needs to be displayed as a document
37 | /// The object could be anything - based on the handlers, a content view model is returned
38 | ///
39 | /// The object which needs to be displayed as a document in Wide
40 | /// The content view model for the given info
41 | ContentViewModel GetViewModel(object info);
42 |
43 | ///
44 | /// Returns a content view model for the specified contentID which needs to be displayed as a document
45 | /// The contentID is the ID used in AvalonDock
46 | ///
47 | /// The contentID which needs to be displayed as a document in Wide
48 | /// The content view model for the given info
49 | ContentViewModel GetViewModelFromContentId(string contentId);
50 |
51 | ///
52 | /// Gets the command which provides the option to create a new document.
53 | ///
54 | /// The new command.
55 | ICommand NewCommand { get; }
56 | }
57 | }
--------------------------------------------------------------------------------
/Src/Wide/Interfaces/Services/ILoggerService.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 | namespace Wide.Interfaces.Services
14 | {
15 | ///
16 | /// Enum LogCategory
17 | ///
18 | public enum LogCategory
19 | {
20 | Debug,
21 | Exception,
22 | Info,
23 | Warn,
24 | Error
25 | }
26 |
27 | ///
28 | /// Enum LogPriority
29 | ///
30 | public enum LogPriority
31 | {
32 | None,
33 | Low,
34 | Medium,
35 | High
36 | }
37 |
38 | ///
39 | /// Interface ILoggerService - used for logging in the application
40 | ///
41 | public interface ILoggerService
42 | {
43 | ///
44 | /// Gets the message which just got logged.
45 | ///
46 | /// The message.
47 | string Message { get; }
48 |
49 | ///
50 | /// Gets the category of logging.
51 | ///
52 | /// The category.
53 | LogCategory Category { get; }
54 |
55 | ///
56 | /// Gets the priority of logging.
57 | ///
58 | /// The priority.
59 | LogPriority Priority { get; }
60 |
61 | ///
62 | /// Logs the specified message.
63 | ///
64 | /// The message.
65 | /// The logging category.
66 | /// The logging priority.
67 | void Log(string message, LogCategory category, LogPriority priority);
68 | }
69 | }
--------------------------------------------------------------------------------
/Src/Wide/Interfaces/Services/IMenuService.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 | namespace Wide.Interfaces.Services
14 | {
15 | public interface IMenuService
16 | {
17 | ///
18 | /// Adds the specified item.
19 | ///
20 | /// The item.
21 | /// true if successfully added, false otherwise
22 | /// Expected a AbstractMenuItem as the argument. Only Menu's can be added within a Menu.
23 | string Add(AbstractCommandable item);
24 |
25 | ///
26 | /// Removes the specified key.
27 | ///
28 | /// The unique GUID set for the menu available for the creator.
29 | /// true if successfully removed, false otherwise
30 | bool Remove(string GuidString);
31 |
32 | ///
33 | /// Gets the node with the specified key.
34 | ///
35 | /// The key.
36 | /// `0.
37 | AbstractCommandable Get(string key);
38 |
39 | ///
40 | /// Refreshes this instance.
41 | ///
42 | void Refresh();
43 | }
44 | }
--------------------------------------------------------------------------------
/Src/Wide/Interfaces/Services/IOpenDocumentService.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 | namespace Wide.Interfaces.Services
14 | {
15 | ///
16 | /// Interface IOpenDocumentService - used to open a file
17 | ///
18 | public interface IOpenDocumentService
19 | {
20 | ///
21 | /// Opens the document from the specified location.
22 | ///
23 | /// The location.
24 | /// ContentViewModel.
25 | ContentViewModel Open(object location = null);
26 |
27 | ///
28 | /// Opens from content from an ID.
29 | ///
30 | /// The content ID.
31 | /// if set to true makes the new document as the active document.
32 | /// ContentViewModel.
33 | ContentViewModel OpenFromID(string contentID, bool makeActive = false);
34 | }
35 | }
--------------------------------------------------------------------------------
/Src/Wide/Interfaces/Services/IStatusbarService.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 System.Windows.Input;
15 | using System.Windows.Media;
16 |
17 | namespace Wide.Interfaces.Services
18 | {
19 | public interface IStatusbarService
20 | {
21 | bool Animation(Image image);
22 | bool Clear();
23 | bool FreezeOutput();
24 | bool IsFrozen { get; }
25 | string Text { get; set; }
26 | Brush Foreground { get; set; }
27 | Brush Background { get; set; }
28 | bool? InsertMode { get; set; }
29 | int? LineNumber { get; set; }
30 | int? CharPosition { get; set; }
31 | int? ColPosition { get; set; }
32 | bool Progress(bool On, uint current, uint total);
33 | }
34 | }
--------------------------------------------------------------------------------
/Src/Wide/Interfaces/Services/IThemeManager.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.ObjectModel;
14 |
15 | namespace Wide.Interfaces.Services
16 | {
17 | ///
18 | /// Interface IThemeManager
19 | ///
20 | public interface IThemeManager
21 | {
22 | ///
23 | /// The list of themes registered with the theme manager
24 | ///
25 | /// The themes.
26 | ObservableCollection Themes { get; }
27 |
28 | ///
29 | /// Adds a theme to the theme manager
30 | ///
31 | /// The theme to add
32 | /// true if successful, false otherwise
33 | bool AddTheme(ITheme theme);
34 |
35 | ///
36 | /// Called to set the current theme from the list of themes
37 | ///
38 | /// The name of the theme
39 | /// true if successful, false otherwise
40 | bool SetCurrent(string name);
41 |
42 | ///
43 | /// Returns the current theme set in the theme manager
44 | ///
45 | /// The current theme.
46 | ITheme CurrentTheme { get; }
47 | }
48 | }
--------------------------------------------------------------------------------
/Src/Wide/Interfaces/Services/IToolbarService.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.Interfaces.Controls;
15 |
16 | namespace Wide.Interfaces.Services
17 | {
18 | ///
19 | /// Interface IToolbarService - the application's toolbar tray is returned by this service
20 | ///
21 | public interface IToolbarService
22 | {
23 | ///
24 | /// Gets the tool bar tray of the application.
25 | ///
26 | /// The tool bar tray.
27 | ToolBarTray ToolBarTray { get; }
28 |
29 | ///
30 | /// Adds the specified item.
31 | ///
32 | /// The item.
33 | /// true if successfully added, false otherwise
34 | string Add(AbstractCommandable item);
35 |
36 | ///
37 | /// Removes the specified key.
38 | ///
39 | /// The GUID.
40 | /// true if successfully removed, false otherwise
41 | bool Remove(string GUID);
42 |
43 | ///
44 | /// Gets the specified toolbar using the key.
45 | ///
46 | /// The key.
47 | /// AbstractCommandable.
48 | AbstractCommandable Get(string key);
49 |
50 | ///
51 | /// Gets the right click menu.
52 | ///
53 | /// The right click menu.
54 | AbstractMenuItem RightClickMenu { get; }
55 | }
56 | }
--------------------------------------------------------------------------------
/Src/Wide/Interfaces/Services/PaneLocation.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Wide.Interfaces.Services
8 | {
9 | public enum PaneLocation
10 | {
11 | Left,
12 | Right,
13 | Bottom
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Src/Wide/Interfaces/Settings/IRecentViewItem.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.Interfaces.Settings
16 | {
17 | public interface IRecentViewItem
18 | {
19 | string ContentID { get; }
20 | string DisplayValue { get; }
21 | }
22 | }
--------------------------------------------------------------------------------
/Src/Wide/Interfaces/Settings/IRecentViewSettings.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.Xml.Serialization;
15 | using Wide.Interfaces.Controls;
16 |
17 | namespace Wide.Interfaces.Settings
18 | {
19 | public interface IRecentViewSettings
20 | {
21 | [XmlIgnore]
22 | AbstractMenuItem RecentMenu { get; }
23 |
24 | [XmlIgnore]
25 | IReadOnlyList RecentItems { get; }
26 | }
27 | }
--------------------------------------------------------------------------------
/Src/Wide/Interfaces/Settings/ISettingsManager.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 |
15 | namespace Wide.Interfaces.Settings
16 | {
17 | public interface ISettingsManager
18 | {
19 | ///
20 | /// Gets the settings command.
21 | ///
22 | /// The settings.
23 | ICommand SettingsCommand { get; }
24 |
25 | ///
26 | /// Adds the specified item.
27 | ///
28 | /// The item.
29 | /// The GUID for the item added which needs to be used to remove the item
30 | string Add(AbstractSettingsItem item);
31 |
32 | ///
33 | /// Removes the specified key.
34 | ///
35 | /// The unique GUID set for the menu available for the creator.
36 | /// true if successfully removed, false otherwise
37 | bool Remove(string GuidString);
38 |
39 | ///
40 | /// Gets the node with the specified key.
41 | ///
42 | /// The key.
43 | /// `0.
44 | AbstractSettingsItem Get(string key);
45 | }
46 | }
--------------------------------------------------------------------------------
/Src/Wide/Interfaces/Settings/IThemeSettings.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.Interfaces.Settings
16 | {
17 | public interface IThemeSettings
18 | {
19 | string SelectedTheme { get; }
20 | }
21 | }
--------------------------------------------------------------------------------
/Src/Wide/Interfaces/Settings/IToolbarPositionSettings.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.Collections.Generic;
15 | using Wide.Interfaces.Controls;
16 |
17 | namespace Wide.Interfaces.Settings
18 | {
19 | public interface IToolbarPositionSettings
20 | {
21 | //IReadOnlyList Toolbars { get; }
22 | }
23 | }
--------------------------------------------------------------------------------
/Src/Wide/Interfaces/Settings/IWindowPositionSettings.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;
15 |
16 | namespace Wide.Interfaces.Settings
17 | {
18 | internal interface IWindowPositionSettings
19 | {
20 | double Height { get; }
21 | double Left { get; }
22 | WindowState State { get; }
23 | double Top { get; }
24 | double Width { get; }
25 | }
26 | }
--------------------------------------------------------------------------------
/Src/Wide/Interfaces/Styles/VS2010/Brushes.xaml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
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 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/Src/Wide/Interfaces/Styles/VS2010/StatusBar.xaml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
24 |
35 |
51 |
52 |
--------------------------------------------------------------------------------
/Src/Wide/Interfaces/Styles/VS2012/DarkTheme.xaml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Src/Wide/Interfaces/Styles/VS2012/LightTheme.xaml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Src/Wide/Interfaces/Styles/VS2012/Tooltip.xaml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
40 |
--------------------------------------------------------------------------------
/Src/Wide/Interfaces/Themes/DarkTheme.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.Collections.Generic;
15 |
16 | namespace Wide.Interfaces.Themes
17 | {
18 | ///
19 | /// Class DarkTheme
20 | ///
21 | public sealed class DarkTheme : ITheme
22 | {
23 | ///
24 | /// Initializes a new instance of the class.
25 | ///
26 | public DarkTheme()
27 | {
28 | UriList = new List
29 | {
30 | new Uri("pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml"),
31 | new Uri("pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml"),
32 | new Uri("pack://application:,,,/MahApps.Metro;component/Styles/Colors.xaml"),
33 | new Uri("pack://application:,,,/MahApps.Metro;component/Styles/Accents/Blue.xaml"),
34 | new Uri("pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseLight.xaml"),
35 | new Uri("pack://application:,,,/Wide;component/Interfaces/Styles/VS2012/DarkColors.xaml"),
36 | new Uri("pack://application:,,,/Wide;component/Interfaces/Styles/VS2012/DarkTheme.xaml"),
37 | new Uri("pack://application:,,,/AvalonDock.Themes.VS2012;component/DarkTheme.xaml"),
38 | new Uri("pack://application:,,,/Wide;component/Interfaces/Styles/VS2012/Menu.xaml")
39 | };
40 | }
41 |
42 | #region ITheme Members
43 |
44 | ///
45 | /// Lists of valid URIs which will be loaded in the theme dictionary
46 | ///
47 | /// The URI list.
48 | public IList UriList { get; internal set; }
49 |
50 | ///
51 | /// The name of the theme - "Dark"
52 | ///
53 | /// The name.
54 | public string Name
55 | {
56 | get { return "Dark"; }
57 | }
58 |
59 | #endregion
60 | }
61 | }
--------------------------------------------------------------------------------
/Src/Wide/Interfaces/Themes/DefaultTheme.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.Collections.Generic;
15 |
16 | namespace Wide.Interfaces.Themes
17 | {
18 | ///
19 | /// Class DefaultTheme
20 | ///
21 | public sealed class DefaultTheme : ITheme
22 | {
23 | ///
24 | /// Initializes a new instance of the class.
25 | ///
26 | public DefaultTheme()
27 | {
28 | UriList = new List
29 | {
30 | new Uri("pack://application:,,,/Wide;component/Interfaces/Styles/VS2012/DarkTheme.xaml"),
31 | new Uri("pack://application:,,,/AvalonDock.Themes.VS2012;component/DarkTheme.xaml")
32 | };
33 | }
34 |
35 | #region ITheme Members
36 |
37 | ///
38 | /// Lists of valid URIs which will be loaded in the theme dictionary
39 | ///
40 | /// The URI list.
41 | public IList UriList { get; internal set; }
42 |
43 | ///
44 | /// The name of the theme - "Default"
45 | ///
46 | /// The name.
47 | public string Name
48 | {
49 | get { return "Default"; }
50 | }
51 |
52 | #endregion
53 | }
54 | }
--------------------------------------------------------------------------------
/Src/Wide/Interfaces/Themes/LightTheme.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.Collections.Generic;
15 |
16 | namespace Wide.Interfaces.Themes
17 | {
18 | ///
19 | /// Class LightTheme
20 | ///
21 | public sealed class LightTheme : ITheme
22 | {
23 | ///
24 | /// Initializes a new instance of the class.
25 | ///
26 | public LightTheme()
27 | {
28 | UriList = new List
29 | {
30 | new Uri("pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml"),
31 | new Uri("pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml"),
32 | new Uri("pack://application:,,,/MahApps.Metro;component/Styles/Colors.xaml"),
33 | new Uri("pack://application:,,,/MahApps.Metro;component/Styles/Accents/Blue.xaml"),
34 | new Uri("pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseLight.xaml"),
35 | new Uri("pack://application:,,,/Wide;component/Interfaces/Styles/VS2012/LightColors.xaml"),
36 | new Uri("pack://application:,,,/Wide;component/Interfaces/Styles/VS2012/LightTheme.xaml"),
37 | new Uri("pack://application:,,,/AvalonDock.Themes.VS2012;component/LightTheme.xaml"),
38 | new Uri("pack://application:,,,/Wide;component/Interfaces/Styles/VS2012/Menu.xaml")
39 | };
40 | }
41 |
42 | #region ITheme Members
43 |
44 | ///
45 | /// Lists of valid URIs which will be loaded in the theme dictionary
46 | ///
47 | /// The URI list.
48 | public IList UriList { get; internal set; }
49 |
50 | ///
51 | /// The name of the theme - "Light"
52 | ///
53 | /// The name.
54 | public string Name
55 | {
56 | get { return "Light"; }
57 | }
58 |
59 | #endregion
60 | }
61 | }
--------------------------------------------------------------------------------
/Src/Wide/Interfaces/Themes/VS2010.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.Collections.Generic;
15 |
16 | namespace Wide.Interfaces.Themes
17 | {
18 | ///
19 | /// Class VS2010
20 | ///
21 | public sealed class VS2010 : ITheme
22 | {
23 | ///
24 | /// Initializes a new instance of the class.
25 | ///
26 | public VS2010()
27 | {
28 | UriList = new List
29 | {
30 | new Uri("pack://application:,,,/Xceed.Wpf.AvalonDock.Themes.VS2010;component/Theme.xaml"),
31 | new Uri("pack://application:,,,/Wide;component/Interfaces/Styles/VS2010/Theme.xaml")
32 | };
33 | }
34 |
35 | #region ITheme Members
36 |
37 | ///
38 | /// Lists of valid URIs which will be loaded in the theme dictionary
39 | ///
40 | /// The URI list.
41 | public IList UriList { get; private set; }
42 |
43 | ///
44 | /// The name of the theme - "VS2010"
45 | ///
46 | /// The name.
47 | public string Name
48 | {
49 | get { return "VS2010"; }
50 | }
51 |
52 | #endregion
53 | }
54 | }
--------------------------------------------------------------------------------
/Src/Wide/Interfaces/ToolModel.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 | namespace Wide.Interfaces
14 | {
15 | ///
16 | /// Class ToolModel
17 | ///
18 | public class ToolModel : ViewModelBase
19 | {
20 | }
21 | }
--------------------------------------------------------------------------------
/Src/Wide/Interfaces/ViewModelBase.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 System.Runtime.CompilerServices;
16 | using System.Runtime.Serialization;
17 | using Wide.Utils;
18 |
19 | namespace Wide.Interfaces
20 | {
21 | ///
22 | /// The view model base class
23 | ///
24 | [DataContract]
25 | [Serializable]
26 | public class ViewModelBase : INotifyPropertyChanged
27 | {
28 | #region INotifyPropertyChanged Members
29 |
30 | ///
31 | /// Event handler that gets triggered when a property changes
32 | ///
33 | public virtual event PropertyChangedEventHandler PropertyChanged;
34 |
35 | #endregion
36 |
37 | ///
38 | /// Should be called when a property value has changed
39 | ///
40 | /// The property name
41 | protected virtual void RaisePropertyChanged([CallerMemberName] string propertyName="")
42 | {
43 | if (PropertyChanged != null)
44 | PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
45 | }
46 |
47 |
48 | ///
49 | /// Raises the property changed with undo.
50 | ///
51 | /// The old value.
52 | /// The new value.
53 | /// The description.
54 | /// Name of the property.
55 | protected virtual void RaisePropertyChangedWithValues(object oldValue, object newValue, string description, [CallerMemberName] string propertyName = "")
56 | {
57 | if (PropertyChanged != null)
58 | {
59 | PropertyChanged(this, new PropertyChangedExtendedEventArgs(propertyName, oldValue, newValue, description));
60 | }
61 | }
62 |
63 | }
64 | }
--------------------------------------------------------------------------------
/Src/Wide/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.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.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/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.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/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Src/Wide/Shell/ActiveDocumentConverter.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.Globalization;
15 | using System.Windows.Data;
16 | using Wide.Interfaces;
17 |
18 | namespace Wide.Shell
19 | {
20 | internal class ActiveDocumentConverter : IValueConverter
21 | {
22 | #region IValueConverter Members
23 |
24 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
25 | {
26 | if (value is ContentViewModel)
27 | return value;
28 |
29 | return Binding.DoNothing;
30 | }
31 |
32 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
33 | {
34 | if (value is ContentViewModel)
35 | return value;
36 |
37 | return Binding.DoNothing;
38 | }
39 |
40 | #endregion
41 | }
42 | }
--------------------------------------------------------------------------------
/Src/Wide/Shell/PanesStyleSelector.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 | using Wide.Interfaces;
16 |
17 | namespace Wide.Shell
18 | {
19 | internal class PanesStyleSelector : StyleSelector
20 | {
21 | public Style ToolStyle { get; set; }
22 |
23 | public Style ContentStyle { get; set; }
24 |
25 | public override Style SelectStyle(object item, DependencyObject container)
26 | {
27 | if (item is ToolViewModel)
28 | return ToolStyle;
29 |
30 | if (item is ContentViewModel)
31 | return ContentStyle;
32 |
33 | return base.SelectStyle(item, container);
34 | }
35 | }
36 | }
--------------------------------------------------------------------------------
/Src/Wide/Shell/PanesTemplateSelector.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 | using Wide.Interfaces;
16 |
17 | namespace Wide.Shell
18 | {
19 | internal class PanesTemplateSelector : DataTemplateSelector
20 | {
21 | public DataTemplate ContentViewTemplate { get; set; }
22 |
23 | public DataTemplate ToolViewTemplate { get; set; }
24 |
25 | public override DataTemplate SelectTemplate(object item, DependencyObject container)
26 | {
27 | if (item is ContentViewModel)
28 | return ContentViewTemplate;
29 |
30 | if (item is ToolViewModel)
31 | return ToolViewTemplate;
32 |
33 | return base.SelectTemplate(item, container);
34 | }
35 | }
36 | }
--------------------------------------------------------------------------------
/Src/Wide/Shell/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/Src/Wide/Splash/Behaviours/SplashBehaviour.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 |
15 | namespace Wide.Splash.Behaviours
16 | {
17 | ///
18 | /// Class SplashBehaviour - Add as an attached property on your splash view
19 | ///
20 | public sealed class SplashBehaviour
21 | {
22 | #region Dependency Properties
23 |
24 | public static readonly DependencyProperty EnabledProperty = DependencyProperty.RegisterAttached(
25 | "Enabled", typeof (bool), typeof (SplashBehaviour), new PropertyMetadata(OnEnabledChanged));
26 |
27 | public static bool GetEnabled(DependencyObject d)
28 | {
29 | return (bool) d.GetValue(EnabledProperty);
30 | }
31 |
32 | public static void SetEnabled(DependencyObject d, bool value)
33 | {
34 | d.SetValue(EnabledProperty, value);
35 | }
36 |
37 | #endregion
38 |
39 | #region Event Handlers
40 |
41 | private static void OnEnabledChanged(DependencyObject d, DependencyPropertyChangedEventArgs args)
42 | {
43 | var splash = d as Window;
44 | if (splash != null && args.NewValue is bool && (bool) args.NewValue)
45 | {
46 | splash.Closed += (s, e) =>
47 | {
48 | splash.DataContext = null;
49 | splash.Dispatcher.InvokeShutdown();
50 | };
51 | splash.MouseDoubleClick += (s, e) => splash.Close();
52 | splash.MouseLeftButtonDown += (s, e) => splash.DragMove();
53 | }
54 | }
55 |
56 | #endregion
57 | }
58 | }
--------------------------------------------------------------------------------
/Src/Wide/Splash/ISplashView.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 | namespace Wide.Splash
14 | {
15 | ///
16 | /// Interface for SplashView
17 | ///
18 | public interface ISplashView
19 | {
20 | }
21 | }
--------------------------------------------------------------------------------
/Src/Wide/Splash/SplashView.xaml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
35 |
36 |
37 |
38 |
39 |
40 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/Src/Wide/Splash/SplashView.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 | namespace Wide.Splash
14 | {
15 | ///
16 | /// Interaction logic for SplashView.xaml
17 | ///
18 | internal partial class SplashView : ISplashView
19 | {
20 | public SplashView(SplashViewModel model)
21 | {
22 | InitializeComponent();
23 | DataContext = model;
24 | }
25 | }
26 | }
--------------------------------------------------------------------------------
/Src/Wide/Splash/SplashViewModel.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 Microsoft.Practices.Prism.Events;
15 | using Wide.Interfaces;
16 | using Wide.Interfaces.Events;
17 |
18 | namespace Wide.Splash
19 | {
20 | public class SplashViewModel : ViewModelBase
21 | {
22 | #region Declarations
23 |
24 | private string _status;
25 |
26 | #endregion
27 |
28 | #region CTOR
29 |
30 | public SplashViewModel(IEventAggregator eventAggregator_)
31 | {
32 | eventAggregator_.GetEvent().Subscribe(e_ => UpdateMessage(e_.Message));
33 | }
34 |
35 | #endregion
36 |
37 | #region Public Properties
38 |
39 | public string Status
40 | {
41 | get { return _status; }
42 | set
43 | {
44 | _status = value;
45 | RaisePropertyChanged("Status");
46 | }
47 | }
48 |
49 | #endregion
50 |
51 | #region Private Methods
52 |
53 | private void UpdateMessage(string message)
54 | {
55 | if (string.IsNullOrEmpty(message))
56 | {
57 | return;
58 | }
59 |
60 | Status = string.Concat(Environment.NewLine, message, "...") + Status;
61 | }
62 |
63 | #endregion
64 | }
65 | }
--------------------------------------------------------------------------------
/Src/Wide/Utils/DatabindingDebugConverter.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.Collections.Generic;
15 | using System.Diagnostics;
16 | using System.Globalization;
17 | using System.Linq;
18 | using System.Text;
19 | using System.Threading.Tasks;
20 | using System.Windows.Data;
21 |
22 | namespace Wide.Utils
23 | {
24 | ///
25 | /// This converter does nothing except breaking the debugger into the convert method
26 | ///
27 | public class DatabindingDebugConverter : IValueConverter
28 | {
29 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
30 | {
31 | //Debugger.Break();
32 | return value;
33 | }
34 |
35 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
36 | {
37 | //Debugger.Break();
38 | return value;
39 | }
40 | }
41 | }
--------------------------------------------------------------------------------
/Src/Wide/Utils/PropertyChangedEvent.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel;
2 |
3 | namespace Wide.Utils
4 | {
5 | public class PropertyChangedExtendedEventArgs : PropertyChangedEventArgs
6 | {
7 | public virtual object OldValue { get; private set; }
8 | public virtual object NewValue { get; private set; }
9 | public virtual string Description { get; private set; }
10 |
11 | public PropertyChangedExtendedEventArgs(string propertyName, object oldValue, object newValue, string description) : base(propertyName)
12 | {
13 | OldValue = oldValue;
14 | NewValue = newValue;
15 | Description = description;
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------