Beispiel #1
0
        public byte[] Pack(int headerOffset)
        {
            BytePacketWriter bp = new BytePacketWriter(headerOffset + 16);

            bp.Write(_commandID);
            bp.Write(UniqueID);
            return(bp.GetPacket());
        }
        public byte[] Pack(int headerOffset)
        {
            BytePacketWriter bp = new BytePacketWriter(headerOffset + 24);

            bp.CurrentPosition = headerOffset;
            bp.Write(_commandID);
            bp.Write(_cliendID);
            bp.Write(PictureBoxID);

            return(bp.GetPacket());
        }
Beispiel #3
0
        public byte[] Pack(int headerOffset)
        {
            BytePacketWriter bp = new BytePacketWriter(headerOffset + 8);

            bp.CurrentPosition = headerOffset;

            bp.Write(CommandID);
            bp.Write(Login);
            bp.Write(Password);

            return(bp.GetPacket());
        }
        public byte[] Pack(int headerOffset)
        {
            BytePacketWriter bp = new BytePacketWriter(headerOffset + 32);

            bp.CurrentPosition = headerOffset;
            bp.Write(CommandID);
            bp.Write(_clientID);
            bp.Write(PictureBoxID);

            bp.Write(LocationX);
            bp.Write(LocationY);

            bp.Write(PBSizeX);
            bp.Write(PBSizeY);

            if (PBImage != null)
            {
                using (MemoryStream str = new MemoryStream())
                {
                    PBImage.Save(str, System.Drawing.Imaging.ImageFormat.Png);
                    str.Close();
                    bp.Write(str.ToArray());
                }
            }

            return(bp.GetPacket());
        }
        public byte[] Pack(int headerOffset)
        {
            BytePacketWriter bp = new BytePacketWriter(headerOffset + 42);

            bp.CurrentPosition = headerOffset;
            bp.Write(CommandID);
            bp.Write(ClientID);
            bp.Write(PictureBoxID);

            bp.Write(Selector.LocationX);
            bp.Write(Selector.LocationY);
            bp.Write(Selector.SizeX);
            bp.Write(Selector.SizeY);
            bp.Write(Selector.CutObject);
            bp.Write(Selector.NeedCopy);

            return(bp.GetPacket());
        }
Beispiel #6
0
        public byte[] Pack(int headerOffset)
        {
            BytePacketWriter bp = new BytePacketWriter(headerOffset + 40);

            bp.CurrentPosition = headerOffset;
            bp.Write(CommandID);
            bp.Write(_clientID);
            bp.Write(PictureBoxID);
            bp.Write(MoveObj.OffsetX);
            bp.Write(MoveObj.OffsetY);
            bp.Write(MoveObj.LocationX);
            bp.Write(MoveObj.LocationY);

            return(bp.GetPacket());
        }
Beispiel #7
0
        public byte[] Pack(int headerOffset)
        {
            BytePacketWriter bp = new BytePacketWriter(headerOffset + 48);

            bp.CurrentPosition = headerOffset;
            bp.Write(CommandID);
            bp.Write(CliendID);
            bp.Write(PictureBoxID);

            bp.Write(Rect.BrushColor.R);
            bp.Write(Rect.BrushColor.G);
            bp.Write(Rect.BrushColor.B);
            bp.Write(Rect.BrushColor.A);
            bp.Write(Rect.BrushSize);

            bp.Write(Rect.LocationX);
            bp.Write(Rect.LocationY);
            bp.Write(Rect.SizeX);
            bp.Write(Rect.SizeY);

            return(bp.GetPacket());
        }
        public byte[] Pack(int headerOffset)
        {
            BytePacketWriter bp = new BytePacketWriter(headerOffset + 48);

            bp.CurrentPosition = headerOffset;
            bp.Write(CommandID);
            bp.Write(CliendID);
            bp.Write(PictureBoxID);
            bp.Write(Line.BrushColor.R);
            bp.Write(Line.BrushColor.G);
            bp.Write(Line.BrushColor.B);
            bp.Write(Line.BrushColor.A);
            bp.Write(Line.BrushSize);
            bp.Write(Line.LineStartX);
            bp.Write(Line.LineStartY);
            bp.Write(Line.LineEndX);
            bp.Write(Line.LineEndY);
            bp.Write(new byte[1000]);

            return(bp.GetPacket());
        }