Posted by Brad Wed 29th Mar 2006 18:18 - Syntax is C# - 77 views
Download | New Post | Modify | Hide line numbers
  1. using System;
  2. using System.Drawing;
  3. using System.Collections;
  4. using System.ComponentModel;
  5. using System.Windows.Forms;
  6.  
  7. namespace Bankaccountforms
  8. {
  9.     ///
  10.     /// Summary description for PayInForm.
  11.     ///
  12.     public class PayInForm : System.Windows.Forms.Form
  13.     {
  14.         private System.Windows.Forms.Label deposit_label;
  15.         private System.Windows.Forms.TextBox deposit_textBox;
  16.         private System.Windows.Forms.Button deposit_button;
  17.         ///
  18.         /// Required designer variable.
  19.         ///
  20.  
  21.         private System.ComponentModel.Container components = null;
  22.         public PayInForm( Account inEditAccount)
  23.         {
  24.             InitializeComponent();
  25.  
  26.             editAccount = inEditAccount;
  27.         }
  28.  
  29.         private void deposit_button_Click(object sender, System.EventArgs e)
  30.         {
  31.             editAccount.PayInFunds(decimal.Parse(nameTextBox.Text));
  32.         {
  33.  
  34.             //
  35.             // Required for Windows Form Designer support
  36.             //
  37.  
  38.  
  39.             //
  40.             // TODO: Add any constructor code after InitializeComponent call
  41.             //
  42.         }
  43.         }
  44.  
  45.         ///
  46.         /// Clean up any resources being used.
  47.         ///
  48.         protected override void Dispose( bool disposing )
  49.         {
  50.             if( disposing )
  51.             {
  52.                 if(components != null)
  53.                 {
  54.                     components.Dispose();
  55.                 }
  56.             }
  57.             base.Dispose( disposing );
  58.         }
  59.  
  60.         #region Windows Form Designer generated code
  61.         ///
  62.         /// Required method for Designer support - do not modify
  63.         /// the contents of this method with the code editor.
  64.         ///
  65.         private void InitializeComponent()
  66.         {
  67.             this.deposit_label = System.Windows.Forms.Label();
  68.             this.deposit_textBox = System.Windows.Forms.TextBox();
  69.             this.deposit_button = System.Windows.Forms.Button();
  70.             this.SuspendLayout();
  71.             //
  72.             // deposit_label
  73.             //
  74.             this.deposit_label.Location = System.Drawing.Point(40, 16);
  75.             this.deposit_label.Name = "deposit_label";
  76.             this.deposit_label.Size = System.Drawing.Size(208, 40);
  77.             this.deposit_label.TabIndex = 0;
  78.             this.deposit_label.Text = "How much would you like to deposit??";
  79.             this.deposit_label.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
  80.             //
  81.             // deposit_textBox
  82.             //
  83.             this.deposit_textBox.Location = System.Drawing.Point(112, 88);
  84.             this.deposit_textBox.Name = "deposit_textBox";
  85.             this.deposit_textBox.Size = System.Drawing.Size(56, 20);
  86.             this.deposit_textBox.TabIndex = 1;
  87.             this.deposit_textBox.Text = "�0.00";
  88.             //
  89.             // deposit_button
  90.             //
  91.             this.deposit_button.Location = System.Drawing.Point(96, 160);
  92.             this.deposit_button.Name = "deposit_button";
  93.             this.deposit_button.Size = System.Drawing.Size(88, 72);
  94.             this.deposit_button.TabIndex = 2;
  95.             this.deposit_button.Text = "Deposit";
  96.             this.deposit_button.Click += System.EventHandler(this.deposit_button_Click);
  97.             //
  98.             // PayInForm
  99.             //
  100.             this.AutoScaleBaseSize = System.Drawing.Size(5, 13);
  101.             this.ClientSize = System.Drawing.Size(292, 273);
  102.             this.Controls.Add(this.deposit_button);
  103.             this.Controls.Add(this.deposit_textBox);
  104.             this.Controls.Add(this.deposit_label);
  105.             this.Name = "PayInForm";
  106.             this.Text = "PayInForm";
  107.             this.ResumeLayout(false);
  108.  
  109.         }
  110.         #endregion
  111.  
  112.            
  113.     }
  114. }
  115.  

PermaLink to this entry https://pastebin.co.uk/596
Posted by Brad Wed 29th Mar 2006 18:18 - Syntax is C# - 77 views
Download | New Post | Modify | Hide line numbers