示例#1
0
        /// <summary>
        /// Class constructor
        /// </summary>
        public ConfigViewModel()
            : base()
        {
            // Setup default values here - real values are loaded in a specific method of this class (!)
            this.mWordWrapText = false;
            this.mReloadOpenFilesOnAppStart = false;
            this.mRunSingleInstance         = true;
            this.mPinSortMode = MRUSortMethod.PinnedEntriesFirst;

            this.WordWrapText = false;

            // Get default list of units from settings manager
            var unitList = new ObservableCollection <ListItem>(Options.GenerateScreenUnitList());

            this.SizeUnitLabel = new UnitViewModel(unitList, new ScreenConverter(), (int)ZoomUnit.Percentage, 100);

            this.EditorTextOptions = new TextEditorOptions();

            // Initialize localization settings
            this.Languages = new List <LanguageCollection>(Options.GetSupportedLanguages());

            // Set default language to make sure app neutral is selected and available for sure
            // (this is a fallback if all else fails)
            try
            {
                this.LanguageSelected = this.Languages.FirstOrDefault(lang => lang.BCP47 == Options.DefaultLocal);
            }
            catch
            {
            }
        }
示例#2
0
文件: Options.cs 项目: rasyidf/Edi
        /// <summary>
        /// Copy constructor
        /// </summary>
        /// <param name="copyThis"></param>
        public Options(Options copyThis)
            : this()
        {
            if (copyThis == null)
            {
                return;
            }

            this.mThemesManager    = copyThis.mThemesManager;
            this.EditorTextOptions = copyThis.EditorTextOptions;
            this.mWordWarpText     = copyThis.mWordWarpText;

            this.mDocumentZoomUnit = copyThis.mDocumentZoomUnit;     // Zoom View in Percent
            this.mDocumentZoomView = copyThis.mDocumentZoomView;     // Font Size 12 is 100 %

            this.mReloadOpenFilesOnAppStart = copyThis.mReloadOpenFilesOnAppStart;
            this.mRunSingleInstance         = copyThis.mRunSingleInstance;
            this.mCurrentTheme     = copyThis.mCurrentTheme;
            this.mMRU_SortMethod   = copyThis.mMRU_SortMethod;
            this.mLanguageSelected = copyThis.mLanguageSelected;

            this.mIsDirty = copyThis.mIsDirty;
        }
示例#3
0
文件: Options.cs 项目: rasyidf/Edi
        /// <summary>
        /// Hidden class Constructor
        /// </summary>
        protected Options()
        {
            this.mThemesManager = null;

            this.EditorTextOptions = new TextEditorOptions();
            this.mWordWarpText     = false;

            this.mDocumentZoomUnit = ZoomUnit.Percentage;     // Zoom View in Percent
            this.mDocumentZoomView = 100;                     // Font Size 12 is 100 %

            this.mReloadOpenFilesOnAppStart = true;
            this.mRunSingleInstance         = true;
            this.mCurrentTheme     = ThemesManager.DefaultThemeName;
            this.mMRU_SortMethod   = MRUSortMethod.PinnedEntriesFirst;
            this.mLanguageSelected = Options.DefaultLocal;

            this.HighlightOnFileNew          = true;
            this.FileNewDefaultFileName      = Util.Local.Strings.STR_FILE_DEFAULTNAME;
            this.FileNewDefaultFileExtension = ".txt";

            this.ExplorerSettings = new ExplorerSettingsModel(true);

            this.mIsDirty = false;
        }
示例#4
0
 public MRUListVM(MRUSortMethod pinEntryAtHeadOfList = MRUSortMethod.PinnedEntriesFirst)
     : this()
 {
     this.mPinEntryAtHeadOfList = pinEntryAtHeadOfList;
 }
示例#5
0
 public MRUListVM()
 {
     this.mMaxMruEntryCount     = 45;
     this.mPinEntryAtHeadOfList = MRUSortMethod.PinnedEntriesFirst;
 }