diff options
| author | Alex-TIMEHACK <[email protected]> | 2017-09-23 17:25:22 +0100 |
|---|---|---|
| committer | Alex-TIMEHACK <[email protected]> | 2017-09-23 17:25:22 +0100 |
| commit | 350e749bb9eab16efe753f9b8fd703b52a97f808 (patch) | |
| tree | 9c90ec1a8148d66d9ff8605710a992e5e14a6b7e /Histacom2/GlobalPrograms/WinClassicCalculator.cs | |
| parent | 84ef033af262343febc3f84471233e18bc6b502e (diff) | |
| parent | 1ee3e00f8f0ee879fce4edf7d1ba9889335bc826 (diff) | |
| download | histacom2-350e749bb9eab16efe753f9b8fd703b52a97f808.tar.gz histacom2-350e749bb9eab16efe753f9b8fd703b52a97f808.tar.bz2 histacom2-350e749bb9eab16efe753f9b8fd703b52a97f808.zip | |
Merge branch 'master' of https://github.com/Histacom2-Devs/Histacom2
Diffstat (limited to 'Histacom2/GlobalPrograms/WinClassicCalculator.cs')
| -rw-r--r-- | Histacom2/GlobalPrograms/WinClassicCalculator.cs | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/Histacom2/GlobalPrograms/WinClassicCalculator.cs b/Histacom2/GlobalPrograms/WinClassicCalculator.cs index 7f04e85..50fd2d8 100644 --- a/Histacom2/GlobalPrograms/WinClassicCalculator.cs +++ b/Histacom2/GlobalPrograms/WinClassicCalculator.cs @@ -9,7 +9,7 @@ using System.Threading.Tasks; using System.Windows.Forms; using Histacom2.Engine; -namespace Histacom2.OS.Win95.Win95Apps +namespace Histacom2.GlobalPrograms { public partial class WinClassicCalculator : UserControl { @@ -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 = ""; } |
