colored taskbar things and new buttons in calc

This commit is contained in:
lempamo 2017-09-13 12:55:01 -04:00
parent 74722bac5a
commit 868078d5cb
6 changed files with 147 additions and 142 deletions

View file

@ -28,8 +28,14 @@ public DialogResult DialogResult
}
}
public bool AdaptForeColorWithTheme { get; set; }
public bool AdaptFontWithTheme { get; set; }
public ClassicButton() : base()
{
AdaptForeColorWithTheme = true;
AdaptFontWithTheme = true;
if (SaveSystem.currentTheme != null) BackColor = SaveSystem.currentTheme.threeDObjectsColor;
else BackColor = Color.Silver;
_lightBack = ControlPaint.Light(BackColor, 50);
@ -53,6 +59,18 @@ protected override void OnPaint(PaintEventArgs e)
if (SaveSystem.currentTheme != null) BackColor = SaveSystem.currentTheme.threeDObjectsColor;
else BackColor = Color.Silver;
if (AdaptForeColorWithTheme)
{
if (SaveSystem.currentTheme != null) ForeColor = SaveSystem.currentTheme.threeDObjectsTextColor;
else ForeColor = Color.Black;
}
if (AdaptFontWithTheme)
{
if (SaveSystem.currentTheme != null) Font = SaveSystem.currentTheme.buttonFont;
else Font = new Font("Microsoft Sans Serif", 8.25F, FontStyle.Regular);
}
_lightBack = Paintbrush.GetLightFromColor(BackColor);
_darkBack = Paintbrush.GetDarkFromColor(BackColor);

View file

@ -39,33 +39,33 @@ private void InitializeComponent()
this.CopyCtrlCToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.EditToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.txtNumbers = new System.Windows.Forms.TextBox();
this.Button27 = new System.Windows.Forms.Button();
this.Button26 = new System.Windows.Forms.Button();
this.Button1 = new System.Windows.Forms.Button();
this.Button25 = new System.Windows.Forms.Button();
this.Button2 = new System.Windows.Forms.Button();
this.Button21 = new System.Windows.Forms.Button();
this.Button3 = new System.Windows.Forms.Button();
this.Button22 = new System.Windows.Forms.Button();
this.Button4 = new System.Windows.Forms.Button();
this.Button23 = new System.Windows.Forms.Button();
this.Button11 = new System.Windows.Forms.Button();
this.Button7 = new System.Windows.Forms.Button();
this.Button16 = new System.Windows.Forms.Button();
this.Button24 = new System.Windows.Forms.Button();
this.Button12 = new System.Windows.Forms.Button();
this.one = new System.Windows.Forms.Button();
this.Button15 = new System.Windows.Forms.Button();
this.Button17 = new System.Windows.Forms.Button();
this.Button13 = new System.Windows.Forms.Button();
this.Button5 = new System.Windows.Forms.Button();
this.Button14 = new System.Windows.Forms.Button();
this.Button18 = new System.Windows.Forms.Button();
this.Button8 = new System.Windows.Forms.Button();
this.Button10 = new System.Windows.Forms.Button();
this.Button20 = new System.Windows.Forms.Button();
this.Button19 = new System.Windows.Forms.Button();
this.Button9 = new System.Windows.Forms.Button();
this.Button27 = new Histacom2.Engine.UI.ClassicButton();
this.Button26 = new Histacom2.Engine.UI.ClassicButton();
this.Button1 = new Histacom2.Engine.UI.ClassicButton();
this.Button25 = new Histacom2.Engine.UI.ClassicButton();
this.Button2 = new Histacom2.Engine.UI.ClassicButton();
this.Button21 = new Histacom2.Engine.UI.ClassicButton();
this.Button3 = new Histacom2.Engine.UI.ClassicButton();
this.Button22 = new Histacom2.Engine.UI.ClassicButton();
this.Button4 = new Histacom2.Engine.UI.ClassicButton();
this.Button23 = new Histacom2.Engine.UI.ClassicButton();
this.Button11 = new Histacom2.Engine.UI.ClassicButton();
this.Button7 = new Histacom2.Engine.UI.ClassicButton();
this.Button16 = new Histacom2.Engine.UI.ClassicButton();
this.Button24 = new Histacom2.Engine.UI.ClassicButton();
this.Button12 = new Histacom2.Engine.UI.ClassicButton();
this.one = new Histacom2.Engine.UI.ClassicButton();
this.Button15 = new Histacom2.Engine.UI.ClassicButton();
this.Button17 = new Histacom2.Engine.UI.ClassicButton();
this.Button13 = new Histacom2.Engine.UI.ClassicButton();
this.Button5 = new Histacom2.Engine.UI.ClassicButton();
this.Button14 = new Histacom2.Engine.UI.ClassicButton();
this.Button18 = new Histacom2.Engine.UI.ClassicButton();
this.Button8 = new Histacom2.Engine.UI.ClassicButton();
this.Button10 = new Histacom2.Engine.UI.ClassicButton();
this.Button20 = new Histacom2.Engine.UI.ClassicButton();
this.Button19 = new Histacom2.Engine.UI.ClassicButton();
this.Button9 = new Histacom2.Engine.UI.ClassicButton();
this.MenuStrip2 = new System.Windows.Forms.MenuStrip();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.MenuStrip2.SuspendLayout();
@ -159,8 +159,9 @@ private void InitializeComponent()
//
// Button27
//
this.Button27.AdaptFontWithTheme = false;
this.Button27.AdaptForeColorWithTheme = false;
this.Button27.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.Button27.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.Button27.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Button27.ForeColor = System.Drawing.Color.Firebrick;
this.Button27.Location = new System.Drawing.Point(159, 71);
@ -168,13 +169,13 @@ private void InitializeComponent()
this.Button27.Size = new System.Drawing.Size(49, 28);
this.Button27.TabIndex = 84;
this.Button27.Text = "CE";
this.Button27.UseVisualStyleBackColor = true;
this.Button27.Click += new System.EventHandler(this.Button27_Click);
//
// Button26
//
this.Button26.AdaptFontWithTheme = false;
this.Button26.AdaptForeColorWithTheme = false;
this.Button26.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.Button26.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.Button26.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Button26.ForeColor = System.Drawing.Color.Firebrick;
this.Button26.Location = new System.Drawing.Point(210, 71);
@ -182,13 +183,13 @@ private void InitializeComponent()
this.Button26.Size = new System.Drawing.Size(49, 28);
this.Button26.TabIndex = 83;
this.Button26.Text = "C";
this.Button26.UseVisualStyleBackColor = true;
this.Button26.Click += new System.EventHandler(this.Button26_Click);
//
// Button1
//
this.Button1.AdaptFontWithTheme = false;
this.Button1.AdaptForeColorWithTheme = false;
this.Button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.Button1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Button1.ForeColor = System.Drawing.Color.Red;
this.Button1.Location = new System.Drawing.Point(11, 139);
@ -196,12 +197,12 @@ private void InitializeComponent()
this.Button1.Size = new System.Drawing.Size(36, 28);
this.Button1.TabIndex = 58;
this.Button1.Text = "MR";
this.Button1.UseVisualStyleBackColor = true;
//
// Button25
//
this.Button25.AdaptFontWithTheme = false;
this.Button25.AdaptForeColorWithTheme = false;
this.Button25.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.Button25.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.Button25.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Button25.ForeColor = System.Drawing.Color.Firebrick;
this.Button25.Location = new System.Drawing.Point(104, 71);
@ -209,13 +210,13 @@ private void InitializeComponent()
this.Button25.Size = new System.Drawing.Size(49, 28);
this.Button25.TabIndex = 82;
this.Button25.Text = "Back";
this.Button25.UseVisualStyleBackColor = true;
this.Button25.Click += new System.EventHandler(this.Button25_Click);
//
// Button2
//
this.Button2.AdaptFontWithTheme = false;
this.Button2.AdaptForeColorWithTheme = false;
this.Button2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.Button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.Button2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Button2.ForeColor = System.Drawing.Color.Red;
this.Button2.Location = new System.Drawing.Point(11, 207);
@ -223,12 +224,12 @@ private void InitializeComponent()
this.Button2.Size = new System.Drawing.Size(36, 28);
this.Button2.TabIndex = 59;
this.Button2.Text = "M+";
this.Button2.UseVisualStyleBackColor = true;
//
// Button21
//
this.Button21.AdaptFontWithTheme = false;
this.Button21.AdaptForeColorWithTheme = false;
this.Button21.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.Button21.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.Button21.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Button21.ForeColor = System.Drawing.Color.Red;
this.Button21.Location = new System.Drawing.Point(223, 207);
@ -236,13 +237,13 @@ private void InitializeComponent()
this.Button21.Size = new System.Drawing.Size(36, 28);
this.Button21.TabIndex = 81;
this.Button21.Text = "=";
this.Button21.UseVisualStyleBackColor = true;
this.Button21.Click += new System.EventHandler(this.Button21_Click);
//
// Button3
//
this.Button3.AdaptFontWithTheme = false;
this.Button3.AdaptForeColorWithTheme = false;
this.Button3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.Button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.Button3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Button3.ForeColor = System.Drawing.Color.Red;
this.Button3.Location = new System.Drawing.Point(11, 173);
@ -250,12 +251,12 @@ private void InitializeComponent()
this.Button3.Size = new System.Drawing.Size(36, 28);
this.Button3.TabIndex = 60;
this.Button3.Text = "MS";
this.Button3.UseVisualStyleBackColor = true;
//
// Button22
//
this.Button22.AdaptFontWithTheme = false;
this.Button22.AdaptForeColorWithTheme = false;
this.Button22.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.Button22.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.Button22.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Button22.ForeColor = System.Drawing.Color.MidnightBlue;
this.Button22.Location = new System.Drawing.Point(223, 105);
@ -263,14 +264,13 @@ private void InitializeComponent()
this.Button22.Size = new System.Drawing.Size(36, 28);
this.Button22.TabIndex = 80;
this.Button22.Text = "sqrt";
this.Button22.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.Button22.UseVisualStyleBackColor = true;
this.Button22.Click += new System.EventHandler(this.arithmitic_click);
//
// Button4
//
this.Button4.AdaptFontWithTheme = false;
this.Button4.AdaptForeColorWithTheme = false;
this.Button4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.Button4.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.Button4.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Button4.ForeColor = System.Drawing.Color.Red;
this.Button4.Location = new System.Drawing.Point(11, 105);
@ -278,12 +278,12 @@ private void InitializeComponent()
this.Button4.Size = new System.Drawing.Size(36, 28);
this.Button4.TabIndex = 61;
this.Button4.Text = "MC";
this.Button4.UseVisualStyleBackColor = true;
//
// Button23
//
this.Button23.AdaptFontWithTheme = false;
this.Button23.AdaptForeColorWithTheme = false;
this.Button23.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.Button23.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.Button23.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Button23.ForeColor = System.Drawing.Color.MidnightBlue;
this.Button23.Location = new System.Drawing.Point(223, 173);
@ -291,13 +291,13 @@ private void InitializeComponent()
this.Button23.Size = new System.Drawing.Size(36, 28);
this.Button23.TabIndex = 79;
this.Button23.Text = "1/x";
this.Button23.UseVisualStyleBackColor = true;
this.Button23.Click += new System.EventHandler(this.arithmitic_click);
//
// Button11
//
this.Button11.AdaptFontWithTheme = false;
this.Button11.AdaptForeColorWithTheme = false;
this.Button11.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
this.Button11.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.Button11.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Button11.ForeColor = System.Drawing.Color.Blue;
this.Button11.Location = new System.Drawing.Point(143, 105);
@ -305,13 +305,13 @@ private void InitializeComponent()
this.Button11.Size = new System.Drawing.Size(36, 28);
this.Button11.TabIndex = 70;
this.Button11.Text = "9";
this.Button11.UseVisualStyleBackColor = true;
this.Button11.Click += new System.EventHandler(this.number_click);
//
// Button7
//
this.Button7.AdaptFontWithTheme = false;
this.Button7.AdaptForeColorWithTheme = false;
this.Button7.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
this.Button7.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.Button7.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Button7.ForeColor = System.Drawing.Color.Blue;
this.Button7.Location = new System.Drawing.Point(63, 139);
@ -319,13 +319,13 @@ private void InitializeComponent()
this.Button7.Size = new System.Drawing.Size(36, 28);
this.Button7.TabIndex = 62;
this.Button7.Text = "4";
this.Button7.UseVisualStyleBackColor = true;
this.Button7.Click += new System.EventHandler(this.number_click);
//
// Button16
//
this.Button16.AdaptFontWithTheme = false;
this.Button16.AdaptForeColorWithTheme = false;
this.Button16.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
this.Button16.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.Button16.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Button16.ForeColor = System.Drawing.Color.Blue;
this.Button16.Location = new System.Drawing.Point(63, 207);
@ -333,13 +333,13 @@ private void InitializeComponent()
this.Button16.Size = new System.Drawing.Size(36, 28);
this.Button16.TabIndex = 71;
this.Button16.Text = "0";
this.Button16.UseVisualStyleBackColor = true;
this.Button16.Click += new System.EventHandler(this.number_click);
//
// Button24
//
this.Button24.AdaptFontWithTheme = false;
this.Button24.AdaptForeColorWithTheme = false;
this.Button24.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.Button24.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.Button24.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Button24.ForeColor = System.Drawing.Color.MidnightBlue;
this.Button24.Location = new System.Drawing.Point(223, 139);
@ -347,13 +347,13 @@ private void InitializeComponent()
this.Button24.Size = new System.Drawing.Size(36, 28);
this.Button24.TabIndex = 78;
this.Button24.Text = "%";
this.Button24.UseVisualStyleBackColor = true;
this.Button24.Click += new System.EventHandler(this.arithmitic_click);
//
// Button12
//
this.Button12.AdaptFontWithTheme = false;
this.Button12.AdaptForeColorWithTheme = false;
this.Button12.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
this.Button12.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.Button12.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Button12.ForeColor = System.Drawing.Color.Blue;
this.Button12.Location = new System.Drawing.Point(143, 173);
@ -361,13 +361,13 @@ private void InitializeComponent()
this.Button12.Size = new System.Drawing.Size(36, 28);
this.Button12.TabIndex = 69;
this.Button12.Text = "3";
this.Button12.UseVisualStyleBackColor = true;
this.Button12.Click += new System.EventHandler(this.number_click);
//
// one
//
this.one.AdaptFontWithTheme = false;
this.one.AdaptForeColorWithTheme = false;
this.one.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
this.one.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.one.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.one.ForeColor = System.Drawing.Color.Blue;
this.one.Location = new System.Drawing.Point(63, 173);
@ -375,13 +375,13 @@ private void InitializeComponent()
this.one.Size = new System.Drawing.Size(36, 28);
this.one.TabIndex = 63;
this.one.Text = "1";
this.one.UseVisualStyleBackColor = true;
this.one.Click += new System.EventHandler(this.number_click);
//
// Button15
//
this.Button15.AdaptFontWithTheme = false;
this.Button15.AdaptForeColorWithTheme = false;
this.Button15.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
this.Button15.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.Button15.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Button15.ForeColor = System.Drawing.Color.Blue;
this.Button15.Location = new System.Drawing.Point(103, 207);
@ -389,13 +389,13 @@ private void InitializeComponent()
this.Button15.Size = new System.Drawing.Size(36, 28);
this.Button15.TabIndex = 72;
this.Button15.Text = "+/-";
this.Button15.UseVisualStyleBackColor = true;
this.Button15.Click += new System.EventHandler(this.Button15_Click);
//
// Button17
//
this.Button17.AdaptFontWithTheme = false;
this.Button17.AdaptForeColorWithTheme = false;
this.Button17.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.Button17.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.Button17.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Button17.ForeColor = System.Drawing.Color.Red;
this.Button17.Location = new System.Drawing.Point(183, 207);
@ -403,13 +403,13 @@ private void InitializeComponent()
this.Button17.Size = new System.Drawing.Size(36, 28);
this.Button17.TabIndex = 77;
this.Button17.Text = "+";
this.Button17.UseVisualStyleBackColor = true;
this.Button17.Click += new System.EventHandler(this.arithmitic_click);
//
// Button13
//
this.Button13.AdaptFontWithTheme = false;
this.Button13.AdaptForeColorWithTheme = false;
this.Button13.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
this.Button13.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.Button13.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Button13.ForeColor = System.Drawing.Color.Blue;
this.Button13.Location = new System.Drawing.Point(143, 139);
@ -417,13 +417,13 @@ private void InitializeComponent()
this.Button13.Size = new System.Drawing.Size(36, 28);
this.Button13.TabIndex = 68;
this.Button13.Text = "6";
this.Button13.UseVisualStyleBackColor = true;
this.Button13.Click += new System.EventHandler(this.number_click);
//
// Button5
//
this.Button5.AdaptFontWithTheme = false;
this.Button5.AdaptForeColorWithTheme = false;
this.Button5.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
this.Button5.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.Button5.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Button5.ForeColor = System.Drawing.Color.Blue;
this.Button5.Location = new System.Drawing.Point(63, 105);
@ -431,13 +431,13 @@ private void InitializeComponent()
this.Button5.Size = new System.Drawing.Size(36, 28);
this.Button5.TabIndex = 64;
this.Button5.Text = "7";
this.Button5.UseVisualStyleBackColor = true;
this.Button5.Click += new System.EventHandler(this.number_click);
//
// Button14
//
this.Button14.AdaptFontWithTheme = false;
this.Button14.AdaptForeColorWithTheme = false;
this.Button14.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
this.Button14.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.Button14.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Button14.ForeColor = System.Drawing.Color.Blue;
this.Button14.Location = new System.Drawing.Point(143, 207);
@ -445,13 +445,13 @@ private void InitializeComponent()
this.Button14.Size = new System.Drawing.Size(36, 28);
this.Button14.TabIndex = 73;
this.Button14.Text = ".";
this.Button14.UseVisualStyleBackColor = true;
this.Button14.Click += new System.EventHandler(this.number_click);
//
// Button18
//
this.Button18.AdaptFontWithTheme = false;
this.Button18.AdaptForeColorWithTheme = false;
this.Button18.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.Button18.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.Button18.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Button18.ForeColor = System.Drawing.Color.Red;
this.Button18.Location = new System.Drawing.Point(183, 105);
@ -459,13 +459,13 @@ private void InitializeComponent()
this.Button18.Size = new System.Drawing.Size(36, 28);
this.Button18.TabIndex = 76;
this.Button18.Text = "/";
this.Button18.UseVisualStyleBackColor = true;
this.Button18.Click += new System.EventHandler(this.arithmitic_click);
//
// Button8
//
this.Button8.AdaptFontWithTheme = false;
this.Button8.AdaptForeColorWithTheme = false;
this.Button8.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
this.Button8.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.Button8.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Button8.ForeColor = System.Drawing.Color.Blue;
this.Button8.Location = new System.Drawing.Point(103, 105);
@ -473,13 +473,13 @@ private void InitializeComponent()
this.Button8.Size = new System.Drawing.Size(36, 28);
this.Button8.TabIndex = 67;
this.Button8.Text = "8";
this.Button8.UseVisualStyleBackColor = true;
this.Button8.Click += new System.EventHandler(this.number_click);
//
// Button10
//
this.Button10.AdaptFontWithTheme = false;
this.Button10.AdaptForeColorWithTheme = false;
this.Button10.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
this.Button10.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.Button10.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Button10.ForeColor = System.Drawing.Color.Blue;
this.Button10.Location = new System.Drawing.Point(103, 139);
@ -487,13 +487,13 @@ private void InitializeComponent()
this.Button10.Size = new System.Drawing.Size(36, 28);
this.Button10.TabIndex = 65;
this.Button10.Text = "5";
this.Button10.UseVisualStyleBackColor = true;
this.Button10.Click += new System.EventHandler(this.number_click);
//
// Button20
//
this.Button20.AdaptFontWithTheme = false;
this.Button20.AdaptForeColorWithTheme = false;
this.Button20.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.Button20.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.Button20.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Button20.ForeColor = System.Drawing.Color.Red;
this.Button20.Location = new System.Drawing.Point(183, 139);
@ -501,13 +501,13 @@ private void InitializeComponent()
this.Button20.Size = new System.Drawing.Size(36, 28);
this.Button20.TabIndex = 74;
this.Button20.Text = "*";
this.Button20.UseVisualStyleBackColor = true;
this.Button20.Click += new System.EventHandler(this.arithmitic_click);
//
// Button19
//
this.Button19.AdaptFontWithTheme = false;
this.Button19.AdaptForeColorWithTheme = false;
this.Button19.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.Button19.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.Button19.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Button19.ForeColor = System.Drawing.Color.Red;
this.Button19.Location = new System.Drawing.Point(183, 173);
@ -515,13 +515,13 @@ private void InitializeComponent()
this.Button19.Size = new System.Drawing.Size(36, 28);
this.Button19.TabIndex = 75;
this.Button19.Text = "-";
this.Button19.UseVisualStyleBackColor = true;
this.Button19.Click += new System.EventHandler(this.arithmitic_click);
//
// Button9
//
this.Button9.AdaptFontWithTheme = false;
this.Button9.AdaptForeColorWithTheme = false;
this.Button9.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
this.Button9.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.Button9.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Button9.ForeColor = System.Drawing.Color.Blue;
this.Button9.Location = new System.Drawing.Point(103, 173);
@ -529,7 +529,6 @@ private void InitializeComponent()
this.Button9.Size = new System.Drawing.Size(36, 28);
this.Button9.TabIndex = 66;
this.Button9.Text = "2";
this.Button9.UseVisualStyleBackColor = true;
this.Button9.Click += new System.EventHandler(this.number_click);
//
// MenuStrip2
@ -613,33 +612,33 @@ private void InitializeComponent()
internal System.Windows.Forms.ToolStripMenuItem CopyCtrlCToolStripMenuItem1;
internal System.Windows.Forms.ToolStripMenuItem EditToolStripMenuItem1;
internal System.Windows.Forms.TextBox txtNumbers;
internal System.Windows.Forms.Button Button27;
internal System.Windows.Forms.Button Button26;
internal System.Windows.Forms.Button Button1;
internal System.Windows.Forms.Button Button25;
internal System.Windows.Forms.Button Button2;
internal System.Windows.Forms.Button Button21;
internal System.Windows.Forms.Button Button3;
internal System.Windows.Forms.Button Button22;
internal System.Windows.Forms.Button Button4;
internal System.Windows.Forms.Button Button23;
internal System.Windows.Forms.Button Button11;
internal System.Windows.Forms.Button Button7;
internal System.Windows.Forms.Button Button16;
internal System.Windows.Forms.Button Button24;
internal System.Windows.Forms.Button Button12;
internal System.Windows.Forms.Button one;
internal System.Windows.Forms.Button Button15;
internal System.Windows.Forms.Button Button17;
internal System.Windows.Forms.Button Button13;
internal System.Windows.Forms.Button Button5;
internal System.Windows.Forms.Button Button14;
internal System.Windows.Forms.Button Button18;
internal System.Windows.Forms.Button Button8;
internal System.Windows.Forms.Button Button10;
internal System.Windows.Forms.Button Button20;
internal System.Windows.Forms.Button Button19;
internal System.Windows.Forms.Button Button9;
internal Histacom2.Engine.UI.ClassicButton Button27;
internal Histacom2.Engine.UI.ClassicButton Button26;
internal Histacom2.Engine.UI.ClassicButton Button1;
internal Histacom2.Engine.UI.ClassicButton Button25;
internal Histacom2.Engine.UI.ClassicButton Button2;
internal Histacom2.Engine.UI.ClassicButton Button21;
internal Histacom2.Engine.UI.ClassicButton Button3;
internal Histacom2.Engine.UI.ClassicButton Button22;
internal Histacom2.Engine.UI.ClassicButton Button4;
internal Histacom2.Engine.UI.ClassicButton Button23;
internal Histacom2.Engine.UI.ClassicButton Button11;
internal Histacom2.Engine.UI.ClassicButton Button7;
internal Histacom2.Engine.UI.ClassicButton Button16;
internal Histacom2.Engine.UI.ClassicButton Button24;
internal Histacom2.Engine.UI.ClassicButton Button12;
internal Histacom2.Engine.UI.ClassicButton one;
internal Histacom2.Engine.UI.ClassicButton Button15;
internal Histacom2.Engine.UI.ClassicButton Button17;
internal Histacom2.Engine.UI.ClassicButton Button13;
internal Histacom2.Engine.UI.ClassicButton Button5;
internal Histacom2.Engine.UI.ClassicButton Button14;
internal Histacom2.Engine.UI.ClassicButton Button18;
internal Histacom2.Engine.UI.ClassicButton Button8;
internal Histacom2.Engine.UI.ClassicButton Button10;
internal Histacom2.Engine.UI.ClassicButton Button20;
internal Histacom2.Engine.UI.ClassicButton Button19;
internal Histacom2.Engine.UI.ClassicButton Button9;
internal System.Windows.Forms.MenuStrip MenuStrip2;
private System.Windows.Forms.PictureBox pictureBox1;
}

