Ejemplo n.º 1
0
 public override void writeBinary(BinaryWriter bw)
 {
     // Writing binary/design criteria for Rectangle
     bw.Write("Rect");
     bw.Write(PenColor.ToArgb());
     bw.Write(PenWidth);
     bw.Write(Pt1.X); bw.Write(Pt1.Y);
     bw.Write(Pt2.X); bw.Write(Pt2.Y);
 }
Ejemplo n.º 2
0
 public override void writeBinary(BinaryWriter bw)
 {
     // YOUR CODE HERE
     bw.Write("Rectangle");
     bw.Write(Pt1.X);
     bw.Write(Pt1.Y);
     bw.Write(Pt2.X);
     bw.Write(Pt2.Y);
     bw.Write((int)PenWidth);
     bw.Write(PenColor.ToArgb());
 }
Ejemplo n.º 3
0
        public override void writeBinary(BinaryWriter bw)
        {
            // Writing binary/design criteria for Line


            bw.Write("Line");
            bw.Write(Pt1.X); bw.Write(Pt1.Y);
            bw.Write(Pt2.X); bw.Write(Pt2.Y);
            bw.Write(PenColor.ToArgb());
            bw.Write((int)PenWidth);
        }
Ejemplo n.º 4
0
 public override void writeBinary(BinaryWriter bw)
 {
     // Writing binary/design criteria for Free Line
     bw.Write("FreeLine");
     bw.Write(PenColor.ToArgb());
     bw.Write(PenWidth);
     bw.Write(FreeList.Count);
     foreach (Point pointElement in FreeList)
     {
         bw.Write(pointElement.X); bw.Write(pointElement.Y);
     }
 }
Ejemplo n.º 5
0
        public void GetObjectData(SerializationInfo info, StreamingContext context)
        {
            info.AddValue("ShapeId", ShapeId);
            info.AddValue("CurrentShape", CurrentShape);
            info.AddValue("BrushType", BrushType);
            info.AddValue("PenType", PenType);
            info.AddValue("Width", ShapeSize.Width);
            info.AddValue("Height", ShapeSize.Height);

            info.AddValue("X", ShapeLoc.X);
            info.AddValue("Y", ShapeLoc.Y);

            info.AddValue("PenColor", PenColor.ToArgb());
            info.AddValue("BrushColor", BrushColor.ToArgb());
            info.AddValue("IsBrush", IsBrush);
        }
Ejemplo n.º 6
0
        public override void writeBinary(BinaryWriter bw)
        {
            // YOUR CODE HERE
            bw.Write("Text");
            bw.Write(Pt1.X);
            bw.Write(Pt1.Y);
            bw.Write(TextLine);
            //  bw.Write((String)TextFont.FontFamily);
            var cvt = new FontConverter();

            bw.Write(TextFont.FontFamily.Name);
            bw.Write(TextFont.Size);
            bw.Write(PenColor.ToArgb());

            Console.WriteLine("Text data :" + ToString());
        }
Ejemplo n.º 7
0
        public override void writeBinary(BinaryWriter bw)
        {
            // YOUR CODE HERE

            bw.Write("FreeLine");
            bw.Write((int)PenWidth);
            bw.Write(PenColor.ToArgb());
            Point[] pts = FreeList.ToArray();
            bw.Write(pts.Length);
            foreach (Point p in FreeList)
            {
                bw.Write(p.X);
                bw.Write(p.Y);
            }
            bw.Write("\n");
        }
Ejemplo n.º 8
0
 public override void writeBinary(BinaryWriter bw)
 {
     // Writing binary/design criteria for Text
     bw.Write("Text");
     bw.Write(Pt1.X + "," + Pt1.Y + "," + TextLine + "," + TextFont.FontFamily.Name + "," + TextFont.SizeInPoints + "," + PenColor.ToArgb());
 }