private void RandomizeShip()
        {
            Ship ThisShip = GetRandomShip();

            if (ThisShip != null)
            {
                RandomizedShip = ThisShip;
                FlagImage.Load(Commons.GetFlagURL(ThisShip.Country));
                ShipImage.Load(ThisShip.Images.Small);
                SetShipName(ThisShip.Name);
                SetDescription(ThisShip.Description);
                ShipLoaded = true;
                if (ThisShip.Premium)
                {
                    ShipImage.BackColor = SystemColors.Info;
                }
                else
                {
                    ShipImage.BackColor = SystemColors.Control;
                }
                AlreadyRandomizedShips.Add(ThisShip.ID);
            }
            else
            {
                ShipLoaded = false;
            }
        }
Example #2
0
 public LInfo(LTexture formImage, int x, int y, int width, int height)
     : base(x, y, width, height)
 {
     fontSize = deffont.GetSize();
     if (formImage == null)
     {
         this.SetBackground(new LTexture(width, height, true));
         this.SetAlpha(0.3F);
     }
     else
     {
         this.SetBackground(formImage);
         if (width == -1)
         {
             width = formImage.GetWidth();
         }
         if (height == -1)
         {
             height = formImage.GetHeight();
         }
     }
     this.message_char_count = 0;
     this.message_x          = new int[messageCountMax];
     this.message_y          = new int[messageCountMax];
     this.locatePoint        = new List <LocatePoint>();
     this.flag            = new FlagImage(this);
     this.customRendering = true;
     this.SetElastic(true);
     this.SetLayer(100);
 }
Example #3
0
        private void FillGeneralTab()
        {
            ShipName.Text = selectedShip.Name;
            FlagImage.Load(Commons.GetFlagURL(selectedShip.Country));
            FlagImage.Tag = selectedShip.Country;
            ShipImage.Load(selectedShip.Images.Small);
            DescriptionBox.Text = selectedShip.Description;
            lblPremium.Text     = "Premium: " + Commons.TranslateTrueFalse(selectedShip.Premium);;
            lblDemo.Text        = "Demo: " + Commons.TranslateTrueFalse(selectedShip.DemoProfile);
            lblID.Text          = "ID: " + selectedShip.ID.ToString() + " (" + selectedShip.ShipId + ")";
            lblCostCredits.Text = "Cost: " + selectedShip.PriceCredits.ToString();
            lblCostGold.Text    = "Cost (gold): " + selectedShip.PriceGold.ToString();
            lblSlots.Text       = "Number of slots: " + selectedShip.NumberOfSlots.ToString();
            lblSpecial.Text     = "Special: " + Commons.TranslateTrueFalse(selectedShip.Special);
            lblTier.Text        = "Tier: " + selectedShip.Tier.ToString();
            lblShipType.Text    = "Shiptype: " + selectedShip.ShipType;

            lblTurningRadius.Text = "Turning Radius: " + selectedShip.Profile.Mobility.TurningRadius.ToString() + " m";
            lblTurningSpeed.Text  = "Ruddershift: " + selectedShip.Profile.Mobility.RudderTime.ToString() + " sec";

            lblAirDet.Text     = selectedShip.Profile.Concealment.AirDetection.ToString() + " km";
            lblSurfaceDet.Text = selectedShip.Profile.Concealment.SurfaceDetection.ToString() + " km";

            addConsumablesImages(selectedShip);
        }
Example #4
0
        public IActionResult Update(string id, FlagImage flagImage)
        {
            var result = _flagService.Get(id);

            if (result == null)
            {
                return(NotFound());
            }

            _flagService.Update(id, flagImage);

            return(NoContent());
        }
Example #5
0
 public LInfo(LTexture formImage, int x, int y, int width, int height)
     : base(x, y, width, height)
 {
     fontSize = deffont.GetSize();
     if (formImage == null)
     {
         this.SetBackground(new LTexture(width, height, true));
         this.SetAlpha(0.3F);
     }
     else
     {
         this.SetBackground(formImage);
         if (width == -1)
         {
             width = formImage.GetWidth();
         }
         if (height == -1)
         {
             height = formImage.GetHeight();
         }
     }
     this.message_char_count = 0;
     this.message_x = new int[messageCountMax];
     this.message_y = new int[messageCountMax];
     this.locatePoint = new List<LocatePoint>();
     this.flag = new FlagImage(this);
     this.customRendering = true;
     this.SetElastic(true);
     this.SetLayer(100);
 }
Example #6
0
 public void Remove(FlagImage flagImageIn) =>
 _flagImages.DeleteOne(flagImage => flagImage.Id == flagImageIn.Id);
Example #7
0
 public void Update(string id, FlagImage flagImageIn) =>
 _flagImages.ReplaceOne(flagImage => flagImage.Id == id, flagImageIn);
Example #8
0
 public FlagImage Create(FlagImage flagImage)
 {
     _flagImages.InsertOne(flagImage);
     return(flagImage);
 }
Example #9
0
        public IActionResult Create(FlagImage flagImage)
        {
            flagImage = _flagService.Create(flagImage);

            return(CreatedAtRoute("", new { id = flagImage.Id.ToString() }, flagImage));
        }