aboutsummaryrefslogtreecommitdiff
path: root/Histacom2.Engine/Paintbrush.cs
diff options
context:
space:
mode:
authorlempamo <[email protected]>2017-08-23 13:38:40 -0400
committerlempamo <[email protected]>2017-08-23 13:38:40 -0400
commit3306d36ecbc024775972e5cf7971b2a7a70671d0 (patch)
tree0a79e67b6723a8c75ffd66c7828bdd0ebb1bf74d /Histacom2.Engine/Paintbrush.cs
parent99fef5c57360f07259fc86f433bed8a9ab59c48e (diff)
downloadhistacom2-3306d36ecbc024775972e5cf7971b2a7a70671d0.tar.gz
histacom2-3306d36ecbc024775972e5cf7971b2a7a70671d0.tar.bz2
histacom2-3306d36ecbc024775972e5cf7971b2a7a70671d0.zip
Renaming the game!
Diffstat (limited to 'Histacom2.Engine/Paintbrush.cs')
-rw-r--r--Histacom2.Engine/Paintbrush.cs49
1 files changed, 49 insertions, 0 deletions
diff --git a/Histacom2.Engine/Paintbrush.cs b/Histacom2.Engine/Paintbrush.cs
new file mode 100644
index 0000000..320b80d
--- /dev/null
+++ b/Histacom2.Engine/Paintbrush.cs
@@ -0,0 +1,49 @@
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace Histacom2.Engine
+{
+ public class Paintbrush
+ {
+ public static void PaintClassicBorders(object sender, PaintEventArgs e, int borderwidth)
+ {
+ ControlPaint.DrawBorder(e.Graphics, ((Control)sender).ClientRectangle,
+ Color.White, borderwidth, ButtonBorderStyle.Solid,
+ Color.White, borderwidth, ButtonBorderStyle.Solid,
+ Color.Gray, borderwidth, ButtonBorderStyle.Solid,
+ Color.Gray, borderwidth, ButtonBorderStyle.Solid);
+ }
+
+ public static void PaintClassicBordersIndented(object sender, PaintEventArgs e, int borderwidth)
+ {
+ ControlPaint.DrawBorder(e.Graphics, ((Control)sender).ClientRectangle,
+ Color.Gray, borderwidth, ButtonBorderStyle.Solid,
+ Color.Gray, borderwidth, ButtonBorderStyle.Solid,
+ Color.White, borderwidth, ButtonBorderStyle.Solid,
+ Color.White, borderwidth, ButtonBorderStyle.Solid);
+ }
+
+ public static void ExtendedToolStripSeparator_Paint(object sender, PaintEventArgs e)
+ {
+ // Get the separator's width and height.
+ ToolStripSeparator toolStripSeparator = (ToolStripSeparator)sender;
+ int width = toolStripSeparator.Width;
+ int height = toolStripSeparator.Height;
+
+ // Choose the colors for drawing.
+ Color foreColor = Color.Gray;
+ Color backColor = Color.Silver;
+
+ // Fill the background.
+ e.Graphics.FillRectangle(new SolidBrush(backColor), 0, 0, width, height);
+
+ // Draw the line.
+ e.Graphics.DrawLine(new Pen(foreColor), 4, height / 2, width - 4, height / 2);
+ }
+ }
+}