Exemple #1
0
        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;
            }
        }
Exemple #2
0
        public override void OnDocumentModified(ulong modifiedStart, ulong modifiedEnd)
        {
            base.OnDocumentModified(modifiedStart, modifiedEnd);

            if (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 < Children.Count);
            while (i <= endi)
            {
                var obj = (MetaDataTableRecordTreeNode)Children[i];
                obj.OnDocumentModified(modifiedStart, modifiedEnd);
                i++;
            }
        }
 public override void OnDocumentModified(ulong modifiedStart, ulong modifiedEnd)
 {
     base.OnDocumentModified(modifiedStart, modifiedEnd);
     if (HexUtils.IsModified(imageSectionHeaderVM.NameVM.StartOffset, imageSectionHeaderVM.NameVM.EndOffset, modifiedStart, modifiedEnd))
     {
         RaisePropertyChanged("Text");
     }
 }
Exemple #4
0
        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);
            }
        }
Exemple #5
0
        public override void OnDocumentModified(ulong modifiedStart, ulong modifiedEnd)
        {
            base.OnDocumentModified(modifiedStart, modifiedEnd);
            if (HexUtils.IsModified(storageStreamVM.RCNameVM.StartOffset, storageStreamVM.RCNameVM.EndOffset, modifiedStart, modifiedEnd))
            {
                RaisePropertyChanged("Text");
            }

            foreach (HexTreeNode node in Children)
            {
                node.OnDocumentModified(modifiedStart, modifiedEnd);
            }
        }
Exemple #6
0
 public override void OnDocumentModified(ulong modifiedStart, ulong modifiedEnd)
 {
     if (infoTuple != null)
     {
         var tableInfo = ((MetaDataTableTreeNode)Parent).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))
             {
                 RaisePropertyChanged("Text");
                 break;
             }
         }
     }
 }
Exemple #7
0
        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 < virtList.Count);
            while (i <= endi)
            {
                var obj = virtList.TryGet(i);
                if (obj != null)
                {
                    obj.OnDocumentModified(modifiedStart, modifiedEnd);
                }
                i++;
            }
        }