Exemplo n.º 1
0
        public StandardEngine(
            ISettingsManager settingsManager,
            IBranchManager branchManager,
            ICommandLineManager commandLineManager,
            IBannerManager bannerManager,
            IAppearanceManager appearanceManager,
            IErrorManager errorManager,
            IDialogsManager dialogsManager,
            IHelpManager helpManager,
            IAdvancedMenuManager advancedMenuManager,
            IEndpointManager endpointManager
            )
        {
            SettingsManager = settingsManager;
            BranchManager = branchManager;
            BannerManager = bannerManager;
            AppearanceManager = appearanceManager;
            CommandLineManager = commandLineManager;
            ErrorManager = errorManager;
            DialogsManager = dialogsManager;
            HelpManager = helpManager;
            AdvancedMenuManager = advancedMenuManager;
            EndpointManager = endpointManager;

            Identifier = Guid.NewGuid();
        }
Exemplo n.º 2
0
        public AdvancedMenuModel(
            IAdvancedMenuManager advancedMenuManager,
            IAppearanceManager appearanceManager,
            IBranchManager branchManager,
            IHelpManager helpManager,
            AbstractDialogModel model)
        {
            IsEnabled = true;
            _advancedMenuManager = advancedMenuManager;
            _appearanceManager = appearanceManager;
            _branchManager = branchManager;
            _helpManager = helpManager;
            _model = model;
            _dialogInstance = new AdvancedMenuWindow { DataContext = this };
            BuildGroupsList();
            _width = 500;
            _height = 550;
            Cursor = Cursors.Arrow;
            Title = _advancedMenuManager.DefaultTitle;
            Description = _advancedMenuManager.DefaultDescription;
            _timer = new DispatcherTimer
                {
                    Interval = new TimeSpan(0, 0, 0, 0, 500),
                    IsEnabled = false,
                };

            _timer.Tick += TimerTickHandler;
        }
Exemplo n.º 3
0
 public RunModel(IAppearanceManager appearanceManager, AdvancedMenuModel model)
     : base(appearanceManager, model)
 {
     IsCancelButton = true;
     IsDefaultButton = false;
     Text = "Run";
 }
        private void CreateDefaultsSettings(ISettingsManager settings
                                            , IAppearanceManager appearance)
        {
            try
            {
                // Add default themings for Dark and Light
                appearance.SetDefaultThemes(settings.Themes);

                // Add additional Dark and Light resources to those theme resources added above
                appearance.AddThemeResources("Dark", new List <Uri>
                {
                    new Uri("/MWindowDialogLib;component/Themes/DarkIcons.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/MWindowDialogLib;component/Themes/DarkBrushs.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/BindToMLib;component/DarkBrushs.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/FolderBrowser;component/Themes/MetroDark.xaml", UriKind.RelativeOrAbsolute)

//                   ,new Uri("/PDF Binder;component/Themes/MWindowLib/DarkBrushs.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/PDF Binder;component/Themes/Dark/DarkIcons.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/PDF Binder;component/Themes/WatermarkControlsLib/DarkBrushs.xaml", UriKind.RelativeOrAbsolute)
                }, settings.Themes);
            }
            catch
            {
            }


            try
            {
                appearance.AddThemeResources("Light", new List <Uri>
                {
                    new Uri("/MWindowDialogLib;component/Themes/LightIcons.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/MWindowDialogLib;component/Themes/LightBrushs.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/BindToMLib;component/LightBrushs.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/FolderBrowser;component/Themes/MetroDark.xaml", UriKind.RelativeOrAbsolute)

//                   ,new Uri("/PDF Binder;component/Themes/MWindowLib/LightBrushs.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/PDF Binder;component/Themes/Light/LightIcons.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/PDF Binder;component/Themes/WatermarkControlsLib/LightBrushs.xaml", UriKind.RelativeOrAbsolute)
                }, settings.Themes);
            }
            catch
            {
            }


            try
            {
                // Create a general settings model to make sure the app is at least governed by defaults
                // if there are no customized settings on first ever start-up of application
                var options = settings.Options;

                SettingDefaults.CreateGeneralSettings(options);
                SettingDefaults.CreateAppearanceSettings(options, settings);

                settings.Options.SetUndirty();
            }
            catch
            {
            }
        }
