public string[] PrintPGMInfo() { Console.WriteLine("Type = " + this.Type.ToString()); Console.WriteLine("ColorSize = " + this.ColorSize.ToString()); Console.WriteLine("Comment = " + this.Comment); Console.WriteLine("Length = " + this.Length.ToString()); Console.WriteLine("Width = " + this.Width.ToString()); string[] info = { Type, ColorSize.ToString(), Comment, Length.ToString(), Width.ToString() }; return(info); }
protected virtual void Draw(IPosition position, Graphics g, int x, int y) { int s = 1; Brush br = drawBrush; object p = position.Parameters; if (p != null) { if (p is ColorSize) { ColorSize cs = p as ColorSize; s = (int)cs.Size; if (s < 1) { s = 1; } tempBrush.Color = cs.Color; br = tempBrush; } } g.FillEllipse(br, x - s, y - s, 2 * s, 2 * s); }