Exemple #1
0
        private int DisplayPresidentIndex()
        {
            var presidentIndex = 0;

            if (_presidentToDisplay != null)
            {
                presidentIndex = AllPresidents.IndexOf(_presidentToDisplay);
            }
            return(presidentIndex);
        }
Exemple #2
0
        internal void Refresh()
        {
            AllPresidents.Clear();
            DataService ds         = new DataService();
            var         presidents = ds.GetAllPresidents();

            foreach (var pres in presidents)
            {
                AllPresidents.Add(pres);
            }
        }
Exemple #3
0
        public PresidentListViewModel()
        {
            DataService ds         = new DataService();
            var         presidents = ds.GetAllPresidents();

            foreach (var pres in presidents)
            {
                AllPresidents.Add(pres);
            }
            PresidentToDisplay = AllPresidents[0];
        }