Esempio n. 1
0
        public ItemObservableCollection <Player> CloneOnCourtPlayers()
        {
            var list = new ItemObservableCollection <Player>();

            foreach (var item in this._onCourtPlayers)
            {
                list.Add(item.Clone());
            }
            return(list);
        }
        public ItemObservableCollection <Reason> CloneReasons()
        {
            ItemObservableCollection <Reason> reasons = new ItemObservableCollection <Reason>();

            foreach (var item in this.WinReasons)
            {
                reasons.Add(new Reason()
                {
                    Name = item.Name, Count = 0, Grade = item.Grade, ServeReturned = item.ServeReturned, Value = item.Value, Win = item.Win
                });
            }
            foreach (var item in this.LooseReasons)
            {
                reasons.Add(new Reason()
                {
                    Name = item.Name, Count = 0, Grade = item.Grade, ServeReturned = item.ServeReturned, Value = item.Value, Win = item.Win
                });
            }
            return(reasons);
        }
Esempio n. 3
0
        private void LayoutRoot_Loaded(object sender, RoutedEventArgs e)
        {
            ItemObservableCollection <Adapter> collection = new ItemObservableCollection <Adapter>();

            if (collection.Count == 0)
            {
                foreach (ListCurrencyView temp in ListCurrencyViewModel.instanceCurrency.ListCurrencyCountry)
                {
                    collection.Add(new Adapter {
                        Name = temp.Symbol, Description = temp.FullNameCurrency
                    });
                }
            }

            lstUsers.ItemsSource = collection;
        }