├── .gitignore ├── 00_Docu ├── DropDownList.png └── MouseoverStyles.png ├── BmLib ├── AssemblyInfo.cs ├── Base │ └── RelayCommand.cs ├── Behaviors │ ├── MergeStyleBehaviour.cs │ ├── SelectionChangedCommand.cs │ └── TreeViewVirtualItemBehaviour.cs ├── BmLib.csproj ├── BmLib.csproj.user ├── Controls │ ├── BindingProxy.cs │ ├── Breadcrumb.xaml │ ├── Breadcrumb.xaml.cs │ ├── BreadcrumbSwitchStyle.xaml │ ├── Breadcrumbs │ │ ├── BreadcrumbTree.xaml │ │ ├── BreadcrumbTree.xaml.cs │ │ ├── BreadcrumbTreeItem.xaml │ │ └── BreadcrumbTreeItem.xaml.cs │ ├── DropDown.xaml │ ├── DropDown.xaml.cs │ ├── DropDownList.xaml │ ├── DropDownList.xaml.cs │ ├── DropDownListButtonStyle.xaml │ ├── HotTrack.xaml │ ├── HotTrack.xaml.cs │ ├── OverflowableStackPanel.cs │ ├── Switch.xaml │ └── Switch.xaml.cs ├── Converters │ ├── AssociatedIconConverter.cs │ ├── BoolToOneOfTwoBindingsConverter.cs │ ├── BoolToVisibilityPropConverter.cs │ └── InvertBoolConverter.cs ├── Enums │ └── UpdateMode.cs ├── Interfaces │ ├── IBreadcrumbModel.cs │ ├── IBrowseRequestTaskQueue.cs │ ├── IOverflown.cs │ ├── IParent.cs │ └── IProgress.cs ├── Resources │ └── Icons │ │ ├── Dark │ │ ├── Close_White_16x.ico │ │ ├── Close_White_16x.svg │ │ ├── Refresh_white_16x.ico │ │ └── Refresh_white_16x.svg │ │ └── Light │ │ ├── Close.ico │ │ ├── Close_16x.svg │ │ ├── ExpandChevronDown.ico │ │ ├── Refresh_16x.svg │ │ └── Refresh_black_16x.ico ├── Styles │ ├── ProgressBar.xaml │ └── RefreshCancelButton.xaml └── Themes │ ├── DarkBrushs.xaml │ ├── DarkIcons.xaml │ ├── DarkTheme.xaml │ ├── Default │ ├── Brushes.xaml │ ├── Buttons.xaml │ └── Geometry.xaml │ ├── Generic.xaml │ ├── LightBrushs.xaml │ ├── LightIcons.xaml │ ├── LightTheme.xaml │ └── ResourceKeys.cs ├── Breadcrumb.sln ├── CleanAll.bat ├── Components ├── Icons │ ├── Dark │ │ ├── SpecialFolder_ApplicationData.ico │ │ ├── SpecialFolder_Contacts.ico │ │ ├── SpecialFolder_ControlPanel.ico │ │ ├── SpecialFolder_Default.ico │ │ ├── SpecialFolder_Desktop.ico │ │ ├── SpecialFolder_DesktopFolder.ico │ │ ├── SpecialFolder_Downloads.ico │ │ ├── SpecialFolder_Favourites.ico │ │ ├── SpecialFolder_Fonts.ico │ │ ├── SpecialFolder_Libraries.ico │ │ ├── SpecialFolder_LibraryDocuments.ico │ │ ├── SpecialFolder_LibraryDocumentsGeneric.ico │ │ ├── SpecialFolder_LibraryMusic.ico │ │ ├── SpecialFolder_LibraryPicture.ico │ │ ├── SpecialFolder_LibraryVideos.ico │ │ ├── SpecialFolder_Links.ico │ │ ├── SpecialFolder_MyComputer.ico │ │ ├── SpecialFolder_MyDocuments.ico │ │ ├── SpecialFolder_MyMusic.ico │ │ ├── SpecialFolder_MyPictures.ico │ │ ├── SpecialFolder_MyVideos.ico │ │ ├── SpecialFolder_RecentPlaces.ico │ │ ├── SpecialFolder_RecycleBinEmpty.ico │ │ ├── SpecialFolder_RecycleBinWithContent.ico │ │ ├── SpecialFolder_SavedGames.ico │ │ ├── SpecialFolder_Searches.ico │ │ └── SpecialFolder_UserProfile.ico │ ├── DarkIcons.xaml │ ├── Generic │ │ ├── SpecialFolder_ApplicationData.ico │ │ ├── SpecialFolder_Contacts.ico │ │ ├── SpecialFolder_ControlPanel.ico │ │ ├── SpecialFolder_Default.ico │ │ ├── SpecialFolder_Desktop.ico │ │ ├── SpecialFolder_DesktopFolder.ico │ │ ├── SpecialFolder_Downloads.ico │ │ ├── SpecialFolder_Favourites.ico │ │ ├── SpecialFolder_Fonts.ico │ │ ├── SpecialFolder_Libraries.ico │ │ ├── SpecialFolder_LibraryDocuments.ico │ │ ├── SpecialFolder_LibraryDocumentsGeneric.ico │ │ ├── SpecialFolder_LibraryMusic.ico │ │ ├── SpecialFolder_LibraryPicture.ico │ │ ├── SpecialFolder_LibraryVideos.ico │ │ ├── SpecialFolder_Links.ico │ │ ├── SpecialFolder_MyComputer.ico │ │ ├── SpecialFolder_MyDocuments.ico │ │ ├── SpecialFolder_MyMusic.ico │ │ ├── SpecialFolder_MyPictures.ico │ │ ├── SpecialFolder_MyVideos.ico │ │ ├── SpecialFolder_RecentPlaces.ico │ │ ├── SpecialFolder_RecycleBinEmpty.ico │ │ ├── SpecialFolder_RecycleBinWithContent.ico │ │ ├── SpecialFolder_SavedGames.ico │ │ ├── SpecialFolder_Searches.ico │ │ └── SpecialFolder_UserProfile.ico │ ├── GenericIcons.xaml │ ├── Icons.csproj │ ├── Light │ │ ├── SpecialFolder_ApplicationData.ico │ │ ├── SpecialFolder_Contacts.ico │ │ ├── SpecialFolder_ControlPanel.ico │ │ ├── SpecialFolder_Default.ico │ │ ├── SpecialFolder_Desktop.ico │ │ ├── SpecialFolder_DesktopFolder.ico │ │ ├── SpecialFolder_Downloads.ico │ │ ├── SpecialFolder_Favourites.ico │ │ ├── SpecialFolder_Fonts.ico │ │ ├── SpecialFolder_Libraries.ico │ │ ├── SpecialFolder_LibraryDocuments.ico │ │ ├── SpecialFolder_LibraryDocumentsGeneric.ico │ │ ├── SpecialFolder_LibraryMusic.ico │ │ ├── SpecialFolder_LibraryPicture.ico │ │ ├── SpecialFolder_LibraryVideos.ico │ │ ├── SpecialFolder_Links.ico │ │ ├── SpecialFolder_MyComputer.ico │ │ ├── SpecialFolder_MyDocuments.ico │ │ ├── SpecialFolder_MyMusic.ico │ │ ├── SpecialFolder_MyPictures.ico │ │ ├── SpecialFolder_MyVideos.ico │ │ ├── SpecialFolder_RecentPlaces.ico │ │ ├── SpecialFolder_RecycleBinEmpty.ico │ │ ├── SpecialFolder_RecycleBinWithContent.ico │ │ ├── SpecialFolder_SavedGames.ico │ │ ├── SpecialFolder_Searches.ico │ │ └── SpecialFolder_UserProfile.ico │ ├── LightIcons.xaml │ └── Properties │ │ └── AssemblyInfo.cs ├── ServiceLocator │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── ServiceContainer.cs │ └── ServiceLocator.csproj └── Settings │ ├── Settings │ ├── Interfaces │ │ ├── IOptions.cs │ │ ├── IOptionsPanel.cs │ │ ├── IProfile.cs │ │ ├── ISettingsManager.cs │ │ └── IViewPosSizeModel.cs │ ├── Internal │ │ └── SettingsManagerImpl.cs │ ├── ProgramSettings │ │ ├── LanguageCollection.cs │ │ └── OptionsPanel.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── SerializableDictionary.cs │ ├── Settings.csproj │ ├── SettingsManager.cs │ ├── UserProfile │ │ ├── IViewSize.cs │ │ ├── LocalizabilityAttribute.cs │ │ ├── Profile.cs │ │ ├── ViewPosSizeModel.cs │ │ └── ViewSize.cs │ └── packages.config │ └── SettingsModel │ ├── ExtensionMethods │ └── SecureStringExtensionMethod.cs │ ├── Interfaces │ ├── IEngine.cs │ ├── IOptionGroup.cs │ └── IOptionsSchema.cs │ ├── Models │ ├── Engine.cs │ ├── Factory.cs │ ├── FileReference.cs │ ├── OptionGroup.cs │ ├── OptionsSchema.cs │ └── XML │ │ ├── Converters │ │ ├── AlternativeDataTypeHandler.cs │ │ ├── IAlternativeDataTypeHandler.cs │ │ └── SecureStringHandler.cs │ │ └── XMLLayer.cs │ ├── Overview.cd │ ├── Properties │ └── AssemblyInfo.cs │ ├── SettingsModel.csproj │ └── packages.config ├── Demos ├── BreadcrumbTestLib │ ├── Behaviors │ │ └── TreeViewItemBehaviour.cs │ ├── BreadcrumbTestLib.csproj │ ├── Models │ │ ├── HintDirection.cs │ │ ├── IRoot.cs │ │ └── LocationIndicator.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Resources │ │ └── FolderOpen.ico │ ├── Tasks │ │ └── OneTaskLimitedScheduler.cs │ ├── Utils │ │ ├── AsyncLock.cs │ │ ├── AsyncSemaphore.cs │ │ ├── FastObservableCollection.cs │ │ └── RelayCommand.cs │ ├── ViewModels │ │ ├── AppViewModel.cs │ │ ├── Base │ │ │ ├── RelayCommand.cs │ │ │ └── ViewModelBase.cs │ │ ├── BreadCrumbControllerViewModel.cs │ │ ├── Breadcrumbs │ │ │ ├── BreadcrumbTreeItemHelperViewModel.cs │ │ │ ├── BreadcrumbTreeItemPath.cs │ │ │ ├── BreadcrumbTreeItemViewModel.cs │ │ │ ├── BreadcrumbViewModel.cs │ │ │ ├── ProgressViewModel.cs │ │ │ ├── ShellPathValidationRule.cs │ │ │ └── TreeSelectors │ │ │ │ └── TreeSelectorViewModel.cs │ │ ├── BrowseRequestTaskQueueViewModel.cs │ │ ├── Interfaces │ │ │ ├── IBreadcrumbTreeItemHelperViewModel.cs │ │ │ ├── IBreadcrumbTreeItemPath.cs │ │ │ ├── IBreadcrumbTreeItemViewModel.cs │ │ │ ├── IBreadcrumbViewModel.cs │ │ │ ├── ISupportTreeSelector.cs │ │ │ └── ITreeSelector.cs │ │ ├── SuggestQueryResultModel.cs │ │ ├── SuggestSourceDirectory.cs │ │ └── SuggestionListItem.cs │ ├── Views │ │ ├── DemoView.xaml │ │ └── DemoView.xaml.cs │ └── packages.config ├── GenericDemo │ ├── App.config │ ├── App.xaml │ ├── App.xaml.cs │ ├── GenericDemo.csproj │ ├── MainWindow.xaml │ ├── MainWindow.xaml.cs │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ ├── Resources.Designer.cs │ │ ├── Resources.resx │ │ ├── Settings.Designer.cs │ │ └── Settings.settings │ └── packages.config ├── SSCCoreLib │ ├── Browse │ │ ├── BrowseRequest.cs │ │ ├── BrowseResult.cs │ │ ├── BrowsingEventArgs.cs │ │ ├── FinalBrowseResult.cs │ │ ├── ICanNavigate.cs │ │ ├── INavigateable.cs │ │ └── INavigationController.cs │ ├── Interfaces │ │ └── ITaskQueueViewModel.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Resources │ │ └── FolderOpen.ico │ ├── SSCoreLib.csproj │ ├── ViewModels │ │ ├── Base │ │ │ ├── RelayCommand.cs │ │ │ └── ViewModelBase.cs │ │ └── TaskQueueViewModel.cs │ └── packages.config └── ThemedDemo │ ├── App.config │ ├── App.xaml │ ├── App.xaml.cs │ ├── BindToMLib │ ├── BmLib │ │ └── DarkLightBrushs.xaml │ ├── MWindowLib │ │ └── DarkLightBrushs.xaml │ └── SuggestionLibDarkLightBrushs.xaml │ ├── Demos │ ├── Behaviors │ │ └── SelectionChangedBehavior.cs .cs │ ├── Models │ │ └── FolderBrowserResult.cs │ └── ViewModels │ │ └── DemoViewModel.cs │ ├── Models │ ├── AppCore.cs │ └── SettingDefaults.cs │ ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── Settings.Designer.cs │ └── Settings.settings │ ├── ServiceInjector.cs │ ├── ThemedDemo.csproj │ ├── ViewModels │ ├── AppLifeCycleViewModel.cs │ ├── AppViewModel.cs │ ├── Base │ │ ├── ModelBase.cs │ │ ├── RelayCommand.cs │ │ └── ViewModelBase.cs │ ├── ThemeDefinitionViewModel.cs │ └── ThemeViewModel.cs │ ├── Views │ ├── MainWindow.xaml │ └── MainWindow.xaml.cs │ └── packages.config ├── LICENSE ├── README.md └── appveyor.yml /.gitignore: -------------------------------------------------------------------------------- 1 | .vs/ 2 | packages/ 3 | debug/ 4 | release/ 5 | build/ 6 | bin/ 7 | obj/ 8 | cache/ 9 | log/ 10 | tmp/ 11 | 12 | *~ 13 | *.lock 14 | *.DS_Store 15 | *.swp 16 | *.out 17 | *.sou 18 | -------------------------------------------------------------------------------- /00_Docu/DropDownList.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/00_Docu/DropDownList.png -------------------------------------------------------------------------------- /00_Docu/MouseoverStyles.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/00_Docu/MouseoverStyles.png -------------------------------------------------------------------------------- /BmLib/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | [assembly: ThemeInfo( 4 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located 5 | //(used if a resource is not found in the page, 6 | // or application resource dictionaries) 7 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located 8 | //(used if a resource is not found in the page, 9 | // app, or any theme specific resource dictionaries) 10 | )] 11 | -------------------------------------------------------------------------------- /BmLib/Base/RelayCommand.cs: -------------------------------------------------------------------------------- 1 | namespace BmLib.Base 2 | { 3 | using System; 4 | using System.Diagnostics; 5 | using System.Windows.Input; 6 | 7 | /// 8 | /// A command whose sole purpose is to 9 | /// relay its functionality to other 10 | /// objects by invoking delegates. The 11 | /// default return value for the CanExecute 12 | /// method is 'true'. 13 | /// 14 | /// Source: http://www.codeproject.com/Articles/31837/Creating-an-Internationalized-Wizard-in-WPF 15 | /// 16 | internal class RelayCommand : ICommand 17 | { 18 | #region Fields 19 | private readonly Action mExecute = null; 20 | private readonly Predicate mCanExecute = null; 21 | #endregion // Fields 22 | 23 | #region Constructors 24 | /// 25 | /// Class constructor 26 | /// 27 | /// 28 | public RelayCommand(Action execute) 29 | : this(execute, null) 30 | { 31 | } 32 | 33 | /// 34 | /// Creates a new command. 35 | /// 36 | /// The execution logic. 37 | /// The execution status logic. 38 | public RelayCommand(Action execute, Predicate canExecute) 39 | { 40 | if (execute == null) 41 | throw new ArgumentNullException("execute"); 42 | 43 | this.mExecute = execute; 44 | this.mCanExecute = canExecute; 45 | } 46 | 47 | #endregion // Constructors 48 | 49 | #region events 50 | /// 51 | /// Eventhandler to re-evaluate whether this command can execute or not 52 | /// 53 | public event EventHandler CanExecuteChanged 54 | { 55 | add 56 | { 57 | if (this.mCanExecute != null) 58 | CommandManager.RequerySuggested += value; 59 | } 60 | 61 | remove 62 | { 63 | if (this.mCanExecute != null) 64 | CommandManager.RequerySuggested -= value; 65 | } 66 | } 67 | #endregion 68 | 69 | #region methods 70 | /// 71 | /// Determine whether this pre-requisites to execute this command are given or not. 72 | /// 73 | /// 74 | /// 75 | [DebuggerStepThrough] 76 | public bool CanExecute(object parameter) 77 | { 78 | return this.mCanExecute == null ? true : this.mCanExecute((T)parameter); 79 | } 80 | 81 | /// 82 | /// Execute the command method managed in this class. 83 | /// 84 | /// 85 | public void Execute(object parameter) 86 | { 87 | this.mExecute((T)parameter); 88 | } 89 | #endregion methods 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /BmLib/BmLib.csproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Designer 7 | 8 | 9 | Designer 10 | 11 | 12 | Designer 13 | 14 | 15 | Designer 16 | 17 | 18 | Designer 19 | 20 | 21 | Designer 22 | 23 | 24 | Designer 25 | 26 | 27 | Designer 28 | 29 | 30 | Designer 31 | 32 | 33 | Designer 34 | 35 | 36 | Designer 37 | 38 | 39 | Designer 40 | 41 | 42 | Designer 43 | 44 | 45 | Designer 46 | 47 | 48 | Designer 49 | 50 | 51 | Designer 52 | 53 | 54 | Designer 55 | 56 | 57 | Designer 58 | 59 | 60 | Designer 61 | 62 | 63 | Designer 64 | 65 | 66 | -------------------------------------------------------------------------------- /BmLib/Controls/BindingProxy.cs: -------------------------------------------------------------------------------- 1 | namespace BmLib.Controls 2 | { 3 | using System.Windows; 4 | 5 | /// 6 | /// Implements an XAML proxy which can be used to bind items (TreeViewItem, ListViewItem etc) 7 | /// with a viewmodel that manages the collecrions. 8 | /// 9 | /// Source: http://www.thomaslevesque.com/2011/03/21/wpf-how-to-bind-to-data-when-the-datacontext-is-not-inherited/ 10 | /// Issue: http://stackoverflow.com/questions/9994241/mvvm-binding-command-to-contextmenu-item 11 | /// 12 | public class BindingProxy : Freezable 13 | { 14 | /// 15 | /// Backing store of the dependency property. 16 | /// 17 | public static readonly DependencyProperty DataProperty = 18 | DependencyProperty.Register("Data", typeof(object), typeof(BindingProxy), new UIPropertyMetadata(null)); 19 | 20 | /// 21 | /// Gets the data object this class is forwarding to everyone 22 | /// who has a reference to this object. 23 | /// 24 | public object Data 25 | { 26 | get { return (object)this.GetValue(DataProperty); } 27 | set { this.SetValue(DataProperty, value); } 28 | } 29 | 30 | /// 31 | /// Overrides of Freezable 32 | /// 33 | /// 34 | protected override Freezable CreateInstanceCore() 35 | { 36 | return new BindingProxy(); 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /BmLib/Controls/Breadcrumbs/BreadcrumbTree.xaml: -------------------------------------------------------------------------------- 1 | 8 | 9 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /BmLib/Controls/Breadcrumbs/BreadcrumbTree.xaml.cs: -------------------------------------------------------------------------------- 1 | namespace BmLib.Controls.Breadcrumbs 2 | { 3 | using System.ComponentModel; 4 | using System.Windows; 5 | using System.Windows.Controls; 6 | 7 | /// 8 | /// Implements a control that displays breadcrumbs using a 9 | /// as a source data structure. 10 | /// 11 | public class BreadcrumbTree : TreeView 12 | { 13 | #region fields 14 | /// 15 | /// Backing store of the dependency property. 16 | /// 17 | public static readonly DependencyProperty DropDownListItemDataTemplateProperty = 18 | DependencyProperty.Register("DropDownListItemDataTemplate", typeof(DataTemplate), 19 | typeof(BreadcrumbTree), new PropertyMetadata(null)); 20 | #endregion fields 21 | 22 | #region Constructor 23 | /// 24 | /// Static class constructor. 25 | /// 26 | static BreadcrumbTree() 27 | { 28 | DefaultStyleKeyProperty.OverrideMetadata(typeof(BreadcrumbTree), 29 | new FrameworkPropertyMetadata(typeof(BreadcrumbTree))); 30 | } 31 | #endregion 32 | 33 | #region properties 34 | /// 35 | /// Gets or sets the used to display 36 | /// the drop down list of each item in the breadcrumb tree control. 37 | /// 38 | /// Returns: 39 | /// A that specifies the visualization of the data objects. 40 | /// The default is null (none). 41 | /// 42 | [Bindable(true)] 43 | public DataTemplate DropDownListItemDataTemplate 44 | { 45 | get { return (DataTemplate)GetValue(DropDownListItemDataTemplateProperty); } 46 | set { SetValue(DropDownListItemDataTemplateProperty, value); } 47 | } 48 | #endregion properties 49 | 50 | #region methods 51 | //// /// 52 | //// /// Measures the child elements of a 53 | //// /// in anticipation of arranging them during the 54 | //// /// 55 | //// /// 56 | //// /// An upper limit that should not be exceeded. 57 | //// /// The System.Windows.Size that represents the desired size of the element. 58 | //// protected override Size MeasureOverride(Size constraint) 59 | //// { 60 | //// if (double.IsPositiveInfinity(constraint.Width)) // || double.IsPositiveInfinity(constraint.Height)) 61 | //// { 62 | //// // This constrain hints a layout proplem that can cause items to NOT Overflow. 63 | //// Debug.WriteLine(" +---> Warning: BreadcrumbTree.MeasureOverride(Size constraint) with constraint == Infinity"); 64 | //// } 65 | //// 66 | //// var sz = base.MeasureOverride(constraint); 67 | //// 68 | //// if (constraint.Width <= sz.Width) 69 | //// { 70 | //// Debug.WriteLine(""); 71 | //// } 72 | //// 73 | //// return sz; 74 | //// } 75 | 76 | /// 77 | /// Creates the element that is used to display a . 78 | /// 79 | /// A new object instance. 80 | protected override DependencyObject GetContainerForItemOverride() 81 | { 82 | return new BreadcrumbTreeItem(); 83 | } 84 | #endregion methods 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /BmLib/Controls/Switch.xaml: -------------------------------------------------------------------------------- 1 |  7 | 8 | 9 | 10 | 11 | 12 | 13 | 17 | 21 | 22 | 23 | 24 | 28 | 29 | -------------------------------------------------------------------------------- /BmLib/Converters/BoolToOneOfTwoBindingsConverter.cs: -------------------------------------------------------------------------------- 1 | namespace BmLib.Converters 2 | { 3 | using System; 4 | using System.Globalization; 5 | using System.Windows; 6 | using System.Windows.Data; 7 | 8 | /// 9 | /// Implements a Converter that can be used to convert a true/false 10 | /// input flag into either of two additional bindings. 11 | /// 12 | /// This converter requires 3 bindings: 13 | /// 1> Boolean Flag 14 | /// 2> Binding to return if 1> is true 15 | /// 3> Binding to return if 1> is true 16 | /// 17 | [ValueConversion(typeof(bool), typeof(object))] 18 | public class BoolToOneOfTwoBindingsConverter : DependencyObject, IValueConverter 19 | { 20 | #region fields 21 | /// 22 | /// Implements a dependency property that is returned when the input value is true. 23 | /// 24 | public static readonly DependencyProperty TrueSourceProperty = 25 | DependencyProperty.Register("TrueSource", typeof(object), typeof(BoolToOneOfTwoBindingsConverter), new PropertyMetadata(null)); 26 | 27 | /// 28 | /// Implements a dependency property that is returned when the input value is false. 29 | /// 30 | public static readonly DependencyProperty FalseSourceProperty = 31 | DependencyProperty.Register("FalseSource", typeof(object), typeof(BoolToOneOfTwoBindingsConverter), new PropertyMetadata(null)); 32 | #endregion fields 33 | 34 | #region properties 35 | /// 36 | /// Implements a dependency property that is returned when the input value is true. 37 | /// 38 | public object TrueSource 39 | { 40 | get { return (object)GetValue(TrueSourceProperty); } 41 | set { SetValue(TrueSourceProperty, value); } 42 | } 43 | 44 | /// 45 | /// Implements a dependency property that is returned when the input value is false. 46 | /// 47 | public object FalseSource 48 | { 49 | get { return (object)GetValue(FalseSourceProperty); } 50 | set { SetValue(FalseSourceProperty, value); } 51 | } 52 | #endregion properties 53 | 54 | #region methods 55 | /// 56 | /// The convert expects 3 bindings: 57 | /// 1> True/False value to determine whether updates should be shown to UI or not. 58 | /// TrueSource (property) The binding that should be shown if 1> was True. 59 | /// FalseSource (property) The binding that should be shown if 1> was False. 60 | /// 61 | /// 62 | /// 63 | /// 64 | /// 65 | /// 66 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 67 | { 68 | if ((value is bool) == false) 69 | return Binding.DoNothing; 70 | 71 | var inputFlag = (bool)value; 72 | 73 | if (inputFlag == true) // Return corresponding binding to input flag 74 | return TrueSource; 75 | else 76 | return FalseSource; 77 | } 78 | 79 | /// 80 | /// Not implemented. 81 | /// 82 | /// 83 | /// 84 | /// 85 | /// 86 | /// 87 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 88 | { 89 | throw new NotImplementedException(); 90 | } 91 | #endregion methods 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /BmLib/Converters/BoolToVisibilityPropConverter.cs: -------------------------------------------------------------------------------- 1 | namespace BmLib.Converters 2 | { 3 | using System; 4 | using System.Globalization; 5 | using System.Windows; 6 | using System.Windows.Data; 7 | 8 | /// 9 | /// Converts a boolean value into a configurable 10 | /// value of type . 11 | /// 12 | /// Source: http://stackoverflow.com/questions/3128023/wpf-booleantovisibilityconverter-that-converts-to-hidden-instead-of-collapsed-wh 13 | /// 14 | [ValueConversion(typeof(bool), typeof(Visibility))] 15 | public sealed class BoolToVisibilityPropConverter : IValueConverter 16 | { 17 | #region constructor 18 | /// 19 | /// Class constructor 20 | /// 21 | public BoolToVisibilityPropConverter() 22 | { 23 | // set defaults 24 | TrueValue = Visibility.Visible; 25 | FalseValue = Visibility.Collapsed; 26 | } 27 | #endregion constructor 28 | 29 | #region properties 30 | /// 31 | /// Gets/sets the value that is associated 32 | /// (converted into) with the boolean true value. 33 | /// 34 | public Visibility TrueValue { get; set; } 35 | 36 | /// 37 | /// Gets/sets the value that is associated 38 | /// (converted into) with the boolean false value. 39 | /// 40 | public Visibility FalseValue { get; set; } 41 | #endregion properties 42 | 43 | #region methods 44 | /// 45 | /// Convertzs a bool value into as configured in the 46 | /// and properties. 47 | /// 48 | /// 49 | /// 50 | /// 51 | /// 52 | /// 53 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 54 | { 55 | if (!(value is bool)) 56 | return null; 57 | return (bool)value ? TrueValue : FalseValue; 58 | } 59 | 60 | /// 61 | /// Convertzs a value into bool as configured in the 62 | /// and properties. 63 | /// 64 | /// 65 | /// 66 | /// 67 | /// 68 | /// 69 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 70 | { 71 | if (Equals(value, TrueValue)) 72 | return true; 73 | 74 | if (Equals(value, FalseValue)) 75 | return false; 76 | 77 | return null; 78 | } 79 | #endregion methods 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /BmLib/Converters/InvertBoolConverter.cs: -------------------------------------------------------------------------------- 1 | namespace BmLib.Converters 2 | { 3 | using System; 4 | using System.Globalization; 5 | using System.Windows.Data; 6 | 7 | /// 8 | /// Implements a boolean negation converter. 9 | /// 10 | [ValueConversion(typeof(bool), typeof(bool))] 11 | public class InvertBoolConverter : IValueConverter 12 | { 13 | #region IValueConverter Members 14 | /// 15 | /// Converts boolean true to false. 16 | /// 17 | /// 18 | /// 19 | /// 20 | /// 21 | /// 22 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 23 | { 24 | if (value is bool && (bool)value) 25 | return false; 26 | else 27 | return true; 28 | } 29 | 30 | /// 31 | /// Converts boolean true to false. 32 | /// 33 | /// 34 | /// 35 | /// 36 | /// 37 | /// 38 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 39 | { 40 | if (value is bool && (bool)value) 41 | return false; 42 | else 43 | return true; 44 | } 45 | #endregion 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /BmLib/Enums/UpdateMode.cs: -------------------------------------------------------------------------------- 1 | namespace BmLib.Enums 2 | { 3 | /// 4 | /// Specifies whether list entries are to be replaced or updated on (re)load. 5 | /// 6 | public enum UpdateMode 7 | { 8 | /// 9 | /// Existing list entries are replaced on (re)load. 10 | /// 11 | Replace, 12 | 13 | /// 14 | /// Existing list entries are updated on (re)load. 15 | /// 16 | Update 17 | } 18 | } -------------------------------------------------------------------------------- /BmLib/Interfaces/IBreadcrumbModel.cs: -------------------------------------------------------------------------------- 1 | namespace BmLib.Interfaces 2 | { 3 | using System; 4 | using System.Threading.Tasks; 5 | 6 | /// 7 | /// Defines the core methods that are called when switching the SuggestBox on and off 8 | /// which requires synchronization and path re-mounting between TreeView and SuggestBox. 9 | /// 10 | public interface IBreadcrumbModel 11 | { 12 | /// 13 | /// Raised when a node is selected, use SelectedValue/ViewModel to return the selected item. 14 | /// 15 | event EventHandler SelectionChanged; 16 | 17 | /// 18 | /// Gets a currently selected item that is at the end 19 | /// of the currently selected path. 20 | /// 21 | IParent BreadcrumbSelectedItem { get; } 22 | 23 | /// 24 | /// This navigates the bound tree view model to the requested 25 | /// location when the user switches the display from: 26 | /// 27 | /// - the string based and path oriented suggestbox back to 28 | /// - the tree view item based and path orient tree view. 29 | /// 30 | /// 31 | /// 32 | /// 33 | Task NavigateTreeViewModel(string navigateToThisLocation, 34 | bool goBackToPreviousLocation); 35 | 36 | /// 37 | /// Updates the bound text path property of the SuggestBox with the path of the 38 | /// currently selected item. This method should be called whenever the SuggestBox 39 | /// is switched from invisible to visible. 40 | /// 41 | /// 42 | /// 43 | string UpdateSuggestPath(out object locations); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /BmLib/Interfaces/IBrowseRequestTaskQueue.cs: -------------------------------------------------------------------------------- 1 | namespace BmLib.Interfaces 2 | { 3 | using System.Windows.Input; 4 | 5 | /// 6 | /// Defines an interface of an object that supports the maintainance of cancelable 7 | /// background tasks in order to support management of Cancel-able background tasks 8 | /// that can run longer than 1 second in dependence of the actual runtime environment. 9 | /// 10 | public interface IBrowseRequestTaskQueue 11 | { 12 | /// 13 | /// Gets whether there is a long running background task processing 14 | /// that could be canceled. 15 | /// 16 | bool IsProcessCancelable { get; } 17 | 18 | /// 19 | /// Gets a command that will cancel all currently queued tasks (if any). 20 | /// Canceled tasks may run to completeness or leave off in the middle of 21 | /// the processing - it is the responsibility of the caller to ensure 22 | /// clean states and correct processing after cancellation has taken place. 23 | /// 24 | ICommand CancelProcess { get; } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /BmLib/Interfaces/IOverflown.cs: -------------------------------------------------------------------------------- 1 | namespace BmLib.Interfaces 2 | { 3 | /// 4 | /// Implements a viewmodel interface to determine whether a breadcrumb 5 | /// item (a crumb) is overflown (thus invisible since there is not enough 6 | /// space for display) or not. 7 | /// 8 | public interface IOverflown 9 | { 10 | /// 11 | /// Gets whether the breadcrumb item is overflown or not. 12 | /// 13 | bool IsOverflown { get; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /BmLib/Interfaces/IParent.cs: -------------------------------------------------------------------------------- 1 | namespace BmLib.Interfaces 2 | { 3 | /// 4 | /// Models an interfaces to an item that can 5 | /// tell whether it has a paren or not. 6 | /// 7 | public interface IParent 8 | { 9 | /// 10 | /// Gets the parent object where this object is the child in the treeview. 11 | /// 12 | IParent GetParent(); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /BmLib/Interfaces/IProgress.cs: -------------------------------------------------------------------------------- 1 | namespace BmLib.Interfaces 2 | { 3 | using System.ComponentModel; 4 | 5 | /// 6 | /// Exposes the properties of a Progress Display (ProgressBar) to enable 7 | /// UI feedback on long running processings. 8 | /// 9 | public interface IProgress : INotifyPropertyChanged 10 | { 11 | #region properties 12 | /// 13 | /// Gets whether the progress indicator is currenlty displayed or not. 14 | /// 15 | bool IsProgressbarVisible { get; } 16 | 17 | /// 18 | /// Gets whether the current progress display 19 | /// is indeterminate or not. 20 | /// 21 | bool IsIndeterminate { get; } 22 | 23 | /// 24 | /// Gets the current progress value that should be displayed if the progress is turned on 25 | /// via and is not indeterminated as indicated in 26 | /// . 27 | /// 28 | double ProgressValue { get; } 29 | 30 | /// 31 | /// Gets the minimum progress value that should be displayed if the progress is turned on 32 | /// via and is not indeterminated as indicated in 33 | /// . 34 | /// 35 | double MinimumProgressValue { get; } 36 | 37 | /// 38 | /// Gets the maximum progress value that should be displayed if the progress is turned on 39 | /// via and is not indeterminated as indicated in 40 | /// . 41 | /// 42 | double MaximumProgressValue { get; } 43 | #endregion properties 44 | 45 | #region methods 46 | /// 47 | /// Method enables properties such that display of 48 | /// indeterminate progress is turned on. 49 | /// 50 | void ShowIndeterminatedProgress(); 51 | 52 | /// 53 | /// Method enables properties such that display of 54 | /// determinate progress is turned on. 55 | /// 56 | /// 57 | /// 58 | /// 59 | void ShowDeterminatedProgress(double value, 60 | double minimum = 0, 61 | double maximum = 100); 62 | 63 | /// 64 | /// Method updates a display of determinate progress 65 | /// which should previously been turned on via 66 | /// 67 | /// is turned on. 68 | /// 69 | /// 70 | void UpdateDeterminatedProgress(double value); 71 | 72 | /// 73 | /// Method turns the current progress display off. 74 | /// 75 | void ProgressDisplayOff(); 76 | #endregion methods 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /BmLib/Resources/Icons/Dark/Close_White_16x.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/BmLib/Resources/Icons/Dark/Close_White_16x.ico -------------------------------------------------------------------------------- /BmLib/Resources/Icons/Dark/Close_White_16x.svg: -------------------------------------------------------------------------------- 1 | 2 | 15 | 17 | 18 | 20 | image/svg+xml 21 | 23 | 24 | 25 | 26 | 28 | 48 | 50 | 54 | 60 | 63 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /BmLib/Resources/Icons/Dark/Refresh_white_16x.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/BmLib/Resources/Icons/Dark/Refresh_white_16x.ico -------------------------------------------------------------------------------- /BmLib/Resources/Icons/Dark/Refresh_white_16x.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /BmLib/Resources/Icons/Light/Close.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/BmLib/Resources/Icons/Light/Close.ico -------------------------------------------------------------------------------- /BmLib/Resources/Icons/Light/Close_16x.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /BmLib/Resources/Icons/Light/ExpandChevronDown.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/BmLib/Resources/Icons/Light/ExpandChevronDown.ico -------------------------------------------------------------------------------- /BmLib/Resources/Icons/Light/Refresh_16x.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /BmLib/Resources/Icons/Light/Refresh_black_16x.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/BmLib/Resources/Icons/Light/Refresh_black_16x.ico -------------------------------------------------------------------------------- /BmLib/Styles/ProgressBar.xaml: -------------------------------------------------------------------------------- 1 |  4 | 5 | 6 | 19 | 20 | -------------------------------------------------------------------------------- /BmLib/Styles/RefreshCancelButton.xaml: -------------------------------------------------------------------------------- 1 |  5 | 6 | 7 | 46 | 47 | -------------------------------------------------------------------------------- /BmLib/Themes/DarkIcons.xaml: -------------------------------------------------------------------------------- 1 |  5 | 6 | 9 | 10 | 13 | 14 | 17 | 18 | -------------------------------------------------------------------------------- /BmLib/Themes/DarkTheme.xaml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /BmLib/Themes/Generic.xaml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /BmLib/Themes/LightIcons.xaml: -------------------------------------------------------------------------------- 1 |  5 | 6 | 9 | 10 | 13 | 14 | 17 | 18 | -------------------------------------------------------------------------------- /BmLib/Themes/LightTheme.xaml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /CleanAll.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | pushd "%~dp0" 3 | ECHO. 4 | ECHO. 5 | ECHO. 6 | ECHO This script deletes all temporary build files in their 7 | ECHO corresponding BIN and OBJ Folder contained in the following projects 8 | ECHO. 9 | ECHO BmLib 10 | ECHO. 11 | ECHO. 12 | ECHO Components\ServiceLocator 13 | ECHO Components\Settings\Settings 14 | ECHO Components\Settings\SettingsModel 15 | ECHO Components\Icons 16 | ECHO. 17 | ECHO Demos\GenericDemo 18 | ECHO Demos\ThemedDemo 19 | ECHO Demos\BreadcrumbTestLib 20 | ECHO Demos\SSCCoreLib 21 | ECHO. 22 | REM Ask the user if hes really sure to continue beyond this point XXXXXXXX 23 | set /p choice=Are you sure to continue (Y/N)? 24 | if not '%choice%'=='Y' Goto EndOfBatch 25 | REM Script does not continue unless user types 'Y' in upper case letter 26 | ECHO. 27 | ECHO XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 28 | ECHO. 29 | ECHO XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 30 | 31 | RMDIR /S /Q .vs 32 | RMDIR /S /Q TestResults 33 | 34 | ECHO. 35 | ECHO Deleting BIN and OBJ Folders in BmLib folder 36 | ECHO. 37 | RMDIR /S /Q BmLib\bin 38 | RMDIR /S /Q BmLib\obj 39 | 40 | ECHO Deleting BIN and OBJ Folders in Icons folder 41 | ECHO. 42 | RMDIR /S /Q Components\Icons\bin 43 | RMDIR /S /Q Components\Icons\obj 44 | 45 | ECHO. 46 | 47 | ECHO Deleting BIN and OBJ Folders in ServiceLocator folder 48 | ECHO. 49 | RMDIR /S /Q Components\ServiceLocator\bin 50 | RMDIR /S /Q Components\ServiceLocator\obj 51 | 52 | ECHO Deleting BIN and OBJ Folders in Settings\Settings folder 53 | ECHO. 54 | RMDIR /S /Q Components\Settings\Settings\bin 55 | RMDIR /S /Q Components\Settings\Settings\obj 56 | 57 | ECHO Deleting BIN and OBJ Folders in Settings\SettingsModel folder 58 | ECHO. 59 | RMDIR /S /Q Components\Settings\SettingsModel\bin 60 | RMDIR /S /Q Components\Settings\SettingsModel\obj 61 | 62 | ECHO Deleting BIN and OBJ Folders in GenericDemo folder 63 | ECHO. 64 | RMDIR /S /Q Demos\GenericDemo\bin 65 | RMDIR /S /Q Demos\GenericDemo\obj 66 | 67 | ECHO Deleting BIN and OBJ Folders in BreadcrumbTestLib folder 68 | ECHO. 69 | RMDIR /S /Q Demos\BreadcrumbTestLib\bin 70 | RMDIR /S /Q Demos\BreadcrumbTestLib\obj 71 | 72 | ECHO Deleting BIN and OBJ Folders in ThemedDemo folder 73 | ECHO. 74 | RMDIR /S /Q Demos\ThemedDemo\bin 75 | RMDIR /S /Q Demos\ThemedDemo\obj 76 | 77 | ECHO Deleting BIN and OBJ Folders in SSCCoreLib folder 78 | ECHO. 79 | RMDIR /S /Q Demos\SSCCoreLib\bin 80 | RMDIR /S /Q Demos\SSCCoreLib\obj 81 | 82 | PAUSE 83 | 84 | :EndOfBatch -------------------------------------------------------------------------------- /Components/Icons/Dark/SpecialFolder_ApplicationData.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Dark/SpecialFolder_ApplicationData.ico -------------------------------------------------------------------------------- /Components/Icons/Dark/SpecialFolder_Contacts.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Dark/SpecialFolder_Contacts.ico -------------------------------------------------------------------------------- /Components/Icons/Dark/SpecialFolder_ControlPanel.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Dark/SpecialFolder_ControlPanel.ico -------------------------------------------------------------------------------- /Components/Icons/Dark/SpecialFolder_Default.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Dark/SpecialFolder_Default.ico -------------------------------------------------------------------------------- /Components/Icons/Dark/SpecialFolder_Desktop.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Dark/SpecialFolder_Desktop.ico -------------------------------------------------------------------------------- /Components/Icons/Dark/SpecialFolder_DesktopFolder.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Dark/SpecialFolder_DesktopFolder.ico -------------------------------------------------------------------------------- /Components/Icons/Dark/SpecialFolder_Downloads.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Dark/SpecialFolder_Downloads.ico -------------------------------------------------------------------------------- /Components/Icons/Dark/SpecialFolder_Favourites.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Dark/SpecialFolder_Favourites.ico -------------------------------------------------------------------------------- /Components/Icons/Dark/SpecialFolder_Fonts.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Dark/SpecialFolder_Fonts.ico -------------------------------------------------------------------------------- /Components/Icons/Dark/SpecialFolder_Libraries.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Dark/SpecialFolder_Libraries.ico -------------------------------------------------------------------------------- /Components/Icons/Dark/SpecialFolder_LibraryDocuments.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Dark/SpecialFolder_LibraryDocuments.ico -------------------------------------------------------------------------------- /Components/Icons/Dark/SpecialFolder_LibraryDocumentsGeneric.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Dark/SpecialFolder_LibraryDocumentsGeneric.ico -------------------------------------------------------------------------------- /Components/Icons/Dark/SpecialFolder_LibraryMusic.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Dark/SpecialFolder_LibraryMusic.ico -------------------------------------------------------------------------------- /Components/Icons/Dark/SpecialFolder_LibraryPicture.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Dark/SpecialFolder_LibraryPicture.ico -------------------------------------------------------------------------------- /Components/Icons/Dark/SpecialFolder_LibraryVideos.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Dark/SpecialFolder_LibraryVideos.ico -------------------------------------------------------------------------------- /Components/Icons/Dark/SpecialFolder_Links.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Dark/SpecialFolder_Links.ico -------------------------------------------------------------------------------- /Components/Icons/Dark/SpecialFolder_MyComputer.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Dark/SpecialFolder_MyComputer.ico -------------------------------------------------------------------------------- /Components/Icons/Dark/SpecialFolder_MyDocuments.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Dark/SpecialFolder_MyDocuments.ico -------------------------------------------------------------------------------- /Components/Icons/Dark/SpecialFolder_MyMusic.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Dark/SpecialFolder_MyMusic.ico -------------------------------------------------------------------------------- /Components/Icons/Dark/SpecialFolder_MyPictures.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Dark/SpecialFolder_MyPictures.ico -------------------------------------------------------------------------------- /Components/Icons/Dark/SpecialFolder_MyVideos.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Dark/SpecialFolder_MyVideos.ico -------------------------------------------------------------------------------- /Components/Icons/Dark/SpecialFolder_RecentPlaces.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Dark/SpecialFolder_RecentPlaces.ico -------------------------------------------------------------------------------- /Components/Icons/Dark/SpecialFolder_RecycleBinEmpty.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Dark/SpecialFolder_RecycleBinEmpty.ico -------------------------------------------------------------------------------- /Components/Icons/Dark/SpecialFolder_RecycleBinWithContent.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Dark/SpecialFolder_RecycleBinWithContent.ico -------------------------------------------------------------------------------- /Components/Icons/Dark/SpecialFolder_SavedGames.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Dark/SpecialFolder_SavedGames.ico -------------------------------------------------------------------------------- /Components/Icons/Dark/SpecialFolder_Searches.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Dark/SpecialFolder_Searches.ico -------------------------------------------------------------------------------- /Components/Icons/Dark/SpecialFolder_UserProfile.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Dark/SpecialFolder_UserProfile.ico -------------------------------------------------------------------------------- /Components/Icons/DarkIcons.xaml: -------------------------------------------------------------------------------- 1 |  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 | -------------------------------------------------------------------------------- /Components/Icons/Generic/SpecialFolder_ApplicationData.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Generic/SpecialFolder_ApplicationData.ico -------------------------------------------------------------------------------- /Components/Icons/Generic/SpecialFolder_Contacts.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Generic/SpecialFolder_Contacts.ico -------------------------------------------------------------------------------- /Components/Icons/Generic/SpecialFolder_ControlPanel.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Generic/SpecialFolder_ControlPanel.ico -------------------------------------------------------------------------------- /Components/Icons/Generic/SpecialFolder_Default.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Generic/SpecialFolder_Default.ico -------------------------------------------------------------------------------- /Components/Icons/Generic/SpecialFolder_Desktop.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Generic/SpecialFolder_Desktop.ico -------------------------------------------------------------------------------- /Components/Icons/Generic/SpecialFolder_DesktopFolder.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Generic/SpecialFolder_DesktopFolder.ico -------------------------------------------------------------------------------- /Components/Icons/Generic/SpecialFolder_Downloads.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Generic/SpecialFolder_Downloads.ico -------------------------------------------------------------------------------- /Components/Icons/Generic/SpecialFolder_Favourites.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Generic/SpecialFolder_Favourites.ico -------------------------------------------------------------------------------- /Components/Icons/Generic/SpecialFolder_Fonts.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Generic/SpecialFolder_Fonts.ico -------------------------------------------------------------------------------- /Components/Icons/Generic/SpecialFolder_Libraries.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Generic/SpecialFolder_Libraries.ico -------------------------------------------------------------------------------- /Components/Icons/Generic/SpecialFolder_LibraryDocuments.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Generic/SpecialFolder_LibraryDocuments.ico -------------------------------------------------------------------------------- /Components/Icons/Generic/SpecialFolder_LibraryDocumentsGeneric.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Generic/SpecialFolder_LibraryDocumentsGeneric.ico -------------------------------------------------------------------------------- /Components/Icons/Generic/SpecialFolder_LibraryMusic.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Generic/SpecialFolder_LibraryMusic.ico -------------------------------------------------------------------------------- /Components/Icons/Generic/SpecialFolder_LibraryPicture.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Generic/SpecialFolder_LibraryPicture.ico -------------------------------------------------------------------------------- /Components/Icons/Generic/SpecialFolder_LibraryVideos.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Generic/SpecialFolder_LibraryVideos.ico -------------------------------------------------------------------------------- /Components/Icons/Generic/SpecialFolder_Links.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Generic/SpecialFolder_Links.ico -------------------------------------------------------------------------------- /Components/Icons/Generic/SpecialFolder_MyComputer.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Generic/SpecialFolder_MyComputer.ico -------------------------------------------------------------------------------- /Components/Icons/Generic/SpecialFolder_MyDocuments.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Generic/SpecialFolder_MyDocuments.ico -------------------------------------------------------------------------------- /Components/Icons/Generic/SpecialFolder_MyMusic.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Generic/SpecialFolder_MyMusic.ico -------------------------------------------------------------------------------- /Components/Icons/Generic/SpecialFolder_MyPictures.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Generic/SpecialFolder_MyPictures.ico -------------------------------------------------------------------------------- /Components/Icons/Generic/SpecialFolder_MyVideos.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Generic/SpecialFolder_MyVideos.ico -------------------------------------------------------------------------------- /Components/Icons/Generic/SpecialFolder_RecentPlaces.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Generic/SpecialFolder_RecentPlaces.ico -------------------------------------------------------------------------------- /Components/Icons/Generic/SpecialFolder_RecycleBinEmpty.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Generic/SpecialFolder_RecycleBinEmpty.ico -------------------------------------------------------------------------------- /Components/Icons/Generic/SpecialFolder_RecycleBinWithContent.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Generic/SpecialFolder_RecycleBinWithContent.ico -------------------------------------------------------------------------------- /Components/Icons/Generic/SpecialFolder_SavedGames.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Generic/SpecialFolder_SavedGames.ico -------------------------------------------------------------------------------- /Components/Icons/Generic/SpecialFolder_Searches.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Generic/SpecialFolder_Searches.ico -------------------------------------------------------------------------------- /Components/Icons/Generic/SpecialFolder_UserProfile.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Generic/SpecialFolder_UserProfile.ico -------------------------------------------------------------------------------- /Components/Icons/GenericIcons.xaml: -------------------------------------------------------------------------------- 1 |  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 | -------------------------------------------------------------------------------- /Components/Icons/Light/SpecialFolder_ApplicationData.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Light/SpecialFolder_ApplicationData.ico -------------------------------------------------------------------------------- /Components/Icons/Light/SpecialFolder_Contacts.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Light/SpecialFolder_Contacts.ico -------------------------------------------------------------------------------- /Components/Icons/Light/SpecialFolder_ControlPanel.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Light/SpecialFolder_ControlPanel.ico -------------------------------------------------------------------------------- /Components/Icons/Light/SpecialFolder_Default.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Light/SpecialFolder_Default.ico -------------------------------------------------------------------------------- /Components/Icons/Light/SpecialFolder_Desktop.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Light/SpecialFolder_Desktop.ico -------------------------------------------------------------------------------- /Components/Icons/Light/SpecialFolder_DesktopFolder.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Light/SpecialFolder_DesktopFolder.ico -------------------------------------------------------------------------------- /Components/Icons/Light/SpecialFolder_Downloads.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Light/SpecialFolder_Downloads.ico -------------------------------------------------------------------------------- /Components/Icons/Light/SpecialFolder_Favourites.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Light/SpecialFolder_Favourites.ico -------------------------------------------------------------------------------- /Components/Icons/Light/SpecialFolder_Fonts.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Light/SpecialFolder_Fonts.ico -------------------------------------------------------------------------------- /Components/Icons/Light/SpecialFolder_Libraries.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Light/SpecialFolder_Libraries.ico -------------------------------------------------------------------------------- /Components/Icons/Light/SpecialFolder_LibraryDocuments.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Light/SpecialFolder_LibraryDocuments.ico -------------------------------------------------------------------------------- /Components/Icons/Light/SpecialFolder_LibraryDocumentsGeneric.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Light/SpecialFolder_LibraryDocumentsGeneric.ico -------------------------------------------------------------------------------- /Components/Icons/Light/SpecialFolder_LibraryMusic.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Light/SpecialFolder_LibraryMusic.ico -------------------------------------------------------------------------------- /Components/Icons/Light/SpecialFolder_LibraryPicture.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Light/SpecialFolder_LibraryPicture.ico -------------------------------------------------------------------------------- /Components/Icons/Light/SpecialFolder_LibraryVideos.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Light/SpecialFolder_LibraryVideos.ico -------------------------------------------------------------------------------- /Components/Icons/Light/SpecialFolder_Links.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Light/SpecialFolder_Links.ico -------------------------------------------------------------------------------- /Components/Icons/Light/SpecialFolder_MyComputer.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Light/SpecialFolder_MyComputer.ico -------------------------------------------------------------------------------- /Components/Icons/Light/SpecialFolder_MyDocuments.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Light/SpecialFolder_MyDocuments.ico -------------------------------------------------------------------------------- /Components/Icons/Light/SpecialFolder_MyMusic.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Light/SpecialFolder_MyMusic.ico -------------------------------------------------------------------------------- /Components/Icons/Light/SpecialFolder_MyPictures.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Light/SpecialFolder_MyPictures.ico -------------------------------------------------------------------------------- /Components/Icons/Light/SpecialFolder_MyVideos.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Light/SpecialFolder_MyVideos.ico -------------------------------------------------------------------------------- /Components/Icons/Light/SpecialFolder_RecentPlaces.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Light/SpecialFolder_RecentPlaces.ico -------------------------------------------------------------------------------- /Components/Icons/Light/SpecialFolder_RecycleBinEmpty.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Light/SpecialFolder_RecycleBinEmpty.ico -------------------------------------------------------------------------------- /Components/Icons/Light/SpecialFolder_RecycleBinWithContent.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Light/SpecialFolder_RecycleBinWithContent.ico -------------------------------------------------------------------------------- /Components/Icons/Light/SpecialFolder_SavedGames.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Light/SpecialFolder_SavedGames.ico -------------------------------------------------------------------------------- /Components/Icons/Light/SpecialFolder_Searches.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Light/SpecialFolder_Searches.ico -------------------------------------------------------------------------------- /Components/Icons/Light/SpecialFolder_UserProfile.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Components/Icons/Light/SpecialFolder_UserProfile.ico -------------------------------------------------------------------------------- /Components/Icons/LightIcons.xaml: -------------------------------------------------------------------------------- 1 |  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 | -------------------------------------------------------------------------------- /Components/Icons/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Icons")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("HP")] 12 | [assembly: AssemblyProduct("Icons")] 13 | [assembly: AssemblyCopyright("Copyright © 2014")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("bb9db997-4bdb-4fee-9551-b5c51b22240e")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Components/ServiceLocator/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("ServiceLocator")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("HP")] 12 | [assembly: AssemblyProduct("ServiceLocator")] 13 | [assembly: AssemblyCopyright("Copyright © 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("2516097b-2435-44a4-a9b8-9899bca81a6e")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Components/ServiceLocator/ServiceContainer.cs: -------------------------------------------------------------------------------- 1 | namespace ServiceLocator 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | 6 | /// 7 | /// Source: http://www.codeproject.com/Articles/70223/Using-a-Service-Locator-to-Work-with-MessageBoxes 8 | /// 9 | public class ServiceContainer 10 | { 11 | #region fields 12 | public static readonly ServiceContainer Instance = new ServiceContainer(); 13 | 14 | readonly Dictionary _serviceMap; 15 | readonly object _serviceMapLock; 16 | #endregion fields 17 | 18 | #region constructors 19 | /// 20 | /// Class Constructor 21 | /// 22 | private ServiceContainer() 23 | { 24 | _serviceMap = new Dictionary(); 25 | _serviceMapLock = new object(); 26 | } 27 | #endregion constructors 28 | 29 | #region methods 30 | public void AddService(TServiceContract implementation) 31 | where TServiceContract : class 32 | { 33 | lock (_serviceMapLock) 34 | { 35 | _serviceMap[typeof(TServiceContract)] = implementation; 36 | } 37 | } 38 | 39 | public TServiceContract GetService() 40 | where TServiceContract : class 41 | { 42 | object service; 43 | lock (_serviceMapLock) 44 | { 45 | _serviceMap.TryGetValue(typeof(TServiceContract), out service); 46 | } 47 | 48 | return service as TServiceContract; 49 | } 50 | #endregion methods 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /Components/Settings/Settings/Interfaces/IOptions.cs: -------------------------------------------------------------------------------- 1 | namespace Settings.Interfaces 2 | { 3 | using Settings.ProgramSettings; 4 | using System.Collections.Generic; 5 | 6 | public interface IOptions 7 | { 8 | #region properties 9 | bool IsDirty { get; set; } 10 | string LanguageSelected { get; set; } 11 | bool ReloadOpenFilesOnAppStart { get; set; } 12 | string SourceFilePath { get; set; } 13 | 14 | string DefaultSourceLanguage { get; set; } 15 | string DefaultTargetLanguage { get; set; } 16 | 17 | string DefaultDefaultSourceLanguage { get; } 18 | string DefaultDefaultTargetLanguage { get; } 19 | 20 | int DefaultIconSize { get; } 21 | int IconSizeMin { get; } 22 | int IconSizeMax { get; } 23 | 24 | int DefaultFontSize { get; } 25 | int FontSizeMin { get; } 26 | int FontSizeMax { get; } 27 | #endregion properties 28 | 29 | #region methods 30 | /// 31 | /// Reset the dirty flag (e.g. after saving program options when they where edit). 32 | /// 33 | /// 34 | void SetDirtyFlag(bool flag); 35 | 36 | void SetIconSize(int size); 37 | void SetFontSize(int size); 38 | #endregion methods 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Components/Settings/Settings/Interfaces/IOptionsPanel.cs: -------------------------------------------------------------------------------- 1 | namespace Settings.Interfaces 2 | { 3 | using SettingsModel.Interfaces; 4 | 5 | public interface IOptionsPanel 6 | { 7 | IEngine Options { get; } 8 | } 9 | } -------------------------------------------------------------------------------- /Components/Settings/Settings/Interfaces/IProfile.cs: -------------------------------------------------------------------------------- 1 | namespace Settings.Interfaces 2 | { 3 | using Settings.UserProfile; 4 | using SettingsModel.Models; 5 | using System; 6 | using System.Collections.Generic; 7 | 8 | public interface IProfile 9 | { 10 | #region properties 11 | string GetLastActivePath(); 12 | string LastActiveSolution { get; set; } 13 | 14 | 15 | string LastActiveTargetFile { get; set; } 16 | 17 | List LastActiveSourceFiles { get; set; } 18 | 19 | /// 20 | /// Gets the key name of the MainWindow item in the collection. 21 | /// Ths name can be used as key in the WindowPosSz property 22 | /// to read and write MainWindow position and size information. 23 | /// 24 | string MainWindowName { get; } 25 | 26 | /// 27 | /// Gets a collection of window position and size items. 28 | /// 29 | SerializableDictionary WindowPosSz { get; } 30 | #endregion properties 31 | 32 | #region methods 33 | /// 34 | /// Checks the MainWindow for visibility when re-starting application 35 | /// (with different screen configuration). 36 | /// 37 | /// 38 | /// 39 | void CheckSettingsOnLoad(double SystemParameters_VirtualScreenLeft, double SystemParameters_VirtualScreenTop); 40 | 41 | /// 42 | /// Updates or inserts the requested window pos size item in the collection. 43 | /// 44 | /// 45 | /// 46 | /// 47 | void UpdateInsertWindowPosSize(string windowName, ViewPosSizeModel model); 48 | #endregion methods 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Components/Settings/Settings/Interfaces/ISettingsManager.cs: -------------------------------------------------------------------------------- 1 | namespace Settings.Interfaces 2 | { 3 | using Settings.ProgramSettings; 4 | using MLib.Interfaces; 5 | using System.Collections.Generic; 6 | using System.Xml.Serialization; 7 | 8 | public interface ISettingsManager : IOptionsPanel 9 | { 10 | void CheckSettingsOnLoad(double SystemParameters_VirtualScreenLeft, double SystemParameters_VirtualScreenTop); 11 | 12 | ////void LoadOptions(string settingsFileName); 13 | void LoadSessionData(string sessionDataFileName); 14 | 15 | ////bool SaveOptions(string settingsFileName, Settings.Interfaces.IOptions optionsModel); 16 | bool SaveSessionData(string sessionDataFileName, Settings.Interfaces.IProfile model); 17 | 18 | /// 19 | /// Get a list of all supported languages in Edi. 20 | /// 21 | /// 22 | IEnumerable GetSupportedLanguages(); 23 | 24 | #region properties 25 | Settings.Interfaces.IProfile SessionData { get; } 26 | 27 | int IconSizeMin { get; } 28 | int IconSizeMax { get; } 29 | 30 | int FontSizeMin { get; } 31 | int FontSizeMax { get; } 32 | 33 | /// 34 | /// Gets the default icon size for the application. 35 | /// 36 | int DefaultIconSize { get; } 37 | 38 | /// 39 | /// Gets the default font size for the application. 40 | /// 41 | int DefaultFontSize { get; } 42 | 43 | /// 44 | /// Gets the default fixed font size for the application. 45 | /// 46 | int DefaultFixedFontSize { get; } 47 | 48 | /// 49 | /// Gets the internal name and Uri source for all available themes. 50 | /// 51 | [XmlIgnore] 52 | IThemeInfos Themes { get; } 53 | #endregion properties 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /Components/Settings/Settings/Interfaces/IViewPosSizeModel.cs: -------------------------------------------------------------------------------- 1 | namespace Settings.Interfaces 2 | { 3 | using System; 4 | 5 | public interface IViewPosSizeModel 6 | { 7 | bool DefaultConstruct { get; } 8 | double Height { get; set; } 9 | bool IsMaximized { get; set; } 10 | double Width { get; set; } 11 | double X { get; set; } 12 | double Y { get; set; } 13 | 14 | void SetValidPos(double SystemParameters_VirtualScreenLeft, double SystemParameters_VirtualScreenTop); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Components/Settings/Settings/ProgramSettings/LanguageCollection.cs: -------------------------------------------------------------------------------- 1 | namespace Settings.ProgramSettings 2 | { 3 | using System; 4 | 5 | /// 6 | /// Base class for enumeration over languages (and their locale) that 7 | /// are supported with specific (non-English) button and tool tip strings. 8 | /// 9 | /// The class definition is based on BCP 47 which in turn is used to 10 | /// set the UI and thread culture (which in turn selects the correct 11 | /// string resource in MsgBox assembly). 12 | /// 13 | public class LanguageCollection 14 | { 15 | public string Language { get; set; } 16 | public string Locale { get; set; } 17 | public string Name { get; set; } 18 | 19 | /// 20 | /// Get BCP47 language tag for this language 21 | /// See also http://en.wikipedia.org/wiki/IETF_language_tag 22 | /// 23 | public string BCP47 24 | { 25 | get 26 | { 27 | if (string.IsNullOrEmpty(Locale) == false) 28 | return String.Format("{0}-{1}", Language, Locale); 29 | else 30 | return String.Format("{0}", Language); 31 | } 32 | } 33 | 34 | /// 35 | /// Get BCP47 language tag for this language 36 | /// See also http://en.wikipedia.org/wiki/IETF_language_tag 37 | /// 38 | public string DisplayName 39 | { 40 | get 41 | { 42 | return String.Format("{0} {1}", Name, BCP47); 43 | } 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /Components/Settings/Settings/ProgramSettings/OptionsPanel.cs: -------------------------------------------------------------------------------- 1 | namespace Settings.ProgramSettings 2 | { 3 | using Settings.Interfaces; 4 | using SettingsModel.Interfaces; 5 | using SettingsModel.Models; 6 | 7 | internal class OptionsPanel : IOptionsPanel 8 | { 9 | private IEngine mQuery = null; 10 | 11 | public OptionsPanel() 12 | { 13 | mQuery = Factory.CreateEngine(); 14 | } 15 | 16 | /// 17 | /// Gets the options that used to manage program options. 18 | /// 19 | public IEngine Options 20 | { 21 | get 22 | { 23 | return mQuery; 24 | } 25 | 26 | private set 27 | { 28 | mQuery = value; 29 | } 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Components/Settings/Settings/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Settings")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("HP")] 12 | [assembly: AssemblyProduct("Settings")] 13 | [assembly: AssemblyCopyright("The MIT License (MIT) Copyright © 2013 - 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("7f13f2b5-a017-4045-8ead-f5496101a616")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Components/Settings/Settings/SettingsManager.cs: -------------------------------------------------------------------------------- 1 | namespace Settings 2 | { 3 | using MLib.Interfaces; 4 | using Settings.Interfaces; 5 | using Settings.Internal; 6 | 7 | /// 8 | /// Helper class to initialize an 9 | /// service interface. 10 | /// 11 | public sealed class SettingsManager 12 | { 13 | /// 14 | /// Hidden default constructor. 15 | /// 16 | private SettingsManager() 17 | { 18 | } 19 | 20 | /// 21 | /// Gets an instance of an object that implements the 22 | /// interface. 23 | /// 24 | /// 25 | public static ISettingsManager GetInstance(IThemeInfos themeInfos) 26 | { 27 | return new SettingsManagerImpl(themeInfos); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Components/Settings/Settings/UserProfile/IViewSize.cs: -------------------------------------------------------------------------------- 1 | namespace Settings.UserProfile 2 | { 3 | using System.Windows; 4 | 5 | /// 6 | /// Provide an interface to implement saving and loading/repositioning of Window or view. 7 | /// 8 | public interface IViewSize 9 | { 10 | // 11 | // Zusammenfassung: 12 | // Ruft die Position des linken Fensterrands im Verhältnis zum Desktop ab oder legt 13 | // diese fest. 14 | // 15 | // Rückgabewerte: 16 | // Die Position des linken Fensterrands in logischen Einheiten (1/96 Zoll). 17 | double Left { get; set; } 18 | 19 | // 20 | // Zusammenfassung: 21 | // Ruft die Position des oberen Fensterrands im Verhältnis zum Desktop ab oder legt 22 | // diese fest. 23 | // 24 | // Rückgabewerte: 25 | // Die Position des oberen Fensterrands in logischen Einheiten (1/96 "). 26 | double Top { get; set; } 27 | 28 | // 29 | // Zusammenfassung: 30 | // Ruft die Breite des Elements ab bzw. legt diese fest. 31 | // 32 | // Rückgabewerte: 33 | // Die Breite des Elements in geräteunabhängige Einheiten (1/96th inch per unit).Der 34 | // Standardwert ist System.Double.NaN.Dieser Wert muss größer oder gleich 0,0 sein.In 35 | // den Hinweisen finden Sie Informationen über obere Grenzen. 36 | double Width { get; set; } 37 | 38 | // 39 | // Zusammenfassung: 40 | // Ruft die vorgeschlagene Höhe des Elements ab oder legt diese fest. 41 | // 42 | // Rückgabewerte: 43 | // Die Höhe des Elements in geräteunabhängige Einheiten (1/96th inch per unit).Der 44 | // Standardwert ist System.Double.NaN.Dieser Wert muss größer oder gleich 0,0 sein.In 45 | // den Hinweisen finden Sie Informationen über obere Grenzen. 46 | double Height { get; set; } 47 | 48 | // 49 | // Zusammenfassung: 50 | // Ruft einen Wert ab, der angibt, ob ein Fenster wiederhergestellt, minimiert oder 51 | // maximiert ist, oder legt diesen fest. 52 | // 53 | // Rückgabewerte: 54 | // Ein System.Windows.WindowState, der bestimmt, ob ein Fenster wiederhergestellt, 55 | // minimiert oder maximiert ist.Der Standardwert ist System.Windows.WindowState.Normal 56 | // (wiederhergestellt). 57 | WindowState WindowState { get; set; } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /Components/Settings/Settings/UserProfile/LocalizabilityAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Settings.UserProfile 4 | { 5 | internal class LocalizabilityAttribute : Attribute 6 | { 7 | } 8 | } -------------------------------------------------------------------------------- /Components/Settings/Settings/UserProfile/ViewSize.cs: -------------------------------------------------------------------------------- 1 | namespace Settings.UserProfile 2 | { 3 | // 50, 50, 800, 550 4 | public class ViewSize 5 | { 6 | public ViewSize(double x, double y, double width, double height) 7 | { 8 | X = x; 9 | Y = y; 10 | Width = width; 11 | Height = height; 12 | } 13 | 14 | public double X { get; private set; } 15 | public double Y { get; private set; } 16 | public double Width { get; private set; } 17 | public double Height { get; private set; } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Components/Settings/Settings/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Components/Settings/SettingsModel/ExtensionMethods/SecureStringExtensionMethod.cs: -------------------------------------------------------------------------------- 1 | namespace SettingsModel.ExtensionMethods 2 | { 3 | using System; 4 | using System.Runtime.InteropServices; 5 | using System.Security; 6 | 7 | /// 8 | /// Source: http://blogs.msdn.com/b/fpintos/archive/2009/06/12/how-to-properly-convert-securestring-to-string.aspx 9 | /// 10 | internal static class SecureStringExtensionMethod 11 | { 12 | public static string ConvertToUnsecureString(this SecureString securePassword) 13 | { 14 | if (securePassword == null) 15 | throw new ArgumentNullException("securePassword"); 16 | 17 | IntPtr unmanagedString = IntPtr.Zero; 18 | try 19 | { 20 | unmanagedString = Marshal.SecureStringToGlobalAllocUnicode(securePassword); 21 | return Marshal.PtrToStringUni(unmanagedString); 22 | } 23 | finally 24 | { 25 | Marshal.ZeroFreeGlobalAllocUnicode(unmanagedString); 26 | } 27 | } 28 | 29 | public static SecureString ConvertToSecureString(this string password) 30 | { 31 | if (password == null) 32 | throw new ArgumentNullException("password"); 33 | 34 | var securePassword = new SecureString(); 35 | foreach (char c in password) 36 | securePassword.AppendChar(c); 37 | 38 | securePassword.MakeReadOnly(); 39 | return securePassword; 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Components/Settings/SettingsModel/Models/Factory.cs: -------------------------------------------------------------------------------- 1 | namespace SettingsModel.Models 2 | { 3 | using SettingsModel.Interfaces; 4 | 5 | /// 6 | /// Factory class to create an 7 | /// object from a class that is otherwise unknown to the outside world. 8 | /// 9 | public static class Factory 10 | { 11 | /// 12 | /// Create a new engine object that provides all root functions required 13 | /// to model, track, persist, and load data at run-time. 14 | /// 15 | /// 16 | public static IEngine CreateEngine() 17 | { 18 | return new OptionsEngine(); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Components/Settings/SettingsModel/Models/FileReference.cs: -------------------------------------------------------------------------------- 1 | namespace SettingsModel.Models 2 | { 3 | using System.Xml.Serialization; 4 | 5 | /// 6 | /// Implement a simple file reverence model to allow XML persistence 7 | /// of a List via this class. 8 | /// 9 | public class FileReference 10 | { 11 | /// 12 | /// Gets/sets the path to a file. 13 | /// 14 | [XmlAttribute(AttributeName = "path")] 15 | public string path { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Components/Settings/SettingsModel/Models/XML/Converters/AlternativeDataTypeHandler.cs: -------------------------------------------------------------------------------- 1 | namespace SettingsModel.Models.XML.Converters 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Security; 6 | 7 | /// 8 | /// Holds a collection of alternative datatype 9 | /// handlers to handle datatypes that are not supported through equivalent conversion 10 | /// in alternative datatypes. 11 | /// 12 | internal class AlternativeDataTypeHandler 13 | { 14 | #region fields 15 | private readonly Dictionary converters = null; 16 | #endregion fields 17 | 18 | public AlternativeDataTypeHandler() 19 | { 20 | converters = new Dictionary(); 21 | 22 | converters.Add(typeof(SecureString), new SecureStringHandler()); 23 | } 24 | 25 | /// 26 | /// Finds an alternative datatype handler to handle datatypes that are not 27 | /// supported through equivalent conversion in alternative datatypes. 28 | /// 29 | /// 30 | /// 31 | public IAlternativeDataTypeHandler FindHandler(Type typeOfDataType2Handle) 32 | { 33 | IAlternativeDataTypeHandler ret = null; 34 | 35 | try 36 | { 37 | converters.TryGetValue(typeOfDataType2Handle, out ret); 38 | } 39 | catch 40 | { 41 | } 42 | 43 | return ret; 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /Components/Settings/SettingsModel/Models/XML/Converters/IAlternativeDataTypeHandler.cs: -------------------------------------------------------------------------------- 1 | namespace SettingsModel.Models.XML.Converters 2 | { 3 | using System; 4 | 5 | internal interface IAlternativeDataTypeHandler 6 | { 7 | Type SourceDataType { get; } 8 | Type TargetDataType { get; } 9 | 10 | object Convert(object objectInput); 11 | object ConvertBack(object objectEncryptedData); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Components/Settings/SettingsModel/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("SettingsModel")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("SettingsModel")] 13 | [assembly: AssemblyCopyright("The MIT License (MIT) Copyright © 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("9b0ba841-5a2f-4ed3-a908-253dbca70e77")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Components/Settings/SettingsModel/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Demos/BreadcrumbTestLib/Behaviors/TreeViewItemBehaviour.cs: -------------------------------------------------------------------------------- 1 | namespace BreadcrumbTestLib.Behaviors 2 | { 3 | using System.ComponentModel; 4 | using System.Windows; 5 | using System.Windows.Controls; 6 | 7 | /// 8 | /// Class implements an attached behaviour to bring a selected TreeViewItem 9 | /// into view when selection is driven by the viewmodel (not the user). 10 | /// 11 | /// Sample Usage: 12 | /// <TreeView.ItemContainerStyle> 13 | /// <Style TargetType="{x:Type TreeViewItem}" BasedOn="{StaticResource {x:Type TreeViewItem}}"> 14 | /// <Setter Property="behav:TreeViewItemBehaviour.IsBroughtIntoViewWhenSelected" Value="True" /> 15 | /// <Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" /> 16 | /// <Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" /> 17 | /// 18 | /// <!-- Setter Property="FontWeight" Value="Normal" /> 19 | /// <Style.Triggers> 20 | /// <Trigger Property="IsSelected" Value="True"> 21 | /// <Setter Property="FontWeight" Value="Bold" /> 22 | /// </Trigger> 23 | /// </Style.Triggers --> 24 | /// </Style> 25 | /// </TreeView.ItemContainerStyle> 26 | /// 27 | /// 28 | public static class TreeViewItemBehaviour 29 | { 30 | #region IsBroughtIntoViewWhenSelected 31 | #region IsBroughtIntoViewWhenSelectedDependencyProperty 32 | 33 | /// 34 | /// Backing storage of the IsBroughtIntoViewWhenSelected dependency property. 35 | /// 36 | public static readonly DependencyProperty IsBroughtIntoViewWhenSelectedProperty = 37 | DependencyProperty.RegisterAttached( 38 | "IsBroughtIntoViewWhenSelected", 39 | typeof(bool), 40 | typeof(TreeViewItemBehaviour), 41 | new UIPropertyMetadata(false, OnIsBroughtIntoViewWhenSelectedChanged)); 42 | 43 | /// 44 | /// Gets the value of the IsBroughtIntoViewWhenSelected dependency property. 45 | /// 46 | public static bool GetIsBroughtIntoViewWhenSelected(TreeViewItem treeViewItem) 47 | { 48 | return (bool)treeViewItem.GetValue(IsBroughtIntoViewWhenSelectedProperty); 49 | } 50 | 51 | /// 52 | /// Sets the value of the IsBroughtIntoViewWhenSelected dependency property. 53 | /// 54 | public static void SetIsBroughtIntoViewWhenSelected(TreeViewItem treeViewItem, bool value) 55 | { 56 | treeViewItem.SetValue(IsBroughtIntoViewWhenSelectedProperty, value); 57 | } 58 | #endregion IsBroughtIntoViewWhenSelectedDependencyProperty 59 | 60 | #region methods 61 | private static void OnIsBroughtIntoViewWhenSelectedChanged(DependencyObject depObj, DependencyPropertyChangedEventArgs e) 62 | { 63 | if (DesignerProperties.GetIsInDesignMode(new System.Windows.DependencyObject())) 64 | return; 65 | 66 | TreeViewItem item = depObj as TreeViewItem; 67 | if (item == null) 68 | return; 69 | 70 | if ((bool)e.NewValue) 71 | { 72 | item.Selected += item_Selected; 73 | } 74 | else 75 | { 76 | item.Selected -= item_Selected; 77 | return; 78 | } 79 | } 80 | 81 | private static void item_Selected(object sender, RoutedEventArgs e) 82 | { 83 | TreeViewItem item = e.OriginalSource as TreeViewItem; 84 | 85 | if (item != null) 86 | { 87 | item.BringIntoView(); 88 | item.Focus(); 89 | } 90 | } 91 | #endregion methods 92 | #endregion // IsBroughtIntoViewWhenSelected 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /Demos/BreadcrumbTestLib/Models/HintDirection.cs: -------------------------------------------------------------------------------- 1 | namespace BreadcrumbTestLib.Models 2 | { 3 | /// 4 | /// Models the directions in the tree in which the control is 5 | /// requested to browse in relation to the currently selected 6 | /// item (current path). 7 | /// 8 | public enum HintDirection 9 | { 10 | /// 11 | /// This default should always be applicable when the direction of the 12 | /// new location cannot be hinted by any of the directions below. 13 | /// 14 | /// Example: 15 | /// Current Path: 'C:\Windows' 16 | /// New Location: 'F:\MyDocuments\pictures\nice' 17 | /// 18 | /// -> New path is rather unrelated to current path 19 | /// 20 | Unrelated = 0, 21 | 22 | /// 23 | /// The target of the navigational request is a child 24 | /// below the currently selected item. 25 | /// 26 | /// Example: 27 | /// Current Path: 'C:\Windows' 28 | /// New Location: 'C:\Windows\System32' -> New path is below current path 29 | /// 30 | Down = 1, 31 | 32 | /// 33 | /// The target of the navigational request is a part 34 | /// of the currently selected path. That is, assuming 35 | /// the current path is complete towards the root, this means, 36 | /// the new location is part of the current path. 37 | /// 38 | /// Example: 39 | /// Current Path: 'C:\Windows\System32' 40 | /// New Location: 'C:\Windows' -> New path is part of current 41 | /// 42 | Up = 2 43 | } 44 | } -------------------------------------------------------------------------------- /Demos/BreadcrumbTestLib/Models/IRoot.cs: -------------------------------------------------------------------------------- 1 | namespace BreadcrumbTestLib.Models 2 | { 3 | using BreadcrumbTestLib.ViewModels.Breadcrumbs; 4 | using WSF.Interfaces; 5 | using SSCoreLib.Browse; 6 | using System.Threading.Tasks; 7 | 8 | /// 9 | /// Defines a set of methods and properties to be implemented by the root viewmodel 10 | /// of a Breadcrumb Tree Viewmodel structure. 11 | /// 12 | /// These properties and methods can be used within the beardcrumb tree 13 | /// to initialize the execution of (navigational) methods that influence 14 | /// the tree structure as a whole and ensure correct state for the whole tree. 15 | /// 16 | public interface IRoot : ICanNavigate 17 | { 18 | /// 19 | /// Schedules a navigational task and returns immediately 20 | /// 21 | /// 22 | /// 23 | /// 24 | /// 25 | Task NavigateToScheduledAsync(IDirectoryBrowser targetLocation, 26 | string sourceHint, 27 | HintDirection hintDirection = HintDirection.Unrelated, 28 | BreadcrumbTreeItemViewModel toBeSelectedLocation = null 29 | ); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Demos/BreadcrumbTestLib/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("BreadcrumbTestLib")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("BreadcrumbTestLib")] 13 | [assembly: AssemblyCopyright("Copyright © 2018")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("5dd7405c-a81d-49be-93bf-46fedd0a3a2c")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Demos/BreadcrumbTestLib/Resources/FolderOpen.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Demos/BreadcrumbTestLib/Resources/FolderOpen.ico -------------------------------------------------------------------------------- /Demos/BreadcrumbTestLib/Utils/AsyncLock.cs: -------------------------------------------------------------------------------- 1 | namespace BreadcrumbTestLib.Utils 2 | { 3 | using System; 4 | using System.Threading; 5 | using System.Threading.Tasks; 6 | 7 | /// 8 | /// By - Stephen Toub - MSFT 9 | /// http://blogs.msdn.com/b/pfxteam/archive/2012/02/12/10266988.aspx 10 | /// 11 | public class AsyncLock 12 | { 13 | #region fields 14 | private readonly AsyncSemaphore m_semaphore; 15 | private readonly Task m_releaser; 16 | #endregion fields 17 | 18 | #region constructors 19 | public AsyncLock() 20 | { 21 | this.m_semaphore = new AsyncSemaphore(1); 22 | this.m_releaser = Task.FromResult(new Releaser(this)); 23 | } 24 | #endregion constructors 25 | 26 | #region methods 27 | public Task LockAsync() 28 | { 29 | var wait = this.m_semaphore.WaitAsync(); 30 | return wait.IsCompleted ? 31 | this.m_releaser : 32 | wait.ContinueWith((_, state) => new Releaser((AsyncLock)state), 33 | this, CancellationToken.None, 34 | TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default); 35 | } 36 | #endregion methods 37 | 38 | public struct Releaser : IDisposable 39 | { 40 | private readonly AsyncLock m_toRelease; 41 | 42 | /// 43 | /// Struct Constructor 44 | /// 45 | /// 46 | internal Releaser(AsyncLock toRelease) 47 | { 48 | this.m_toRelease = toRelease; 49 | } 50 | 51 | public void Dispose() 52 | { 53 | if (this.m_toRelease != null) 54 | this.m_toRelease.m_semaphore.Release(); 55 | } 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /Demos/BreadcrumbTestLib/Utils/AsyncSemaphore.cs: -------------------------------------------------------------------------------- 1 | namespace BreadcrumbTestLib.Utils 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Threading.Tasks; 6 | 7 | /// 8 | /// By - Stephen Toub - MSFT 9 | /// http://blogs.msdn.com/b/pfxteam/archive/2012/02/12/10266983.aspx 10 | /// 11 | public class AsyncSemaphore 12 | { 13 | private static readonly Task S_Completed = Task.FromResult(true); 14 | private readonly Queue> m_waiters = new Queue>(); 15 | private int m_currentCount; 16 | 17 | public AsyncSemaphore(int initialCount) 18 | { 19 | if (initialCount < 0) 20 | throw new ArgumentOutOfRangeException("initialCount"); 21 | 22 | this.m_currentCount = initialCount; 23 | } 24 | 25 | public Task WaitAsync() 26 | { 27 | lock (this.m_waiters) 28 | { 29 | if (this.m_currentCount > 0) 30 | { 31 | --this.m_currentCount; 32 | return S_Completed; 33 | } 34 | else 35 | { 36 | var waiter = new TaskCompletionSource(); 37 | 38 | this.m_waiters.Enqueue(waiter); 39 | 40 | return waiter.Task; 41 | } 42 | } 43 | } 44 | 45 | public void Release() 46 | { 47 | TaskCompletionSource toRelease = null; 48 | 49 | lock (this.m_waiters) 50 | { 51 | if (this.m_waiters.Count > 0) 52 | toRelease = this.m_waiters.Dequeue(); 53 | else 54 | ++this.m_currentCount; 55 | } 56 | 57 | if (toRelease != null) 58 | toRelease.SetResult(true); 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /Demos/BreadcrumbTestLib/Utils/RelayCommand.cs: -------------------------------------------------------------------------------- 1 | namespace BreadcrumbTestLib.Utils 2 | { 3 | using System; 4 | using System.Windows.Input; 5 | 6 | internal class RelayCommand : ICommand 7 | { 8 | private readonly Action _handler; 9 | private readonly Func _canHandle; 10 | private bool _isEnabled = true; 11 | 12 | /// 13 | /// Class constructor 14 | /// 15 | /// 16 | /// 17 | public RelayCommand(Action handler, Func canHandle = null) 18 | { 19 | _handler = handler; 20 | _canHandle = canHandle ?? (pm => true); 21 | } 22 | 23 | public event EventHandler CanExecuteChanged; 24 | 25 | public bool IsEnabled 26 | { 27 | get 28 | { 29 | return _isEnabled; 30 | } 31 | 32 | set 33 | { 34 | if (value != _isEnabled) 35 | { 36 | _isEnabled = value; 37 | 38 | if (CanExecuteChanged != null) 39 | { 40 | CanExecuteChanged(this, EventArgs.Empty); 41 | } 42 | } 43 | } 44 | } 45 | 46 | public bool CanExecute(object parameter) 47 | { 48 | return IsEnabled && _canHandle(parameter); 49 | } 50 | 51 | public void Execute(object parameter) 52 | { 53 | _handler(parameter); 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /Demos/BreadcrumbTestLib/ViewModels/AppViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace BreadcrumbTestLib.ViewModels 2 | { 3 | using System; 4 | 5 | public class AppViewModel : Base.ViewModelBase, IDisposable 6 | { 7 | #region fields 8 | /// 9 | /// Log4net logger facility for this class. 10 | /// 11 | protected static readonly log4net.ILog Logger = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); 12 | private bool _disposed = false; 13 | #endregion fields 14 | 15 | #region constructors 16 | /// 17 | /// Class constructor from descriptive demo title name. 18 | /// 19 | /// 20 | public AppViewModel(string demoTitle) 21 | : this() 22 | { 23 | DemoTitle = demoTitle; 24 | } 25 | 26 | /// 27 | /// Class constructor. 28 | /// 29 | protected AppViewModel() 30 | { 31 | // Initialize Breadcrumb Controlller with a containing Breadcrumb ViewModel 32 | BreadcrumbController = new BreadCrumbControllerViewModel(); 33 | } 34 | #endregion constructors 35 | 36 | #region properties 37 | /// 38 | /// Gets the title of this demo 39 | /// 40 | public string DemoTitle { get; } 41 | 42 | /// 43 | /// Gets a Breadcrumb Controller ViewModel that contains a BreadCrumb Browser 44 | /// ViewModel who's background tasks are coordinated by this controller. 45 | /// 46 | public BreadCrumbControllerViewModel BreadcrumbController { get; } 47 | #endregion properties 48 | 49 | #region methods 50 | /// 51 | /// Method should be called after construction to initialize the viewmodel 52 | /// to view a default content. 53 | /// 54 | public void InitPath(string initialPath) 55 | { 56 | BreadcrumbController.InitPath(initialPath); 57 | } 58 | 59 | #region Disposable Interfaces 60 | /// 61 | /// Standard dispose method of the interface. 62 | /// 63 | public void Dispose() 64 | { 65 | Dispose(true); 66 | } 67 | 68 | /// 69 | /// Source: http://www.codeproject.com/Articles/15360/Implementing-IDisposable-and-the-Dispose-Pattern-P 70 | /// 71 | /// 72 | protected virtual void Dispose(bool disposing) 73 | { 74 | if (_disposed == false) 75 | { 76 | if (disposing == true) 77 | { 78 | // Dispose of the currently used inner disposables 79 | BreadcrumbController.Dispose(); 80 | } 81 | 82 | // There are no unmanaged resources to release, but 83 | // if we add them, they need to be released here. 84 | } 85 | 86 | _disposed = true; 87 | 88 | //// If it is available, make the call to the 89 | //// base class's Dispose(Boolean) method 90 | ////base.Dispose(disposing); 91 | } 92 | #endregion Disposable Interfaces 93 | #endregion methods 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /Demos/BreadcrumbTestLib/ViewModels/Base/RelayCommand.cs: -------------------------------------------------------------------------------- 1 | namespace BreadcrumbTestLib.ViewModels.Base 2 | { 3 | using System; 4 | using System.Diagnostics; 5 | using System.Windows.Input; 6 | 7 | /// 8 | /// A command whose sole purpose is to 9 | /// relay its functionality to other 10 | /// objects by invoking delegates. The 11 | /// default return value for the CanExecute 12 | /// method is 'true'. 13 | /// 14 | /// Source: http://www.codeproject.com/Articles/31837/Creating-an-Internationalized-Wizard-in-WPF 15 | /// 16 | internal class RelayCommand : ICommand 17 | { 18 | #region Fields 19 | private readonly Action mExecute = null; 20 | private readonly Predicate mCanExecute = null; 21 | #endregion // Fields 22 | 23 | #region Constructors 24 | /// 25 | /// Class constructor 26 | /// 27 | /// 28 | public RelayCommand(Action execute) 29 | : this(execute, null) 30 | { 31 | } 32 | 33 | /// 34 | /// Creates a new command. 35 | /// 36 | /// The execution logic. 37 | /// The execution status logic. 38 | public RelayCommand(Action execute, Predicate canExecute) 39 | { 40 | if (execute == null) 41 | throw new ArgumentNullException("execute"); 42 | 43 | this.mExecute = execute; 44 | this.mCanExecute = canExecute; 45 | } 46 | 47 | #endregion // Constructors 48 | 49 | #region events 50 | /// 51 | /// Eventhandler to re-evaluate whether this command can execute or not 52 | /// 53 | public event EventHandler CanExecuteChanged 54 | { 55 | add 56 | { 57 | if (this.mCanExecute != null) 58 | CommandManager.RequerySuggested += value; 59 | } 60 | 61 | remove 62 | { 63 | if (this.mCanExecute != null) 64 | CommandManager.RequerySuggested -= value; 65 | } 66 | } 67 | #endregion 68 | 69 | #region methods 70 | /// 71 | /// Determine whether this pre-requisites to execute this command are given or not. 72 | /// 73 | /// 74 | /// 75 | [DebuggerStepThrough] 76 | public bool CanExecute(object parameter) 77 | { 78 | return this.mCanExecute == null ? true : this.mCanExecute((T)parameter); 79 | } 80 | 81 | /// 82 | /// Execute the command method managed in this class. 83 | /// 84 | /// 85 | public void Execute(object parameter) 86 | { 87 | this.mExecute((T)parameter); 88 | } 89 | #endregion methods 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /Demos/BreadcrumbTestLib/ViewModels/Base/ViewModelBase.cs: -------------------------------------------------------------------------------- 1 | namespace BreadcrumbTestLib.ViewModels.Base 2 | { 3 | using System; 4 | using System.ComponentModel; 5 | using System.Linq.Expressions; 6 | 7 | /// 8 | /// Implements a base class for all viewmodel classes 9 | /// that implements interface for binding. 10 | /// 11 | public class ViewModelBase : INotifyPropertyChanged 12 | { 13 | /// 14 | /// Standard implementation of . 15 | /// 16 | public event PropertyChangedEventHandler PropertyChanged; 17 | 18 | /// 19 | /// Tell bound controls (via WPF binding) to refresh their display. 20 | /// 21 | /// Sample call: this.NotifyPropertyChanged(() => this.IsSelected); 22 | /// where 'this' is derived from 23 | /// and IsSelected is a property. 24 | /// 25 | /// 26 | /// 27 | public void NotifyPropertyChanged(Expression> property) 28 | { 29 | var lambda = (LambdaExpression)property; 30 | MemberExpression memberExpression; 31 | 32 | if (lambda.Body is UnaryExpression) 33 | { 34 | var unaryExpression = (UnaryExpression)lambda.Body; 35 | memberExpression = (MemberExpression)unaryExpression.Operand; 36 | } 37 | else 38 | { 39 | memberExpression = (MemberExpression)lambda.Body; 40 | } 41 | 42 | this.NotifyPropertyChanged(memberExpression.Member.Name); 43 | } 44 | 45 | /// 46 | /// Tell bound controls (via WPF binding) to refresh their display. 47 | /// Standard implementation through . 48 | /// 49 | /// 50 | protected virtual void NotifyPropertyChanged(string propertyName) 51 | { 52 | if (this.PropertyChanged != null) 53 | { 54 | this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); 55 | } 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /Demos/BreadcrumbTestLib/ViewModels/Breadcrumbs/ShellPathValidationRule.cs: -------------------------------------------------------------------------------- 1 | namespace BreadcrumbTestLib.ViewModels.Breadcrumbs 2 | { 3 | using WSF.Interfaces; 4 | using System.Globalization; 5 | using System.Windows.Controls; 6 | 7 | /// 8 | /// Provides a way to create a custom rule in order to check the validity of user 9 | /// input and signal invalid input with WPF standard binding API. 10 | /// 11 | public class ShellPathValidationRule : ValidationRule 12 | { 13 | #region ctors 14 | /// 15 | /// Class constructors 16 | /// 17 | public ShellPathValidationRule() 18 | { 19 | } 20 | #endregion ctors 21 | 22 | /// 23 | /// Performs validation checks on a value. 24 | /// 25 | /// The value from the binding target to check. 26 | /// The culture to use in this rule. 27 | /// A System.Windows.Controls.ValidationResult object. 28 | public override ValidationResult Validate(object value, CultureInfo cultureInfo) 29 | { 30 | try 31 | { 32 | if (!(value is string)) 33 | return new ValidationResult(false, "Invalid Path"); 34 | 35 | IDirectoryBrowser[] pathItems; 36 | 37 | if (WSF.Browser.DirectoryExists((string)value, out pathItems) == false) 38 | return new ValidationResult(false, "Path Not Found"); 39 | } 40 | catch (System.Exception ex) 41 | { 42 | System.Diagnostics.Debug.WriteLine("Validate Exception: '{0}'\n{1}", ex.Message, ex.StackTrace); 43 | return new ValidationResult(false, "Invalid Path"); 44 | } 45 | 46 | return new ValidationResult(true, null); 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /Demos/BreadcrumbTestLib/ViewModels/BrowseRequestTaskQueueViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace BreadcrumbTestLib.ViewModels 2 | { 3 | using BmLib.Interfaces; 4 | using SSCoreLib.ViewModels; 5 | 6 | /// 7 | /// This viewmodel extends the and ensures that all 8 | /// required properties are available for bind against the Breadcrumb control by 9 | /// also inheriting the interface. 10 | /// 11 | /// Ideally, alle required properties in are 12 | /// allready implemented in - this inheratence step 13 | /// makes sure the required properties are implemented as required. 14 | /// 15 | public class BrowseRequestTaskQueueViewModel : TaskQueueViewModel, IBrowseRequestTaskQueue 16 | { 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Demos/BreadcrumbTestLib/ViewModels/Interfaces/IBreadcrumbTreeItemHelperViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace BreadcrumbTestLib.ViewModels.Interfaces 2 | { 3 | using BmLib.Enums; 4 | using System; 5 | using System.Collections.Generic; 6 | using System.ComponentModel; 7 | using System.Threading.Tasks; 8 | 9 | /// 10 | /// Helper view model class that provide support of loading sub-entries. 11 | /// 12 | /// 13 | public interface IBreadcrumbTreeItemHelperViewModel : INotifyPropertyChanged 14 | { 15 | #region events 16 | event EventHandler EntriesChanged; 17 | #endregion events 18 | 19 | #region properties 20 | /// 21 | /// Load when expand the first time. 22 | /// 23 | bool IsExpanded { get; set; } 24 | 25 | /// 26 | /// Whether subentries loaded. 27 | /// 28 | bool IsLoaded { get; } 29 | 30 | /// 31 | /// Whether subentries is loading. 32 | /// 33 | bool IsLoading { get; } 34 | 35 | /// 36 | /// Gets a list of sub-entries that should be displayed below this entry 37 | /// in a tree view like display of path items. 38 | /// 39 | IEnumerable All { get; } 40 | #endregion properties 41 | 42 | #region methods 43 | /// 44 | /// Call to load sub-entries. 45 | /// 46 | /// Load sub-entries even if it's already loaded. 47 | /// 48 | Task> LoadAsync(UpdateMode updateMode = UpdateMode.Replace, bool force = false, object parameter = null); 49 | 50 | /// 51 | /// Call to unload sub-entries. 52 | /// Method can also be used to cancel current load processings. 53 | /// 54 | /// 55 | Task UnloadAsync(); 56 | 57 | /// 58 | /// Used to preload sub-entries, fully overwrite entries stored in the helper. 59 | /// 60 | /// 61 | void SetEntries(UpdateMode updateMode = UpdateMode.Replace, params VM[] viewModels); 62 | #endregion methods 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /Demos/BreadcrumbTestLib/ViewModels/Interfaces/IBreadcrumbTreeItemViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace BreadcrumbTestLib.ViewModels.Interfaces 2 | { 3 | using BmLib.Interfaces; 4 | 5 | public interface IBreadcrumbTreeItemViewModel : IParent 6 | { 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Demos/BreadcrumbTestLib/ViewModels/Interfaces/IBreadcrumbViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace BreadcrumbTestLib.ViewModels.Interfaces 2 | { 3 | using BmLib.Interfaces; 4 | using BreadcrumbTestLib.Models; 5 | using BreadcrumbTestLib.ViewModels.Breadcrumbs; 6 | using WSF.Interfaces; 7 | using SSCoreLib.Browse; 8 | using System.ComponentModel; 9 | using System.Threading.Tasks; 10 | 11 | /// 12 | /// Defines an inteface to manage the complete Breadcrumb control with 13 | /// a viewmodel that should implement these properties and methods. 14 | /// 15 | public interface IBreadcrumbViewModel : IRoot, 16 | INotifyPropertyChanged 17 | { 18 | #region properties 19 | /// 20 | /// Gets the root tree of the breadcrumb control tree 21 | /// 22 | BreadcrumbTreeItemViewModel BreadcrumbSubTree { get; } 23 | 24 | /// 25 | /// Gets/sets a property that determines whether a breadcrumb 26 | /// switch is turned on or off. 27 | /// 28 | /// On false: A Breadcrumb switch turned off shows the text editable path 29 | /// On true: A Breadcrumb switch turned on shows the BreadcrumbSubTree for browsing 30 | /// 31 | bool EnableBreadcrumb { get; set; } 32 | 33 | /// 34 | /// Gets an interface to determine whether progress display should currenlty be visible or not. 35 | /// 36 | IProgress Progressing { get; } 37 | #endregion properties 38 | 39 | #region methods 40 | /// 41 | /// Method should be called after construction to initialize the viewmodel 42 | /// to view a default content. 43 | /// 44 | Task InitPathAsync(); 45 | 46 | /// 47 | /// Navigates the viewmodel (and hopefully the bound control) to a new location 48 | /// and ensures correct state and event handling towards 49 | /// listing objects for 50 | /// events. 51 | /// 52 | /// 53 | /// Specifies whether the navigation direction 54 | /// is not specified or up or down relative to the current path or 55 | /// ihintLevel parameter 56 | /// This parameter is relevant for Down direction only. 57 | /// It specifies the level in the tree structure from which the next child 58 | /// in the current path should be searched. 59 | /// Returns a result that informs whether the target was reached or not. 60 | Task> NavigateToAsync( 61 | BrowseRequest requestedLocation, 62 | string sourceHint, 63 | HintDirection direction = HintDirection.Unrelated, 64 | BreadcrumbTreeItemViewModel toBeSelectedLocation = null 65 | ); 66 | #endregion methods 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Demos/BreadcrumbTestLib/ViewModels/Interfaces/ISupportTreeSelector.cs: -------------------------------------------------------------------------------- 1 | namespace BreadcrumbTestLib.ViewModels.Interfaces 2 | { 3 | using BmLib.Interfaces; 4 | 5 | /// 6 | /// Implement by ViewModel that has Tree based structure and support LookupProcessing. 7 | /// 8 | /// Sub-node viewmodel type. 9 | /// Type to identify a node, commonly string. 10 | public interface ISupportBreadcrumbTreeItemViewModel : ISupportBreadcrumbTreeItemHelperViewModel, 11 | IOverflown 12 | { 13 | /// 14 | /// Tree based structure and LookupProcessing support. 15 | /// 16 | ITreeSelector Selection { get; } 17 | } 18 | 19 | 20 | /// 21 | /// Defines an interface to an object that contains an 22 | /// Entries 23 | /// get property. 24 | /// 25 | /// 26 | public interface ISupportBreadcrumbTreeItemHelperViewModel 27 | { 28 | IBreadcrumbTreeItemHelperViewModel Entries { get; } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Demos/BreadcrumbTestLib/ViewModels/Interfaces/ITreeSelector.cs: -------------------------------------------------------------------------------- 1 | namespace BreadcrumbTestLib.ViewModels.Interfaces 2 | { 3 | using System.ComponentModel; 4 | 5 | /// 6 | /// Implement Tree based structure and support LookupProcessing. 7 | /// 8 | /// Sub-node viewmodel type. 9 | /// Type to identify a node, commonly string. 10 | public interface ITreeSelector : INotifyPropertyChanged 11 | { 12 | #region properties 13 | /// 14 | /// Whether current view model is selected. 15 | /// 16 | bool IsSelected { get; set; } 17 | 18 | /// 19 | /// This is marked by TreeRootSelector, for overflow menu support. 20 | /// 21 | bool IsRoot { get; set; } 22 | 23 | /// 24 | /// Based on IsRoot and IsChildSelected 25 | /// 26 | bool IsRootAndIsChildSelected { get; } 27 | 28 | /// 29 | /// Gets whether a child of current view model is selected. 30 | /// 31 | bool IsChildSelected { get; } 32 | 33 | /// 34 | /// Gets the model of the selected child item. 35 | /// 36 | M SelectedChild { get; set; } 37 | 38 | /// 39 | /// Gets the instance of the model object that represents this selection helper. 40 | /// The model backs the ViewModel property and should be in sync 41 | /// with it. 42 | /// 43 | M Value { get; } 44 | 45 | /// 46 | /// Gets the owning ViewModel of this selection helper. 47 | /// 48 | VM ViewModel { get; } 49 | 50 | /// 51 | /// Gets All sub-entries of the current tree item 52 | /// to support loading tree items. 53 | /// 54 | IBreadcrumbTreeItemHelperViewModel EntryHelper { get; } 55 | 56 | /// 57 | /// Gets whether this entry is currently overflowed (should be hidden 58 | /// because its to large for display) or a root element, or both. 59 | /// 60 | /// This can be used by binding system to determine whether an element should 61 | /// be visble in the root drop down list, because overflowed or root 62 | /// items should be visible in the root drop down list for 63 | /// overflowed and root items. 64 | /// 65 | bool IsOverflowedOrRoot { get; } 66 | 67 | /// 68 | /// Gets/sets whether the BreadCrumb Tree item is currently overflowed 69 | /// (does not fit into the view display area) or not. 70 | /// 71 | bool IsOverflowed { get; } 72 | #endregion properties 73 | 74 | #region methods 75 | #endregion methods 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /Demos/BreadcrumbTestLib/ViewModels/SuggestQueryResultModel.cs: -------------------------------------------------------------------------------- 1 | namespace BreadcrumbTestLib.ViewModels 2 | { 3 | using System.Collections.Generic; 4 | 5 | /// 6 | /// Implements a simple model to capture the result a query towards an entered text. 7 | /// 8 | public class SuggestQueryResultModel 9 | { 10 | /// 11 | /// Class constructor 12 | /// 13 | public SuggestQueryResultModel(List lst, bool validInput = true) 14 | { 15 | ResultList = lst; 16 | ValidInput = validInput; 17 | } 18 | 19 | /// 20 | /// Class constructor 21 | /// 22 | public SuggestQueryResultModel() 23 | { 24 | ResultList = new List(); 25 | ValidInput = true; 26 | } 27 | 28 | /// 29 | /// Gets the list of objects that represents a likely suggestion towards an entered text. 30 | /// 31 | public List ResultList { get; } 32 | 33 | /// 34 | /// specifies whether the entered text was considered valid or not. 35 | /// 36 | public bool ValidInput { get; set; } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Demos/BreadcrumbTestLib/ViewModels/SuggestionListItem.cs: -------------------------------------------------------------------------------- 1 | namespace BreadcrumbTestLib.ViewModels 2 | { 3 | using WSF.Enums; 4 | using System; 5 | 6 | /// 7 | /// Models the viewmodel item portion of the list of suggestions in the SuggestionBox. 8 | /// 9 | public class SuggestionListItem : IEquatable 10 | { 11 | #region ctors 12 | /// 13 | /// Class constructor 14 | /// 15 | /// 16 | /// 17 | /// 18 | /// 19 | public SuggestionListItem(string headerParam, 20 | string textpathParam, 21 | object parentParam, 22 | PathType pathTypeParam) 23 | :this() 24 | { 25 | Header = headerParam; 26 | TextPath = textpathParam; 27 | TextPathType = pathTypeParam; 28 | Parent = parentParam; 29 | } 30 | 31 | /// 32 | /// Hidden class constructor 33 | /// 34 | protected SuggestionListItem() 35 | { 36 | } 37 | #endregion ctors 38 | 39 | #region properties 40 | public string Header { get; } 41 | 42 | public string TextPath { get; } 43 | 44 | public PathType TextPathType { get; } 45 | 46 | public object Parent { get; } 47 | #endregion properties 48 | 49 | public bool Equals(SuggestionListItem other) 50 | { 51 | if (other == null) 52 | return false; 53 | 54 | if (TextPathType != other.TextPathType) 55 | return false; 56 | 57 | if ((string.IsNullOrEmpty(Header) == true && string.IsNullOrEmpty(other.Header) == false) || 58 | (string.IsNullOrEmpty(Header) == false && string.IsNullOrEmpty(other.Header) == true) || 59 | (string.IsNullOrEmpty(TextPath) == true && string.IsNullOrEmpty(other.TextPath) == false) || 60 | (string.IsNullOrEmpty(TextPath) == false && string.IsNullOrEmpty(other.TextPath) == true) 61 | ) 62 | { 63 | return false; 64 | } 65 | 66 | if (string.Compare(Header, other.Header) != 0 || 67 | string.Compare(TextPath, other.TextPath) != 0) 68 | return false; 69 | 70 | return true; 71 | } 72 | 73 | public override bool Equals(object obj) 74 | { 75 | var otherItem = obj as SuggestionListItem; 76 | 77 | if (otherItem == null) 78 | return false; 79 | 80 | return Equals(otherItem); 81 | } 82 | 83 | public override int GetHashCode() 84 | { 85 | return (TextPath != null ? TextPath.GetHashCode() : string.Empty.GetHashCode()); 86 | } 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /Demos/BreadcrumbTestLib/Views/DemoView.xaml.cs: -------------------------------------------------------------------------------- 1 | namespace BreadcrumbTestLib.Views 2 | { 3 | using System.Windows.Controls; 4 | 5 | /// 6 | /// Interaction logic for DemoView.xaml 7 | /// 8 | public partial class DemoView : UserControl 9 | { 10 | public DemoView() 11 | { 12 | InitializeComponent(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Demos/BreadcrumbTestLib/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Demos/GenericDemo/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 | 6 | 7 | 8 | 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 | -------------------------------------------------------------------------------- /Demos/GenericDemo/App.xaml: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /Demos/GenericDemo/App.xaml.cs: -------------------------------------------------------------------------------- 1 | namespace GenericDemo 2 | { 3 | using System.Windows; 4 | using log4net.Config; 5 | 6 | /// 7 | /// Interaction logic for App.xaml 8 | /// 9 | public partial class App : Application 10 | { 11 | protected static log4net.ILog Logger; // Enable debugging via Log4Net 12 | 13 | static App() 14 | { 15 | XmlConfigurator.Configure(); // Read Log4Net config from App.config file 16 | Logger = log4net.LogManager.GetLogger("default"); 17 | } 18 | 19 | public App() 20 | { 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Demos/GenericDemo/MainWindow.xaml: -------------------------------------------------------------------------------- 1 |  7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Demos/GenericDemo/MainWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | namespace GenericDemo 2 | { 3 | using System; 4 | using System.Threading.Tasks; 5 | using System.Windows; 6 | using BreadcrumbTestLib.ViewModels; 7 | 8 | /// 9 | /// Interaction logic for MainWindow.xaml 10 | /// 11 | public partial class MainWindow : Window 12 | { 13 | public MainWindow() 14 | { 15 | InitializeComponent(); 16 | 17 | Loaded += MainWindow_Loaded; 18 | } 19 | 20 | private void MainWindow_Loaded(object sender, RoutedEventArgs e) 21 | { 22 | Loaded -= MainWindow_Loaded; 23 | 24 | var appVM = new AppViewModel("Generic"); 25 | DataContext = appVM; 26 | 27 | appVM.InitPath(@"C:\"); 28 | } 29 | 30 | protected override void OnClosed(EventArgs e) 31 | { 32 | base.OnClosed(e); 33 | 34 | var appVm = (DataContext as IDisposable); 35 | 36 | if (appVm != null) 37 | appVm.Dispose(); 38 | 39 | DataContext = null; 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Demos/GenericDemo/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Resources; 3 | using System.Runtime.CompilerServices; 4 | using System.Runtime.InteropServices; 5 | using System.Windows; 6 | 7 | // General Information about an assembly is controlled through the following 8 | // set of attributes. Change these attribute values to modify the information 9 | // associated with an assembly. 10 | [assembly: AssemblyTitle("GenericDemo")] 11 | [assembly: AssemblyDescription("")] 12 | [assembly: AssemblyConfiguration("")] 13 | [assembly: AssemblyCompany("")] 14 | [assembly: AssemblyProduct("GenericDemo")] 15 | [assembly: AssemblyCopyright("Copyright © 2018")] 16 | [assembly: AssemblyTrademark("")] 17 | [assembly: AssemblyCulture("")] 18 | 19 | // Setting ComVisible to false makes the types in this assembly not visible 20 | // to COM components. If you need to access a type in this assembly from 21 | // COM, set the ComVisible attribute to true on that type. 22 | [assembly: ComVisible(false)] 23 | 24 | // In order to begin building localizable applications, set 25 | // CultureYouAreCodingWith in your .csproj file 26 | // inside a . For example, if you are using US english 27 | // in your source files, set the to en-US. Then uncomment 28 | // the NeutralResourceLanguage attribute below. Update the "en-US" in 29 | // the line below to match the UICulture setting in the project file. 30 | 31 | ////[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] 32 | [assembly: ThemeInfo( 33 | ResourceDictionaryLocation.None, // where theme specific resource dictionaries are located 34 | // (used if a resource is not found in the page, 35 | // or application resource dictionaries) 36 | ResourceDictionaryLocation.SourceAssembly // where the generic resource dictionary is located 37 | // (used if a resource is not found in the page, 38 | // app, or any theme specific resource dictionaries) 39 | )] 40 | 41 | // Version information for an assembly consists of the following four values: 42 | // 43 | // Major Version 44 | // Minor Version 45 | // Build Number 46 | // Revision 47 | // 48 | // You can specify all the values or you can default the Build and Revision Numbers 49 | // by using the '*' as shown below: 50 | // [assembly: AssemblyVersion("1.0.*")] 51 | [assembly: AssemblyVersion("1.0.0.0")] 52 | [assembly: AssemblyFileVersion("1.0.0.0")] 53 | -------------------------------------------------------------------------------- /Demos/GenericDemo/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace GenericDemo.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", "16.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("GenericDemo.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 | -------------------------------------------------------------------------------- /Demos/GenericDemo/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace GenericDemo.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.2.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 | -------------------------------------------------------------------------------- /Demos/GenericDemo/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Demos/GenericDemo/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Demos/SSCCoreLib/Browse/BrowseResult.cs: -------------------------------------------------------------------------------- 1 | namespace SSCoreLib.Browse 2 | { 3 | /// 4 | /// Determines the state of a browsing process. for instance, browsing a 5 | /// viewmodel (and it attached view(s)) from 'C:\' to 'G:\' may involve 6 | /// a: 7 | /// - start state == (Unknown) 8 | /// 9 | /// and a state of completion: 10 | /// - error == Incomplete or 11 | /// - success == Complete 12 | /// 13 | public enum BrowseResult 14 | { 15 | /// 16 | /// Result is unknown since browse task is currently running 17 | /// or completed with unknown result ... 18 | /// 19 | Unknown = 0, 20 | 21 | /// 22 | /// Browse Process OK - destination does exist and is accessible 23 | /// 24 | Complete = 1, 25 | 26 | /// 27 | /// Error indicator - destination does not exist or is not accessible 28 | /// 29 | InComplete = 2 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Demos/SSCCoreLib/Browse/BrowsingEventArgs.cs: -------------------------------------------------------------------------------- 1 | namespace SSCoreLib.Browse 2 | { 3 | using System; 4 | using WSF.Interfaces; 5 | 6 | /// 7 | /// A simple event based state model that informs the subscriber about the 8 | /// state of the browser when changing between locations. 9 | /// 10 | public class BrowsingEventArgs : EventArgs 11 | { 12 | /// 13 | /// Event type class constructor from parameter 14 | /// 15 | public BrowsingEventArgs(IDirectoryBrowser location, 16 | bool isBrowsing, 17 | BrowseResult result = BrowseResult.Unknown) 18 | : this() 19 | { 20 | Location = location; 21 | IsBrowsing = isBrowsing; 22 | Result = result; 23 | } 24 | 25 | /// 26 | /// Class constructor 27 | /// 28 | protected BrowsingEventArgs() 29 | : base() 30 | { 31 | this.Location = null; 32 | this.IsBrowsing = false; 33 | } 34 | 35 | /// 36 | /// Path we are browsing to or being arrived at. 37 | /// 38 | public IDirectoryBrowser Location { get; private set; } 39 | 40 | /// 41 | /// Determines if we are: 42 | /// 1) Currently browsing towards this path (display progress) or 43 | /// 2) if the browsing process has arrived at this location (finish progress display). 44 | /// 45 | public bool IsBrowsing { get; private set; } 46 | 47 | /// 48 | /// Gets the result of the browsing process. This should be Unknown 49 | /// if is true and either Complete or InComplete 50 | /// in all other cases. 51 | /// 52 | public BrowseResult Result { get; private set; } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /Demos/SSCCoreLib/Browse/FinalBrowseResult.cs: -------------------------------------------------------------------------------- 1 | namespace SSCoreLib.Browse 2 | { 3 | using System; 4 | 5 | /// 6 | /// Class models the final result of the process for browsing to a location (path) 7 | /// in the file system. A controller should use this class to measure success or 8 | /// failure of a previous . 9 | /// 10 | /// An object of this class can be used to match a previous request with the 11 | /// indicated result (for logging or debugging purposes). 12 | /// 13 | public class FinalBrowseResult 14 | { 15 | #region ctors 16 | /// 17 | /// Parameterized class constructor. 18 | /// 19 | public FinalBrowseResult(T requestedLocation, 20 | RequestType typeOfRequest, 21 | Guid requestId = default(System.Guid), 22 | BrowseResult result = BrowseResult.Unknown 23 | ) 24 | : this() 25 | { 26 | RequestedLocation = requestedLocation; 27 | RequestedAction = typeOfRequest; 28 | Result = result; 29 | RequestId = requestId; 30 | } 31 | 32 | /// 33 | /// Class constructor. 34 | /// 35 | protected FinalBrowseResult() 36 | { 37 | Result = BrowseResult.Unknown; 38 | RequestedLocation = default(T); 39 | RequestId = default(System.Guid); 40 | } 41 | #endregion ctors 42 | 43 | #region properties 44 | /// 45 | /// Gets a descriptive browse result that can be used to classify 46 | /// success or failure and sub-class different types of failures. 47 | /// 48 | public BrowseResult Result { get; } 49 | 50 | /// 51 | /// Gets the new location (a path in the file system) to indicate 52 | /// the target of this browse request. 53 | /// 54 | public T RequestedLocation { get; } 55 | 56 | public RequestType RequestedAction { get; } 57 | 58 | /// 59 | /// Gets the Id that identifies this request among all other requests that may 60 | /// occur if multiple browse requests are initiated or if user interaction also 61 | /// causes additional browse processing... 62 | /// 63 | public Guid RequestId { get; } 64 | 65 | /// 66 | /// Gets/sets an exception object that can be used to communicate exceptional 67 | /// results back to the requesting instance. 68 | /// 69 | public System.Exception UnexpectedError { get; set; } 70 | #endregion properties 71 | 72 | /// 73 | /// ShortCut to convert a given into a final 74 | /// result receipt to support simple closure of requests being full-filled or not etc ... 75 | /// 76 | /// 77 | /// 78 | /// 79 | public static FinalBrowseResult FromRequest(BrowseRequest request, BrowseResult result) 80 | { 81 | if (request != null) 82 | return new FinalBrowseResult(request.NewLocation, request.ActionRequested, 83 | request.RequestId, result); 84 | 85 | return new FinalBrowseResult(default(T), RequestType.Navigational, Guid.NewGuid(), result); 86 | } 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /Demos/SSCCoreLib/Browse/ICanNavigate.cs: -------------------------------------------------------------------------------- 1 | namespace SSCoreLib.Browse 2 | { 3 | using System; 4 | 5 | /// 6 | /// Defines an interface that should be exposed if a control can 7 | /// request the controller (and hence other controls) to browse to 8 | /// a new file system location. 9 | /// 10 | public interface ICanNavigate 11 | { 12 | /// 13 | /// Indicates when the viewmodel starts heading off somewhere else 14 | /// and when its done browsing to a new location. 15 | /// 16 | event EventHandler BrowseEvent; 17 | 18 | /// 19 | /// Can only be set by the control if user started browser process 20 | /// 21 | /// Use IsBrowsing and IsExternallyBrowsing to lock the controls UI 22 | /// during browse operations or display appropriate progress bar(s). 23 | /// 24 | bool IsBrowsing { get; } 25 | } 26 | } 27 | 28 | -------------------------------------------------------------------------------- /Demos/SSCCoreLib/Browse/INavigateable.cs: -------------------------------------------------------------------------------- 1 | namespace SSCoreLib.Browse 2 | { 3 | using WSF.Interfaces; 4 | using System.Threading.Tasks; 5 | 6 | /// 7 | /// Defines an interface that supports the case where a controller 8 | /// can request a control or sub-system to browse to a certain location. 9 | /// 10 | public interface INavigateable : ICanNavigate 11 | { 12 | /// 13 | /// Controller can start browser process if IsBrowsing = false 14 | /// 15 | /// 16 | /// 17 | FinalBrowseResult NavigateTo(BrowseRequest newPath); 18 | 19 | /// 20 | /// Controller can start browser process if IsBrowsing = false 21 | /// 22 | /// 23 | /// 24 | Task> NavigateToAsync(BrowseRequest newPath); 25 | 26 | /// 27 | /// Sets the IsExternalBrowsing state and cleans up any running processings 28 | /// if any. This method should only be called by an external controll instance. 29 | /// 30 | /// 31 | void SetExternalBrowsingState(bool isBrowsing); 32 | } 33 | } -------------------------------------------------------------------------------- /Demos/SSCCoreLib/Browse/INavigationController.cs: -------------------------------------------------------------------------------- 1 | namespace SSCoreLib.Browse 2 | { 3 | using WSF.Interfaces; 4 | using System.Threading; 5 | 6 | /// 7 | /// Is implemented by the controller viewmodel to coordinate all actions 8 | /// in a task based and cancelable way. 9 | /// 10 | public interface INavigationController 11 | { 12 | CancellationTokenSource GetCancelToken(); 13 | 14 | void QueueTask(BrowseRequest request); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Demos/SSCCoreLib/Interfaces/ITaskQueueViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace SSCoreLib.Interfaces 2 | { 3 | using System; 4 | using System.ComponentModel; 5 | using System.Threading; 6 | using System.Windows.Input; 7 | using WSF.Interfaces; 8 | using SSCoreLib.Browse; 9 | 10 | /// 11 | /// Defines an interface to a viewmodel object that keeps a collection of active tasks 12 | /// that can be canceled in order to support management of Cancel-able background tasks 13 | /// that can run longer than 1 second in dependence of the actual runtime environment. 14 | /// 15 | public interface ITaskQueueViewModel : IDisposable, INotifyPropertyChanged 16 | { 17 | #region properties 18 | /// 19 | /// Gets whether there is a long running background task processing 20 | /// that could be canceled. 21 | /// 22 | bool IsProcessCancelable { get; } 23 | 24 | /// 25 | /// Gets a command that will cancel all currently queued tasks (if any). 26 | /// Canceled tasks may run to completeness or leave off in the middle of 27 | /// the processing - it is the responsibility of the caller to ensure 28 | /// clean states and correct processing after cancellation has taken place. 29 | /// 30 | ICommand CancelProcess { get; } 31 | #endregion properties 32 | 33 | #region methods 34 | /// 35 | /// Adds a browse request task into the queue if the contained 36 | /// RequestId unique towards all tasks queued so far. 37 | /// 38 | /// 39 | void AddTaskToQueue(BrowseRequest request); 40 | 41 | /// 42 | /// Removes a browse request task from the queue if the contained 43 | /// unique id can be found in the queue (Invoking this method is 44 | /// not required under normal circumstances because completed tasks 45 | /// are not queued and tasks that completed normally are automatically 46 | /// removed upon completion - see AddTaskToQueue() for details). 47 | /// 48 | /// The removed task is not canceled or processed in any other way 49 | /// - it is the responsibility of the caller to implement additional 50 | /// processing if necessary. 51 | /// 52 | /// 53 | /// Returns the browse task that was successfully removed (if any) 54 | /// from the queue, otherwise this returns null. 55 | /// 56 | void RemoveTaskFromQueue(BrowseRequest request); 57 | 58 | /// 59 | /// Gets the current cancellation source which can be used to generate 60 | /// another cancellation token which in turn is required to signal a task 61 | /// when it should be ending (because user canceled or timeout or such ...) 62 | /// 63 | CancellationTokenSource GetCancelTokenSrc(); 64 | #endregion 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /Demos/SSCCoreLib/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("SSCoreLib")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("SSCoreLib")] 13 | [assembly: AssemblyCopyright("Copyright © 2018")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("24ae0c23-875a-4718-bf04-2ccec08def05")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Demos/SSCCoreLib/Resources/FolderOpen.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dirkster99/bm/3ed1e42d420a0898d2d07a88c35002545b110798/Demos/SSCCoreLib/Resources/FolderOpen.ico -------------------------------------------------------------------------------- /Demos/SSCCoreLib/SSCoreLib.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {24AE0C23-875A-4718-BF04-2CCEC08DEF05} 8 | Library 9 | Properties 10 | SSCoreLib 11 | SSCoreLib 12 | v4.5.1 13 | 512 14 | true 15 | 16 | 17 | 18 | true 19 | full 20 | false 21 | bin\Debug\ 22 | DEBUG;TRACE 23 | prompt 24 | 4 25 | 26 | 27 | pdbonly 28 | true 29 | bin\Release\ 30 | TRACE 31 | prompt 32 | 4 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | ..\..\packages\Dirkster.WSF.1.2.0\lib\net40\WSF.dll 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /Demos/SSCCoreLib/ViewModels/Base/ViewModelBase.cs: -------------------------------------------------------------------------------- 1 | namespace SSCoreLib.ViewModels.Base 2 | { 3 | using System; 4 | using System.ComponentModel; 5 | using System.Linq.Expressions; 6 | 7 | /// 8 | /// Base of Viewmodel classes implemented in this assembly. 9 | /// 10 | public class ViewModelBase : INotifyPropertyChanged 11 | { 12 | #region constructor 13 | /// 14 | /// Standard class constructor 15 | /// 16 | public ViewModelBase() 17 | { 18 | } 19 | #endregion constructor 20 | 21 | /// 22 | /// Standard event of the interface. 23 | /// 24 | public event PropertyChangedEventHandler PropertyChanged; 25 | 26 | #region methods 27 | /// 28 | /// Tell bound controls (via WPF binding) to refresh their display 29 | /// for the viewmodel property indicated as string. 30 | /// 31 | /// 32 | protected virtual void RaisePropertyChanged(string propName) 33 | { 34 | if (PropertyChanged != null) 35 | PropertyChanged(this, new PropertyChangedEventArgs(propName)); 36 | } 37 | 38 | /// 39 | /// Tell bound controls (via WPF binding) to refresh their display. 40 | /// 41 | /// Sample call: this.OnPropertyChanged(() => this.IsSelected); 42 | /// where 'this' is derived from 43 | /// and IsSelected is a property. 44 | /// 45 | /// 46 | /// 47 | protected void RaisePropertyChanged(Expression> propertyExpression) 48 | { 49 | if (propertyExpression.Body.NodeType == ExpressionType.MemberAccess) 50 | { 51 | var memberExpr = propertyExpression.Body as MemberExpression; 52 | string propertyName = memberExpr.Member.Name; 53 | RaisePropertyChanged(propertyName); 54 | } 55 | } 56 | #endregion methods 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /Demos/SSCCoreLib/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Demos/ThemedDemo/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 | 6 | 7 | 8 | 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 | -------------------------------------------------------------------------------- /Demos/ThemedDemo/App.xaml: -------------------------------------------------------------------------------- 1 |  5 | 6 | -------------------------------------------------------------------------------- /Demos/ThemedDemo/BindToMLib/BmLib/DarkLightBrushs.xaml: -------------------------------------------------------------------------------- 1 |  7 | 8 | 12 | 13 | 17 | 18 | 22 | 23 | 24 | 28 | 29 | 30 | 34 | 35 | 36 | 41 | 42 | 43 | 47 | 48 | 51 | 53 | 54 | 56 |