public State(GUIforATM mainForm, string language) { this.mainForm = mainForm; left1BTN = (Button)mainForm.Controls["left1BTN"]; left2BTN = (Button)mainForm.Controls["left2BTN"]; left3BTN = (Button)mainForm.Controls["left3BTN"]; left4BTN = (Button)mainForm.Controls["left4BTN"]; right1BTN = (Button)mainForm.Controls["right1BTN"]; right2BTN = (Button)mainForm.Controls["right2BTN"]; right3BTN = (Button)mainForm.Controls["right3BTN"]; right4BTN = (Button)mainForm.Controls["right4BTN"]; bigDisplayLBL = (Label)mainForm.Controls["bigDisplayLBL"]; smallDisplayLBL = (Label)mainForm.Controls["smallDisplayLBL"]; theCardReader = mainForm.getCardReader(); theCashDispenser = mainForm.getCashDispenser(); this.language = language.ToUpper(); //default language theCard = mainForm.getCard(); theCashcard = mainForm.getCashcard(); }
public GUIforATM(Card c, Cashcard cC) { InitializeComponent(); theCard = c; theCashcard = cC; theCardReader = new CardReader(rightPicBox); theCardReader.withoutCard(); theCashDispenser = new CashDispenser(leftPicBox); theCashDispenser.withoutCash(); keysound = new SoundPlayer(Properties.Resources.keysound); keysound.Load(); currentState = new WaitForBankCardState(this, "ENGLISH"); }