예제 #1
0
        protected GeneralAppSettingsPageBase(CommonEditorOptions options)
        {
            if (options == null)
            {
                throw new ArgumentNullException(nameof(options));
            }
            this.options       = options;
            GroupSizeInBytesVM = new Int32VM(a => { }, useDecimal: true)
            {
                Min = 0, Max = int.MaxValue
            };
            HexOffsetFormatVM = new EnumListVM(hexOffsetFormatList);
            EncodingInfoVM    = new EnumListVM(Encoding.GetEncodings().OrderBy(a => a.DisplayName, StringComparer.CurrentCultureIgnoreCase).Select(a => new EnumVM(a, a.DisplayName)).ToArray());

            EnableHighlightCurrentLine         = options.EnableHighlightCurrentLine;
            HighlightCurrentValue              = options.HighlightCurrentValue;
            HighlightStructureUnderMouseCursor = options.HighlightStructureUnderMouseCursor;
            HighlightActiveColumn              = options.HighlightActiveColumn;
            ValuesLowerCaseHex       = options.ValuesLowerCaseHex;
            OffsetLowerCaseHex       = options.OffsetLowerCaseHex;
            EnableColorization       = options.EnableColorization;
            GroupSizeInBytesVM.Value = options.GroupSizeInBytes;
            HexOffsetFormat          = options.HexOffsetFormat;
            EncodingInfo             = GetEncodingInfo(options.EncodingCodePage) ?? GetEncodingInfo(Encoding.UTF8.CodePage) ?? (EncodingInfo)EncodingInfoVM.Items.FirstOrDefault()?.Value;
        }
예제 #2
0
 protected ScrollBarsAppSettingsPageBase(CommonEditorOptions options)
 {
     if (options == null)
     {
         throw new ArgumentNullException(nameof(options));
     }
     this.options        = options;
     HorizontalScrollBar = options.HorizontalScrollBar;
     VerticalScrollBar   = options.VerticalScrollBar;
 }
예제 #3
0
        protected AdvancedAppSettingsPageBase(CommonEditorOptions options)
        {
            this.options       = options ?? throw new ArgumentNullException(nameof(options));
            ColumnLine0VM      = new EnumListVM(hexColumnLineKindList);
            ColumnLine1VM      = new EnumListVM(hexColumnLineKindList);
            ColumnGroupLine0VM = new EnumListVM(hexColumnLineKindList);
            ColumnGroupLine1VM = new EnumListVM(hexColumnLineKindList);

            ShowColumnLines = options.ShowColumnLines;
            RemoveExtraTextLineVerticalPixels = options.RemoveExtraTextLineVerticalPixels;
            SelectionMargin      = options.SelectionMargin;
            GlyphMargin          = options.GlyphMargin;
            ZoomControl          = options.ZoomControl;
            EnableMouseWheelZoom = options.EnableMouseWheelZoom;
            ColumnLine0          = options.ColumnLine0;
            ColumnLine1          = options.ColumnLine1;
            ColumnGroupLine0     = options.ColumnGroupLine0;
            ColumnGroupLine1     = options.ColumnGroupLine1;
        }