private void ucAccessoryStates_ItemStateChanged(object sender, ItemEventArgs e) { // note: ucAccessoryStates control doesn't fire this event when IsInteractive == false; // add only if it's absent within recent (to prevent jumping) if (!App.EcosModel.AccessoryManager.RecentItemsIDs.Contains(e.Item.ID)) App.AddRecentItem(e.Item); }
private void LocomotiveManager_ItemRemoved(object sender, ItemEventArgs e) { if (NavigationService.CurrentSource == new Uri("/LocomotivePage.xaml", UriKind.Relative) && e.Item == Locomotive) { MessageBox.Show(Labels.ItemDeleted + Locomotive.Name, App.Name, MessageBoxButton.OK); NavigationService.GoBack(); } }
private void AccessoryManager_ItemRemoved(object sender, ItemEventArgs e) { if (NavigationService.CurrentSource == new Uri("/AccessoryPage.xaml", UriKind.Relative) && e.Item == Accessory) { MessageBox.Show(Labels.ItemDeleted + Accessory.NameText, App.Name, MessageBoxButton.OK); NavigationService.GoBack(); } }
//private void btnAdd_Click(object sender, EventArgs e) //{ // App.EcosModel.LocomotiveManager.AppendCreated(); //} private void ucLocos_ItemTapped(object sender, ItemEventArgs e) { Locomotive item = e.Item as Locomotive; App.AddRecentItem(item); App.EcosModel.LocomotiveManager.SelectedItem = item; NavigationService.Navigate(new Uri("/LocomotivePage.xaml", UriKind.Relative)); }
private void ucSensors_ItemTapped(object sender, ItemEventArgs e) { FeedbackModule item = e.Item as FeedbackModule; //App.AddRecentItem(item); App.EcosModel.FeedbackManager.SelectedItem = item; (Application.Current.RootVisual as PhoneApplicationFrame).Navigate(new Uri("/FeedbackModulePage.xaml", UriKind.Relative)); }
private void lbCheckAccessories_ItemUnchecked(object sender, ItemEventArgs e) { if (Collection.AccessoriesIDs.Contains(e.Item.ID)) Collection.AccessoriesIDs.Remove(e.Item.ID); }
private void lbCheckLocomotives_ItemUnchecked(object sender, ItemEventArgs e) { if (Collection.LocomotivesIDs.Contains(e.Item.ID)) Collection.LocomotivesIDs.Remove(e.Item.ID); }
private void AccessoryManager_ItemRemoved(object sender, ItemEventArgs e) { if (IDs != null && IDs.Contains(e.Item.ID)) IDs.Remove(e.Item.ID); }