diff options
| author | jtsshieh <[email protected]> | 2017-07-14 18:20:57 -0400 |
|---|---|---|
| committer | jtsshieh <[email protected]> | 2017-07-14 18:20:57 -0400 |
| commit | 14d1d663f5c6f5f98719223c41005e96a0ac6830 (patch) | |
| tree | 104a8fcb86f89f1b43b7e3d930121bb34231208a | |
| parent | 606a3275a174ea4f31e4b027d614dac1d32a9525 (diff) | |
| download | histacom2-14d1d663f5c6f5f98719223c41005e96a0ac6830.tar.gz histacom2-14d1d663f5c6f5f98719223c41005e96a0ac6830.tar.bz2 histacom2-14d1d663f5c6f5f98719223c41005e96a0ac6830.zip | |
Copy/Paste
Did Copy/Paste for Calculator
BUT paste is not doing too well at filtering out the letters.
| -rw-r--r-- | TimeHACK.Main/OS/Win95/Win95Apps/WinClassicCalculator.Designer.cs | 7 | ||||
| -rw-r--r-- | TimeHACK.Main/OS/Win95/Win95Apps/WinClassicCalculator.cs | 27 |
2 files changed, 32 insertions, 2 deletions
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; + } + } + } } |