Exemplo n.º 5
0
        /// <summary>
        /// Standard Constructor
        /// </summary>
        public ThemesManagerViewModel(ISettingsManager settings,
                                      IAppearanceManager appearanceManager)
            : this()
        {
            _SettingsManager   = settings;
            _AppearanceManager = appearanceManager;

            CreateDefaultsSettings(settings, appearanceManager);

            foreach (var item in _SettingsManager.Themes.GetThemeInfos())
            {
                var list = new List <string>();
                foreach (var subitem in item.ThemeSources)
                {
                    list.Add(subitem.ToString());
                }

                _ListOfThemes.Add(item.DisplayName, new ThemeDefinitionViewModel(new ThemeDefinition(item.DisplayName, list)));
            }


            // Lets make sure there is a default
            string defaultThemeDisplayName = _AppearanceManager.GetDefaultTheme().DisplayName;

            _ListOfThemes.TryGetValue(defaultThemeDisplayName, out _DefaultTheme);

            // and something sensible is selected
            _SelectedTheme            = _DefaultTheme;
            _SelectedTheme.IsSelected = true;
        }
Exemplo n.º 6
0
 protected AbstractCommandModel(IAppearanceManager appearanceManager, AdvancedMenuModel model)
 {
     AppearanceManager = appearanceManager;
     Model = model;
     Model.PropertyChanged += PropertyChangedHandler;
     PropertyChanged += PropertyChangedHandler;
 }
Exemplo n.º 7
0
        private void CreateDefaultsSettings(ISettingsManager settings
                                            , IAppearanceManager appearance)
        {
            try
            {
                // Add default themings for Dark and Light
                appearance.SetDefaultThemes(settings.Themes);

                // Add additional Dark resources to those theme resources added above
                appearance.AddThemeResources("Dark", new List <Uri>
                {
                    new Uri("/ColorPickerLib;component/Themes/DarkBrushs.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/NumericUpDownLib;component/Themes/DarkBrushs.xaml", UriKind.RelativeOrAbsolute)

                    , new Uri("/MWindowLib;component/Themes/DarkTheme.xaml", UriKind.RelativeOrAbsolute)

                    , new Uri("/ThemedDemo;component/BindToMLib/NumericUpDownLib/DarkLightBrushs.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/ThemedDemo;component/BindToMLib/MWindowLib/DarkLightBrushs.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/ThemedDemo;component/BindToMLib/ColorPickerLib/DarkLightBrushs.xaml", UriKind.RelativeOrAbsolute)
                }, settings.Themes);
            }
            catch
            {
            }

            try
            {
                // Add additional Light resources to those theme resources added above
                appearance.AddThemeResources("Light", new List <Uri>
                {
                    new Uri("/ColorPickerLib;component/Themes/LightBrushs.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/NumericUpDownLib;component/Themes/LightBrushs.xaml", UriKind.RelativeOrAbsolute)

                    , new Uri("/MWindowLib;component/Themes/LightTheme.xaml", UriKind.RelativeOrAbsolute)

                    , new Uri("/ThemedDemo;component/BindToMLib/NumericUpDownLib/DarkLightBrushs.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/ThemedDemo;component/BindToMLib/MWindowLib/DarkLightBrushs.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/ThemedDemo;component/BindToMLib/ColorPickerLib/DarkLightBrushs.xaml", UriKind.RelativeOrAbsolute)
                }, settings.Themes);
            }
            catch
            {
            }

            try
            {
                // Create a general settings model to make sure the app is at least governed by defaults
                // if there are no customized settings on first ever start-up of application
                var options = settings.Options;

                SettingDefaults.CreateGeneralSettings(options);
                SettingDefaults.CreateAppearanceSettings(options, settings);

                settings.Options.SetUndirty();
            }
            catch
            {
            }
        }
Exemplo n.º 8
0
        /// <summary>
        /// Class constructor
        /// </summary>
        public ThemesManager()
        {
            _SelectedThemeName = ThemesManager.DefaultThemeNameString;

            _AppearanceManager = MLib.AppearanceManager.GetInstance();
            _TextEditorThemes  = new SortedDictionary <string, IThemeBase>();
            _ListOfAllThemes   = new ObservableCollection <IThemeBase>();
        }
Exemplo n.º 9
0
 public HelpDialogModel(IHelpManager helpManager, IAppearanceManager appearanceManager)
 {
     _helpManager = helpManager;
     _appearanceManager = appearanceManager;
     _dialogInstance = new HelpWindow { DataContext = this };
     _dialogInstance.Browser.Navigated += LoadingCompleteHandler;
     _dialogInstance.Browser.Navigating += NavigatingHandler;
 }
Exemplo n.º 10
0
 public AdvancedMenuGroupModel(IAppearanceManager appearanceManager, IBranchManager branchManager, AdvancedMenuModel model, string groupName)
 {
     _appearanceManager = appearanceManager;
     _branchManager = branchManager;
     _model = model;
     Title = groupName;
     _model.PropertyChanged += PropertyChangedHandler;
 }
