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(); } }
public override void Render(G3Canvas g) { Graphics gx = g.Surface.WindowsGraphics; if (Image != null) { gx.DrawImageTransparentUnstreched(Image, this.Center); } if (_pressed) { g.BeginDrawing(); //g.DrawTextCenter(Text, UICanvas.Encoding, FontStyle.Font, Location.X + (Size.Width / 2), // Location.Y + (Size.Height / 2), 0, // G3Color.GRAY, // G3Color.WHITE); g.DarkBox(Location.X, Location.Y, Size.Width, Size.Height, 9); g.EndDrawing(); } }
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(); }