public override void OnDocumentModified(ulong modifiedStart, ulong modifiedEnd) { base.OnDocumentModified(modifiedStart, modifiedEnd); if (TreeNode.Children.Count == 0) { return; } if (!HexUtils.IsModified(StartOffset, EndOffset, modifiedStart, modifiedEnd)) { return; } ulong start = Math.Max(StartOffset, modifiedStart); ulong end = Math.Min(EndOffset, modifiedEnd); int i = (int)((start - StartOffset) / (ulong)tableInfo.RowSize); int endi = (int)((end - StartOffset) / (ulong)tableInfo.RowSize); Debug.Assert(0 <= i && i <= endi && endi < TreeNode.Children.Count); while (i <= endi) { var obj = (MetaDataTableRecordNode)TreeNode.Children[i].Data; obj.OnDocumentModified(modifiedStart, modifiedEnd); i++; } }
public void OnDocumentModified(ulong modifiedStart, ulong modifiedEnd) { if (!HexUtils.IsModified(startOffset, endOffset, modifiedStart, modifiedEnd)) { return; } var newValue = ReadData(); if (!DataFieldVM.HasError && newValue.Equals(DataFieldVM.ObjectValue)) { return; } var old = disable_UpdateValue; try { disable_UpdateValue = true; DataFieldVM.ObjectValue = newValue; OnDocumentModified(newValue); } finally { disable_UpdateValue = old; } }
public override void OnDocumentModified(ulong modifiedStart, ulong modifiedEnd) { base.OnDocumentModified(modifiedStart, modifiedEnd); if (HexUtils.IsModified(imageSectionHeaderVM.NameVM.StartOffset, imageSectionHeaderVM.NameVM.EndOffset, modifiedStart, modifiedEnd)) { TreeNode.RefreshUI(); } }
public virtual void OnDocumentModified(ulong modifiedStart, ulong modifiedEnd) { if (!HexUtils.IsModified(StartOffset, EndOffset, modifiedStart, modifiedEnd)) { return; } foreach (var vm in HexVMs) { vm.OnDocumentModified(modifiedStart, modifiedEnd); } }
public override void OnDocumentModified(ulong modifiedStart, ulong modifiedEnd) { base.OnDocumentModified(modifiedStart, modifiedEnd); if (HexUtils.IsModified(storageStreamVM.RCNameVM.StartOffset, storageStreamVM.RCNameVM.EndOffset, modifiedStart, modifiedEnd)) { TreeNode.RefreshUI(); } foreach (HexNode node in TreeNode.DataChildren) { node.OnDocumentModified(modifiedStart, modifiedEnd); } }
public override void OnDocumentModified(ulong modifiedStart, ulong modifiedEnd) { if (infoTuple != null) { var tableInfo = ((MetaDataTableNode)TreeNode.Parent.Data).TableInfo; foreach (var index in infoTuple.Item1) { var col = tableInfo.Columns[index]; ulong start = StartOffset + (ulong)col.Offset; if (HexUtils.IsModified(start, start + (ulong)col.Size - 1, modifiedStart, modifiedEnd)) { TreeNode.RefreshUI(); break; } } } }
public override void OnDocumentModified(ulong modifiedStart, ulong modifiedEnd) { if (!HexUtils.IsModified(StartOffset, EndOffset, modifiedStart, modifiedEnd)) { return; } ulong start = Math.Max(StartOffset, modifiedStart); ulong end = Math.Min(EndOffset, modifiedEnd); int i = (int)((start - StartOffset) / (ulong)TableInfo.RowSize); int endi = (int)((end - StartOffset) / (ulong)TableInfo.RowSize); Debug.Assert(0 <= i && i <= endi && endi < Collection.Count); while (i <= endi) { var obj = Collection.TryGet(i); if (obj != null) { obj.OnDocumentModified(modifiedStart, modifiedEnd); } i++; } }