Exemplo n.º 11
0
 public ThemeManager(IAppearanceManager appearanceMgr, IGlobalOptions options)
 {
     AppearanceManager = appearanceMgr;
     Themes            = appearanceMgr.CreateThemeInfos();
     AccentColor       = Color.FromRgb(0, 114, 198);
     Options           = options;
     CurrentTheme      = Options.Theme;
     _app = Application.Current;
     LoadThemeResources();
 }
Exemplo n.º 12
0
 public AdvancedMenuManager(IAppearanceManager appearanceManager, IBranchManager branchManager, IHelpManager helpManager, ISettingsManager settingsManager)
 {
     _appearanceManager = appearanceManager;
     _branchManager = branchManager;
     _helpManager = helpManager;
     _settingsManager = settingsManager;
     Items = new Dictionary<string, IAdvancedMenuItem>();
     DefaultTitle = "Advanced Support Tools";
     DefaultDescription = "This is a place-holder description.";
 }
Exemplo n.º 13
0
        /// <summary>
        /// Call this to initialize application specific items that should be initialized
        /// before loading and display of mainWindow.
        ///
        /// Invocation of This method is REQUIRED if UI is used in this application instance.
        ///
        /// Method should not be called after <seealso cref="InitWithoutMainWindow"/>
        /// </summary>
        public void InitForMainWindow(IAppearanceManager appearance
                                      , string themeDisplayName)
        {
            // Initialize base that does not require UI
            InitWithoutMainWindow();

            appearance.AccentColorChanged += Appearance_AccentColorChanged;

            // Initialize UI specific stuff here
            this.AppTheme.ApplyTheme(Application.Current.MainWindow, themeDisplayName);
        }
Exemplo n.º 14
0
        public HelpModel(IAppearanceManager appearanceManager, IHelpManager helpManager, AdvancedMenuModel model)
            : base(appearanceManager, model)
        {
            _helpManager = helpManager;

            Visibility = !_helpManager.TopicExists(model.HelpTopic) ? Visibility.Hidden : Visibility.Visible;
            Command = new ClearFocusCommand(
                model.DialogInstance,
                param=>_helpManager.ShowHelpTopic(model.HelpTopic, model.ParentModel));

            Text = "Help";
        }
Exemplo n.º 15
0
 public AdvancedMenuItemModel(IAdvancedMenuItem item, AdvancedMenuModel model, IAppearanceManager appearanceManager, IBranchManager branchManager)
 {
     _item = item;
     _model = model;
     _appearanceManager = appearanceManager;
     _branchManager = branchManager;
     Background = _appearanceManager.BodyTextBrush;
     GraphicForeground = _appearanceManager.BodyTextBrush;
     GraphicBackground = _appearanceManager.BackgroundBrush;
     TextBrush = _appearanceManager.BackgroundBrush;
     _model.PropertyChanged += PropertyChangedHandler;
 }
Exemplo n.º 16
0
        private void CreateDefaultsSettings(ISettingsManager settings
                                            , IAppearanceManager appearance)
        {
            var themeInfos = settings.Themes;

            for (int i = 0; i < _WpfThemes.GetLength(0); i++)
            {
                var        item         = _WpfThemes[i];
                List <Uri> WpfResources = null;
                switch (item[1])
                {
                case "Light":
                    WpfResources = new List <Uri>(LightResources);
                    break;

                case "Dark":
                    WpfResources = new List <Uri>(DarkResources);
                    break;

                default:
                    throw new ArgumentOutOfRangeException("WPF theme base:" + item[1] + " not supported.");
                }

                try
                {
                    // Combine resources into one consistent model
                    var theme = new ThemeDefinition(item[0], WpfResources, item[2]);
                    themeInfos.AddThemeInfo(theme);
                }
                catch (Exception exc)
                {
                    Debug.WriteLine(exc.StackTrace);
                }
            }

            appearance.SetDefaultTheme(themeInfos, "Light");             // configure a default WPF theme

            try
            {
                // Create a general settings model to make sure the app is at least governed by defaults
                // if there are no customized settings on first ever start-up of application
                var options = settings.Options;

                SettingDefaults.CreateGeneralSettings(options);
                SettingDefaults.CreateAppearanceSettings(options, settings);

                settings.Options.SetUndirty();
            }
            catch
            {
            }
        }
