コード例 #1
0
 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);
 }
コード例 #2
0
 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();
     }
 }
コード例 #3
0
 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();
     }
 }
コード例 #4
0
        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));
        }
コード例 #5
0
 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();
     }
 }
コード例 #6
0
        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));
        }
コード例 #7
0
 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();
     }
 }
コード例 #8
0
        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);
            }
        }
コード例 #9
0
 private void ucFeedbackModulesList_ItemClicked(object sender, EcosItemEventArgs e)
 {
     AppManager.EcosModel.FeedbackManager.SelectedItem = e.Item as FeedbackModule;
     Frame.Navigate(typeof(FeedbackModulePage));
 }
コード例 #10
0
 private void lvCheckAccessories_ItemUnchecked(object sender, EcosItemEventArgs e)
 {
     if (Collection.AccessoriesIDs.Contains(e.Item.ID))
         Collection.AccessoriesIDs.Remove(e.Item.ID);
 }
コード例 #11
0
        private void lvCheckLocomotives_ItemUnchecked(object sender, EcosItemEventArgs e)
        {
            if (Collection.LocomotivesIDs.Contains(e.Item.ID))
                Collection.LocomotivesIDs.Remove(e.Item.ID);

            AppManager.SaveProfiles();
        }
コード例 #12
0
 private void AccessoryManager_ItemRemoved(object sender, EcosItemEventArgs e)
 {
     if (IDs != null && IDs.Contains(e.Item.ID))
         IDs.Remove(e.Item.ID);
 }