aboutsummaryrefslogtreecommitdiff
path: root/Histacom2.Engine/UI
diff options
context:
space:
mode:
authorlempamo <[email protected]>2017-09-08 11:03:22 -0400
committerlempamo <[email protected]>2017-09-08 11:03:22 -0400
commit60af0b389dfd98f05278f3259485d1d2349d2012 (patch)
tree12a151b74a54d37dfdf917ff17dac49238e8438c /Histacom2.Engine/UI
parent584789ed8a37027db496d6c90873186fe461f021 (diff)
downloadhistacom2-60af0b389dfd98f05278f3259485d1d2349d2012.tar.gz
histacom2-60af0b389dfd98f05278f3259485d1d2349d2012.tar.bz2
histacom2-60af0b389dfd98f05278f3259485d1d2349d2012.zip
WIP ClassicTextbox
Diffstat (limited to 'Histacom2.Engine/UI')
-rw-r--r--Histacom2.Engine/UI/ClassicTextbox.cs44
1 files changed, 44 insertions, 0 deletions
diff --git a/Histacom2.Engine/UI/ClassicTextbox.cs b/Histacom2.Engine/UI/ClassicTextbox.cs
new file mode 100644
index 0000000..efe85a4
--- /dev/null
+++ b/Histacom2.Engine/UI/ClassicTextbox.cs
@@ -0,0 +1,44 @@
+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.UI
+{
+ public class ClassicTextbox : Control
+ {
+ public ClassicTextbox() : base()
+ {
+
+ }
+
+ protected override void OnPaint(PaintEventArgs e)
+ {
+ base.OnPaint(e);
+
+ var textboxcolor = Color.Silver;
+ if (SaveSystem.currentTheme != null) textboxcolor = SaveSystem.currentTheme.windowColor;
+
+ if (SaveSystem.currentTheme != null) BackColor = SaveSystem.currentTheme.threeDObjectsColor;
+ else BackColor = Color.White;
+
+ var _lightBack = Paintbrush.GetLightFromColor(textboxcolor);
+ var _darkBack = Paintbrush.GetDarkFromColor(textboxcolor);
+
+ var g = e.Graphics;
+ g.Clear(BackColor);
+
+ g.DrawLine(new Pen(_darkBack), 0, 0, Width - 2, 0);
+ g.DrawLine(new Pen(_lightBack), Width - 1, 0, Width - 1, Height - 1);
+ g.DrawLine(new Pen(_lightBack), 0, Height - 1, Width - 1, Height - 1);
+ g.DrawLine(new Pen(_darkBack), 0, 0, 0, Height - 2);
+ g.DrawLine(Pens.Black, 1, 1, Width - 3, 1);
+ g.DrawLine(Pens.Black, 1, 1, 1, Height - 3);
+ g.DrawLine(new Pen(textboxcolor), 1, Height - 2, Width - 2, Height - 2);
+ g.DrawLine(new Pen(textboxcolor), Width - 2, Height - 2, Width - 2, 1);
+ }
+ }
+}