Advertisement
ncosentino

Compilation fixes for Leroy's calculator

Aug 17th, 2013
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 13.68 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Text;
  7. using System.Windows.Forms;
  8. namespace ITCO221_L.Simpkins_Unit4
  9. {
  10.     public partial class frmCalculator : Form
  11.     {
  12.         //class level variables
  13.         double num1;
  14.         double num2;
  15.         double answer;
  16.         string mathOperator = "";
  17.  
  18.         public frmCalculator()
  19.         {
  20.             InitializeComponent();
  21.         }
  22.  
  23.         private void InitializeComponent()
  24.         {
  25.             #region "button code"
  26.             {
  27.                 this.textBox1 = new System.Windows.Forms.TextBox();
  28.                 this.button1 = new System.Windows.Forms.Button();
  29.                 this.button2 = new System.Windows.Forms.Button();
  30.                 this.button3 = new System.Windows.Forms.Button();
  31.                 this.button4 = new System.Windows.Forms.Button();
  32.                 this.button5 = new System.Windows.Forms.Button();
  33.                 this.button6 = new System.Windows.Forms.Button();
  34.                 this.button7 = new System.Windows.Forms.Button();
  35.                 this.button8 = new System.Windows.Forms.Button();
  36.                 this.button9 = new System.Windows.Forms.Button();
  37.                 this.button10 = new System.Windows.Forms.Button();
  38.                 this.button11 = new System.Windows.Forms.Button();
  39.                 this.button12 = new System.Windows.Forms.Button();
  40.                 this.button13 = new System.Windows.Forms.Button();
  41.                 this.button14 = new System.Windows.Forms.Button();
  42.                 this.button15 = new System.Windows.Forms.Button();
  43.                 this.button16 = new System.Windows.Forms.Button();
  44.                 this.button17 = new System.Windows.Forms.Button();
  45.                 this.button18 = new System.Windows.Forms.Button();
  46.                 this.button19 = new System.Windows.Forms.Button();
  47.                 this.button20 = new System.Windows.Forms.Button();
  48.                 this.button21 = new System.Windows.Forms.Button();
  49.                 this.SuspendLayout();
  50.                 //
  51.                 // textBox1
  52.                 //
  53.                 this.textBox1.Location = new System.Drawing.Point(303, 12);
  54.                 this.textBox1.Name = "textBox1";
  55.                 this.textBox1.Size = new System.Drawing.Size(151, 20);
  56.                 this.textBox1.TabIndex = 0;
  57.                 //
  58.                 // button1
  59.                 //
  60.                 this.button1.Location = new System.Drawing.Point(361, 62);
  61.                 this.button1.Name = "button1";
  62.                 this.button1.Size = new System.Drawing.Size(75, 23);
  63.                 this.button1.TabIndex = 1;
  64.                 this.button1.Text = "tan";
  65.                 this.button1.UseVisualStyleBackColor = true;
  66.                 //
  67.                 // button2
  68.                 //
  69.                 this.button2.Location = new System.Drawing.Point(203, 121);
  70.                 this.button2.Name = "button2";
  71.                 this.button2.Size = new System.Drawing.Size(75, 23);
  72.                 this.button2.TabIndex = 2;
  73.                 this.button2.Text = "*";
  74.                 this.button2.UseVisualStyleBackColor = true;
  75.                 //
  76.                 // button3
  77.                 //
  78.                 this.button3.Location = new System.Drawing.Point(203, 150);
  79.                 this.button3.Name = "button3";
  80.                 this.button3.Size = new System.Drawing.Size(75, 23);
  81.                 this.button3.TabIndex = 3;
  82.                 this.button3.Text = "1";
  83.                 this.button3.UseVisualStyleBackColor = true;
  84.                 //
  85.                 // button4
  86.                 //
  87.                 this.button4.Location = new System.Drawing.Point(203, 91);
  88.                 this.button4.Name = "button4";
  89.                 this.button4.Size = new System.Drawing.Size(75, 23);
  90.                 this.button4.TabIndex = 4;
  91.                 this.button4.Text = "sln";
  92.                 this.button4.UseVisualStyleBackColor = true;
  93.                 //
  94.                 // button5
  95.                 //
  96.                 this.button5.Location = new System.Drawing.Point(203, 62);
  97.                 this.button5.Name = "button5";
  98.                 this.button5.Size = new System.Drawing.Size(75, 23);
  99.                 this.button5.TabIndex = 5;
  100.                 this.button5.Text = "C";
  101.                 this.button5.UseVisualStyleBackColor = true;
  102.                 //
  103.                 // button6
  104.                 //
  105.                 this.button6.Location = new System.Drawing.Point(280, 150);
  106.                 this.button6.Name = "button6";
  107.                 this.button6.Size = new System.Drawing.Size(75, 23);
  108.                 this.button6.TabIndex = 6;
  109.                 this.button6.Text = "2";
  110.                 this.button6.UseVisualStyleBackColor = true;
  111.                 //
  112.                 // button7
  113.                 //
  114.                 this.button7.Location = new System.Drawing.Point(280, 179);
  115.                 this.button7.Name = "button7";
  116.                 this.button7.Size = new System.Drawing.Size(75, 23);
  117.                 this.button7.TabIndex = 7;
  118.                 this.button7.Text = "5";
  119.                 this.button7.UseVisualStyleBackColor = true;
  120.                 //
  121.                 // button8
  122.                 //
  123.                 this.button8.Location = new System.Drawing.Point(280, 124);
  124.                 this.button8.Name = "button8";
  125.                 this.button8.Size = new System.Drawing.Size(75, 23);
  126.                 this.button8.TabIndex = 8;
  127.                 this.button8.Text = "-";
  128.                 this.button8.UseVisualStyleBackColor = true;
  129.                 //
  130.                 // button9
  131.                 //
  132.                 this.button9.Location = new System.Drawing.Point(280, 91);
  133.                 this.button9.Name = "button9";
  134.                 this.button9.Size = new System.Drawing.Size(75, 23);
  135.                 this.button9.TabIndex = 9;
  136.                 this.button9.Text = "%";
  137.                 this.button9.UseVisualStyleBackColor = true;
  138.                 //
  139.                 // button10
  140.                 //
  141.                 this.button10.Location = new System.Drawing.Point(280, 62);
  142.                 this.button10.Name = "button10";
  143.                 this.button10.Size = new System.Drawing.Size(75, 23);
  144.                 this.button10.TabIndex = 10;
  145.                 this.button10.Text = "cos";
  146.                 this.button10.UseVisualStyleBackColor = true;
  147.                 //
  148.                 // button11
  149.                 //
  150.                 this.button11.Location = new System.Drawing.Point(361, 179);
  151.                 this.button11.Name = "button11";
  152.                 this.button11.Size = new System.Drawing.Size(75, 23);
  153.                 this.button11.TabIndex = 11;
  154.                 this.button11.Text = "6";
  155.                 this.button11.UseVisualStyleBackColor = true;
  156.                 //
  157.                 // button12
  158.                 //
  159.                 this.button12.Location = new System.Drawing.Point(361, 150);
  160.                 this.button12.Name = "button12";
  161.                 this.button12.Size = new System.Drawing.Size(75, 23);
  162.                 this.button12.TabIndex = 12;
  163.                 this.button12.Text = "3";
  164.                 this.button12.UseVisualStyleBackColor = true;
  165.                 //
  166.                 // button13
  167.                 //
  168.                 this.button13.Location = new System.Drawing.Point(361, 121);
  169.                 this.button13.Name = "button13";
  170.                 this.button13.Size = new System.Drawing.Size(75, 23);
  171.                 this.button13.TabIndex = 13;
  172.                 this.button13.Text = "+";
  173.                 this.button13.UseVisualStyleBackColor = true;
  174.                 //
  175.                 // button14
  176.                 //
  177.                 this.button14.Location = new System.Drawing.Point(361, 91);
  178.                 this.button14.Name = "button14";
  179.                 this.button14.Size = new System.Drawing.Size(75, 23);
  180.                 this.button14.TabIndex = 14;
  181.                 this.button14.Text = "/";
  182.                 this.button14.UseVisualStyleBackColor = true;
  183.                 //
  184.                 // button15
  185.                 //
  186.                 this.button15.Location = new System.Drawing.Point(203, 179);
  187.                 this.button15.Name = "button15";
  188.                 this.button15.Size = new System.Drawing.Size(75, 23);
  189.                 this.button15.TabIndex = 15;
  190.                 this.button15.Text = "4";
  191.                 this.button15.UseVisualStyleBackColor = true;
  192.                 //
  193.                 // button16
  194.                 //
  195.                 this.button16.Location = new System.Drawing.Point(203, 208);
  196.                 this.button16.Name = "button16";
  197.                 this.button16.Size = new System.Drawing.Size(75, 23);
  198.                 this.button16.TabIndex = 16;
  199.                 this.button16.Text = "7";
  200.                 this.button16.UseVisualStyleBackColor = true;
  201.                 //
  202.                 // button17
  203.                 //
  204.                 this.button17.Location = new System.Drawing.Point(280, 208);
  205.                 this.button17.Name = "button17";
  206.                 this.button17.Size = new System.Drawing.Size(75, 23);
  207.                 this.button17.TabIndex = 17;
  208.                 this.button17.Text = "8";
  209.                 this.button17.UseVisualStyleBackColor = true;
  210.                 //
  211.                 // button18
  212.                 //
  213.                 this.button18.Location = new System.Drawing.Point(361, 208);
  214.                 this.button18.Name = "button18";
  215.                 this.button18.Size = new System.Drawing.Size(75, 23);
  216.                 this.button18.TabIndex = 18;
  217.                 this.button18.Text = "9";
  218.                 this.button18.UseVisualStyleBackColor = true;
  219.                 //
  220.                 // button19
  221.                 //
  222.                 this.button19.Location = new System.Drawing.Point(203, 237);
  223.                 this.button19.Name = "button19";
  224.                 this.button19.Size = new System.Drawing.Size(75, 23);
  225.                 this.button19.TabIndex = 19;
  226.                 this.button19.Text = "T";
  227.                 this.button19.UseVisualStyleBackColor = true;
  228.                 //
  229.                 // button20
  230.                 //
  231.                 this.button20.Location = new System.Drawing.Point(280, 237);
  232.                 this.button20.Name = "button20";
  233.                 this.button20.Size = new System.Drawing.Size(75, 23);
  234.                 this.button20.TabIndex = 20;
  235.                 this.button20.Text = "0";
  236.                 this.button20.UseVisualStyleBackColor = true;
  237.                 //
  238.                 // button21
  239.                 //
  240.                 this.button21.Location = new System.Drawing.Point(361, 237);
  241.                 this.button21.Name = "button21";
  242.                 this.button21.Size = new System.Drawing.Size(75, 23);
  243.                 this.button21.TabIndex = 21;
  244.                 this.button21.Text = "=";
  245.                 this.button21.UseVisualStyleBackColor = true;
  246.                 //
  247.                 // Form1
  248.                 //
  249.                 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
  250.                 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
  251.                 this.ClientSize = new System.Drawing.Size(481, 264);
  252.                 this.Controls.Add(this.button21);
  253.                 this.Controls.Add(this.button20);
  254.                 this.Controls.Add(this.button19);
  255.                 this.Controls.Add(this.button18);
  256.                 this.Controls.Add(this.button17);
  257.                 this.Controls.Add(this.button16);
  258.                 this.Controls.Add(this.button15);
  259.                 this.Controls.Add(this.button14);
  260.                 this.Controls.Add(this.button13);
  261.                 this.Controls.Add(this.button12);
  262.                 this.Controls.Add(this.button11);
  263.                 this.Controls.Add(this.button10);
  264.                 this.Controls.Add(this.button9);
  265.                 this.Controls.Add(this.button8);
  266.                 this.Controls.Add(this.button7);
  267.                 this.Controls.Add(this.button6);
  268.                 this.Controls.Add(this.button5);
  269.                 this.Controls.Add(this.button4);
  270.                 this.Controls.Add(this.button3);
  271.                 this.Controls.Add(this.button2);
  272.                 this.Controls.Add(this.button1);
  273.                 this.Controls.Add(this.textBox1);
  274.                 this.Name = "Form1";
  275.                 this.Text = "Form1";
  276.                 this.ResumeLayout(false);
  277.                 this.PerformLayout();
  278.  
  279.             }
  280.         }
  281.  
  282.             #endregion
  283.  
  284.         private System.Windows.Forms.TextBox textBox1;
  285.         private System.Windows.Forms.Button button1;
  286.         private System.Windows.Forms.Button button2;
  287.         private System.Windows.Forms.Button button3;
  288.         private System.Windows.Forms.Button button4;
  289.         private System.Windows.Forms.Button button5;
  290.         private System.Windows.Forms.Button button6;
  291.         private System.Windows.Forms.Button button7;
  292.         private System.Windows.Forms.Button button8;
  293.         private System.Windows.Forms.Button button9;
  294.         private System.Windows.Forms.Button button10;
  295.         private System.Windows.Forms.Button button11;
  296.         private System.Windows.Forms.Button button12;
  297.         private System.Windows.Forms.Button button13;
  298.         private System.Windows.Forms.Button button14;
  299.         private System.Windows.Forms.Button button15;
  300.         private System.Windows.Forms.Button button16;
  301.         private System.Windows.Forms.Button button17;
  302.         private System.Windows.Forms.Button button18;
  303.         private System.Windows.Forms.Button button19;
  304.         private System.Windows.Forms.Button button20;
  305.         private System.Windows.Forms.Button button21;
  306.     }
  307. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement