private void ucAccessoryStates_ItemStateChanged(object sender, EcosItemEventArgs e) { // note: ucAccessoryStates control doesn't fire this event when IsInteractive == false; // add only if it's not within recent (to prevent jumping) if (!AppManager.EcosModel.AccessoriesManager.RecentItemsIDs.Contains(e.Item.ID)) AppManager.AddRecentItem(e.Item); }
private async void FeedbackManager_ItemRemoved(object sender, EcosItemEventArgs e) { if (Frame.CurrentSourcePageType == typeof(FeedbackModulePage) && e.Item == FeedbackModule) { await Utils.MessageBox(Labels.ItemDeleted + FeedbackModule.Name); NavigationHelper.GoBack(); } }
private async void AccessoryManager_ItemRemoved(object sender, EcosItemEventArgs e) { if (Frame.CurrentSourcePageType == typeof(AccessoryPage) && e.Item == Accessory) { await Utils.MessageBox(Labels.ItemDeleted + Accessory.NameText); NavigationHelper.GoBack(); } }
private void listAccessories_ItemClicked(object sender, EcosItemEventArgs e) { Accessory item = e.Item as Accessory; AppManager.AddRecentItem(item); //App.EcosModel.AccessoriesManager.SelectedItem = item; //Frame.Navigate(typeof(AccessoryPage)); }
private async void FeedbackManager_ItemRemoved(object sender, EcosItemEventArgs e) { if (e.Item == FeedbackModule) { await Utils.MessageBox(Labels.ItemDeleted + FeedbackModule.Name); if (Frame.CanGoBack) Frame.GoBack(); } }
private void listLocos_ItemClicked(object sender, EcosItemEventArgs e) { Locomotive item = e.Item as Locomotive; AppManager.AddRecentItem(item); AppManager.EcosModel.LocomotivesManager.SelectedItem = item; Frame.Navigate(typeof(LocomotivePage)); }
private async void LocomotiveManager_ItemRemoved(object sender, EcosItemEventArgs e) { if (e.Item == Locomotive) { await Utils.MessageBox(Labels.ItemDeleted + Locomotive.Name); if (Frame.CanGoBack) Frame.GoBack(); } }
private void ucFeedbackModulesList_ItemClicked(object sender, EcosItemEventArgs e) { AppManager.EcosApp.ActiveProfile.FeedbackManager.SelectedItem = e.Item as FeedbackModule; if (AdaptiveStates.CurrentState == NarrowState) { // hide master panel, show only details panel: MasterColumn.Width = new GridLength(0); DetailColumn.Width = new GridLength(1, GridUnitType.Star); } }
private void ucFeedbackModulesList_ItemClicked(object sender, EcosItemEventArgs e) { AppManager.EcosModel.FeedbackManager.SelectedItem = e.Item as FeedbackModule; Frame.Navigate(typeof(FeedbackModulePage)); }
private void lvCheckAccessories_ItemUnchecked(object sender, EcosItemEventArgs e) { if (Collection.AccessoriesIDs.Contains(e.Item.ID)) Collection.AccessoriesIDs.Remove(e.Item.ID); }
private void lvCheckLocomotives_ItemUnchecked(object sender, EcosItemEventArgs e) { if (Collection.LocomotivesIDs.Contains(e.Item.ID)) Collection.LocomotivesIDs.Remove(e.Item.ID); AppManager.SaveProfiles(); }
private void AccessoryManager_ItemRemoved(object sender, EcosItemEventArgs e) { if (IDs != null && IDs.Contains(e.Item.ID)) IDs.Remove(e.Item.ID); }