Пример #1
0
        private void AddPlayerData(int startIndex, int endIndex, PredefinedTypes.PList list, ListBox lstBx)
        {
            for (var index = startIndex; index < endIndex; index++)
            {
                var p = list[index];
                if (p.NameLength <= 3 ||
                    p.Type.Equals(PredefinedTypes.PlayerType.Hostile))
                {
                    continue;
                }

                var cl = Color.FromArgb(p.Color.A, p.Color.R, p.Color.G, p.Color.B);

                var iPlayerCountLenght = Players.Count.ToString(CultureInfo.InvariantCulture).Length;
                var strResult          = "[" + index + "]";

                for (var i = 0; i <= iPlayerCountLenght - index.ToString(CultureInfo.InvariantCulture).Length; i++)
                {
                    strResult += " ";
                }

                strResult += p.Name;

                lstBx.Items.Add(new ListBoxItem2(strResult, Brushes.Black, new SolidColorBrush(cl)));
            }
        }
Пример #2
0
 public void SetPlayers(PredefinedTypes.PList players)
 {
     if (_mainWindows != null)
     {
         _mainWindows.Players = players;
     }
 }
Пример #3
0
 public void SetPlayers(PredefinedTypes.PList players)
 {
     if (_pData != null)
     {
         _pData.Players = players;
     }
 }
Пример #4
0
 /* get the players */
 public void SetPlayers(PredefinedTypes.PList players)
 {
     if (_mMainForm != null &&
         _mMainForm.IsLoaded)
     {
         _mMainForm.Players = players;
     }
 }
Пример #5
0
 public void SetPlayers(PredefinedTypes.PList players)
 {
     _frmExternal.Players = players;
 }
Пример #6
0
 public void SetPlayers(PredefinedTypes.PList players)
 {
     _rRenderer.Players = players;
 }