View file

@ -76,9 +76,6 @@ private void MenuItem_MouseLeave(object sender, EventArgs e)
private void Desktop_Load(object sender, EventArgs e)
{
if (currentTheme.defaultWallpaper != null) desktopicons.BackgroundImage = new Bitmap(currentTheme.defaultWallpaper, Width, Height);
//Start Menu Color - Commented until it works reliably
//startmenuitems.Renderer = new MyRenderer();
//ProgramsToolStripMenuItem.DropDown.Renderer = new MyRenderer();
// Make Font Mandatory
fontLoad();
@ -144,8 +141,8 @@ private void Desktop_Load(object sender, EventArgs e)
private void fontLoad()
{
this.taskbartime.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
//this.ProgramsToolStripMenuItem.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
//this.DocumentsToolStripMenuItem.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
this.ProgramsToolStripMenuItem.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
this.DocumentsToolStripMenuItem.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
this.SettingsToolStripMenuItem.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
this.FindToolStripMenuItem.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
this.HelpToolStripMenuItem.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
@ -658,29 +655,5 @@ private void startmenu_Paint(object sender, PaintEventArgs e)
gfx.DrawLine(new Pen(_lightBack), startmenu.Width - 3, 1, 1, 1);
}
}
public class MyRenderer : ToolStripProfessionalRenderer
{
public MyRenderer() : base(new MyColors()) { }
}
public class MyColors : ProfessionalColorTable
{
public override Color MenuItemSelectedGradientBegin
{
get { return Color.Navy; }
}
public override Color MenuItemSelectedGradientEnd
{
get { return Color.Navy; }
}
public override Color MenuItemPressedGradientBegin
{
get { return Color.Navy; }
}
public override Color MenuItemPressedGradientEnd
{
get { return Color.Navy; }
}
}
}