Exemplo n.º 17
0
        public HelpManager(IAppearanceManager appearanceManager, ISettingsManager settingsManager, IEndpointManager endpointManager)
        {
            _settingsManager = settingsManager;
            _endpointManager = endpointManager;
            _model = new HelpDialogModel(this, appearanceManager);
            SchemeHandlers = new Dictionary<string, IHelpSchemeHandler>
                {
                    {"archive", new ArchiveSchemeHandler()}
                };

            PreserveContentText = "Preserve this content in a new window when the utility exits.";
            DialogTitle = "Help Resources";
            InitialLeftOffset = -75;
            InitialTopOffset = -75;
        }
Exemplo n.º 18
0
        /// <summary>
        /// Load configuration from persistence on startup of application
        /// </summary>
        public void LoadConfigOnAppStartup(ISettingsManager settings
                                           , IAppearanceManager appearance)
        {
            try
            {
                // Re/Load program options and user profile session data to control global behaviour of program
                settings.Options.ReadXML(DirFileAppSettingsData);
                settings.LoadSessionData(Core.DirFileAppSessionData);

                settings.CheckSettingsOnLoad(SystemParameters.VirtualScreenLeft,
                                             SystemParameters.VirtualScreenTop);
            }
            catch
            {
            }
        }
Exemplo n.º 19
0
        /// <summary>
        /// Load configuration from persistence on startup of application
        /// </summary>
        public void LoadConfigOnAppStartup(ISettingsManager settings
                                           , IAppearanceManager appearance)
        {
            try
            {
                CreateDefaultsSettings(settings, appearance);

                /***
                 * // Re/Load program options and user profile session data to control global behaviour of program
                 * ////settings.LoadOptions(AppCore.DirFileAppSettingsData);
                 * settings.Options.ReadXML(DirFileAppSettingsData);
                 * settings.LoadSessionData(Models.AppCore.DirFileAppSessionData);
                 *
                 * settings.CheckSettingsOnLoad(SystemParameters.VirtualScreenLeft,
                 *                  SystemParameters.VirtualScreenTop);
                 ***/
            }
            catch
            {
            }
        }
Exemplo n.º 20
0
 static AppearanceManager()
 {
     _instance = new Internal.AppearanceManagerImp();
 }
Exemplo n.º 21
0
 public BorderedDialogModel(IDialogsManager dialogsManager, IBannerManager bannerManager, IAppearanceManager appearanceManager)
     : base(dialogsManager, bannerManager, appearanceManager, new StarkBorderedWindow())
 {
     ShowInTaskbar = true;
     WindowStyle = WindowStyle.SingleBorderWindow;
 }
Exemplo n.º 22
0
 /// <summary>
 /// Class cosntructor
 /// </summary>
 public SettingsManagerImpl(IAppearanceManager appearanceManager)
     : this()
 {
     _AppearanceManager = appearanceManager;
 }
Exemplo n.º 23
0
 /// <summary>
 /// Gets an instance of an object that implements the
 /// <see cref="ISettingsManager"/> interface.
 /// </summary>
 /// <returns></returns>
 public static ISettingsManager GetInstance(IAppearanceManager appearanceManager)
 {
     return(new SettingsManagerImpl(appearanceManager));
 }
Exemplo n.º 24
0
        private void CreateDefaultsSettings(ISettingsManager settings
                                            , IAppearanceManager appearance)
        {
            try
            {
                // Add default themings for Dark and Light
                appearance.SetDefaultThemes(settings.Themes);

                // Add additional Dark resources to those theme resources added above
                appearance.AddThemeResources("Dark", new List <Uri>
                {
                    ////new Uri("/FolderBrowser;component/Themes/MetroDark.xaml", UriKind.RelativeOrAbsolute)
                    new Uri("/FolderBrowser;component/Themes/MetroDark.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/UserNotification;component/Themes/DarkBrushs.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/InplaceEditBoxLib;component/Themes/DarkBrushs.xaml", UriKind.RelativeOrAbsolute)

                    , new Uri("/MWindowDialogLib;component/Themes/DarkIcons.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/MWindowDialogLib;component/Themes/DarkTheme.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/DropDownButtonLib;component/Themes/MetroDark.xaml", UriKind.RelativeOrAbsolute)

                    // MWindowDialogLib is only used here so we can use a local BindToMLib version
                    , new Uri("/FolderBrowserDemo;component/BindToMLib/MWindowDialogLib/DarkLightBrushs.xaml", UriKind.RelativeOrAbsolute)

                    , new Uri("/BindToMLib;component/DarkBrushs.xaml", UriKind.RelativeOrAbsolute)
                }, settings.Themes);
            }
            catch
            {
            }

            try
            {
                // Add additional Light resources to those theme resources added above
                appearance.AddThemeResources("Light", new List <Uri>
                {
                    new Uri("/UserNotification;component/Themes/LightBrushs.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/InplaceEditBoxLib;component/Themes/LightBrushs.xaml", UriKind.RelativeOrAbsolute)

                    , new Uri("/MWindowDialogLib;component/Themes/LightIcons.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/MWindowDialogLib;component/Themes/LightTheme.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/DropDownButtonLib;component/Themes/MetroLight.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/FolderBrowser;component/Themes/MetroLight.xaml", UriKind.RelativeOrAbsolute)

                    // MWindowDialogLib is only used here so we can use a local BindToMLib version
                    , new Uri("/FolderBrowserDemo;component/BindToMLib/MWindowDialogLib/DarkLightBrushs.xaml", UriKind.RelativeOrAbsolute)

                    , new Uri("/BindToMLib;component/LightBrushs.xaml", UriKind.RelativeOrAbsolute)
                }, settings.Themes);
            }
            catch
            {
            }

            try
            {
                // Create a general settings model to make sure the app is at least governed by defaults
                // if there are no customized settings on first ever start-up of application
                var options = settings.Options;

                SettingDefaults.CreateGeneralSettings(options);
                SettingDefaults.CreateAppearanceSettings(options, settings);

                settings.Options.SetUndirty();
            }
            catch
            {
            }
        }
