Example #1
0
 private void ApplySelection(ShipSprite selectedShip)
 {
     Globals.SelectedShip     = LanderFunctions.LoadShipSprites(selectedShip);
     Globals.FormMain.Visible = true;
     this.Visible             = false;
     GameFunctions.RecordFeatures(Enum.RecordType.SelectedShip);
 }
Example #2
0
        private void FormMain_Load(object sender, EventArgs e)
        {
            Globals.Stage       = new FormStageBase();
            Globals.FormMain    = this;
            Globals.ChooseShip  = new FormChooseShip();
            Globals.ChooseStage = new FormChooseStage();
            Globals.FormClear   = new FormClear();
            Globals.ChooseArea  = new FormChooseArea();

            Enum.Ships selected = Enum.Ships.Type01;

            if (Globals.SaveSelectedShip == Enum.Ships.Type01.ToString())
            {
                selected = Enum.Ships.Type01;
            }
            else if (Globals.SaveSelectedShip == Enum.Ships.Type02.ToString())
            {
                selected = Enum.Ships.Type02;
            }
            else if (Globals.SaveSelectedShip == Enum.Ships.Type03.ToString())
            {
                selected = Enum.Ships.Type03;
            }
            else if (Globals.SaveSelectedShip == Enum.Ships.Type04.ToString())
            {
                selected = Enum.Ships.Type04;
            }
            else if (Globals.SaveSelectedShip == Enum.Ships.Type05.ToString())
            {
                selected = Enum.Ships.Type05;
            }
            else if (Globals.SaveSelectedShip == Enum.Ships.Type06.ToString())
            {
                selected = Enum.Ships.Type06;
            }
            else if (Globals.SaveSelectedShip == Enum.Ships.Type07.ToString())
            {
                selected = Enum.Ships.Type07;
            }
            else if (Globals.SaveSelectedShip == Enum.Ships.Type08.ToString())
            {
                selected = Enum.Ships.Type08;
            }
            else if (Globals.SaveSelectedShip == Enum.Ships.Type09.ToString())
            {
                selected = Enum.Ships.Type09;
            }
            else if (Globals.SaveSelectedShip == Enum.Ships.TypeX1.ToString())
            {
                selected = Enum.Ships.TypeX1;
            }

            Globals.SelectedShip = LanderFunctions.LoadShipSprites(new ShipSprite(selected, this.pictureBoxLander));
        }