Exemplo n.º 1
0
        public CustomRect(int x, int y, int width, Color color)
        {
            InitializeComponent();
            this.Data = new XData();
            this.Data.PointX = x;
            this.Data.PointY = y;
            this.Data.SizeX = width;
            this.Data.SizeY = width;
            this.Data.Width = width;
            this.Data.Color = color;

            System.Drawing.Drawing2D.GraphicsPath Button_Path = new System.Drawing.Drawing2D.GraphicsPath();
            Button_Path.AddRectangle(new System.Drawing.Rectangle(this.Data.PointX, this.Data.PointY, this.Data.SizeX, this.Data.SizeY));
            Region Button_Region = new Region(Button_Path);
            this.Region = Button_Region;
            Graphics g = this.CreateGraphics();
            OnPaint(new PaintEventArgs(g, new System.Drawing.Rectangle(this.Location.X, this.Location.Y, this.Width, this.Height)));
        }
Exemplo n.º 2
0
        public CustomRect(int x, int y, int width, Color color)
        {
            InitializeComponent();
            this.Data        = new XData();
            this.Data.PointX = x;
            this.Data.PointY = y;
            this.Data.SizeX  = width;
            this.Data.SizeY  = width;
            this.Data.Width  = width;
            this.Data.Color  = color;

            System.Drawing.Drawing2D.GraphicsPath Button_Path = new System.Drawing.Drawing2D.GraphicsPath();
            Button_Path.AddRectangle(new System.Drawing.Rectangle(this.Data.PointX, this.Data.PointY, this.Data.SizeX, this.Data.SizeY));
            Region Button_Region = new Region(Button_Path);

            this.Region = Button_Region;
            Graphics g = this.CreateGraphics();

            OnPaint(new PaintEventArgs(g, new System.Drawing.Rectangle(this.Location.X, this.Location.Y, this.Width, this.Height)));
        }
Exemplo n.º 3
0
 public Rectangle(XData data)
 {
     this.Data = data;
 }
Exemplo n.º 4
0
 public CustomRect(XData data)
 {
     InitializeComponent();
     this.Data = data;
 }
Exemplo n.º 5
0
        public CustomRect(XData data)
        {
            InitializeComponent();
            this.Data = data;

        }
Exemplo n.º 6
0
 public Rectangle(XData data)
 {
     this.Data = data;
 }