Exemplo n.º 25
0
        private void CreateDefaultsSettings(ISettingsManager settings
                                            , IAppearanceManager appearance)
        {
            settings.Themes.RemoveAllThemeInfos();
            settings.Themes.AddThemeInfo("Generic", new List <Uri> {
            });
            settings.Themes.AddThemeInfo("VS 2013 Blue", new List <Uri> {
            });
            settings.Themes.AddThemeInfo("VS 2013 Dark", new List <Uri> {
            });
            settings.Themes.AddThemeInfo("VS 2013 Light", new List <Uri> {
            });

            settings.Themes.AddThemeInfo("Metro", new List <Uri> {
            });

            settings.Themes.AddThemeInfo("Expression Dark", new List <Uri> {
            });
            settings.Themes.AddThemeInfo("Expression Light", new List <Uri> {
            });

            try
            {
                // Adding Generic theme (which is really based on Light theme in MLib)
                // but other components may have another theme definition for Generic
                // so this is how it can be tested ...
                appearance.AddThemeResources("Generic", new List <Uri>
                {
                    new Uri("/MWindowLib;component/Themes/Generic.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/Xceed.Wpf.AvalonDock;component/Themes/generic.xaml", UriKind.RelativeOrAbsolute)

                    , new Uri("/MLib;component/Themes/Generic.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/MLibTest;component/BindToMLib/MWindowLib_DarkLightBrushs.xaml", UriKind.RelativeOrAbsolute)
                }, settings.Themes);
            }
            catch (Exception exp)
            {
                Debug.WriteLine(exp);
            }

            try
            {
                // Adding Generic theme (which is really based on Light theme in MLib)
                // but other components may have another theme definition for Generic
                // so this is how it can be tested ...
                appearance.AddThemeResources("VS 2013 Blue", new List <Uri>
                {
                    new Uri("/Xceed.Wpf.AvalonDock.Themes.VS2013;component/Themes/generic.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/Xceed.Wpf.AvalonDock.Themes.VS2013;component/BlueBrushs.xaml", UriKind.RelativeOrAbsolute)

                    , new Uri("/MLib;component/Themes/Generic.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/MWindowLib;component/Themes/Generic.xaml", UriKind.RelativeOrAbsolute)

                    , new Uri("/MLibTest;component/BindToMLib/MWindowLib_DarkLightBrushs.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/MLibTest;component/BindToMLib/AvalonDock_Dark_LightBrushs.xaml", UriKind.RelativeOrAbsolute)
                }, settings.Themes);
            }
            catch (Exception exp)
            {
                Debug.WriteLine(exp);
            }

            try
            {
                // Add additional Dark and Light resources to those theme resources added above
                appearance.AddThemeResources("VS 2013 Dark", new List <Uri>
                {
                    new Uri("/Xceed.Wpf.AvalonDock.Themes.VS2013;component/Themes/generic.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/Xceed.Wpf.AvalonDock.Themes.VS2013;component/DarkBrushs.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/ColorPickerLib;component/Themes/DarkBrushs.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/NumericUpDownLib;component/Themes/DarkBrushs.xaml", UriKind.RelativeOrAbsolute)

                    , new Uri("/MLib;component/Themes/DarkTheme.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/MWindowLib;component/Themes/DarkBrushs.xaml", UriKind.RelativeOrAbsolute)

                    , new Uri("/MLibTest;component/BindToMLib/MWindowLib_DarkLightBrushs.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/MLibTest;component/BindToMLib/AvalonDock_Dark_LightBrushs.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/MLibTest;component/BindToMLib/ColorPickerLib_DarkLightBrushs.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/MLibTest;component/BindToMLib/NumericUpDownLib_DarkLightBrushs.xaml", UriKind.RelativeOrAbsolute)
                }, settings.Themes);
            }
            catch (Exception exp)
            {
                Debug.WriteLine(exp);
            }

            try
            {
                appearance.AddThemeResources("VS 2013 Light", new List <Uri>
                {
                    new Uri("/Xceed.Wpf.AvalonDock.Themes.VS2013;component/Themes/generic.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/Xceed.Wpf.AvalonDock.Themes.VS2013;component/LightBrushs.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/ColorPickerLib;component/Themes/LightBrushs.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/NumericUpDownLib;component/Themes/LightBrushs.xaml", UriKind.RelativeOrAbsolute)

                    , new Uri("/MLib;component/Themes/LightTheme.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/MWindowLib;component/Themes/LightBrushs.xaml", UriKind.RelativeOrAbsolute)

                    , new Uri("/MLibTest;component/BindToMLib/MWindowLib_DarkLightBrushs.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/MLibTest;component/BindToMLib/AvalonDock_Dark_LightBrushs.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/MLibTest;component/BindToMLib/ColorPickerLib_DarkLightBrushs.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/MLibTest;component/BindToMLib/NumericUpDownLib_DarkLightBrushs.xaml", UriKind.RelativeOrAbsolute)
                }, settings.Themes);
            }
            catch (Exception exp)
            {
                Debug.WriteLine(exp);
            }

            try
            {
                // Adding Generic theme (which is really based on Light theme in MLib)
                // but other components may have another theme definition for Generic
                // so this is how it can be tested ...
                appearance.AddThemeResources("Metro", new List <Uri>
                {
                    new Uri("/MLib;component/Themes/Generic.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/MWindowLib;component/Themes/Generic.xaml", UriKind.RelativeOrAbsolute)

                    , new Uri("/Xceed.Wpf.AvalonDock.Themes.Metro;component/Theme.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/MLibTest;component/BindToMLib/MWindowLib_DarkLightBrushs.xaml", UriKind.RelativeOrAbsolute)
                }, settings.Themes);
            }
            catch (Exception exp)
            {
                Debug.WriteLine(exp);
            }

            try
            {
                // Adding Generic theme (which is really based on Light theme in MLib)
                // but other components may have another theme definition for Generic
                // so this is how it can be tested ...
                appearance.AddThemeResources("Expression Light", new List <Uri>
                {
                    new Uri("/MLib;component/Themes/LightTheme.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/MWindowLib;component/Themes/Generic.xaml", UriKind.RelativeOrAbsolute)

                    , new Uri("/Xceed.Wpf.AvalonDock.Themes.Expression;component/LightTheme.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/MLibTest;component/BindToMLib/MWindowLib_DarkLightBrushs.xaml", UriKind.RelativeOrAbsolute)
                }, settings.Themes);
            }
            catch (Exception exp)
            {
                Debug.WriteLine(exp);
            }

            try
            {
                // Adding Generic theme (which is really based on Light theme in MLib)
                // but other components may have another theme definition for Generic
                // so this is how it can be tested ...
                appearance.AddThemeResources("Expression Dark", new List <Uri>
                {
                    new Uri("/MLib;component/Themes/DarkTheme.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/MWindowLib;component/Themes/Generic.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/ColorPickerLib;component/Themes/DarkBrushs.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/NumericUpDownLib;component/Themes/DarkBrushs.xaml", UriKind.RelativeOrAbsolute)

                    , new Uri("/Xceed.Wpf.AvalonDock.Themes.Expression;component/DarkTheme.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/MLibTest;component/BindToMLib/MWindowLib_DarkLightBrushs.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/MLibTest;component/BindToMLib/ColorPickerLib_DarkLightBrushs.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/MLibTest;component/BindToMLib/NumericUpDownLib_DarkLightBrushs.xaml", UriKind.RelativeOrAbsolute)
                }, settings.Themes);
            }
            catch (Exception exp)
            {
                Debug.WriteLine(exp);
            }

            appearance.SetDefaultTheme(settings.Themes, "VS 2013 Dark");

            try
            {
                // Create a general settings model to make sure the app is at least governed by defaults
                // if there are no customized settings on first ever start-up of application
                var options = settings.Options;

                Models.SettingDefaults.CreateGeneralSettings(options);
                Models.SettingDefaults.CreateAppearanceSettings(options, settings);

                settings.Options.SetUndirty();
            }
            catch
            {
            }
        }
