Exemplo n.º 1
0
        private async Task LoadNorthData()
        {
            Fishes.Clear();
            BookCount   = 0;
            MuseumCount = 0;

            var normalAnimals = await CommonDataService.GetAllFishes(CommonDataService.Hemisphere.North);

            //BookCount = bookCount;
            //MuseumCount = museumCount;
            foreach (var item in normalAnimals)
            {
                Fishes.Add(item);
            }
        }
Exemplo n.º 2
0
        private void LoadNorthData()
        {
            Fishes.Clear();
            BookCount   = 0;
            MuseumCount = 0;

            var normalAnimals = CommonDataService.GetAllFishes(out int bookCount, out int museumCount, CommonDataService.Hemisphere.North);

            BookCount   = bookCount;
            MuseumCount = museumCount;
            foreach (var item in normalAnimals)
            {
                Fishes.Add(item);
            }
        }
Exemplo n.º 3
0
        public override void AddFishes()
        {
            var p = @"C:\Users\Programmer\Desktop\Projects\MVPFish — копия — копия\Fishing.BL\Model\Waters"
                    + Path.DirectorySeparatorChar
                    + Game.Game.GetGame().CurrentWater.Name
                    + Path.DirectorySeparatorChar + Name;
            string line;
            var    file =
                new StreamReader(p + "Болото\\" + "FishesList");

            while ((line = file.ReadLine()) != null)
            {
                var fs = new FishString(line);
                Fishes.Add((Fish)fs);
            }
            file.Close();
        }
Exemplo n.º 4
0
        public bool UpdateFishes()
        {
            try
            {
                var fishes = Fish.GetFishesByUserId(App.user.IdUser);

                if (fishes != null)
                {
                    Fishes.Clear();
                    foreach (var fish in fishes)
                    {
                        Fishes.Add(fish);
                    }
                }
                UpdatePins();
                return(true);
            }
            catch (Exception)
            {
                return(false);
            }
        }