예제 #1
0
        public void Add(HexBitField bitField)
        {
            Debug.Assert(bitField.Owner == null);
            bitField.Owner = this;
            bitFields.Add(bitField.Bit, bitField);
            Debug.Assert(!DataFieldVM.HasError);                // Should only be called at init and it's then always valid
            ulong val = ToUInt64(DataFieldVM.ObjectValue);

            SetValue(bitField, val);
        }
예제 #2
0
        internal void Updated(HexBitField bitField)
        {
            ulong val     = ToUInt64(ReadData());
            ulong origVal = val;

            val &= ~(bitField.Mask << bitField.Bit);
            val |= bitField.GetValue() << bitField.Bit;
            if (origVal != val)
            {
                WriteNewValue(val);
            }
        }
예제 #3
0
파일: HexField.cs 프로젝트: 4058665/dnSpy
 void SetValue(HexBitField bitField, ulong val)
 {
     ulong bitVal = (val >> bitField.Bit) & bitField.Mask;
     bitField.SetValue(bitVal);
 }
예제 #4
0
파일: HexField.cs 프로젝트: 4058665/dnSpy
 internal void Updated(HexBitField bitField)
 {
     ulong val = ToUInt64(ReadData());
     ulong origVal = val;
     val &= ~(bitField.Mask << bitField.Bit);
     val |= bitField.GetValue() << bitField.Bit;
     if (origVal != val)
         WriteNewValue(val);
 }
예제 #5
0
파일: HexField.cs 프로젝트: 4058665/dnSpy
 public void Add(HexBitField bitField)
 {
     Debug.Assert(bitField.Owner == null);
     bitField.Owner = this;
     bitFields.Add(bitField.Bit, bitField);
     Debug.Assert(!DataFieldVM.HasError);	// Should only be called at init and it's then always valid
     ulong val = ToUInt64(DataFieldVM.ObjectValue);
     SetValue(bitField, val);
 }
예제 #6
0
        void SetValue(HexBitField bitField, ulong val)
        {
            ulong bitVal = (val >> bitField.Bit) & bitField.Mask;

            bitField.SetValue(bitVal);
        }