Exemplo n.º 26
0
 public BorderlessChildDialogModel(IDialogsManager dialogsManager, IBannerManager bannerManager, IAppearanceManager appearanceManager)
     : base(dialogsManager, bannerManager, appearanceManager)
 {
     ShowInTaskbar = false;
 }
Exemplo n.º 27
0
        private void CreateDefaultsSettings(ISettingsManager settings
                                            , IAppearanceManager appearance)
        {
            try
            {
                try
                {
                    settings.Themes.RemoveAllThemeInfos();
                    settings.Themes.AddThemeInfo("Generic", new List <Uri> {
                    });

                    // Add default MLib themings for Dark and Light
                    appearance.SetDefaultThemes(settings.Themes, false);

                    // Adding Generic theme (which is really based on Light theme in MLib)
                    // but other components may have another theme definition for Generic
                    // so this is how it can be tested ...
                    appearance.AddThemeResources("Generic", new List <Uri>
                    {
                        new Uri("/MLib;component/Themes/Generic.xaml", UriKind.RelativeOrAbsolute)
                        , new Uri("/MWindowLib;component/Themes/Generic.xaml", UriKind.RelativeOrAbsolute)
                        , new Uri("/MWindowDialogLib;component/Themes/Generic.xaml", UriKind.RelativeOrAbsolute)
                        , new Uri("/BindToMLib;component/LightBrushs.xaml", UriKind.RelativeOrAbsolute)
                    }, settings.Themes);
                }
                catch (Exception exp)
                {
                    Debug.WriteLine(exp);
                }

                // Add additional Dark and Light resources to those theme resources added above
                appearance.AddThemeResources("Dark", new List <Uri>
                {
                    new Uri("/MWindowDialogLib;component/Themes/DarkIcons.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/MWindowDialogLib;component/Themes/DarkBrushs.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/BindToMLib;component/DarkBrushs.xaml", UriKind.RelativeOrAbsolute)

                    //,new Uri("/MWindowLib;component/Themes/DarkBrushs.xaml", UriKind.RelativeOrAbsolute)
                    //,new Uri("/MDemo;component/Themes/MWindowLib/DarkBrushs.xaml", UriKind.RelativeOrAbsolute)

                    , new Uri("/MDemo;component/Themes/Dark/DarkIcons.xaml", UriKind.RelativeOrAbsolute)
                    //,new Uri("/MDemo;component/Themes/MWindowDialogLib/DarkBrushs.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/MDemo;component/Demos/Views/Dialogs.xaml", UriKind.RelativeOrAbsolute)
                }, settings.Themes);
            }
            catch
            {
            }

            try
            {
                appearance.AddThemeResources("Light", new List <Uri>
                {
                    new Uri("/MWindowDialogLib;component/Themes/LightIcons.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/MWindowDialogLib;component/Themes/LightBrushs.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/BindToMLib;component/LightBrushs.xaml", UriKind.RelativeOrAbsolute)

                    //,new Uri("/MWindowLib;component/Themes/LightBrushs.xaml", UriKind.RelativeOrAbsolute)
                    //,new Uri("/MDemo;component/Themes/MWindowLib/LightBrushs.xaml", UriKind.RelativeOrAbsolute)

                    , new Uri("/MDemo;component/Themes/Light/LightIcons.xaml", UriKind.RelativeOrAbsolute)
                    //,new Uri("/MDemo;component/Themes/MWindowDialogLib/LightBrushs.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/MDemo;component/Demos/Views/Dialogs.xaml", UriKind.RelativeOrAbsolute)
                }, settings.Themes);
            }
            catch
            {
            }


            try
            {
                // Create a general settings model to make sure the app is at least governed by defaults
                // if there are no customized settings on first ever start-up of application
                var options = settings.Options;

                SettingDefaults.CreateGeneralSettings(options);
                SettingDefaults.CreateAppearanceSettings(options, settings);

                settings.Options.SetUndirty();
            }
            catch
            {
            }
        }
