Ejemplo n.º 1
0
        private void FormWork_FormClosing(object sender, FormClosingEventArgs e)
        {
            formMain Main = Owner as formMain;

            Main.Money    += NewMoney;
            Main.allMoney += NewMoney;
            Main.saveProgress();
        }
Ejemplo n.º 2
0
        private void lblClose_Click(object sender, EventArgs e)
        {
            formMain Main = Owner as formMain;

            Main.saveProgress();
            Close();
            Dispose();
        }
Ejemplo n.º 3
0
        private void lblClose_Click(object sender, EventArgs e)
        {
            formMain Main = Owner as formMain;

            Main.PillValue    = medicine[0];
            Main.SyringeValue = medicine[1];
            Main.Money        = Money;
            Main.saveProgress();
            Close();
        }
Ejemplo n.º 4
0
        private void lblClose_Click(object sender, EventArgs e)
        {
            formMain Main = Owner as formMain;

            Main.MelonValue   = products[0];
            Main.GrapeValue   = products[1];
            Main.CornValue    = products[2];
            Main.DonutValue   = products[3];
            Main.ChickenValue = products[4];
            Main.MilkValue    = products[5];
            Main.Money        = Money;
            Main.saveProgress();
            Close();
        }
Ejemplo n.º 5
0
        private void FormJobs_FormClosing(object sender, FormClosingEventArgs e)
        {
            formMain Main = Owner as formMain;

            Main.workTimeWashingFloors = workTimeWashingFloors;
            Main.workTimeGluePaper     = workTimeGluePaper;
            Main.workTimeCarryFood     = workTimeCarryFood;
            Main.workTimeCashier       = workTimeCashier;
            Main.workTimeCarwash       = workTimeCarwash;
            Main.workTimeFactory       = workTimeFactory;
            Main.workTimeSite          = workTimeSite;
            Main.workTimeGame          = workTimeGame;
            Main.workTimeStream        = workTimeStream;
            Main.workTimeBook          = workTimeBook;
            Main.saveProgress();
        }
Ejemplo n.º 6
0
        private void formEvent_Load(object sender, EventArgs e)
        {
            formMain Main = Owner as formMain;

            evNumber      = Convert.ToByte(rnd.Next(0, events.Length));
            lblEvent.Text = events[evNumber];
            switch (evNumber)
            {
            case 0:
                if (Main.health >= 10)
                {
                    Main.health -= 10;
                }
                else
                {
                    Main.health = 0;
                }
                Main.frameUpdate();
                Main.saveProgress();
                break;

            case 1:
                if (Main.satiety <= 100)
                {
                    Main.satiety++;
                }
                else
                {
                    Main.satiety = 100;
                }
                if (Main.mood <= 90)
                {
                    Main.mood += 10;
                }
                else
                {
                    Main.mood = 100;
                }
                Main.frameUpdate();
                Main.saveProgress();
                break;

            case 2:
                if (Main.mood >= 20)
                {
                    Main.mood -= 20;
                }
                else
                {
                    Main.mood = 0;
                }
                Main.frameUpdate();
                Main.saveProgress();
                break;

            case 3:
                if (Main.mood >= 10)
                {
                    Main.mood -= 10;
                }
                else
                {
                    Main.mood = 0;
                }
                Main.frameUpdate();
                Main.saveProgress();
                break;

            case 4:
                if (Main.satiety >= 20)
                {
                    Main.satiety -= 20;
                }
                else
                {
                    Main.satiety = 0;
                }
                Main.frameUpdate();
                Main.saveProgress();
                break;

            case 5:
                if (Main.health >= 3)
                {
                    Main.health -= 3;
                }
                else
                {
                    Main.health = 0;
                }
                if (Main.mood <= 95)
                {
                    Main.mood += 5;
                }
                else
                {
                    Main.mood = 100;
                }
                Main.frameUpdate();
                Main.saveProgress();
                break;

            case 6:
                if (Main.health <= 95)
                {
                    Main.health += 5;
                }
                else
                {
                    Main.health = 100;
                }
                if (Main.mood <= 95)
                {
                    Main.mood += 5;
                }
                else
                {
                    Main.mood = 100;
                }
                if (Main.satiety <= 85)
                {
                    Main.satiety += 15;
                }
                else
                {
                    Main.satiety = 100;
                }
                if (Main.thirst <= 95)
                {
                    Main.thirst += 5;
                }
                else
                {
                    Main.thirst = 100;
                }
                Main.frameUpdate();
                Main.saveProgress();
                break;

            case 7:
                if (Main.mood <= 90)
                {
                    Main.mood += 10;
                }
                else
                {
                    Main.mood = 100;
                }
                Main.frameUpdate();
                Main.saveProgress();
                break;

            case 8:
                if (Main.thirst >= 10)
                {
                    Main.thirst -= 10;
                }
                else
                {
                    Main.thirst = 0;
                }
                Main.frameUpdate();
                Main.saveProgress();
                break;

            case 9:
                if (Main.mood >= 5)
                {
                    Main.mood -= 5;
                }
                else
                {
                    Main.mood = 0;
                }
                Main.frameUpdate();
                Main.saveProgress();
                break;
            }
        }