Пример #1
0
        public MruManager(MruInfo mruInfo, MenuItem mruMenuItem)
        {
            if (mruInfo == null)
            {
                throw new ArgumentNullException("mruInfo");
            }

            if (mruMenuItem == null)
            {
                throw new ArgumentNullException("mruMenuItem");
            }

            this.infoMru = mruInfo;
            this.menuItemMru = mruMenuItem;

            UpdateMenu();
        }
Пример #2
0
        /// <summary>
        /// Default constructor.
        /// Creates instances of all internal classes and sets all default values.
        /// 
        /// This prevents exception when client cannot load Settings instance from
        /// XML file - in this case default Settings instance is created.
        /// Default Settings instance should always contain valid default values.
        /// </summary>
        public Settings()
        {
            mainWindowStateInfo = new WindowStateInfo();
            recentFilesList = new MruInfo();
            initialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);

            lineWidth = 1;
            objectColor = Colors.Black;
            textFontFamilyName = "Tahoma";
            textFontStyle = FontConversions.FontStyleToString(FontStyles.Normal);
            textFontWeight = FontConversions.FontWeightToString(FontWeights.Normal);
            textFontStretch = FontConversions.FontStretchToString(FontStretches.Normal);
            textFontSize = 12;

            // Set default values for other members here
            // ...
        }