public void Initialize()
        {
            ColorList = ConsoleFormatService.GetColors();
            if (SettingsService.ForegroundColor == null)
            {
                ForegroundColor = "White";
            }
            else
            {
                ForegroundColor = SettingsService.ForegroundColor;
            }

            if (SettingsService.BackgroundColor == null)
            {
                BackgroundColor = "Black";
            }
            else
            {
                BackgroundColor = SettingsService.BackgroundColor;
            }

            FontFamilyList = ConsoleFormatService.GetFontFamilies();
            if (SettingsService.FontFamily == null)
            {
                FontFamily = FontFamilyList.FirstOrDefault();
            }
            else
            {
                FontFamily = SettingsService.FontFamily;
            }

            FontSize = SettingsService.FontSize;
        }
Beispiel #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ViewModel" /> class.
        /// </summary>
        public ViewModel()
        {
            saveAsCommand               = new DelegateCommand <object>(ExecuteSaveAsCommand);
            openCommand                 = new DelegateCommand <object>(ExecuteOpenCommand);
            closeCommand                = new DelegateCommand <object>(ExecuteCloseCommand);
            backStageExitCommand        = new DelegateCommand <object>(ExecuteBackStageExitCommand);
            onlineHelpCommand           = new DelegateCommand <object>(ExecuteOnlineHelpCommand);
            inHelpGettingStartedCommand = new DelegateCommand <object>(ExecuteGettingStartedCommand);
            returnToEditorCommand       = new DelegateCommand <object>(ExecuteReturnToEditorCommand);
            buttonCommand               = new DelegateCommand <object>(ButtonCommandExecute);
            dropdownCommand             = new DelegateCommand <object>(DropDownCommandExecute);
            ribbonComboBoxCommand       = new DelegateCommand <object>(ExecuteRibbonComboBoxCommand);

            setEnableTouchCommand            = new DelegateCommand <object>(ExecuteSetEnableTouchCommand);
            removeEnableTouchCommand         = new DelegateCommand <object>(ExecuteRemoveEnableTouchCommand);
            openModelTabCommand              = new DelegateCommand <object>(ExecuteOpenModelTabCommand);
            closeModelTabCommand             = new DelegateCommand <object>(ExecuteCloseModelTabCommand);
            flowDirectionCommand             = new DelegateCommand <object>(ExecuteFlowDirectionCommand);
            splashWindowLoadedCommand        = new DelegateCommand <object>(ExecuteSplashWindowLoadedCommand);
            mainWindowClosedCommand          = new DelegateCommand <object>(ExecuteMainWindowClosedCommand);
            ribbonDisableCommand             = new DelegateCommand <object>(ExecuteRibbonDisableCommand);
            simpleButtonsBarIsEnableProperty = true;

            var items = new System.Collections.ObjectModel.ObservableCollection <Model>();

            items.Add(getSlideItem("Tools WPF Controls", ""));
            items.Add(getSlideItem("Ribbon", "Our collection of Office 2007-style UI  controls let you create Office-style menus, toolbars, window frames, etc. Bringing your application UI on par with industry standards and leaders has never been easier."));
            items.Add(getSlideItem("DockingManager", "The docking manager provides VS.NET-style docked container support to your application. Dock panels can be docked, floated, auto-hidden, etc. Based on a proven VS.NET-style architecture, your end users can interact with it in a very intuitive fashion. The layout can be set up easily in code or in XAML."));
            items.Add(getSlideItem("TabControlExt ", "The TabControlExt control provides a simple and intuitive interface for a tab-based navigation system. "));
            items.Add(getSlideItem("Carousel", "The Carousel control provides a 3-D interface for displaying objects in a rich visual manner that allows users to quickly navigate through data visually. "));
            items.Add(getSlideItem("Document Container", "If you missed the traditional multiple document interface (MDI) user interface in WPF, the MDI support in our document container framework comes to the rescue. You can also use the tabbed document interface (TDI) framework to build the latest VS 2010-style tabbed document interfaces."));
            items.Add(getSlideItem("Skin Manager", "The skin manager is a great utility that allows you to apply a uniform skin on all the controls in your application for both Syncfusion and other WPF controls. There are also several built-in skins that provide multiple options for creating a very professional look and feel for your applications."));
            items.Add(getSlideItem("TileView", "The TileView control acts as a container that holds a set of items to host information that can be maximized or minimized to provide an organized view of data."));
            items.Add(getSlideItem("TreeViewAdv", "The TreeViewAdv control provides all the advanced capabilities that are missing in the framework version. Advanced features such as multiple columns, drag-and-drop, multi-node selection, and inline editing support are also available. It also has a feature for adding images, and it contains the built-in ability to perform item sorting on a tree view."));
            items.Add(getSlideItem("Input Controls", "Such as ButtonAdv control is a basic button control that can be used to design complex forms and applications. "));
            SlideItems = items;

            int[] sizes = new int[15] {
                8, 9, 10, 11, 12, 14, 16, 18, 20, 22, 24, 28, 36, 48, 72
            };
            foreach (FontFamily fontFamily in Fonts.SystemFontFamilies)
            {
                FontFamilyList.Add(new Model()
                {
                    FontFamily = fontFamily.ToString()
                });
            }
            for (int i = 0; i < sizes.Length; i++)
            {
                FontSizeList.Add(new Model()
                {
                    FontSize = sizes[i]
                });
            }
        }
 /// <summary>
 /// Initialization of font size and font family for RibbonComboBox.
 /// </summary>
 public void InitializeFont_FamilySize()
 {
     int[] sizes = new int[15] {
         8, 9, 10, 11, 12, 14, 16, 18, 20, 22, 24, 28, 36, 48, 72
     };
     foreach (FontFamily fontFamily in Fonts.SystemFontFamilies)
     {
         FontFamilyList.Add(new GettingStartedModel()
         {
             FontFamily = fontFamily.ToString()
         });
     }
     for (int i = 0; i < sizes.Length; i++)
     {
         FontSizeList.Add(new GettingStartedModel()
         {
             FontSize = sizes[i]
         });
     }
 }