Exemplo n.º 28
0
 public BorderedChildDialogModel(IDialogsManager dialogsManager, IBannerManager bannerManager, IAppearanceManager appearanceManager)
     : base(dialogsManager, bannerManager, appearanceManager)
 {
     ShowInTaskbar = false;
     WindowStyle = WindowStyle.ToolWindow;
 }
Exemplo n.º 29
0
 public UpdateDisplayManager(ISettingsManager settingsManager, IAppearanceManager appearanceManager, string progressTextKey, string progressText, string progressTitleKey, string progressTitle, bool deferTitleUpdates, bool deferTextUpdates)
 {
     _settingsManager = settingsManager;
     _appearanceManager = appearanceManager;
     _progressTextKey = progressTextKey;
     _progressText = progressText;
     _progressTitleKey = progressTitleKey;
     _progressTitle = progressTitle;
     _deferTitleUpdates = deferTitleUpdates;
     _deferTextUpdates = deferTextUpdates;
 }
Exemplo n.º 30
0
 public BorderlessDialogModel(IDialogsManager dialogsManager, IBannerManager bannerManager, IAppearanceManager appearanceManager)
     : base(dialogsManager, bannerManager, appearanceManager, new BorderlessWindow())
 {
     ShowInTaskbar = true;
     SuppressCloseQuestion = true;
 }
