Ejemplo n.º 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;
            }
        }
Ejemplo n.º 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++;
            }
        }
Ejemplo n.º 3
0
 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");
     }
 }
Ejemplo n.º 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);
            }
        }
Ejemplo n.º 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);
            }
        }
Ejemplo n.º 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;
             }
         }
     }
 }
Ejemplo n.º 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++;
            }
        }