Пример #1
0
 public MovedImageFragment(IDataStream s)
 {
     bounds.X      = s.ReadInt16();
     bounds.Y      = s.ReadInt16();
     bounds.Width  = s.ReadUInt16();
     bounds.Height = s.ReadUInt16();
     source.X      = s.ReadInt16();
     source.Y      = s.ReadInt16();
 }
Пример #2
0
        /// <summary>
        /// Reads a DirtyImageFragment from the stream, assuming it is already in compressed format.
        /// </summary>
        /// <param name="s"></param>
        public DirtyImageFragment(IDataStream s)
        {
            bounds.X      = s.ReadInt16();
            bounds.Y      = s.ReadInt16();
            bounds.Width  = s.ReadUInt16();
            bounds.Height = s.ReadUInt16();
            int imgLength = s.ReadInt32();

            screenshot = new Screenshot(bounds.Width, bounds.Height, 32, new byte[imgLength], bufferIsCompressed: true);
            s.Read(screenshot.Buffer, 0, imgLength);
        }
Пример #3
0
        public DesktopScreen(IDataStream s)
        {
            adapterIndex = (byte)s.ReadByte();
            outputIndex  = (byte)s.ReadByte();

            ushort strLength = s.ReadUInt16();

            adapterName = Encoding.UTF8.GetString(ByteUtil.ReadNBytes(s, strLength));

            strLength  = s.ReadUInt16();
            outputName = Encoding.UTF8.GetString(ByteUtil.ReadNBytes(s, strLength));

            X      = s.ReadInt16();
            Y      = s.ReadInt16();
            Width  = s.ReadUInt16();
            Height = s.ReadUInt16();
        }