Пример #1
0
        public void PlaneSpeed()
        {
            if (this.picPlaneMap.InvokeRequired)
            {
                MovePlane moving = new MovePlane(PlaneSpeed);
                this.Invoke(moving);
            }
            else
            {
                this.picPlaneMap.Location = new Point(speedPlane, picPlaneMap.Location.Y);

                if (speedPlane < 278)
                {
                    lblArmory.Visible = true;
                    picArmory.Visible = true;

                    lblBaracks.Visible  = true;
                    picBarracks.Visible = true;

                    lblQuarters.Visible = true;
                    picOffice.Visible   = true;

                    lblMessHall.Visible = true;
                    picMessHall.Visible = true;

                    lblHospital.Visible  = true;
                    picHostpital.Visible = true;
                }
            }
        }
Пример #2
0
 public void PlaneAltitudeDown()
 {
     if (this.picPlaneMap.InvokeRequired)
     {
         MovePlane moving = new MovePlane(PlaneAltitudeDown);
         this.Invoke(moving);
     }
     else
     {
         this.picPlaneMap.Location = new Point(picPlaneMap.Location.X, altitudePlaneDown);
     }
 }
Пример #3
0
 public void movingPlane()
 {
     if (this.picPlaneMap.InvokeRequired)
     {
         MovePlane moving = new MovePlane(movingPlane);
         this.Invoke(moving);
     }
     else
     {
         this.picPlaneMap.Location = new Point(MovePlaneInitial, picPlaneMap.Location.Y);
     }
 }
Пример #4
0
 public void FuelDying()
 {
     if (this.txtFuelLeft.InvokeRequired)
     {
         MovePlane moving = new MovePlane(FuelDying);
         this.Invoke(moving);
     }
     else
     {
         this.txtFuelLeft.Text = FuelDown.ToString();
     }
 }
Пример #5
0
 public void ChangingY()
 {
     if (this.picPlaneMap.InvokeRequired)
     {
         MovePlane moving = new MovePlane(ChangingY);
         this.Invoke(moving);
     }
     else
     {
         this.picPlaneMap.Location = new Point(picPlaneMap.Location.X, picPlaneMap.Location.Y - ChangeY);
     }
 }
Пример #6
0
 public void Seconds()
 {
     if (this.lblTimeBegun.InvokeRequired)
     {
         MovePlane moving = new MovePlane(Seconds);
         this.Invoke(moving);
     }
     else
     {
         this.lblTimeBegun.Text = IncreasingTimeMinutes.ToString() + ":" + IncreasingSeconds.ToString();
     }
 }