Ejemplo n.º 1
0
        public override void Render(G3Canvas g)
        {
            {
                if (Image != null)
                {
                    Graphics gx = g.Surface.WindowsGraphics;
                    gx.DrawImageTransparent(Image, this.Bound);
                }
            }

            if (!string.IsNullOrEmpty(Text) || _pressed)
            {
                g.BeginDrawing();

                g.DrawText(Text, Parent.Encoding, FontStyle.Font, FontStyle.FontColor, FontStyle.HaloColor,
                    this.TextAlign, this.Bound);

                if (_pressed)
                {
                    g.DarkBox(Location.X, Location.Y, Size.Width, Size.Height, 9);
                }

                g.EndDrawing();
            }
        }
Ejemplo n.º 2
0
        public override void Render(G3Canvas g)
        {
            g.BeginDrawing();

            Gradient.Draw(g, this.Bound);

            if (Border.Enabled)
                Border.Draw(g, this.Bound);

            g.DrawText(Text, Parent.Encoding, FontStyle.Font,
                 FontStyle.FontColor, FontStyle.HaloColor, TextAlign.Center, this.Bound);

            g.EndDrawing();
        }
Ejemplo n.º 3
0
        public override void Render(G3Canvas g)
        {
            // IMPROVE: Bu kod UIElement içine yapılacak bir eklenti ile BeforeAdd ve AfterRemove işlemleri
            // içerisine taşınacak.
            Parent.UICanvas.DisableAll();
            this.Enable = true;

            g.BeginDrawing();

            g.DarkBox(0, 0,
                System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width,
                System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height, 10);

            int w = this.Size.Width;
            int h = this.Size.Height;

            int x = this.Location.X;
            int y = this.Location.Y;

            // MessageBox
            this.Gradient.Draw(g, x, y + 30, w, h);

            // Title
            this.TitleGradient.Draw(g, x, y, w, 30);

            // Title Text
            g.DrawText(Title, Parent.Encoding, TitleFont, G3Color.BLACK, G3Color.WHITE, TextAlign.Center,
                new Rectangle(x, y, w, 30));

            // Message Text
            g.DrawText(Text, Parent.Encoding, Font, G3Color.GRAY, G3Color.WHITE, TextAlign.Center,
                new Rectangle(x, y + 30, w, h));

            // Border
            g.Rectangle(x, y, w, h + 30, G3Color.GRAY);

            g.EndDrawing();
        }
Ejemplo n.º 4
0
        public override void Render(G3Canvas g)
        {
            {
                Graphics gx = g.Surface.WindowsGraphics;

                if (this.Checked)
                {
                    if (CheckedImage != null)
                    {
                        gx.DrawImage(CheckedImage, Location.X, Location.Y + ((Size.Height - CheckedImage.Height) / 2));
                    }
                }
                else
                {
                    if (UncheckedImage != null)
                    {
                        gx.DrawImage(UncheckedImage, Location.X, Location.Y + ((Size.Height - UncheckedImage.Height) / 2));
                    }
                }
            }

            g.BeginDrawing();

            Rectangle r = this.Bound;
            r.Offset(CheckedImage.Width, 0);

            g.DrawText(Text, Parent.Encoding, FontStyle.Font, FontStyle.FontColor, FontStyle.HaloColor,
                 TextAlign.Left, r);

            g.EndDrawing();
        }
Ejemplo n.º 5
0
        public override void Render(G3Canvas g)
        {
            g.BeginDrawing();

            if (pressed)
            {
                Gradient.DrawDarker(g, this.Bound, 30);
            }
            else
            {
                Gradient.Draw(g, this.Bound);
            }

            g.EndDrawing();

            if (MaskImage != null)
            {
                {
                    Graphics gx = g.Surface.WindowsGraphics;
                    gx.DrawImageTransparent(MaskImage, this.Bound, MaskImageColor.WindowsColor);
                }
            }

            if (!string.IsNullOrEmpty(Text))
            {
                g.BeginDrawing();

                if (Border.Enabled)
                    Border.Draw(g, this.Bound);

                g.DrawText(Text, Parent.Encoding, FontStyle.Font, FontStyle.FontColor, FontStyle.HaloColor,
                     this.TextAlign, this.Bound);

                g.EndDrawing();
            }
        }