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 --- .../Win95Apps/WinClassicCalculator.Designer.cs | 574 +++++++++++++++++++++ 1 file changed, 574 insertions(+) create mode 100644 TimeHACK.Main/OS/Win95/Win95Apps/WinClassicCalculator.Designer.cs (limited to 'TimeHACK.Main/OS/Win95/Win95Apps/WinClassicCalculator.Designer.cs') 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; + } +} -- 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/OS/Win95/Win95Apps/WinClassicCalculator.Designer.cs') 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 From 7c02e210108003913dfc77a001f546bb0617dba8 Mon Sep 17 00:00:00 2001 From: lempamo Date: Thu, 13 Jul 2017 19:13:35 -0500 Subject: pixel perfected:tm: calculator --- TimeHACK.Engine/Paintbrush.cs | 9 + .../Win95Apps/WinClassicCalculator.Designer.cs | 183 +++++++++++++-------- .../OS/Win95/Win95Apps/WinClassicCalculator.cs | 19 ++- .../OS/Win95/Win95Apps/WinClassicTimeDistorter.cs | 1 + TimeHACK.Main/Properties/Resources.Designer.cs | 10 ++ TimeHACK.Main/Properties/Resources.resx | 5 +- TimeHACK.Main/Resources/IE4/ie4about.png | Bin 0 -> 11773 bytes TimeHACK.Main/TimeHACK.Main.csproj | 1 + 8 files changed, 158 insertions(+), 70 deletions(-) create mode 100644 TimeHACK.Main/Resources/IE4/ie4about.png (limited to 'TimeHACK.Main/OS/Win95/Win95Apps/WinClassicCalculator.Designer.cs') diff --git a/TimeHACK.Engine/Paintbrush.cs b/TimeHACK.Engine/Paintbrush.cs index 1b442bc..96d324d 100644 --- a/TimeHACK.Engine/Paintbrush.cs +++ b/TimeHACK.Engine/Paintbrush.cs @@ -19,5 +19,14 @@ namespace TimeHACK.Engine SystemColors.ControlLightLight, borderwidth, ButtonBorderStyle.Outset, SystemColors.ControlLightLight, borderwidth, ButtonBorderStyle.Outset); } + + public static void PaintClassicBordersIndented(object sender, PaintEventArgs e, int borderwidth) + { + ControlPaint.DrawBorder(e.Graphics, ((Control)sender).ClientRectangle, + SystemColors.ControlLightLight, borderwidth, ButtonBorderStyle.Inset, + SystemColors.ControlLightLight, borderwidth, ButtonBorderStyle.Inset, + SystemColors.ControlLightLight, borderwidth, ButtonBorderStyle.Inset, + SystemColors.ControlLightLight, borderwidth, ButtonBorderStyle.Inset); + } } } diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicCalculator.Designer.cs b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicCalculator.Designer.cs index f71c5e3..49a47d0 100644 --- a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicCalculator.Designer.cs +++ b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicCalculator.Designer.cs @@ -67,7 +67,9 @@ this.Button19 = new System.Windows.Forms.Button(); this.Button9 = new System.Windows.Forms.Button(); this.MenuStrip2 = new System.Windows.Forms.MenuStrip(); + this.pictureBox1 = new System.Windows.Forms.PictureBox(); this.MenuStrip2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); this.SuspendLayout(); // // timer1 @@ -79,28 +81,28 @@ 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.Size = new System.Drawing.Size(41, 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.Size = new System.Drawing.Size(152, 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.Size = new System.Drawing.Size(117, 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.Size = new System.Drawing.Size(117, 22); this.ScientificToolStripMenuItem.Text = "Scientific"; // // HelpToolStripMenuItem2 @@ -109,21 +111,21 @@ this.ScientificToolStripMenuItem, this.StandardToolStripMenuItem}); this.HelpToolStripMenuItem2.Name = "HelpToolStripMenuItem2"; - this.HelpToolStripMenuItem2.Size = new System.Drawing.Size(44, 20); + this.HelpToolStripMenuItem2.Size = new System.Drawing.Size(42, 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.Size = new System.Drawing.Size(150, 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.Size = new System.Drawing.Size(150, 22); this.CopyCtrlCToolStripMenuItem1.Text = "Copy Ctrl+C"; // // EditToolStripMenuItem1 @@ -133,19 +135,21 @@ this.CopyCtrlCToolStripMenuItem1, this.PasteCtrlVToolStripMenuItem1}); this.EditToolStripMenuItem1.Name = "EditToolStripMenuItem1"; - this.EditToolStripMenuItem1.Size = new System.Drawing.Size(39, 20); + this.EditToolStripMenuItem1.Size = new System.Drawing.Size(37, 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.BackColor = System.Drawing.Color.White; + this.txtNumbers.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); + this.txtNumbers.Location = new System.Drawing.Point(11, 39); + this.txtNumbers.Margin = new System.Windows.Forms.Padding(4); this.txtNumbers.Multiline = true; this.txtNumbers.Name = "txtNumbers"; this.txtNumbers.ReadOnly = true; - this.txtNumbers.Size = new System.Drawing.Size(272, 28); + this.txtNumbers.Size = new System.Drawing.Size(249, 26); this.txtNumbers.TabIndex = 85; this.txtNumbers.Text = "0"; this.txtNumbers.TextAlign = System.Windows.Forms.HorizontalAlignment.Right; @@ -153,11 +157,12 @@ // Button27 // 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(179, 96); + this.Button27.Location = new System.Drawing.Point(157, 71); this.Button27.Name = "Button27"; - this.Button27.Size = new System.Drawing.Size(53, 30); + this.Button27.Size = new System.Drawing.Size(49, 28); this.Button27.TabIndex = 84; this.Button27.Text = "CE"; this.Button27.UseVisualStyleBackColor = true; @@ -166,11 +171,12 @@ // Button26 // 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(237, 96); + this.Button26.Location = new System.Drawing.Point(210, 71); this.Button26.Name = "Button26"; - this.Button26.Size = new System.Drawing.Size(53, 30); + this.Button26.Size = new System.Drawing.Size(49, 28); this.Button26.TabIndex = 83; this.Button26.Text = "C"; this.Button26.UseVisualStyleBackColor = true; @@ -179,11 +185,12 @@ // Button1 // 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(18, 172); + this.Button1.Location = new System.Drawing.Point(11, 139); this.Button1.Name = "Button1"; - this.Button1.Size = new System.Drawing.Size(38, 30); + this.Button1.Size = new System.Drawing.Size(36, 28); this.Button1.TabIndex = 58; this.Button1.Text = "MR"; this.Button1.UseVisualStyleBackColor = true; @@ -191,11 +198,12 @@ // Button25 // 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(120, 96); + this.Button25.Location = new System.Drawing.Point(104, 71); this.Button25.Name = "Button25"; - this.Button25.Size = new System.Drawing.Size(53, 30); + this.Button25.Size = new System.Drawing.Size(49, 28); this.Button25.TabIndex = 82; this.Button25.Text = "Back"; this.Button25.UseVisualStyleBackColor = true; @@ -204,11 +212,12 @@ // Button2 // 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(18, 243); + this.Button2.Location = new System.Drawing.Point(11, 207); this.Button2.Name = "Button2"; - this.Button2.Size = new System.Drawing.Size(38, 30); + this.Button2.Size = new System.Drawing.Size(36, 28); this.Button2.TabIndex = 59; this.Button2.Text = "M+"; this.Button2.UseVisualStyleBackColor = true; @@ -216,11 +225,12 @@ // Button21 // 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.MidnightBlue; - this.Button21.Location = new System.Drawing.Point(252, 243); + this.Button21.ForeColor = System.Drawing.Color.Red; + this.Button21.Location = new System.Drawing.Point(223, 207); this.Button21.Name = "Button21"; - this.Button21.Size = new System.Drawing.Size(38, 30); + this.Button21.Size = new System.Drawing.Size(36, 28); this.Button21.TabIndex = 81; this.Button21.Text = "="; this.Button21.UseVisualStyleBackColor = true; @@ -229,11 +239,12 @@ // Button3 // 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(18, 208); + this.Button3.Location = new System.Drawing.Point(11, 173); this.Button3.Name = "Button3"; - this.Button3.Size = new System.Drawing.Size(38, 30); + this.Button3.Size = new System.Drawing.Size(36, 28); this.Button3.TabIndex = 60; this.Button3.Text = "MS"; this.Button3.UseVisualStyleBackColor = true; @@ -241,24 +252,27 @@ // Button22 // 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(252, 136); + this.Button22.Location = new System.Drawing.Point(223, 105); this.Button22.Name = "Button22"; - this.Button22.Size = new System.Drawing.Size(38, 30); + 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.Button22_Click); // // Button4 // 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(18, 136); + this.Button4.Location = new System.Drawing.Point(11, 105); this.Button4.Name = "Button4"; - this.Button4.Size = new System.Drawing.Size(38, 30); + this.Button4.Size = new System.Drawing.Size(36, 28); this.Button4.TabIndex = 61; this.Button4.Text = "MC"; this.Button4.UseVisualStyleBackColor = true; @@ -266,11 +280,12 @@ // Button23 // 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(252, 208); + this.Button23.Location = new System.Drawing.Point(223, 173); this.Button23.Name = "Button23"; - this.Button23.Size = new System.Drawing.Size(38, 30); + this.Button23.Size = new System.Drawing.Size(36, 28); this.Button23.TabIndex = 79; this.Button23.Text = "1/x"; this.Button23.UseVisualStyleBackColor = true; @@ -279,11 +294,12 @@ // Button11 // 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(162, 136); + this.Button11.Location = new System.Drawing.Point(143, 105); this.Button11.Name = "Button11"; - this.Button11.Size = new System.Drawing.Size(38, 30); + this.Button11.Size = new System.Drawing.Size(36, 28); this.Button11.TabIndex = 70; this.Button11.Text = "9"; this.Button11.UseVisualStyleBackColor = true; @@ -292,11 +308,12 @@ // Button7 // 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(74, 172); + this.Button7.Location = new System.Drawing.Point(63, 139); this.Button7.Name = "Button7"; - this.Button7.Size = new System.Drawing.Size(38, 30); + this.Button7.Size = new System.Drawing.Size(36, 28); this.Button7.TabIndex = 62; this.Button7.Text = "4"; this.Button7.UseVisualStyleBackColor = true; @@ -305,11 +322,12 @@ // Button16 // 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(74, 243); + this.Button16.Location = new System.Drawing.Point(63, 207); this.Button16.Name = "Button16"; - this.Button16.Size = new System.Drawing.Size(38, 30); + this.Button16.Size = new System.Drawing.Size(36, 28); this.Button16.TabIndex = 71; this.Button16.Text = "0"; this.Button16.UseVisualStyleBackColor = true; @@ -318,11 +336,12 @@ // Button24 // 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(252, 172); + this.Button24.Location = new System.Drawing.Point(223, 139); this.Button24.Name = "Button24"; - this.Button24.Size = new System.Drawing.Size(38, 30); + this.Button24.Size = new System.Drawing.Size(36, 28); this.Button24.TabIndex = 78; this.Button24.Text = "%"; this.Button24.UseVisualStyleBackColor = true; @@ -331,11 +350,12 @@ // Button12 // 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(162, 208); + this.Button12.Location = new System.Drawing.Point(143, 173); this.Button12.Name = "Button12"; - this.Button12.Size = new System.Drawing.Size(38, 30); + this.Button12.Size = new System.Drawing.Size(36, 28); this.Button12.TabIndex = 69; this.Button12.Text = "3"; this.Button12.UseVisualStyleBackColor = true; @@ -344,11 +364,12 @@ // Button6 // this.Button6.Anchor = System.Windows.Forms.AnchorStyles.Bottom; + this.Button6.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 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.Location = new System.Drawing.Point(63, 173); this.Button6.Name = "Button6"; - this.Button6.Size = new System.Drawing.Size(38, 30); + this.Button6.Size = new System.Drawing.Size(36, 28); this.Button6.TabIndex = 63; this.Button6.Text = "1"; this.Button6.UseVisualStyleBackColor = true; @@ -357,11 +378,12 @@ // Button15 // 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(118, 243); + this.Button15.Location = new System.Drawing.Point(103, 207); this.Button15.Name = "Button15"; - this.Button15.Size = new System.Drawing.Size(38, 30); + this.Button15.Size = new System.Drawing.Size(36, 28); this.Button15.TabIndex = 72; this.Button15.Text = "+/-"; this.Button15.UseVisualStyleBackColor = true; @@ -370,11 +392,12 @@ // Button17 // 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(208, 243); + this.Button17.Location = new System.Drawing.Point(183, 207); this.Button17.Name = "Button17"; - this.Button17.Size = new System.Drawing.Size(38, 30); + this.Button17.Size = new System.Drawing.Size(36, 28); this.Button17.TabIndex = 77; this.Button17.Text = "+"; this.Button17.UseVisualStyleBackColor = true; @@ -383,11 +406,12 @@ // Button13 // 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(162, 172); + this.Button13.Location = new System.Drawing.Point(143, 139); this.Button13.Name = "Button13"; - this.Button13.Size = new System.Drawing.Size(38, 30); + this.Button13.Size = new System.Drawing.Size(36, 28); this.Button13.TabIndex = 68; this.Button13.Text = "6"; this.Button13.UseVisualStyleBackColor = true; @@ -396,11 +420,12 @@ // Button5 // 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(74, 136); + this.Button5.Location = new System.Drawing.Point(63, 105); this.Button5.Name = "Button5"; - this.Button5.Size = new System.Drawing.Size(38, 30); + this.Button5.Size = new System.Drawing.Size(36, 28); this.Button5.TabIndex = 64; this.Button5.Text = "7"; this.Button5.UseVisualStyleBackColor = true; @@ -409,11 +434,12 @@ // Button14 // 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(162, 243); + this.Button14.Location = new System.Drawing.Point(143, 207); this.Button14.Name = "Button14"; - this.Button14.Size = new System.Drawing.Size(38, 30); + this.Button14.Size = new System.Drawing.Size(36, 28); this.Button14.TabIndex = 73; this.Button14.Text = "."; this.Button14.UseVisualStyleBackColor = true; @@ -422,11 +448,12 @@ // Button18 // 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(208, 136); + this.Button18.Location = new System.Drawing.Point(183, 105); this.Button18.Name = "Button18"; - this.Button18.Size = new System.Drawing.Size(38, 30); + this.Button18.Size = new System.Drawing.Size(36, 28); this.Button18.TabIndex = 76; this.Button18.Text = "/"; this.Button18.UseVisualStyleBackColor = true; @@ -435,11 +462,12 @@ // Button8 // 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(118, 136); + this.Button8.Location = new System.Drawing.Point(103, 105); this.Button8.Name = "Button8"; - this.Button8.Size = new System.Drawing.Size(38, 30); + this.Button8.Size = new System.Drawing.Size(36, 28); this.Button8.TabIndex = 67; this.Button8.Text = "8"; this.Button8.UseVisualStyleBackColor = true; @@ -448,11 +476,12 @@ // Button10 // 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(118, 172); + this.Button10.Location = new System.Drawing.Point(103, 139); this.Button10.Name = "Button10"; - this.Button10.Size = new System.Drawing.Size(38, 30); + this.Button10.Size = new System.Drawing.Size(36, 28); this.Button10.TabIndex = 65; this.Button10.Text = "5"; this.Button10.UseVisualStyleBackColor = true; @@ -461,11 +490,12 @@ // Button20 // 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(208, 172); + this.Button20.Location = new System.Drawing.Point(183, 139); this.Button20.Name = "Button20"; - this.Button20.Size = new System.Drawing.Size(38, 30); + this.Button20.Size = new System.Drawing.Size(36, 28); this.Button20.TabIndex = 74; this.Button20.Text = "*"; this.Button20.UseVisualStyleBackColor = true; @@ -474,11 +504,12 @@ // Button19 // 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(208, 208); + this.Button19.Location = new System.Drawing.Point(183, 173); this.Button19.Name = "Button19"; - this.Button19.Size = new System.Drawing.Size(38, 30); + this.Button19.Size = new System.Drawing.Size(36, 28); this.Button19.TabIndex = 75; this.Button19.Text = "-"; this.Button19.UseVisualStyleBackColor = true; @@ -487,11 +518,12 @@ // Button9 // 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(118, 208); + this.Button9.Location = new System.Drawing.Point(103, 173); this.Button9.Name = "Button9"; - this.Button9.Size = new System.Drawing.Size(38, 30); + this.Button9.Size = new System.Drawing.Size(36, 28); this.Button9.TabIndex = 66; this.Button9.Text = "2"; this.Button9.UseVisualStyleBackColor = true; @@ -500,20 +532,33 @@ // MenuStrip2 // this.MenuStrip2.BackColor = System.Drawing.Color.Silver; + this.MenuStrip2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 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.Size = new System.Drawing.Size(270, 24); this.MenuStrip2.TabIndex = 86; this.MenuStrip2.Text = "MenuStrip2"; // + // pictureBox1 + // + this.pictureBox1.BackgroundImage = global::TimeHACK.Properties.Resources.ie4_hsplitter; + this.pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.pictureBox1.Location = new System.Drawing.Point(1, 24); + this.pictureBox1.Name = "pictureBox1"; + this.pictureBox1.Size = new System.Drawing.Size(268, 2); + this.pictureBox1.TabIndex = 87; + this.pictureBox1.TabStop = false; + // // WinClassicCalculator // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.Silver; + this.Controls.Add(this.pictureBox1); this.Controls.Add(this.txtNumbers); this.Controls.Add(this.Button27); this.Controls.Add(this.Button26); @@ -544,10 +589,11 @@ this.Controls.Add(this.Button9); this.Controls.Add(this.MenuStrip2); this.Name = "WinClassicCalculator"; - this.Size = new System.Drawing.Size(308, 276); + this.Size = new System.Drawing.Size(270, 247); this.Load += new System.EventHandler(this.WinClassicCalculator_Load); this.MenuStrip2.ResumeLayout(false); this.MenuStrip2.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -593,5 +639,6 @@ internal System.Windows.Forms.Button Button19; internal System.Windows.Forms.Button Button9; internal System.Windows.Forms.MenuStrip MenuStrip2; + private System.Windows.Forms.PictureBox pictureBox1; } } diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicCalculator.cs b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicCalculator.cs index 14111c1..9e923bb 100644 --- a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicCalculator.cs +++ b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicCalculator.cs @@ -16,6 +16,19 @@ namespace TimeHACK.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); } public double prevnum = 0; public bool iszero = true; @@ -180,6 +193,10 @@ namespace TimeHACK.OS.Win95.Win95Apps switch (coperator) { case "+": + if (prevnum == 0) + { + break; + } txtNumbers.Text = (prevnum + double.Parse(txtNumbers.Text)).ToString(); prevnum = double.Parse(txtNumbers.Text); break; @@ -221,7 +238,7 @@ namespace TimeHACK.OS.Win95.Win95Apps coperator = "+"; Calculate(); prevnum = double.Parse(txtNumbers.Text); - txtNumbers.Text = "0"; + iszero = true; } private void Button19_Click(object sender, EventArgs e) diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicTimeDistorter.cs b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicTimeDistorter.cs index 57fa683..e2c8d64 100644 --- a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicTimeDistorter.cs +++ b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicTimeDistorter.cs @@ -26,6 +26,7 @@ namespace TimeHACK.OS.Win95 { lblCountDown.Visible = true; btnGo.Enabled = false; + ((WinClassic)ParentForm).closeDisabled = true; _action?.Invoke(); countDownTimer.Start(); diff --git a/TimeHACK.Main/Properties/Resources.Designer.cs b/TimeHACK.Main/Properties/Resources.Designer.cs index 65971a2..ee5c4c5 100644 --- a/TimeHACK.Main/Properties/Resources.Designer.cs +++ b/TimeHACK.Main/Properties/Resources.Designer.cs @@ -325,6 +325,16 @@ namespace TimeHACK.Properties { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap ie4about { + get { + object obj = ResourceManager.GetObject("ie4about", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// diff --git a/TimeHACK.Main/Properties/Resources.resx b/TimeHACK.Main/Properties/Resources.resx index 7fd3bd8..cf2df35 100644 --- a/TimeHACK.Main/Properties/Resources.resx +++ b/TimeHACK.Main/Properties/Resources.resx @@ -522,7 +522,7 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - vwAADr8BOAVTJAAAAJVJREFUOE+VkQsSxCAMQj16bu4GFU3YdO2+Gaqi0F/7j96zfqKHqYiuByYBFfYJ + vgAADr4B6kKxwAAAAJVJREFUOE+VkQsSxCAMQj16bu4GFU3YdO2+Gaqi0F/7j96zfqKHqYiuByYBFfYJ 1okT9uuef4slmG9gWjdzN4Wnf9bRT1RhaCN+KriGieyvkjr8Rl7AMMbywE0zCBiIBS9Awbn7tUD29xME Q0rM8IHhPbziKRhMU0pqjVIfcgHAfB2oiugnuEnG/EkZ/4fLZEksutHaB6sGQO/gf7MbAAAAAElFTkSu QmCC @@ -651,4 +651,7 @@ ..\Resources\ie4_hsplitter2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\IE4\ie4about.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/TimeHACK.Main/Resources/IE4/ie4about.png b/TimeHACK.Main/Resources/IE4/ie4about.png new file mode 100644 index 0000000..c76c16c Binary files /dev/null and b/TimeHACK.Main/Resources/IE4/ie4about.png differ diff --git a/TimeHACK.Main/TimeHACK.Main.csproj b/TimeHACK.Main/TimeHACK.Main.csproj index ce7407e..b0ac5d0 100644 --- a/TimeHACK.Main/TimeHACK.Main.csproj +++ b/TimeHACK.Main/TimeHACK.Main.csproj @@ -471,6 +471,7 @@ + -- cgit v1.2.3 From 606a3275a174ea4f31e4b027d614dac1d32a9525 Mon Sep 17 00:00:00 2001 From: jtsshieh Date: Fri, 14 Jul 2017 17:59:22 -0400 Subject: Nice almost working Calculator A calculator that has been totally recoded! Things to do -Make decimal work -Figure out why infinity sign is breaking everything -Get negative working --- .../Win95Apps/WinClassicCalculator.Designer.cs | 73 +++--- .../OS/Win95/Win95Apps/WinClassicCalculator.cs | 263 +++++---------------- 2 files changed, 98 insertions(+), 238 deletions(-) (limited to 'TimeHACK.Main/OS/Win95/Win95Apps/WinClassicCalculator.Designer.cs') diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicCalculator.Designer.cs b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicCalculator.Designer.cs index 49a47d0..92190a3 100644 --- a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicCalculator.Designer.cs +++ b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicCalculator.Designer.cs @@ -54,7 +54,7 @@ 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.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(); @@ -90,6 +90,7 @@ this.AboutCalculatorToolStripMenuItem.Name = "AboutCalculatorToolStripMenuItem"; this.AboutCalculatorToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.AboutCalculatorToolStripMenuItem.Text = "About Calculator"; + this.AboutCalculatorToolStripMenuItem.Click += new System.EventHandler(this.AboutCalculatorToolStripMenuItem_Click); // // StandardToolStripMenuItem // @@ -160,7 +161,7 @@ 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(157, 71); + this.Button27.Location = new System.Drawing.Point(159, 71); this.Button27.Name = "Button27"; this.Button27.Size = new System.Drawing.Size(49, 28); this.Button27.TabIndex = 84; @@ -262,7 +263,7 @@ this.Button22.Text = "sqrt"; this.Button22.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.Button22.UseVisualStyleBackColor = true; - this.Button22.Click += new System.EventHandler(this.Button22_Click); + this.Button22.Click += new System.EventHandler(this.arithmitic_click); // // Button4 // @@ -289,7 +290,7 @@ this.Button23.TabIndex = 79; this.Button23.Text = "1/x"; this.Button23.UseVisualStyleBackColor = true; - this.Button23.Click += new System.EventHandler(this.Button23_Click); + this.Button23.Click += new System.EventHandler(this.arithmitic_click); // // Button11 // @@ -303,7 +304,7 @@ this.Button11.TabIndex = 70; this.Button11.Text = "9"; this.Button11.UseVisualStyleBackColor = true; - this.Button11.Click += new System.EventHandler(this.Button11_Click); + this.Button11.Click += new System.EventHandler(this.number_click); // // Button7 // @@ -317,7 +318,7 @@ this.Button7.TabIndex = 62; this.Button7.Text = "4"; this.Button7.UseVisualStyleBackColor = true; - this.Button7.Click += new System.EventHandler(this.Button7_Click); + this.Button7.Click += new System.EventHandler(this.number_click); // // Button16 // @@ -331,7 +332,7 @@ this.Button16.TabIndex = 71; this.Button16.Text = "0"; this.Button16.UseVisualStyleBackColor = true; - this.Button16.Click += new System.EventHandler(this.Button16_Click); + this.Button16.Click += new System.EventHandler(this.number_click); // // Button24 // @@ -345,7 +346,7 @@ this.Button24.TabIndex = 78; this.Button24.Text = "%"; this.Button24.UseVisualStyleBackColor = true; - this.Button24.Click += new System.EventHandler(this.Button24_Click); + this.Button24.Click += new System.EventHandler(this.arithmitic_click); // // Button12 // @@ -359,21 +360,21 @@ this.Button12.TabIndex = 69; this.Button12.Text = "3"; this.Button12.UseVisualStyleBackColor = true; - this.Button12.Click += new System.EventHandler(this.Button12_Click); - // - // Button6 - // - this.Button6.Anchor = System.Windows.Forms.AnchorStyles.Bottom; - this.Button6.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - 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(63, 173); - this.Button6.Name = "Button6"; - this.Button6.Size = new System.Drawing.Size(36, 28); - this.Button6.TabIndex = 63; - this.Button6.Text = "1"; - this.Button6.UseVisualStyleBackColor = true; - this.Button6.Click += new System.EventHandler(this.Button6_Click); + this.Button12.Click += new System.EventHandler(this.number_click); + // + // one + // + 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); + this.one.Name = "one"; + 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 // @@ -387,7 +388,6 @@ this.Button15.TabIndex = 72; this.Button15.Text = "+/-"; this.Button15.UseVisualStyleBackColor = true; - this.Button15.Click += new System.EventHandler(this.Button15_Click); // // Button17 // @@ -401,7 +401,7 @@ this.Button17.TabIndex = 77; this.Button17.Text = "+"; this.Button17.UseVisualStyleBackColor = true; - this.Button17.Click += new System.EventHandler(this.Button17_Click); + this.Button17.Click += new System.EventHandler(this.arithmitic_click); // // Button13 // @@ -415,7 +415,7 @@ this.Button13.TabIndex = 68; this.Button13.Text = "6"; this.Button13.UseVisualStyleBackColor = true; - this.Button13.Click += new System.EventHandler(this.Button13_Click); + this.Button13.Click += new System.EventHandler(this.number_click); // // Button5 // @@ -429,7 +429,7 @@ this.Button5.TabIndex = 64; this.Button5.Text = "7"; this.Button5.UseVisualStyleBackColor = true; - this.Button5.Click += new System.EventHandler(this.Button5_Click); + this.Button5.Click += new System.EventHandler(this.number_click); // // Button14 // @@ -443,7 +443,7 @@ this.Button14.TabIndex = 73; this.Button14.Text = "."; this.Button14.UseVisualStyleBackColor = true; - this.Button14.Click += new System.EventHandler(this.Button14_Click); + this.Button14.Click += new System.EventHandler(this.number_click); // // Button18 // @@ -457,7 +457,7 @@ this.Button18.TabIndex = 76; this.Button18.Text = "/"; this.Button18.UseVisualStyleBackColor = true; - this.Button18.Click += new System.EventHandler(this.Button18_Click); + this.Button18.Click += new System.EventHandler(this.arithmitic_click); // // Button8 // @@ -471,7 +471,7 @@ this.Button8.TabIndex = 67; this.Button8.Text = "8"; this.Button8.UseVisualStyleBackColor = true; - this.Button8.Click += new System.EventHandler(this.Button8_Click); + this.Button8.Click += new System.EventHandler(this.number_click); // // Button10 // @@ -485,7 +485,7 @@ this.Button10.TabIndex = 65; this.Button10.Text = "5"; this.Button10.UseVisualStyleBackColor = true; - this.Button10.Click += new System.EventHandler(this.Button10_Click); + this.Button10.Click += new System.EventHandler(this.number_click); // // Button20 // @@ -499,7 +499,7 @@ this.Button20.TabIndex = 74; this.Button20.Text = "*"; this.Button20.UseVisualStyleBackColor = true; - this.Button20.Click += new System.EventHandler(this.Button20_Click); + this.Button20.Click += new System.EventHandler(this.arithmitic_click); // // Button19 // @@ -513,7 +513,7 @@ this.Button19.TabIndex = 75; this.Button19.Text = "-"; this.Button19.UseVisualStyleBackColor = true; - this.Button19.Click += new System.EventHandler(this.Button19_Click); + this.Button19.Click += new System.EventHandler(this.arithmitic_click); // // Button9 // @@ -527,7 +527,7 @@ this.Button9.TabIndex = 66; this.Button9.Text = "2"; this.Button9.UseVisualStyleBackColor = true; - this.Button9.Click += new System.EventHandler(this.Button9_Click); + this.Button9.Click += new System.EventHandler(this.number_click); // // MenuStrip2 // @@ -575,7 +575,7 @@ this.Controls.Add(this.Button16); this.Controls.Add(this.Button24); this.Controls.Add(this.Button12); - this.Controls.Add(this.Button6); + this.Controls.Add(this.one); this.Controls.Add(this.Button15); this.Controls.Add(this.Button17); this.Controls.Add(this.Button13); @@ -590,7 +590,6 @@ this.Controls.Add(this.MenuStrip2); this.Name = "WinClassicCalculator"; this.Size = new System.Drawing.Size(270, 247); - this.Load += new System.EventHandler(this.WinClassicCalculator_Load); this.MenuStrip2.ResumeLayout(false); this.MenuStrip2.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); @@ -626,7 +625,7 @@ 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 one; internal System.Windows.Forms.Button Button15; internal System.Windows.Forms.Button Button17; internal System.Windows.Forms.Button Button13; diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicCalculator.cs b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicCalculator.cs index 9e923bb..1a1c905 100644 --- a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicCalculator.cs +++ b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicCalculator.cs @@ -13,6 +13,9 @@ namespace TimeHACK.OS.Win95.Win95Apps { public partial class WinClassicCalculator : UserControl { + double prevnum = 0; + string operation = ""; + bool operation_pressed = false; public WinClassicCalculator() { InitializeComponent(); @@ -30,258 +33,116 @@ namespace TimeHACK.OS.Win95.Win95Apps } txtNumbers.Paint += (sender, args) => Paintbrush.PaintClassicBordersIndented(sender, args, 2); } - public double prevnum = 0; - public bool iszero = true; - public bool neg = false; - public bool isdecimal = false; - public string coperator; - public void appendnum(string num) + private void number_click(object sender, EventArgs e) { - if (iszero == true) - { + if (txtNumbers.Text.Contains("∞")) txtNumbers.Clear(); - txtNumbers.Text += (num); - iszero = false; - } - else + if ((txtNumbers.Text == "0") || (operation_pressed)) + txtNumbers.Text = ""; + operation_pressed = false; + Button num = (Button)sender; + if (num.Text == ".") { - if (iszero == false) - { - txtNumbers.Text += (num); - } + if (!txtNumbers.Text.Contains(".")) + txtNumbers.Text = txtNumbers.Text + num.Text; } - - } - 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"); + else + txtNumbers.Text = txtNumbers.Text + num.Text; } - private void Button11_Click(object sender, EventArgs e) + private void Button27_Click(object sender, EventArgs e) { - appendnum("9"); + txtNumbers.Text = "0"; } - private void Button16_Click(object sender, EventArgs e) + private void Button26_Click(object sender, EventArgs e) { - - if (iszero == false) - { - txtNumbers.Text += (0); - } + prevnum = 0; + operation = ""; + operation_pressed = false; + txtNumbers.Text = "0"; } private void Button25_Click(object sender, EventArgs e) { - if (txtNumbers.Text != "0") + if (txtNumbers.Text.Length>0) { - txtNumbers.Text = txtNumbers.Text.Remove(txtNumbers.Text.Length - 1); + txtNumbers.Text = txtNumbers.Text.Remove(txtNumbers.Text.Length - 1, 1); } - if (txtNumbers.TextLength < 1) + if (txtNumbers.Text =="") { txtNumbers.Text = "0"; } - } - private void Button15_Click(object sender, EventArgs e) + private void arithmitic_click(object sender, EventArgs e) { - if (neg == false) + Button num = (Button)sender; + if (txtNumbers.Text.Contains("∞")) + txtNumbers.Clear(); + if (prevnum != 0) { - txtNumbers.Text = "-" + txtNumbers.Text; - neg = true; + if (num.Text == "sqrt") + prevnum = Math.Sqrt(double.Parse(txtNumbers.Text)); + if (num.Text == "1/x") + prevnum = Convert.ToDouble(1.0 / Convert.ToDouble(txtNumbers.Text)); + if (num.Text == "%") + prevnum = Convert.ToDouble(txtNumbers.Text) / 100; + Button21.PerformClick(); + operation = num.Text; + operation_pressed = true; } - else + else if (num.Text == "sqrt") { - txtNumbers.Text = txtNumbers.Text.Replace("-", ""); - neg = false; + prevnum = Math.Sqrt(double.Parse(txtNumbers.Text)); + txtNumbers.Text = prevnum.ToString(); } - } - - private void Button14_Click(object sender, EventArgs e) - { - - if (isdecimal == false) + else if (num.Text == "1/x") { - appendnum("."); - isdecimal = true; + prevnum = Convert.ToDouble(1.0 / Convert.ToDouble(txtNumbers.Text)); + txtNumbers.Text = prevnum.ToString(); } - } - - private void timer1_Tick(object sender, EventArgs e) - { - if (txtNumbers.Text.Contains(".") == false) + else if (num.Text == "%") { - isdecimal = false; + prevnum = Convert.ToDouble(txtNumbers.Text) / 100; + txtNumbers.Text = prevnum.ToString(); } - if (txtNumbers.Text == "0") + else { - iszero = true; + operation = num.Text; + prevnum = double.Parse(txtNumbers.Text); + txtNumbers.Text = "0"; + operation_pressed = 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() + + private void Button21_Click(object sender, EventArgs e) { - switch (coperator) + if (txtNumbers.Text.Contains("∞")) + txtNumbers.Clear(); + switch (operation) { 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; case "/": - if (prevnum == 0) - { - break; - } txtNumbers.Text = (prevnum / double.Parse(txtNumbers.Text)).ToString(); - prevnum = double.Parse(txtNumbers.Text); break; } + prevnum = Int32.Parse(txtNumbers.Text); + operation = ""; } - 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); - iszero = true; - } - - 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); - } - - private void Button12_Click_1(object sender, EventArgs e) + private void AboutCalculatorToolStripMenuItem_Click(object sender, EventArgs e) { - + WindowManager wm = new WindowManager(); + wm.StartAboutBox95("Calculator", "Microsoft Calculator", Properties.Resources.WinClassicCalc); } } } -- cgit v1.2.3 From 14d1d663f5c6f5f98719223c41005e96a0ac6830 Mon Sep 17 00:00:00 2001 From: jtsshieh Date: Fri, 14 Jul 2017 18:20:57 -0400 Subject: Copy/Paste Did Copy/Paste for Calculator BUT paste is not doing too well at filtering out the letters. --- .../Win95Apps/WinClassicCalculator.Designer.cs | 7 ++++-- .../OS/Win95/Win95Apps/WinClassicCalculator.cs | 27 ++++++++++++++++++++++ 2 files changed, 32 insertions(+), 2 deletions(-) (limited to 'TimeHACK.Main/OS/Win95/Win95Apps/WinClassicCalculator.Designer.cs') diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicCalculator.Designer.cs b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicCalculator.Designer.cs index 92190a3..70ad0a2 100644 --- a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicCalculator.Designer.cs +++ b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicCalculator.Designer.cs @@ -119,15 +119,17 @@ // this.PasteCtrlVToolStripMenuItem1.BackColor = System.Drawing.Color.Silver; this.PasteCtrlVToolStripMenuItem1.Name = "PasteCtrlVToolStripMenuItem1"; - this.PasteCtrlVToolStripMenuItem1.Size = new System.Drawing.Size(150, 22); + this.PasteCtrlVToolStripMenuItem1.Size = new System.Drawing.Size(152, 22); this.PasteCtrlVToolStripMenuItem1.Text = "Paste Ctrl+V"; + this.PasteCtrlVToolStripMenuItem1.Click += new System.EventHandler(this.PasteCtrlVToolStripMenuItem1_Click); // // CopyCtrlCToolStripMenuItem1 // this.CopyCtrlCToolStripMenuItem1.BackColor = System.Drawing.Color.Silver; this.CopyCtrlCToolStripMenuItem1.Name = "CopyCtrlCToolStripMenuItem1"; - this.CopyCtrlCToolStripMenuItem1.Size = new System.Drawing.Size(150, 22); + this.CopyCtrlCToolStripMenuItem1.Size = new System.Drawing.Size(152, 22); this.CopyCtrlCToolStripMenuItem1.Text = "Copy Ctrl+C"; + this.CopyCtrlCToolStripMenuItem1.Click += new System.EventHandler(this.CopyCtrlCToolStripMenuItem1_Click); // // EditToolStripMenuItem1 // @@ -388,6 +390,7 @@ this.Button15.TabIndex = 72; this.Button15.Text = "+/-"; this.Button15.UseVisualStyleBackColor = true; + this.Button15.Click += new System.EventHandler(this.Button15_Click); // // Button17 // diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicCalculator.cs b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicCalculator.cs index 1a1c905..71ded89 100644 --- a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicCalculator.cs +++ b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicCalculator.cs @@ -144,5 +144,32 @@ namespace TimeHACK.OS.Win95.Win95Apps WindowManager wm = new WindowManager(); wm.StartAboutBox95("Calculator", "Microsoft Calculator", Properties.Resources.WinClassicCalc); } + + private void Button15_Click(object sender, EventArgs e) + { + + } + + private void CopyCtrlCToolStripMenuItem1_Click(object sender, EventArgs e) + { + txtNumbers.Copy(); + } + + private void PasteCtrlVToolStripMenuItem1_Click(object sender, EventArgs e) + { + string pasteText = Clipboard.GetText(); + string strippedText = ""; + for (int i = 0; i < pasteText.Length; i++) + { + if (char.IsDigit(pasteText[i])) + strippedText += pasteText[i].ToString(); + MessageBox.Show("Test"); + } + if (strippedText!=pasteText) + { + txtNumbers.Text = pasteText; + } + } + } } -- cgit v1.2.3