Exemplo n.º 31
0
 public StandardTokens(ISettingsManager settingsManager, IEndpointManager endpointManager, IAppearanceManager appearanceManager)
 {
     _settingsManager = settingsManager;
     _endpointManager = endpointManager;
     _appearanceManager = appearanceManager;
 }
Exemplo n.º 32
0
        private void CreateDefaultsSettings(ISettingsManager settings
                                            , IAppearanceManager appearance)
        {
            try
            {
                // Add default themings for Dark and Light
                appearance.SetDefaultThemes(settings.Themes);

                // Add additional Dark resources to those theme resources added above
                appearance.AddThemeResources("Dark", new List <Uri>
                {
                    new Uri("/MWindowLib;component/Themes/DarkTheme.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/Aehnlich;component/BindToMLib/MWindowLib/DarkLightBrushs.xaml", UriKind.RelativeOrAbsolute)

                    , new Uri("/Xceed.Wpf.AvalonDock.Themes.VS2013;component/DarkTheme.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/Aehnlich;component/BindToMLib/AvalonDock_Dark_LightBrushs.xaml", UriKind.RelativeOrAbsolute)

                    , new Uri("/AehnlichViewLib;component/Themes/LightIcons.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/AehnlichViewLib;component/Themes/DarkBrushs.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/Aehnlich;component/BindToMLib/AehnlichViewLib_Dark_LightBrushs.xaml", UriKind.RelativeOrAbsolute)

                    , new Uri("/SuggestBoxLib;component/Themes/DarkBrushs.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/Aehnlich;component/BindToMLib/SuggestionLibDarkLightBrushs.xaml", UriKind.RelativeOrAbsolute)
                }, settings.Themes);
            }
            catch
            {
                // Ignore issues in theme definition stage to ensure app starts up
            }

            try
            {
                // Add additional Light resources to those theme resources added above
                appearance.AddThemeResources("Light", new List <Uri>
                {
                    new Uri("/MWindowLib;component/Themes/LightTheme.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/Aehnlich;component/BindToMLib/MWindowLib/DarkLightBrushs.xaml", UriKind.RelativeOrAbsolute)

                    , new Uri("/Xceed.Wpf.AvalonDock.Themes.VS2013;component/LightTheme.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/Aehnlich;component/BindToMLib/AvalonDock_Dark_LightBrushs.xaml", UriKind.RelativeOrAbsolute)

                    , new Uri("/AehnlichViewLib;component/Themes/LightIcons.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/AehnlichViewLib;component/Themes/LightBrushs.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/Aehnlich;component/BindToMLib/AehnlichViewLib_Dark_LightBrushs.xaml", UriKind.RelativeOrAbsolute)

                    , new Uri("/SuggestBoxLib;component/Themes/LightBrushs.xaml", UriKind.RelativeOrAbsolute)
                    , new Uri("/Aehnlich;component/BindToMLib/SuggestionLibDarkLightBrushs.xaml", UriKind.RelativeOrAbsolute)
                }, settings.Themes);
            }
            catch
            {
                // Ignore issues in theme definition stage to ensure app starts up
            }

            try
            {
                // Create a general settings model to make sure the app is at least governed by defaults
                // if there are no customized settings on first ever start-up of application
                var options = settings.Options;

                SettingDefaults.CreateGeneralSettings(options);
                SettingDefaults.CreateAppearanceSettings(options, settings);

                settings.Options.SetUndirty();
            }
            catch
            {
                // Ignore issues in theme definition stage to ensure app starts up
            }
        }