Exemplo n.º 1
0
 public BitData(FlagData parent, string name, int index, string tooltip)
 {
     _parent  = parent;
     _name    = name;
     _index   = index;
     _mask    = (ulong)1U << index;
     _tooltip = tooltip;
 }
Exemplo n.º 2
0
        public override MetaField CloneValue()
        {
            var result = new FlagData(Name, Offset, FieldAddress, _type, PluginLine, ToolTip);

            foreach (var bit in _bits)
            {
                result.DefineBit(bit.Key, bit.Value.Name, bit.Value.ToolTip);
            }
            result.Value = _value;
            return(result);
        }
Exemplo n.º 3
0
 public void VisitFlags(FlagData field)
 {
     FilterString(field, field.Name);
     foreach (var bit in field.Bits)
     {
         if (FilterString(field, bit.Name))
         {
             return;
         }
     }
 }
Exemplo n.º 4
0
        public void VisitFlags(FlagData field)
        {
            SeekToOffset(field.Offset);
            switch (field.Type)
            {
            case FlagsType.Flags8:
                field.Value = _reader.ReadByte();
                break;

            case FlagsType.Flags16:
                field.Value = _reader.ReadUInt16();
                break;

            case FlagsType.Flags32:
                field.Value = _reader.ReadUInt32();
                break;

            case FlagsType.Flags64:
                field.Value = _reader.ReadUInt64();
                break;
            }
        }
Exemplo n.º 5
0
        public void VisitFlags(FlagData field)
        {
            SeekToOffset(field.Offset);
            switch (field.Type)
            {
            case FlagsType.Flags8:
                _writer.WriteByte((byte)field.Value);
                break;

            case FlagsType.Flags16:
                _writer.WriteUInt16((ushort)field.Value);
                break;

            case FlagsType.Flags32:
                _writer.WriteUInt32((uint)field.Value);
                break;

            case FlagsType.Flags64:
                _writer.WriteUInt64(field.Value);
                break;
            }
        }
Exemplo n.º 6
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="QuickCheckCommand" /> class.
 /// </summary>
 /// <param name="data">The flags field.</param>
 /// <param name="check">
 ///     If set to <c>true</c>, the command will check all bits in the field, otherwise it will uncheck all
 ///     bits in the field.
 /// </param>
 public QuickCheckCommand(FlagData data, bool check)
 {
     _data  = data;
     _check = check;
 }
Exemplo n.º 7
0
 public void VisitFlags(FlagData field)
 {
     AddWidth(_flagsControl.Width);
 }
Exemplo n.º 8
0
 public void VisitFlags(FlagData field)
 {
 }