コード例 #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            if (Stupid.Money >= Stupid.Debt)
            {
                Stupid.Money -= Stupid.Debt;
                Stupid.Debt   = 0;

                origMoney.Text = formatStringToCurrency(Stupid.Money);
                origDebt.Text  = formatStringToCurrency(Stupid.Debt);
                label5.Text    = formatStringToCurrency(Stupid.Money);
                label3.Text    = formatStringToCurrency(Stupid.Debt);

                DebtAction ChoiceHere = new DebtAction(1);
                ChoiceHere.StartPosition = FormStartPosition.CenterParent;
                ChoiceHere.ShowDialog(this);

                this.Hide();
            }
            else
            {
                DebtAction ChoiceHere = new DebtAction(2);
                ChoiceHere.StartPosition = FormStartPosition.CenterParent;
                ChoiceHere.ShowDialog(this);
            }
        }
コード例 #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            Stupid.Money            -= Stupid.DebtPenaltyValue;
            Stupid.DebtPenaltyValue += 10000;

            if (Stupid.Money <= 0)
            {
                Stupid.Money = 200;
            }
            int NumToSubtract = getPercent(Stupid.Money, 20);

            Stupid.Money -= NumToSubtract;
            Stupid.Health = Stupid.Health / 2;
            if (Stupid.Health <= 1)
            {
                Stupid.Health = 2;
            }

            origMoney.Text  = formatStringToCurrency(Stupid.Money);
            label5.Text     = formatStringToCurrency(Stupid.Money);
            origHealth.Text = Stupid.Health.ToString() + " / " + Stupid.MaxHealth;

            DebtAction ChoiceHere = new DebtAction(0);

            ChoiceHere.StartPosition = FormStartPosition.CenterParent;
            ChoiceHere.ShowDialog(this);

            this.Hide();
        }