Exemple #1
0
 void InitializeFrom(LocalHexSettings options)
 {
     BytesGroupCountVM.Value = options.BytesGroupCount;
     BytesPerLineVM.Value    = options.BytesPerLine;
     UseHexPrefix            = options.UseHexPrefix;
     ShowAscii    = options.ShowAscii;
     LowerCaseHex = options.LowerCaseHex;
     AsciiEncodingVM.SelectedItem = options.AsciiEncoding ?? AsciiEncoding_DEFAULT;
     HexOffsetSizeVM.Value        = options.HexOffsetSize;
     UseRelativeOffsets           = options.UseRelativeOffsets;
     BaseOffsetVM.Value           = options.BaseOffset;
     StartOffsetVM.Value          = options.StartOffset;
     EndOffsetVM.Value            = options.EndOffset;
 }
Exemple #2
0
        LocalHexSettings CopyTo(LocalHexSettings options)
        {
            options.BytesGroupCount = BytesGroupCountVM.Value;
            options.BytesPerLine    = BytesPerLineVM.Value;
            options.UseHexPrefix    = UseHexPrefix;
            options.ShowAscii       = ShowAscii;
            options.LowerCaseHex    = LowerCaseHex;
            var val = (AsciiEncoding)AsciiEncodingVM.SelectedItem;

            options.AsciiEncoding      = val == AsciiEncoding_DEFAULT ? (AsciiEncoding?)null : val;
            options.HexOffsetSize      = HexOffsetSizeVM.Value;
            options.UseRelativeOffsets = UseRelativeOffsets;
            options.BaseOffset         = BaseOffsetVM.Value;
            options.StartOffset        = StartOffsetVM.Value;
            options.EndOffset          = EndOffsetVM.Value;
            return(options);
        }
Exemple #3
0
        public LocalSettingsVM(LocalHexSettings options)
        {
            this.origOptions       = options;
            this.bytesGroupCountVM = new NullableInt32VM(a => HasErrorUpdated());
            this.bytesPerLineVM    = new NullableInt32VM(a => HasErrorUpdated(), true)
            {
                Min = 0,
                Max = HexSettings.MAX_BYTES_PER_LINE,
            };
            this.hexOffsetSizeVM = new Int32VM(a => HasErrorUpdated(), true)
            {
                Min = 0,
                Max = 64,
            };
            this.baseOffsetVM    = new UInt64VM(a => HasErrorUpdated());
            this.startOffsetVM   = new NullableUInt64VM(a => HasErrorUpdated());
            this.endOffsetVM     = new NullableUInt64VM(a => HasErrorUpdated());
            this.asciiEncodingVM = new EnumListVM(asciiEncodingList);

            Reinitialize();
        }
Exemple #4
0
		LocalHexSettings CopyTo(LocalHexSettings options) {
			options.BytesGroupCount = BytesGroupCountVM.Value;
			options.BytesPerLine = BytesPerLineVM.Value;
			options.UseHexPrefix = UseHexPrefix;
			options.ShowAscii = ShowAscii;
			options.LowerCaseHex = LowerCaseHex;
			var val = (AsciiEncoding)AsciiEncodingVM.SelectedItem;
			options.AsciiEncoding = val == AsciiEncoding_DEFAULT ? (AsciiEncoding?)null : val;
			options.HexOffsetSize = HexOffsetSizeVM.Value;
			options.UseRelativeOffsets = UseRelativeOffsets;
			options.BaseOffset = BaseOffsetVM.Value;
			options.StartOffset = StartOffsetVM.Value;
			options.EndOffset = EndOffsetVM.Value;
			return options;
		}
Exemple #5
0
		void InitializeFrom(LocalHexSettings options) {
			BytesGroupCountVM.Value = options.BytesGroupCount;
			BytesPerLineVM.Value = options.BytesPerLine;
			UseHexPrefix = options.UseHexPrefix;
			ShowAscii = options.ShowAscii;
			LowerCaseHex = options.LowerCaseHex;
			AsciiEncodingVM.SelectedItem = options.AsciiEncoding ?? AsciiEncoding_DEFAULT;
			HexOffsetSizeVM.Value = options.HexOffsetSize;
			UseRelativeOffsets = options.UseRelativeOffsets;
			BaseOffsetVM.Value = options.BaseOffset;
			StartOffsetVM.Value = options.StartOffset;
			EndOffsetVM.Value = options.EndOffset;
		}
Exemple #6
0
		public LocalSettingsVM(LocalHexSettings options) {
			this.origOptions = options;
			this.bytesGroupCountVM = new NullableInt32VM(a => HasErrorUpdated());
			this.bytesPerLineVM = new NullableInt32VM(a => HasErrorUpdated(), true) {
				Min = 0,
				Max = HexSettings.MAX_BYTES_PER_LINE,
			};
			this.hexOffsetSizeVM = new Int32VM(a => HasErrorUpdated(), true) {
				Min = 0,
				Max = 64,
			};
			this.baseOffsetVM = new UInt64VM(a => HasErrorUpdated());
			this.startOffsetVM = new NullableUInt64VM(a => HasErrorUpdated());
			this.endOffsetVM = new NullableUInt64VM(a => HasErrorUpdated());
			this.asciiEncodingVM = new EnumListVM(asciiEncodingList);

			Reinitialize();
		}