View file

@ -77,19 +77,16 @@ private void ChangeTheme()
case "Default":
SaveSystem.CurrentSave.ThemeName = "default95";
SaveSystem.currentTheme = new Default95Theme();
TitleScreen.frm95.BackgroundImage = null;
TitleScreen.frm95.desktopicons.BackgroundImage = null;
break;
case "Dangerous Creatures":
SaveSystem.CurrentSave.ThemeName = "dangeranimals";
SaveSystem.currentTheme = new DangerousCreaturesTheme();
TitleScreen.frm95.BackgroundImage = Properties.Resources.DCTheme_BG;
TitleScreen.frm95.desktopicons.BackgroundImage = new Bitmap(Properties.Resources.DCTheme_BG, TitleScreen.frm95.Width, TitleScreen.frm95.Height);
break;
case "Inside Your Computer":
SaveSystem.CurrentSave.ThemeName = "insidepc";
SaveSystem.currentTheme = new InsideComputerTheme();
TitleScreen.frm95.BackgroundImage = Properties.Resources.ICTheme_BG;
TitleScreen.frm95.desktopicons.BackgroundImage = new Bitmap(Properties.Resources.ICTheme_BG, TitleScreen.frm95.Width, TitleScreen.frm95.Height);
break;
}

View file

@ -67,6 +67,7 @@ private void InitializeComponent()
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(160, 22);
this.panel1.TabIndex = 2;
this.panel1.Paint += new System.Windows.Forms.PaintEventHandler(this.panel1_Paint);
//
// Win95TaskBarItem
//

View file

@ -39,5 +39,22 @@ private void Win95TaskBarItem_Click(object sender, EventArgs e)
{
tb.FocusAppFromID(ApplicationID);
}
private void panel1_Paint(object sender, PaintEventArgs e)
{
if (SaveSystem.currentTheme != null) BackColor = SaveSystem.currentTheme.threeDObjectsColor;
else BackColor = Color.Silver;
var _lightBack = Paintbrush.GetLightFromColor(BackColor);
var _darkBack = Paintbrush.GetDarkFromColor(BackColor);
var g = e.Graphics;
g.Clear(BackColor);
g.FillRectangle(Brushes.Black, new Rectangle(0, 0, Width, Height));
g.FillRectangle(new SolidBrush(_lightBack), new Rectangle(0, 0, Width - 1, Height - 1));
g.FillRectangle(new SolidBrush(_darkBack), new Rectangle(1, 1, Width - 2, Height - 2));
g.FillRectangle(new SolidBrush(BackColor), new Rectangle(1, 1, Width - 3, Height - 3));
}
}
}