Пример #1
0
        private void Ps_MouseDown(object sender, MouseEventArgs e)
        {
            PlayerShort ps = sender as PlayerShort;

            _odabraniPS = ps;
            ps.DoDragDrop(42, DragDropEffects.Move);
        }
Пример #2
0
        public void OnFavoriziranje(object sender, EventArgs e)
        {
            PlayerShort ps = sender as PlayerShort;

            _odabraniPS = ps;
            if (_odabraniPS.Favorite == false)
            {
                _odabraniPS.Favorite = false;
                _odabraniPS.StarOnOFF();
                flpTeam.Controls.Add(_odabraniPS);
                flpFavorites.Controls.Remove(_odabraniPS);
                Favorite();
            }
            else
            {
                SrediFavorite();
            }
        }
Пример #3
0
 private void PrikaziIgrace()
 {
     foreach (var player in playersList)
     {
         if (savedTeam.Players.Count > 22 && savedTeam.code == this.Code)
         {
             foreach (Player savedPlayer in savedTeam.Players)
             {
                 if (player.Name == savedPlayer.Name)
                 {
                     PlayerShort psSaved = new PlayerShort(player.Name, player.Captain, player.ShirtNumber, player.position, player.Favorite);
                     psSaved.MouseDown     += Ps_MouseDown;
                     psSaved.Favoriziranje += OnFavoriziranje;
                     if (savedPlayer.Favorite == true)
                     {
                         psSaved.Favorite = true;
                     }
                     if (savedPlayer.ProfilePic != "default" && File.Exists(savedPlayer.ProfilePic))
                     {
                         psSaved.PicturPath = savedPlayer.ProfilePic;
                     }
                     if (psSaved.Favorite)
                     {
                         flpFavorites.Controls.Add(psSaved);
                     }
                     else
                     {
                         flpTeam.Controls.Add(psSaved);
                     }
                 }
             }
         }
         else
         {
             PlayerShort ps = new PlayerShort(player.Name, player.Captain, player.ShirtNumber, player.position, player.Favorite);
             ps.MouseDown     += Ps_MouseDown;
             ps.Favoriziranje += OnFavoriziranje;
             flpTeam.Controls.Add(ps);
         }
     }
 }
Пример #4
0
 private void TeamDetails_Load(object sender, EventArgs e)
 {
     UcitajIgrace();
     PrikaziIgrace();
     _odabraniPS = null;
 }