aboutsummaryrefslogtreecommitdiff
path: root/Histacom2.Engine/UI/ClassicDropDown.cs
diff options
context:
space:
mode:
authorAlex-TIMEHACK <[email protected]>2017-10-24 13:55:39 +0100
committerAlex-TIMEHACK <[email protected]>2017-10-24 13:55:39 +0100
commit81cde79fccd0b46e5af1109968f16f5249b27555 (patch)
tree0c6e6b1ba4e09fa4121521a0085dfc4b689afdb9 /Histacom2.Engine/UI/ClassicDropDown.cs
parent72a2b98a29ac1d3b67a4158b6a1823a39ecb5e00 (diff)
downloadhistacom2-81cde79fccd0b46e5af1109968f16f5249b27555.tar.gz
histacom2-81cde79fccd0b46e5af1109968f16f5249b27555.tar.bz2
histacom2-81cde79fccd0b46e5af1109968f16f5249b27555.zip
Started on ClassicDropDown
Diffstat (limited to 'Histacom2.Engine/UI/ClassicDropDown.cs')
-rw-r--r--Histacom2.Engine/UI/ClassicDropDown.cs61
1 files changed, 61 insertions, 0 deletions
diff --git a/Histacom2.Engine/UI/ClassicDropDown.cs b/Histacom2.Engine/UI/ClassicDropDown.cs
index 43e1a65..b26862e 100644
--- a/Histacom2.Engine/UI/ClassicDropDown.cs
+++ b/Histacom2.Engine/UI/ClassicDropDown.cs
@@ -12,9 +12,70 @@ namespace Histacom2.Engine.UI
{
public partial class ClassicDropDown : UserControl
{
+ public bool UseSystemPasswordChar { get; set; }
+
+ public static Color textboxcolor = Color.Black;
+
+ public static Color _lightBack = Color.Silver;
+ public static Color _darkBack = Color.Silver;
+
public ClassicDropDown()
{
InitializeComponent();
+
+ try
+ {
+ // Draw the border
+
+ this.Paint += new PaintEventHandler((object sender, PaintEventArgs e) =>
+ {
+ // Update a bunch of variables!
+ textBox1.Font = new Font("Microsoft Sans Serif", 8.25F, FontStyle.Regular);
+
+ if (SaveSystem.currentTheme != null) textBox1.BackColor = SaveSystem.currentTheme.threeDObjectsColor;
+ else textBox1.BackColor = Color.White;
+
+ if (SaveSystem.currentTheme != null)
+ {
+ textboxcolor = SaveSystem.currentTheme.windowColor;
+
+ _lightBack = Paintbrush.GetLightFromColor(textboxcolor);
+ _darkBack = Paintbrush.GetDarkFromColor(textboxcolor);
+ }
+ });
+
+
+ tborder.Paint += new PaintEventHandler((object sender, PaintEventArgs e) =>
+ {
+ e.Graphics.DrawLine(new Pen(_darkBack), 0, 0, tborder.Width, 0);
+ e.Graphics.DrawLine(Pens.Black, 0, 1, tborder.Width, 1);
+
+ });
+
+ lborder.Paint += new PaintEventHandler((object sender, PaintEventArgs e) =>
+ {
+ e.Graphics.DrawLine(new Pen(_darkBack), 0, 0, 0, Height);
+ e.Graphics.DrawLine(Pens.Black, 1, 0, 1, Height);
+ });
+
+ rborder.Paint += new PaintEventHandler((object sender, PaintEventArgs e) =>
+ {
+ e.Graphics.DrawLine(new Pen(_lightBack), 0, 0, 0, Height - 1);
+ e.Graphics.DrawLine(new Pen(textboxcolor), 1, 0, 1, Height - 1);
+ });
+
+ bborder.Paint += new PaintEventHandler((object sender, PaintEventArgs e) =>
+ {
+ e.Graphics.DrawLine(new Pen(_lightBack), 0, 0, Width - 1, 0);
+ e.Graphics.DrawLine(new Pen(textboxcolor), 0, 1, Width - 2, 1);
+ });
+
+ tborder.Invalidate();
+ lborder.Invalidate();
+ rborder.Invalidate();
+ bborder.Invalidate();
+ }
+ catch { }
}
}
}