aboutsummaryrefslogtreecommitdiff
path: root/Histacom2/GlobalPrograms/WinClassicCalculator.cs
diff options
context:
space:
mode:
authorFloppyDiskDrive <[email protected]>2017-09-13 19:07:23 -0500
committerFloppyDiskDrive <[email protected]>2017-09-13 19:07:23 -0500
commitefc8583dad8c9b22172cdb74e156df4803cfeadd (patch)
tree23cbe04f662e649d3fe28bf7c120d826ae51788f /Histacom2/GlobalPrograms/WinClassicCalculator.cs
parent282cdbca58ef7b4c3decaa942ad20333e3c15cfd (diff)
parentca482366718339b0684f64980dc67587222b4850 (diff)
downloadhistacom2-efc8583dad8c9b22172cdb74e156df4803cfeadd.tar.gz
histacom2-efc8583dad8c9b22172cdb74e156df4803cfeadd.tar.bz2
histacom2-efc8583dad8c9b22172cdb74e156df4803cfeadd.zip
Merge remote-tracking branch 'refs/remotes/Histacom2-Devs/master'
Diffstat (limited to 'Histacom2/GlobalPrograms/WinClassicCalculator.cs')
-rw-r--r--Histacom2/GlobalPrograms/WinClassicCalculator.cs18
1 files changed, 3 insertions, 15 deletions
diff --git a/Histacom2/GlobalPrograms/WinClassicCalculator.cs b/Histacom2/GlobalPrograms/WinClassicCalculator.cs
index 7f04e85..2fecae8 100644
--- a/Histacom2/GlobalPrograms/WinClassicCalculator.cs
+++ b/Histacom2/GlobalPrograms/WinClassicCalculator.cs
@@ -19,18 +19,6 @@ namespace Histacom2.OS.Win95.Win95Apps
public WinClassicCalculator()
{
InitializeComponent();
- foreach (Control c in Controls)
- {
- if (c is Button)
- {
- c.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Bold, GraphicsUnit.Point, ((byte)(0)));
- c.Paint += (sender, args) => Paintbrush.PaintClassicBorders(sender, args, 2);
- }
- else
- {
- c.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
- }
- }
txtNumbers.Paint += (sender, args) => Paintbrush.PaintClassicBordersIndented(sender, args, 2);
}
private void number_click(object sender, EventArgs e)
@@ -40,7 +28,7 @@ namespace Histacom2.OS.Win95.Win95Apps
if ((txtNumbers.Text == "0") || (operation_pressed))
txtNumbers.Text = "";
operation_pressed = false;
- Button num = (Button)sender;
+ Engine.UI.ClassicButton num = (Engine.UI.ClassicButton)sender;
if (num.Text == ".")
{
if (!txtNumbers.Text.Contains("."))
@@ -77,7 +65,7 @@ namespace Histacom2.OS.Win95.Win95Apps
private void arithmitic_click(object sender, EventArgs e)
{
- Button num = (Button)sender;
+ Engine.UI.ClassicButton num = (Engine.UI.ClassicButton)sender;
if (txtNumbers.Text.Contains("∞"))
txtNumbers.Clear();
if (prevnum != 0)
@@ -135,7 +123,7 @@ namespace Histacom2.OS.Win95.Win95Apps
txtNumbers.Text = (prevnum / double.Parse(txtNumbers.Text)).ToString();
break;
}
- prevnum = Int32.Parse(txtNumbers.Text);
+ prevnum = int.Parse(txtNumbers.Text);
operation = "";
}