public BaronPlacedDlg(ObservableCollection <CatanPlayer> players)
        {
            this.InitializeComponent();
            if (Application.Current is App)
            {
                Dispatcher.AcceleratorKeyActivated += Dispatcher_AcceleratorKeyActivated;
            }

            ObservableCollection <CatanPlayer> copyPlayers = new ObservableCollection <CatanPlayer>();

            foreach (var p in players)
            {
                CatanPlayer newP = new CatanPlayer(p);
                copyPlayers.Add(newP);
            }

            _playersView.Players = copyPlayers;
            _txtInput.Text       = "1";
            _txtInput.Focus(FocusState.Programmatic);
            _txtInput.SelectAll();
        }
Exemple #2
0
        public int CompareTo(object obj)
        {
            CatanPlayer p = obj as CatanPlayer;

            return(String.Compare(p.PlayerName, this.PlayerName));
        }