コード例 #1
0
        public void RefreshDisplay()
        {
            MaintenanceSelection = null;

            MaintenanceItems.Clear();
            using (var db = Util.Database.Connection())
            {
                var data = db.Table<Maintenance>().OrderByDescending(item => item.Odometer).ToList();

                for (int i = 0; i < data.Count; i++)
                    MaintenanceItems.Add(new MaintenanceView(data[i].ID));
            }
        }
コード例 #2
0
        private void OnItemClick(object sender, ItemClickEventArgs e)
        {
            if (MaintenanceSelection != null)
            {
                MaintenanceSelection.ItemBackground = new SolidColorBrush(Windows.UI.Colors.Transparent);
            }

            MaintenanceSelection = (MaintenanceView)e.ClickedItem;
            MaintenanceSelection.ItemBackground = (Brush)App.Current.Resources["ButtonBackground"];
        }