From 49f0c7a892895f0cfd9a96b0631b510a1794e2d2 Mon Sep 17 00:00:00 2001 From: jtsshieh Date: Wed, 12 Jul 2017 12:32:35 -0400 Subject: Basic Kinda working calc The title --- TimeHACK.Main/OS/Win95/Win95.Designer.cs | 21 +- TimeHACK.Main/OS/Win95/Win95.cs | 13 + TimeHACK.Main/OS/Win95/Win95.resx | 2 +- .../Win95Apps/WinClassicCalculator.Designer.cs | 574 +++++++++++++++++++++ .../OS/Win95/Win95Apps/WinClassicCalculator.cs | 265 ++++++++++ .../OS/Win95/Win95Apps/WinClassicCalculator.resx | 126 +++++ TimeHACK.Main/TimeHACK.Main.csproj | 9 + 7 files changed, 999 insertions(+), 11 deletions(-) create mode 100644 TimeHACK.Main/OS/Win95/Win95Apps/WinClassicCalculator.Designer.cs create mode 100644 TimeHACK.Main/OS/Win95/Win95Apps/WinClassicCalculator.cs create mode 100644 TimeHACK.Main/OS/Win95/Win95Apps/WinClassicCalculator.resx (limited to 'TimeHACK.Main') diff --git a/TimeHACK.Main/OS/Win95/Win95.Designer.cs b/TimeHACK.Main/OS/Win95/Win95.Designer.cs index e96c0ff..144b0c9 100644 --- a/TimeHACK.Main/OS/Win95/Win95.Designer.cs +++ b/TimeHACK.Main/OS/Win95/Win95.Designer.cs @@ -93,6 +93,7 @@ namespace TimeHACK.OS.Win95 this.downloaderTestToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.installerTestToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.storyTest1ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.iE4TestToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.SettingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.ControlPanelToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.PrintersToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); @@ -130,7 +131,6 @@ namespace TimeHACK.OS.Win95 this.BitmapImageToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.MicrosoftDataLinkToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.PropertiesToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); - this.iE4TestToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.panel1.SuspendLayout(); this.taskbar.SuspendLayout(); this.clockPanel.SuspendLayout(); @@ -457,6 +457,7 @@ namespace TimeHACK.OS.Win95 this.CalculatorToolStripMenuItem.Name = "CalculatorToolStripMenuItem"; this.CalculatorToolStripMenuItem.Size = new System.Drawing.Size(181, 28); this.CalculatorToolStripMenuItem.Text = "Calculator"; + this.CalculatorToolStripMenuItem.Click += new System.EventHandler(this.CalculatorToolStripMenuItem_Click); // // HyperTerminalToolStripMenuItem // @@ -781,6 +782,15 @@ namespace TimeHACK.OS.Win95 this.storyTest1ToolStripMenuItem.Text = "StoryTest1"; this.storyTest1ToolStripMenuItem.Click += new System.EventHandler(this.storyTest1ToolStripMenuItem_Click); // + // iE4TestToolStripMenuItem + // + this.iE4TestToolStripMenuItem.BackColor = System.Drawing.SystemColors.Control; + this.iE4TestToolStripMenuItem.BackgroundImage = global::TimeHACK.Properties.Resources.sliversilver; + this.iE4TestToolStripMenuItem.Name = "iE4TestToolStripMenuItem"; + this.iE4TestToolStripMenuItem.Size = new System.Drawing.Size(159, 22); + this.iE4TestToolStripMenuItem.Text = "IE4Test"; + this.iE4TestToolStripMenuItem.Click += new System.EventHandler(this.iE4TestToolStripMenuItem_Click); + // // SettingsToolStripMenuItem // this.SettingsToolStripMenuItem.BackColor = System.Drawing.Color.Silver; @@ -1145,15 +1155,6 @@ namespace TimeHACK.OS.Win95 this.PropertiesToolStripMenuItem1.Text = "Properties"; this.PropertiesToolStripMenuItem1.Click += new System.EventHandler(this.PropertiesToolStripMenuItem1_Click); // - // iE4TestToolStripMenuItem - // - this.iE4TestToolStripMenuItem.BackColor = System.Drawing.SystemColors.Control; - this.iE4TestToolStripMenuItem.BackgroundImage = global::TimeHACK.Properties.Resources.sliversilver; - this.iE4TestToolStripMenuItem.Name = "iE4TestToolStripMenuItem"; - this.iE4TestToolStripMenuItem.Size = new System.Drawing.Size(159, 22); - this.iE4TestToolStripMenuItem.Text = "IE4Test"; - this.iE4TestToolStripMenuItem.Click += new System.EventHandler(this.iE4TestToolStripMenuItem_Click); - // // Windows95 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); diff --git a/TimeHACK.Main/OS/Win95/Win95.cs b/TimeHACK.Main/OS/Win95/Win95.cs index e08d436..7efe5e9 100644 --- a/TimeHACK.Main/OS/Win95/Win95.cs +++ b/TimeHACK.Main/OS/Win95/Win95.cs @@ -450,6 +450,19 @@ namespace TimeHACK.OS.Win95 app.BringToFront(); startmenu.Hide(); } + + private void CalculatorToolStripMenuItem_Click(object sender, EventArgs e) + { + WinClassic app = wm.StartWin95(new WinClassicCalculator(), "Calculator", Properties.Resources.WinClassicCalc, false, false); + AddTaskBarItem(app, app.Tag.ToString(), "Calculator", Properties.Resources.WinClassicCalc); + + nonimportantapps.Add(app); + nonimportantapps[nonimportantapps.Count - 1].BringToFront(); + nonimportantapps[nonimportantapps.Count - 1].FormClosing += new FormClosingEventHandler(NonImportantApp_Closing); + + app.BringToFront(); + startmenu.Hide(); + } } public class MyRenderer : ToolStripProfessionalRenderer { diff --git a/TimeHACK.Main/OS/Win95/Win95.resx b/TimeHACK.Main/OS/Win95/Win95.resx index e0111f1..ec161c8 100644 --- a/TimeHACK.Main/OS/Win95/Win95.resx +++ b/TimeHACK.Main/OS/Win95/Win95.resx @@ -382,7 +382,7 @@ AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADq - ggAAAk1TRnQBSQFMAgEBDAEAAZABAQGQAQEBIAEAASABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAGA + ggAAAk1TRnQBSQFMAgEBDAEAAZgBAQGYAQEBIAEAASABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAGA AwABgAMAAQEBAAEgBwABAf8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A /wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A /wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8AXAAB/wMAAf8DAAH/AwAB/wMAAf8DAAH/AwAB/x8AAf8DAAH/ diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicCalculator.Designer.cs b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicCalculator.Designer.cs new file mode 100644 index 0000000..b34082d --- /dev/null +++ b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicCalculator.Designer.cs @@ -0,0 +1,574 @@ +namespace TimeHACK.OS.Win95.Win95Apps +{ + partial class WinClassicCalculator + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.timer1 = new System.Windows.Forms.Timer(this.components); + this.HelpToolStripMenuItem3 = new System.Windows.Forms.ToolStripMenuItem(); + this.AboutCalculatorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.StandardToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ScientificToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.HelpToolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem(); + this.PasteCtrlVToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + 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.Button6 = 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.MenuStrip2 = new System.Windows.Forms.MenuStrip(); + this.MenuStrip2.SuspendLayout(); + this.SuspendLayout(); + // + // timer1 + // + this.timer1.Interval = 1; + // + // HelpToolStripMenuItem3 + // + this.HelpToolStripMenuItem3.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.AboutCalculatorToolStripMenuItem}); + this.HelpToolStripMenuItem3.Name = "HelpToolStripMenuItem3"; + this.HelpToolStripMenuItem3.Size = new System.Drawing.Size(44, 20); + this.HelpToolStripMenuItem3.Text = "Help"; + // + // AboutCalculatorToolStripMenuItem + // + this.AboutCalculatorToolStripMenuItem.BackColor = System.Drawing.Color.Silver; + this.AboutCalculatorToolStripMenuItem.Name = "AboutCalculatorToolStripMenuItem"; + this.AboutCalculatorToolStripMenuItem.Size = new System.Drawing.Size(164, 22); + this.AboutCalculatorToolStripMenuItem.Text = "About Calculator"; + // + // StandardToolStripMenuItem + // + this.StandardToolStripMenuItem.BackColor = System.Drawing.Color.Silver; + this.StandardToolStripMenuItem.Name = "StandardToolStripMenuItem"; + this.StandardToolStripMenuItem.Size = new System.Drawing.Size(122, 22); + this.StandardToolStripMenuItem.Text = "Standard"; + // + // ScientificToolStripMenuItem + // + this.ScientificToolStripMenuItem.BackColor = System.Drawing.Color.Silver; + this.ScientificToolStripMenuItem.Name = "ScientificToolStripMenuItem"; + this.ScientificToolStripMenuItem.Size = new System.Drawing.Size(122, 22); + this.ScientificToolStripMenuItem.Text = "Scientific"; + // + // HelpToolStripMenuItem2 + // + this.HelpToolStripMenuItem2.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.ScientificToolStripMenuItem, + this.StandardToolStripMenuItem}); + this.HelpToolStripMenuItem2.Name = "HelpToolStripMenuItem2"; + this.HelpToolStripMenuItem2.Size = new System.Drawing.Size(44, 20); + this.HelpToolStripMenuItem2.Text = "View"; + // + // PasteCtrlVToolStripMenuItem1 + // + this.PasteCtrlVToolStripMenuItem1.BackColor = System.Drawing.Color.Silver; + this.PasteCtrlVToolStripMenuItem1.Name = "PasteCtrlVToolStripMenuItem1"; + this.PasteCtrlVToolStripMenuItem1.Size = new System.Drawing.Size(158, 22); + this.PasteCtrlVToolStripMenuItem1.Text = "Paste Ctrl+V"; + // + // CopyCtrlCToolStripMenuItem1 + // + this.CopyCtrlCToolStripMenuItem1.BackColor = System.Drawing.Color.Silver; + this.CopyCtrlCToolStripMenuItem1.Name = "CopyCtrlCToolStripMenuItem1"; + this.CopyCtrlCToolStripMenuItem1.Size = new System.Drawing.Size(158, 22); + this.CopyCtrlCToolStripMenuItem1.Text = "Copy Ctrl+C"; + // + // EditToolStripMenuItem1 + // + this.EditToolStripMenuItem1.BackColor = System.Drawing.Color.Silver; + this.EditToolStripMenuItem1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.CopyCtrlCToolStripMenuItem1, + this.PasteCtrlVToolStripMenuItem1}); + this.EditToolStripMenuItem1.Name = "EditToolStripMenuItem1"; + this.EditToolStripMenuItem1.Size = new System.Drawing.Size(39, 20); + this.EditToolStripMenuItem1.Text = "Edit"; + // + // txtNumbers + // + this.txtNumbers.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtNumbers.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtNumbers.Location = new System.Drawing.Point(18, 62); + this.txtNumbers.Multiline = true; + this.txtNumbers.Name = "txtNumbers"; + this.txtNumbers.ReadOnly = true; + this.txtNumbers.Size = new System.Drawing.Size(272, 28); + this.txtNumbers.TabIndex = 85; + this.txtNumbers.Text = "0"; + this.txtNumbers.TextAlign = System.Windows.Forms.HorizontalAlignment.Right; + // + // Button27 + // + this.Button27.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + 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(179, 96); + this.Button27.Name = "Button27"; + this.Button27.Size = new System.Drawing.Size(53, 30); + this.Button27.TabIndex = 84; + this.Button27.Text = "CE"; + this.Button27.UseVisualStyleBackColor = true; + // + // Button26 + // + this.Button26.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + 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(237, 96); + this.Button26.Name = "Button26"; + this.Button26.Size = new System.Drawing.Size(53, 30); + this.Button26.TabIndex = 83; + this.Button26.Text = "C"; + this.Button26.UseVisualStyleBackColor = true; + // + // Button1 + // + this.Button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + 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(18, 172); + this.Button1.Name = "Button1"; + this.Button1.Size = new System.Drawing.Size(38, 30); + this.Button1.TabIndex = 58; + this.Button1.Text = "MR"; + this.Button1.UseVisualStyleBackColor = true; + // + // Button25 + // + this.Button25.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + 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(120, 96); + this.Button25.Name = "Button25"; + this.Button25.Size = new System.Drawing.Size(53, 30); + this.Button25.TabIndex = 82; + this.Button25.Text = "Back"; + this.Button25.UseVisualStyleBackColor = true; + // + // Button2 + // + this.Button2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + 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(18, 243); + this.Button2.Name = "Button2"; + this.Button2.Size = new System.Drawing.Size(38, 30); + this.Button2.TabIndex = 59; + this.Button2.Text = "M+"; + this.Button2.UseVisualStyleBackColor = true; + // + // Button21 + // + this.Button21.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + 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.MidnightBlue; + this.Button21.Location = new System.Drawing.Point(252, 243); + this.Button21.Name = "Button21"; + this.Button21.Size = new System.Drawing.Size(38, 30); + this.Button21.TabIndex = 81; + this.Button21.Text = "="; + this.Button21.UseVisualStyleBackColor = true; + this.Button21.Click += new System.EventHandler(this.Button21_Click); + // + // Button3 + // + this.Button3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + 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(18, 208); + this.Button3.Name = "Button3"; + this.Button3.Size = new System.Drawing.Size(38, 30); + this.Button3.TabIndex = 60; + this.Button3.Text = "MS"; + this.Button3.UseVisualStyleBackColor = true; + // + // Button22 + // + this.Button22.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + 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(252, 136); + this.Button22.Name = "Button22"; + this.Button22.Size = new System.Drawing.Size(38, 30); + this.Button22.TabIndex = 80; + this.Button22.Text = "sqrt"; + this.Button22.UseVisualStyleBackColor = true; + // + // Button4 + // + this.Button4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + 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(18, 136); + this.Button4.Name = "Button4"; + this.Button4.Size = new System.Drawing.Size(38, 30); + this.Button4.TabIndex = 61; + this.Button4.Text = "MC"; + this.Button4.UseVisualStyleBackColor = true; + // + // Button23 + // + this.Button23.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + 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(252, 208); + this.Button23.Name = "Button23"; + this.Button23.Size = new System.Drawing.Size(38, 30); + this.Button23.TabIndex = 79; + this.Button23.Text = "1/x"; + this.Button23.UseVisualStyleBackColor = true; + // + // Button11 + // + this.Button11.Anchor = System.Windows.Forms.AnchorStyles.Bottom; + 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(162, 136); + this.Button11.Name = "Button11"; + this.Button11.Size = new System.Drawing.Size(38, 30); + this.Button11.TabIndex = 70; + this.Button11.Text = "9"; + this.Button11.UseVisualStyleBackColor = true; + // + // Button7 + // + this.Button7.Anchor = System.Windows.Forms.AnchorStyles.Bottom; + 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(74, 172); + this.Button7.Name = "Button7"; + this.Button7.Size = new System.Drawing.Size(38, 30); + this.Button7.TabIndex = 62; + this.Button7.Text = "4"; + this.Button7.UseVisualStyleBackColor = true; + // + // Button16 + // + this.Button16.Anchor = System.Windows.Forms.AnchorStyles.Bottom; + 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(74, 243); + this.Button16.Name = "Button16"; + this.Button16.Size = new System.Drawing.Size(38, 30); + this.Button16.TabIndex = 71; + this.Button16.Text = "0"; + this.Button16.UseVisualStyleBackColor = true; + // + // Button24 + // + this.Button24.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + 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(252, 172); + this.Button24.Name = "Button24"; + this.Button24.Size = new System.Drawing.Size(38, 30); + this.Button24.TabIndex = 78; + this.Button24.Text = "%"; + this.Button24.UseVisualStyleBackColor = true; + // + // Button12 + // + this.Button12.Anchor = System.Windows.Forms.AnchorStyles.Bottom; + 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(162, 208); + this.Button12.Name = "Button12"; + this.Button12.Size = new System.Drawing.Size(38, 30); + this.Button12.TabIndex = 69; + this.Button12.Text = "3"; + this.Button12.UseVisualStyleBackColor = true; + // + // Button6 + // + this.Button6.Anchor = System.Windows.Forms.AnchorStyles.Bottom; + this.Button6.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Button6.ForeColor = System.Drawing.Color.Blue; + this.Button6.Location = new System.Drawing.Point(74, 208); + this.Button6.Name = "Button6"; + this.Button6.Size = new System.Drawing.Size(38, 30); + this.Button6.TabIndex = 63; + this.Button6.Text = "1"; + this.Button6.UseVisualStyleBackColor = true; + // + // Button15 + // + this.Button15.Anchor = System.Windows.Forms.AnchorStyles.Bottom; + 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(118, 243); + this.Button15.Name = "Button15"; + this.Button15.Size = new System.Drawing.Size(38, 30); + this.Button15.TabIndex = 72; + this.Button15.Text = "+/-"; + this.Button15.UseVisualStyleBackColor = true; + // + // Button17 + // + this.Button17.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + 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(208, 243); + this.Button17.Name = "Button17"; + this.Button17.Size = new System.Drawing.Size(38, 30); + this.Button17.TabIndex = 77; + this.Button17.Text = "+"; + this.Button17.UseVisualStyleBackColor = true; + // + // Button13 + // + this.Button13.Anchor = System.Windows.Forms.AnchorStyles.Bottom; + 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(162, 172); + this.Button13.Name = "Button13"; + this.Button13.Size = new System.Drawing.Size(38, 30); + this.Button13.TabIndex = 68; + this.Button13.Text = "6"; + this.Button13.UseVisualStyleBackColor = true; + // + // Button5 + // + this.Button5.Anchor = System.Windows.Forms.AnchorStyles.Bottom; + 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(74, 136); + this.Button5.Name = "Button5"; + this.Button5.Size = new System.Drawing.Size(38, 30); + this.Button5.TabIndex = 64; + this.Button5.Text = "7"; + this.Button5.UseVisualStyleBackColor = true; + // + // Button14 + // + this.Button14.Anchor = System.Windows.Forms.AnchorStyles.Bottom; + 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(162, 243); + this.Button14.Name = "Button14"; + this.Button14.Size = new System.Drawing.Size(38, 30); + this.Button14.TabIndex = 73; + this.Button14.Text = "."; + this.Button14.UseVisualStyleBackColor = true; + // + // Button18 + // + this.Button18.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + 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(208, 136); + this.Button18.Name = "Button18"; + this.Button18.Size = new System.Drawing.Size(38, 30); + this.Button18.TabIndex = 76; + this.Button18.Text = "/"; + this.Button18.UseVisualStyleBackColor = true; + // + // Button8 + // + this.Button8.Anchor = System.Windows.Forms.AnchorStyles.Bottom; + 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(118, 136); + this.Button8.Name = "Button8"; + this.Button8.Size = new System.Drawing.Size(38, 30); + this.Button8.TabIndex = 67; + this.Button8.Text = "8"; + this.Button8.UseVisualStyleBackColor = true; + // + // Button10 + // + this.Button10.Anchor = System.Windows.Forms.AnchorStyles.Bottom; + 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(118, 172); + this.Button10.Name = "Button10"; + this.Button10.Size = new System.Drawing.Size(38, 30); + this.Button10.TabIndex = 65; + this.Button10.Text = "5"; + this.Button10.UseVisualStyleBackColor = true; + // + // Button20 + // + this.Button20.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + 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(208, 172); + this.Button20.Name = "Button20"; + this.Button20.Size = new System.Drawing.Size(38, 30); + this.Button20.TabIndex = 74; + this.Button20.Text = "*"; + this.Button20.UseVisualStyleBackColor = true; + // + // Button19 + // + this.Button19.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + 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(208, 208); + this.Button19.Name = "Button19"; + this.Button19.Size = new System.Drawing.Size(38, 30); + this.Button19.TabIndex = 75; + this.Button19.Text = "-"; + this.Button19.UseVisualStyleBackColor = true; + // + // Button9 + // + this.Button9.Anchor = System.Windows.Forms.AnchorStyles.Bottom; + 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(118, 208); + this.Button9.Name = "Button9"; + this.Button9.Size = new System.Drawing.Size(38, 30); + this.Button9.TabIndex = 66; + this.Button9.Text = "2"; + this.Button9.UseVisualStyleBackColor = true; + // + // MenuStrip2 + // + this.MenuStrip2.BackColor = System.Drawing.Color.Silver; + this.MenuStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.EditToolStripMenuItem1, + this.HelpToolStripMenuItem2, + this.HelpToolStripMenuItem3}); + this.MenuStrip2.Location = new System.Drawing.Point(0, 0); + this.MenuStrip2.Name = "MenuStrip2"; + this.MenuStrip2.Size = new System.Drawing.Size(308, 24); + this.MenuStrip2.TabIndex = 86; + this.MenuStrip2.Text = "MenuStrip2"; + // + // WinClassicCalculator + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.txtNumbers); + this.Controls.Add(this.Button27); + this.Controls.Add(this.Button26); + this.Controls.Add(this.Button1); + this.Controls.Add(this.Button25); + this.Controls.Add(this.Button2); + this.Controls.Add(this.Button21); + this.Controls.Add(this.Button3); + this.Controls.Add(this.Button22); + this.Controls.Add(this.Button4); + this.Controls.Add(this.Button23); + this.Controls.Add(this.Button11); + this.Controls.Add(this.Button7); + this.Controls.Add(this.Button16); + this.Controls.Add(this.Button24); + this.Controls.Add(this.Button12); + this.Controls.Add(this.Button6); + this.Controls.Add(this.Button15); + this.Controls.Add(this.Button17); + this.Controls.Add(this.Button13); + this.Controls.Add(this.Button5); + this.Controls.Add(this.Button14); + this.Controls.Add(this.Button18); + this.Controls.Add(this.Button8); + this.Controls.Add(this.Button10); + this.Controls.Add(this.Button20); + this.Controls.Add(this.Button19); + this.Controls.Add(this.Button9); + this.Controls.Add(this.MenuStrip2); + this.Name = "WinClassicCalculator"; + this.Size = new System.Drawing.Size(308, 276); + this.MenuStrip2.ResumeLayout(false); + this.MenuStrip2.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Timer timer1; + internal System.Windows.Forms.ToolStripMenuItem HelpToolStripMenuItem3; + internal System.Windows.Forms.ToolStripMenuItem AboutCalculatorToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem StandardToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem ScientificToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem HelpToolStripMenuItem2; + internal System.Windows.Forms.ToolStripMenuItem PasteCtrlVToolStripMenuItem1; + 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 Button6; + 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 System.Windows.Forms.MenuStrip MenuStrip2; + } +} diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicCalculator.cs b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicCalculator.cs new file mode 100644 index 0000000..f4105c0 --- /dev/null +++ b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicCalculator.cs @@ -0,0 +1,265 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using TimeHACK.Engine; + +namespace TimeHACK.OS.Win95.Win95Apps +{ + public partial class WinClassicCalculator : UserControl + { + public WinClassicCalculator() + { + InitializeComponent(); + } + public double prevnum = 0; + public bool iszero = true; + public bool neg = false; + public bool isdecimal = false; + public string coperator; + public void appendnum(string num) + { + if (iszero == true) + { + txtNumbers.Clear(); + txtNumbers.Text += (num); + iszero = false; + } + else + { + if (iszero == false) + { + txtNumbers.Text += (num); + } + } + + } + private void Button6_Click(object sender, EventArgs e) + { + appendnum("1"); + } + + private void Button9_Click(object sender, EventArgs e) + { + appendnum("2"); + } + + private void Button21_Click(object sender, EventArgs e) + { + Calculate(); + } + + private void Button12_Click(object sender, EventArgs e) + { + appendnum("3"); + } + + private void Button7_Click(object sender, EventArgs e) + { + appendnum("4"); + } + + private void Button10_Click(object sender, EventArgs e) + { + appendnum("5"); + } + + private void Button13_Click(object sender, EventArgs e) + { + appendnum("6"); + } + + private void Button5_Click(object sender, EventArgs e) + { + appendnum("7"); + } + + private void Button8_Click(object sender, EventArgs e) + { + appendnum("8"); + } + + private void Button11_Click(object sender, EventArgs e) + { + appendnum("9"); + } + + private void Button16_Click(object sender, EventArgs e) + { + + if (iszero == false) + { + txtNumbers.Text += (0); + } + } + + private void Button25_Click(object sender, EventArgs e) + { + if (txtNumbers.Text != "0") + { + txtNumbers.Text = txtNumbers.Text.Remove(txtNumbers.Text.Length - 1); + } + if (txtNumbers.TextLength < 1) + { + txtNumbers.Text = "0"; + } + + } + + private void Button15_Click(object sender, EventArgs e) + { + if (neg == false) + { + txtNumbers.Text = "-" + txtNumbers.Text; + neg = true; + } + else + { + txtNumbers.Text = txtNumbers.Text.Replace("-", ""); + neg = false; + } + } + + private void Button14_Click(object sender, EventArgs e) + { + + if (isdecimal == false) + { + appendnum("."); + isdecimal = true; + } + } + + private void timer1_Tick(object sender, EventArgs e) + { + if (txtNumbers.Text.Contains(".") == false) + { + isdecimal = false; + } + if (txtNumbers.Text == "0") + { + iszero = true; + } + } + + private void WinClassicCalculator_Load(object sender, EventArgs e) + { + timer1.Start(); + } + + private void AboutCalculatorToolStripMenuItem_Click(object sender, EventArgs e) + { + + WindowManager wm = new WindowManager(); + wm.StartAboutBox95("Calculator", null, Properties.Resources.WinClassicCalc); + } + + private void Button26_Click(object sender, EventArgs e) + { + prevnum = 0; + txtNumbers.Text = "0"; + isdecimal = false; + iszero = true; + neg = false; + } + + private void Button27_Click(object sender, EventArgs e) + { + txtNumbers.Text = "0"; + isdecimal = false; + iszero = true; + neg = false; + } + public void Calculate() + { + switch (coperator) + { + case "+": + txtNumbers.Text = (prevnum + double.Parse(txtNumbers.Text)).ToString(); + prevnum = double.Parse(txtNumbers.Text); + break; + case "-": + if (prevnum == 0) + { + break; + } + txtNumbers.Text = (prevnum - double.Parse(txtNumbers.Text)).ToString(); + prevnum = double.Parse(txtNumbers.Text); + break; + case "*": + if (prevnum == 0) + { + break; + } + txtNumbers.Text = (prevnum * double.Parse(txtNumbers.Text)).ToString(); + prevnum = double.Parse(txtNumbers.Text); + break; + case "/": + if (prevnum == 0) + { + break; + } + txtNumbers.Text = (prevnum / double.Parse(txtNumbers.Text)).ToString(); + prevnum = double.Parse(txtNumbers.Text); + break; + } + } + + private void Button22_Click(object sender, EventArgs e) + { + double sq = double.Parse(txtNumbers.Text); + txtNumbers.Text = Math.Sqrt(sq).ToString(); + } + + private void Button17_Click(object sender, EventArgs e) + { + coperator = "+"; + Calculate(); + prevnum = double.Parse(txtNumbers.Text); + txtNumbers.Text = "0"; + } + + private void Button19_Click(object sender, EventArgs e) + { + coperator = "-"; + Calculate(); + prevnum = double.Parse(txtNumbers.Text); + txtNumbers.Text = "0"; + } + + private void Button20_Click(object sender, EventArgs e) + { + coperator = "*"; + Calculate(); + prevnum = double.Parse(txtNumbers.Text); + txtNumbers.Text = "0"; + } + + private void Button18_Click(object sender, EventArgs e) + { + coperator = "/"; + Calculate(); + prevnum = double.Parse(txtNumbers.Text); + txtNumbers.Text = "0"; + } + + private void Button23_Click(object sender, EventArgs e) + { + double a; + a = Convert.ToDouble(1.0 / Convert.ToDouble(txtNumbers.Text)); + txtNumbers.Text = Convert.ToString(a); + } + + private void Button24_Click(object sender, EventArgs e) + { + double a; + a = Convert.ToDouble(txtNumbers.Text) / Convert.ToDouble(100); + txtNumbers.Text = Convert.ToString(a); + } + } +} diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicCalculator.resx b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicCalculator.resx new file mode 100644 index 0000000..d7509b3 --- /dev/null +++ b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicCalculator.resx @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 219, 17 + + + 306, 17 + + \ No newline at end of file diff --git a/TimeHACK.Main/TimeHACK.Main.csproj b/TimeHACK.Main/TimeHACK.Main.csproj index 8d2f76d..229b453 100644 --- a/TimeHACK.Main/TimeHACK.Main.csproj +++ b/TimeHACK.Main/TimeHACK.Main.csproj @@ -158,6 +158,12 @@ Win95Installer.cs + + UserControl + + + WinClassicCalculator.cs + UserControl @@ -327,6 +333,9 @@ Win95Installer.cs + + WinClassicCalculator.cs + WinClassicFTPClient.cs -- cgit v1.2.3 From e8fc74612a301b32b8676f82528965c2751948b5 Mon Sep 17 00:00:00 2001 From: jtsshieh Date: Wed, 12 Jul 2017 13:07:56 -0400 Subject: Finally basic calc Has a ton of bugs. --- .../Win95Apps/WinClassicCalculator.Designer.cs | 23 ++++++++++++++++++++++ .../OS/Win95/Win95Apps/WinClassicCalculator.cs | 5 +++++ 2 files changed, 28 insertions(+) (limited to 'TimeHACK.Main') diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicCalculator.Designer.cs b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicCalculator.Designer.cs index b34082d..f71c5e3 100644 --- a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicCalculator.Designer.cs +++ b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicCalculator.Designer.cs @@ -161,6 +161,7 @@ this.Button27.TabIndex = 84; this.Button27.Text = "CE"; this.Button27.UseVisualStyleBackColor = true; + this.Button27.Click += new System.EventHandler(this.Button27_Click); // // Button26 // @@ -173,6 +174,7 @@ this.Button26.TabIndex = 83; this.Button26.Text = "C"; this.Button26.UseVisualStyleBackColor = true; + this.Button26.Click += new System.EventHandler(this.Button26_Click); // // Button1 // @@ -197,6 +199,7 @@ this.Button25.TabIndex = 82; this.Button25.Text = "Back"; this.Button25.UseVisualStyleBackColor = true; + this.Button25.Click += new System.EventHandler(this.Button25_Click); // // Button2 // @@ -246,6 +249,7 @@ this.Button22.TabIndex = 80; this.Button22.Text = "sqrt"; this.Button22.UseVisualStyleBackColor = true; + this.Button22.Click += new System.EventHandler(this.Button22_Click); // // Button4 // @@ -270,6 +274,7 @@ this.Button23.TabIndex = 79; this.Button23.Text = "1/x"; this.Button23.UseVisualStyleBackColor = true; + this.Button23.Click += new System.EventHandler(this.Button23_Click); // // Button11 // @@ -282,6 +287,7 @@ this.Button11.TabIndex = 70; this.Button11.Text = "9"; this.Button11.UseVisualStyleBackColor = true; + this.Button11.Click += new System.EventHandler(this.Button11_Click); // // Button7 // @@ -294,6 +300,7 @@ this.Button7.TabIndex = 62; this.Button7.Text = "4"; this.Button7.UseVisualStyleBackColor = true; + this.Button7.Click += new System.EventHandler(this.Button7_Click); // // Button16 // @@ -306,6 +313,7 @@ this.Button16.TabIndex = 71; this.Button16.Text = "0"; this.Button16.UseVisualStyleBackColor = true; + this.Button16.Click += new System.EventHandler(this.Button16_Click); // // Button24 // @@ -318,6 +326,7 @@ this.Button24.TabIndex = 78; this.Button24.Text = "%"; this.Button24.UseVisualStyleBackColor = true; + this.Button24.Click += new System.EventHandler(this.Button24_Click); // // Button12 // @@ -330,6 +339,7 @@ this.Button12.TabIndex = 69; this.Button12.Text = "3"; this.Button12.UseVisualStyleBackColor = true; + this.Button12.Click += new System.EventHandler(this.Button12_Click); // // Button6 // @@ -342,6 +352,7 @@ this.Button6.TabIndex = 63; this.Button6.Text = "1"; this.Button6.UseVisualStyleBackColor = true; + this.Button6.Click += new System.EventHandler(this.Button6_Click); // // Button15 // @@ -354,6 +365,7 @@ this.Button15.TabIndex = 72; this.Button15.Text = "+/-"; this.Button15.UseVisualStyleBackColor = true; + this.Button15.Click += new System.EventHandler(this.Button15_Click); // // Button17 // @@ -366,6 +378,7 @@ this.Button17.TabIndex = 77; this.Button17.Text = "+"; this.Button17.UseVisualStyleBackColor = true; + this.Button17.Click += new System.EventHandler(this.Button17_Click); // // Button13 // @@ -378,6 +391,7 @@ this.Button13.TabIndex = 68; this.Button13.Text = "6"; this.Button13.UseVisualStyleBackColor = true; + this.Button13.Click += new System.EventHandler(this.Button13_Click); // // Button5 // @@ -390,6 +404,7 @@ this.Button5.TabIndex = 64; this.Button5.Text = "7"; this.Button5.UseVisualStyleBackColor = true; + this.Button5.Click += new System.EventHandler(this.Button5_Click); // // Button14 // @@ -402,6 +417,7 @@ this.Button14.TabIndex = 73; this.Button14.Text = "."; this.Button14.UseVisualStyleBackColor = true; + this.Button14.Click += new System.EventHandler(this.Button14_Click); // // Button18 // @@ -414,6 +430,7 @@ this.Button18.TabIndex = 76; this.Button18.Text = "/"; this.Button18.UseVisualStyleBackColor = true; + this.Button18.Click += new System.EventHandler(this.Button18_Click); // // Button8 // @@ -426,6 +443,7 @@ this.Button8.TabIndex = 67; this.Button8.Text = "8"; this.Button8.UseVisualStyleBackColor = true; + this.Button8.Click += new System.EventHandler(this.Button8_Click); // // Button10 // @@ -438,6 +456,7 @@ this.Button10.TabIndex = 65; this.Button10.Text = "5"; this.Button10.UseVisualStyleBackColor = true; + this.Button10.Click += new System.EventHandler(this.Button10_Click); // // Button20 // @@ -450,6 +469,7 @@ this.Button20.TabIndex = 74; this.Button20.Text = "*"; this.Button20.UseVisualStyleBackColor = true; + this.Button20.Click += new System.EventHandler(this.Button20_Click); // // Button19 // @@ -462,6 +482,7 @@ this.Button19.TabIndex = 75; this.Button19.Text = "-"; this.Button19.UseVisualStyleBackColor = true; + this.Button19.Click += new System.EventHandler(this.Button19_Click); // // Button9 // @@ -474,6 +495,7 @@ this.Button9.TabIndex = 66; this.Button9.Text = "2"; this.Button9.UseVisualStyleBackColor = true; + this.Button9.Click += new System.EventHandler(this.Button9_Click); // // MenuStrip2 // @@ -523,6 +545,7 @@ this.Controls.Add(this.MenuStrip2); this.Name = "WinClassicCalculator"; this.Size = new System.Drawing.Size(308, 276); + this.Load += new System.EventHandler(this.WinClassicCalculator_Load); this.MenuStrip2.ResumeLayout(false); this.MenuStrip2.PerformLayout(); this.ResumeLayout(false); diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicCalculator.cs b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicCalculator.cs index f4105c0..14111c1 100644 --- a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicCalculator.cs +++ b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicCalculator.cs @@ -261,5 +261,10 @@ namespace TimeHACK.OS.Win95.Win95Apps a = Convert.ToDouble(txtNumbers.Text) / Convert.ToDouble(100); txtNumbers.Text = Convert.ToString(a); } + + private void Button12_Click_1(object sender, EventArgs e) + { + + } } } -- cgit v1.2.3