Exemplo n.º 1
0
        // Simple 10 Minute clock method
        private void CashoutTimer_Tick(object sender, EventArgs e)
        {
            if (SecondsLeft == 0)
            {
                MinutesLeft--;
                SecondsLeft = 59;
            }
            else
            {
                SecondsLeft--;
            }

            if (SecondsLeft < 10)
            {
                CashoutTimerLabel.Text = MinutesLeft + ":0" + SecondsLeft;
            }
            else
            {
                CashoutTimerLabel.Text = MinutesLeft + ":" + SecondsLeft;
            }

            if (MinutesLeft != 0 || SecondsLeft != 0)
            {
                return;
            }
            CashoutTimer.Stop();
            InvestmentTimer.Stop();
            VerifyTextBox.Enabled = false;
            CashoutButton.Visible = true;
        }
Exemplo n.º 2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void IncomeDoubleButton_Click(object sender, EventArgs e)
 {
     if (_wallet.Balance < 5)
     {
         return;
     }
     _upgradeCount++;
     _wallet.Balance           -= 5;
     ResourceLabel.Text         = _wallet.Balance.ToString(CultureInfo.InvariantCulture);
     _incomeDoubled             = true;
     IncomeDoubleButton.Enabled = false;
     AutoGenerateButton.Text    = "Doubles Manual Income\r\n\r\nPurchased!";
     InvestmentTimer.Start();
     MessageBox.Show("Investment Successful.");
 }
Exemplo n.º 3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void AutoGenerateButton_Click(object sender, EventArgs e)
 {
     if (_wallet.Balance < 2)
     {
         return;
     }
     _upgradeCount++;
     _wallet.Balance           -= 2;
     ResourceLabel.Text         = _wallet.Balance.ToString(CultureInfo.InvariantCulture);
     AutoGenerateButton.Enabled = false;
     AutoGenerateButton.Text    = "Generate 1 Code Every 5 Seconds\r\n\r\nPurchased!";
     InvestmentTimer.Start();
     _investmentBought = true;
     MessageBox.Show("Investment Successful.");
 }