private void buttonContinue_Click(object sender, EventArgs e) { // instatiate a new BankRegister object, load with starting balance, // enable bottom group box for activity, disable account details group box. // note we don't validate the stating balance here-- That already happened elsewhere register = new BankRegister { Balance = Convert.ToDecimal(textBoxBeginningBalance.Text) }; // switch to the Activity group box groupBoxActivity.Visible = true; groupBoxAccountDetails.Enabled = false; SetAccoundDetailsTextBoxesReadOnly(true); linkLabelClearInputFields.Visible = false; labelAvailableBalance.Visible = true; labelAvailTitle.Visible = true; labelBeginningBalance.Text = "Available Balance"; // required action for project-- Would not do this otherwise this.Text = ACTIVITY_TITLE; // switch form title }
private void SetBankSelectRegister(byte value) { this.selectedBank = (BankRegister)(value & 0x07); // When set: 0x8000 - 0x9000 is swappable and 0xC000 - 0xDFFF is fixed to the second-to-last bank // otherwise: 0x8000 - 0x9000 is fixed to the second to last bank and 0xC000 - 0xDFFF is swappable this.prgRomBankMode = ((value & 0x40) == 0x40) ? PrgRomBankMode.LoBankFixed : PrgRomBankMode.HiBankFixed; // When set : 2 2K banks of CHR ROM at 0x1000 - 0x1FFF and 4 1K banks at 0x0000 - 0x1000 // otherwise: 4 1K banks of CHR ROM at 0x1000 - 0x1FFF and 2 2K banks at 0x0000 - 0x1000; this.chrRomBankMode = ((value & 0x80) == 0x80) ? ChrRomBankMode.HiBanks2K : ChrRomBankMode.LoBanks2K; this.RecalcuateBankMasks(); }