예제 #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;
 }