Inheritance: RoutedEventArgs, IItemClickEventArgs
 void ItemView_ItemClick(object sender, ItemClickEventArgs e)
 {
     if (e.ClickedItem is MovieInfo)
         this.Frame.Navigate(typeof (MovieDetailsPage));
     else
         this.Zoom.IsZoomedInViewActive = false;
 }
 /// <summary>
 /// Invoked when an item within a group is clicked.
 /// </summary>
 /// <param name="sender">The GridView (or ListView when the application is snapped)
 /// displaying the item clicked.</param>
 /// <param name="e">Event data that describes the item clicked.</param>
 void ItemView_ItemClick(object sender, ItemClickEventArgs e)
 {
     // Navigate to the appropriate destination page, configuring the new page
     // by passing required information as a navigation parameter
     var itemId = ((SampleDataItem)e.ClickedItem).UniqueId;
     this.Frame.Navigate(typeof(ItemDetailPage), itemId);
 }
        private void ThumbnailList_Click(object sender, ItemClickEventArgs e)
        {
            GridView gridView = (GridView)sender;
            GridViewItem item = (GridViewItem)gridView.ContainerFromItem(e.ClickedItem);
            CompositionImage image = VisualTreeHelperExtensions.GetFirstDescendantOfType<CompositionImage>(item);

            // We are about to transition to a new page.  Cancel any outstanding transitions.
            if (_currentTransition != null)
            {
                if (!_currentTransition.Completed)
                {
                    _currentTransition.Cancel();
                }
                _currentTransition = null;
            }

            DetailsInfo info;
            info.thumbanil = (Thumbnail)e.ClickedItem;

            // Setup the new transition and trigger the navigation
            ConnectedTransition transition = new ConnectedTransition();
            transition.Initialize(Frame, image, info);

            Frame.Navigate(typeof(CustomConnectedAnimationDetail), transition);
        }
Example #4
0
        public EmitentDetailsViewModel(INavigationService navigationService, IMainCommandBar commandBar)
        {
            this._navigationService = navigationService;
            this._commandBar        = commandBar;
            this.FinancialList      = new ObservableCollection <Entities.Financial>();

            Messenger.Default.Register <FinancialListLoadedMessage>(this, (msg) =>
            {
                this.FinancialList.Clear();
                foreach (Entities.Financial financial in msg.FinancialList)
                {
                    this.FinancialList.Add(financial);
                }
            });

            this.SelectFinancialCmd = new RelayCommand <object>((parameter) =>
            {
                Windows.UI.Xaml.Controls.ItemClickEventArgs e = (Windows.UI.Xaml.Controls.ItemClickEventArgs)parameter;
                this._selectedFinancial = (Financial)e.ClickedItem;
            });

            this.AddFinancialCmd = new RelayCommand(() =>
            {
                this._navigationService.NavigateTo("FinancialEdit", new Financial()
                {
                    EmitentId = _emitentId
                });
            });

            this.EditFinancialCmd = new RelayCommand(() =>
            {
                this._navigationService.NavigateTo("FinancialEdit", this._selectedFinancial);
            });
        }
Example #5
0
 /// <summary>
 /// 在单击某个项时进行调用。
 /// </summary>
 /// <param name="sender">显示所单击项的 GridView。</param>
 /// <param name="e">描述所单击项的事件数据。</param>
 void ItemView_ItemClick(object sender, ItemClickEventArgs e)
 {
     // 导航至相应的目标页,并
     // 通过将所需信息作为导航参数传入来配置新页
     var itemId = ((SampleDataItem)e.ClickedItem).UniqueId;
     this.Frame.Navigate(typeof(ItemPage), itemId);
 }
        private static void Control_ItemClick(object sender, ItemClickEventArgs e)
        {
            ListViewBase currentBase = null;
            if(sender is ListView)
            {
                currentBase = sender as ListView;
            }
            else
            {
                currentBase = sender as GridView;
            }
            if (currentBase != null)
            {
                var command = GetItemClickCommand(currentBase);
                
                var paramter = e.ClickedItem;

                object obj = null;

                if (paramter != null)
                {
                    obj = paramter;
                }
                else
                {
                    obj = currentBase.DataContext;
                }

                if (command != null && command.CanExecute(obj))
                    command.Execute(obj);
            }
        }
Example #7
0
        /// <summary>
        /// Invoked when an item within a group is clicked.
        /// </summary>
        void ItemView_ItemClick(object sender, ItemClickEventArgs e)
        {
            Exception exception = null;
            try
            {
                // Navigate to the appropriate destination page, configuring the new page
                // by passing required information as a navigation parameter
                var itemId = ((MainPageItem)e.ClickedItem).UniqueId;

                if (itemId == "NewSurvey-StartNewSurvey")
                    Frame.Navigate(typeof(RoadSelectionPage));
                else if (itemId == "DataMan-SyncData")
                    ButtonSync_OnClick(sender, null);
                else if (itemId == "SyncRoad")
                    ButtonRoadSync_OnClick(sender, null);
                else if (itemId == "EditRoadSegments")
                    NotificationHelper.ShowNewMessage("Sorry, This function is not ready yet. Please click other buttons");
                else
                    this.Frame.Navigate(typeof(EditSurvey_RoadSelection));
            }
            catch (Exception _ex)
            {
                exception = _ex;
                throw;
            }
            if (exception != null)
                NotificationHelper.ShowErrorMessage(exception.Message);
        }
Example #8
0
 /// <summary>
 /// Invoked when an item is clicked.
 /// </summary>
 /// <param name="sender">The GridView (or ListView when the application is snapped)
 /// displaying the item clicked.</param>
 /// <param name="e">Event data that describes the item clicked.</param>
 void ItemView_ItemClick(object sender, ItemClickEventArgs e)
 {
     // Navigate to the appropriate destination page, configuring the new page
     // by passing required information as a navigation parameter
     var groupId = ((TestGroup)e.ClickedItem).UniqueId;
     this.Frame.Navigate(typeof(SplitPage), groupId);
 }
Example #9
0
 void ItemView_ItemClick(object sender, ItemClickEventArgs e)
 {
     // Navigate to the appropriate destination page, configuring the new page
     // by passing required information as a navigation parameter
     var gameId = ((PlayItemDataItem)e.ClickedItem).GameId;
     this.Frame.Navigate(typeof(BoardGame), gameId);
 }
 /// <summary>
 /// 在单击某个项时进行调用。
 /// </summary>
 /// <param name="sender">显示所单击项的 GridView (在应用程序处于对齐状态时
 /// 为 ListView)。</param>
 /// <param name="e">描述所单击项的事件数据。</param>
 void ItemView_ItemClick(object sender, ItemClickEventArgs e)
 {
     // 导航至相应的目标页,并
     // 通过将所需信息作为导航参数传入来配置新页
     var itemId = ((T_Rubbing)e.ClickedItem).ID;
     this.Frame.Navigate(typeof(RubbingPhotosPage), itemId);
 }
 /// <summary>
 /// Wird aufgerufen, wenn auf ein Element geklickt wird.
 /// </summary>
 /// <param name="sender">GridView (oder ListView, wenn die Anwendung angedockt ist),
 /// die das angeklickte Element anzeigt.</param>
 /// <param name="e">Ereignisdaten, die das angeklickte Element beschreiben.</param>
 void ItemView_ItemClick(object sender, ItemClickEventArgs e)
 {
     // Navigieren Sie zur entsprechenden Zielseite, und konfigurieren Sie die neue Seite,
     // indem Sie die erforderlichen Informationen als Navigationsparameter übergeben.
     var itemId = ((SampleDataItem)e.ClickedItem).UniqueId;
     this.Frame.Navigate(typeof(ItemDetailPage), itemId);
 }
 private void GridViewMain_ItemClick(object sender, ItemClickEventArgs e)
 {
     if (e.ClickedItem is BookShelfViewModels.IItemViewModel)
     {
         OnItemClicked(e.ClickedItem as BookShelfViewModels.IItemViewModel);
     }
 }
 private void ListView_ItemClick(object sender, ItemClickEventArgs e)
 {
     this.Frame.Navigate(
         typeof(BasicSubPage),
         e.ClickedItem,
         new Windows.UI.Xaml.Media.Animation.DrillInNavigationTransitionInfo());
 }
 private void OptionSelected(object sender, ItemClickEventArgs e)
 {
     if (e.ClickedItem == monsters)
     {
         Frame.Navigate(typeof(MonsterListPage));
     }
     else if (e.ClickedItem == items)
     {
         Frame.Navigate(typeof(ItemListPage));
     }
     else if (e.ClickedItem == weapons)
     {
         Frame.Navigate(typeof(WeaponTypePage));
     }
     else if (e.ClickedItem == armor)
     {
         Frame.Navigate(typeof(ArmorListPage));
     }
     else if (e.ClickedItem == skills)
     {
         Frame.Navigate(typeof(SkillListPage));
     }
     else if (e.ClickedItem == quests)
         Frame.Navigate(typeof(QuestListPage));
     else if (e.ClickedItem == combinations)
         Frame.Navigate(typeof(CombinationListPage));
     else if (e.ClickedItem == wyporium)
         Frame.Navigate(typeof(WyporiumTradeList));
     else if (e.ClickedItem == felyneSkills)
         Frame.Navigate(typeof(FelyneSkillListPage));
 }
        // Pin file selection event.
        private void uiPinFileList_ItemClick(object sender, Windows.UI.Xaml.Controls.ItemClickEventArgs e)
        {
            // Get Selected File Obejct
            FileObjectViewItem fileObjectViewItem = e.ClickedItem as FileObjectViewItem;

            // If user select folder, go in.
            // Otherwise, add it to list.
            if (fileObjectViewItem.ThumnailType.Equals(FileObjectViewModel.FOLDER))  // If folder, get files it the folder
            {
                this.SetPinFileListAsync(Switcher.GetCurrentStorage(), AppResources.Loading, fileObjectViewItem);
            }
            else  // If file, Do selection
            {
                if (fileObjectViewItem.SelectFileImage.Equals(FileObjectViewModel.CHECK_NOT_IMAGE_URI))
                {
                    this.PinSelectedFileList.Add(fileObjectViewItem);
                    fileObjectViewItem.SelectFileImage = FileObjectViewModel.CHECK_IMAGE_URI;
                    this.uiPinAppBarButton.IsEnabled   = true;
                }
                else if (fileObjectViewItem.SelectFileImage.Equals(FileObjectViewModel.CHECK_IMAGE_URI))
                {
                    this.PinSelectedFileList.Remove(fileObjectViewItem);
                    fileObjectViewItem.SelectFileImage = FileObjectViewModel.CHECK_NOT_IMAGE_URI;
                    if (this.PinSelectedFileList.Count < 1)
                    {
                        this.uiPinAppBarButton.IsEnabled = false;
                    }
                }
            }
        }
 /// <summary>
 /// 按一下項目時叫用。
 /// </summary>
 /// <param name="sender">GridView 顯示項目已按下。</param>
 /// <param name="e">描述已按下之項目的事件資料。</param>
 void ItemView_ItemClick(object sender, ItemClickEventArgs e)
 {
     // 巡覽至適用的目的頁面,設定新的頁面
     // 方式是透過傳遞必要資訊做為巡覽參數
     var itemId = ((SampleDataItem)e.ClickedItem).UniqueId;
     this.Frame.Navigate(typeof(ItemDetailPage), itemId);
 }
		private void ItemView_ItemClick (object sender, ItemClickEventArgs e)
		{
			if (e.ClickedItem != null) {
				var feed = (FeedData)e.ClickedItem;
				Frame.Navigate (typeof (SplitPage), feed);
			}
		}
Example #18
0
 private async void ListViewSpeakers_ItemClick(object sender, ItemClickEventArgs e)
 {
     string personid = (e.ClickedItem as Person).Name.Replace(' ', '_');
     personid = personid.ToLower();
     string url = string.Format("https://fosdem.org/2016/schedule/speaker/{0}/", personid);
     await Windows.System.Launcher.LaunchUriAsync(new Uri(url));
 }
Example #19
0
        private async void gvDrawing_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (gvViewType.SelectedIndex == 0)
            {
                if (gvDrawing.SelectedItem == e.ClickedItem)
                {
                    DataItem item = e.ClickedItem as DataItem;

                    //Login.MasterPage.ShowTopBanner = false;
                    string[] addrs = ExtractAddress(item.ImagePath);
                    if (item.ImagePath.ToLower().Contains(".pdf") || item.ImagePath.ToLower().Contains(".ozd") || item.ImagePath.ToLower().Contains(".ozr"))
                        WinAppLibrary.Utilities.Helper.SimpleMessage("Can't Edit", "Alert");
                    else
                    {
                        Login.MasterPage.Loading(true, this);
                        DrawingEditor.EnableEdit(false);
                        if (!await DrawingEditor.LoadDrawingWithServer(item.ImagePath, UriKind.Absolute))
                            await DrawingEditor.LoadDefault();

                        DrawingEditor.ViewMode();
                        Login.MasterPage.Loading(false, this);
                    }
                }
                else
                {
                    gvDrawing.SelectedItem = e.ClickedItem;
                }
            }
        }
Example #20
0
		private static bool ExecuteMethod(ItemClickEventArgs e, object target, string methodName)
		{
			var method = target.GetType().GetTypeInfo().GetDeclaredMethod(methodName);

			if (method != null)
			{
				var parms = method.GetParameters();

				if (parms != null && parms.Length == 1)
				{
					method.Invoke(target, new[] { e.ClickedItem });
				}
				else
				{
					method.Invoke(target, null);
				}
				return true;
			}
			else
			{
				var property = target.GetType().GetTypeInfo().GetDeclaredProperty(methodName);

				if (property != null && property.PropertyType == typeof(ICommand))
				{
					var command = (ICommand)property.GetValue(target);
					command.Execute(e.ClickedItem);

					return true;
				}
			}

			return false;
		}
 /// <summary>
 /// Invoked when an item is clicked.
 /// </summary>
 /// <param name="sender">The GridView (or ListView when the application is snapped)
 /// displaying the item clicked.</param>
 /// <param name="e">Event data that describes the item clicked.</param>
 void ItemView_ItemClick(object sender, ItemClickEventArgs e)
 {
     // Navigate to the appropriate destination page, configuring the new page
     // by passing required information as a navigation parameter
     var selectedItemId = ((SearchItemModel) e.ClickedItem).Id;           
     Frame.Navigate(typeof(DetailsPage), selectedItemId);            
 }
Example #22
0
 /// <summary>
 /// Вызывается при щелчке элемента.
 /// </summary>
 /// <param name="sender">Представление сетки, в котором отображается нажатый элемент.</param>
 /// <param name="e">Данные о событии, описывающие нажатый элемент.</param>
 void ItemView_ItemClick(object sender, ItemClickEventArgs e)
 {
     // Переход к соответствующей странице назначения и настройка новой страницы
     // путем передачи необходимой информации в виде параметра навигации
     var itemId = ((SampleDataItem)e.ClickedItem).UniqueId;
     this.Frame.Navigate(typeof(ItemPage), itemId);
 }
 private void ListArticle_ItemClick(object sender, ItemClickEventArgs e)
 {
     var feed = e.ClickedItem as IFeedItem;
     var detail = ViewModelLocator.Get<Detail_ViewModel>();
     detail.CurrentFeed = feed;
     App.Current.NavigationService.NavigateTo(Pages.DetailPage);
 }
 /// <summary>
 /// アイテムがクリックされたときに呼び出されます。
 /// </summary>
 /// <param name="sender">クリックされたアイテムを表示する GridView (アプリケーションがスナップ
 /// されている場合は ListView) です。</param>
 /// <param name="e">クリックされたアイテムを説明するイベント データ。</param>
 void ItemView_ItemClick(object sender, ItemClickEventArgs e)
 {
     // 適切な移動先のページに移動し、新しいページを構成します。
     // このとき、必要な情報をナビゲーション パラメーターとして渡します
     var itemId = ((SampleDataItem)e.ClickedItem).UniqueId;
     this.Frame.Navigate(typeof(ItemDetailPage), itemId);
 }
        private void ListView_ItemClick(object sender, ItemClickEventArgs e)
        {
            var page = e.ClickedItem as PageVmi;
            if (page == null) return;

            Frame.Navigate(page.Type, page.Param);
        }
Example #26
0
        async private void Reviews_ItemClick(object sender, Windows.UI.Xaml.Controls.ItemClickEventArgs e)
        {
            try
            {
                Suggestion item         = e.ClickedItem as Suggestion;
                string     selected_med = item.suggestion.ToString();
                block1.Text = selected_med;
                string api_Key = "6df2a5e1693d8085bfeadd1fdae9fe";

                block1.Text = "Processing...";

                HttpClient http     = new HttpClient();
                var        response = await http.GetStringAsync("http://oaayush-aayush.rhcloud.com/api/medicine_alternatives/?id=" + selected_med + "&key=" + api_Key + "&limit=10");

                var FSfeed = JsonConvert.DeserializeObject <Rootobject>(response);

                Reviews.ItemsSource = FSfeed.response.medicine_alternatives;

                back.Visibility            = Visibility.Visible;
                block1.Text                = "Alternatives:";
                txt1.Visibility            = Visibility.Collapsed;
                search.Visibility          = Visibility.Collapsed;
                Reviews.IsItemClickEnabled = false;
            }
            catch
            {
                block1.Text = "Net not Connected!";
            }
        }
 private async void AdaptiveGridViewControl_ItemClick(object sender, Windows.UI.Xaml.Controls.ItemClickEventArgs e)
 {
     if (e.ClickedItem != null)
     {
         await new MessageDialog($"You clicked {(e.ClickedItem as PhotoDataItem).Title}", "Item Clicked").ShowAsync();
     }
 }
 /// <summary>
 /// Se invoca al hacer clic en un elemento contenido en un grupo.
 /// </summary>
 /// <param name="sender">Objeto GridView (o ListView cuando la aplicación está en estado Snapped)
 /// que muestra el elemento en el que se hizo clic.</param>
 /// <param name="e">Datos de evento que describen el elemento en el que se hizo clic.</param>
 void ItemView_ItemClick(object sender, ItemClickEventArgs e)
 {
     // Navegar a la página de destino adecuada y configurar la nueva página
     // al pasar la información requerida como parámetro de navegación
     var itemId = ((SampleDataItem)e.ClickedItem).UniqueId;
     this.Frame.Navigate(typeof(ItemDetailPage), itemId);
 }
 /// <summary>
 ///     Invoked when an item is clicked.
 /// </summary>
 /// <param name="sender">The GridView displaying the item clicked.</param>
 /// <param name="e">Event data that describes the item clicked.</param>
 private void ItemView_ItemClick(object sender, ItemClickEventArgs e)
 {
     // Navigate to the appropriate destination page, configuring the new page
     // by passing required information as a navigation parameter
     string itemId = ((CustomerDataItem) e.ClickedItem).Id;
     Frame.Navigate(typeof (ItemDetailPage), itemId);
 }
Example #30
0
        private async void powerMenuList_ItemClick(object sender, ItemClickEventArgs e)
        {
            var item = e.ClickedItem as FrameworkElement;
            if (item == null)
                return;

            // Not supported in latest releases
            // TODO: Uncomment when fixed
            //var dialog = new MessageDialog("Are you sure you want to " + (e.ClickedItem as TextBlock).Text.ToLower() + "?", (e.ClickedItem as TextBlock).Text.ToUpper());

            //var resp = await dialog.ShowAsync();

            //if (resp.Label == "No")
            //    return;

            switch (item.Name)
            {
                case "ShutdownOption":
                    ShutdownHelper(ShutdownKind.Shutdown);
                    break;
                case "RestartOption":
                    ShutdownHelper(ShutdownKind.Restart);
                    break;
            }
        }
        public void PlayEpisode(object sender, ItemClickEventArgs parameters)
        {
            var episodeViewModel = parameters.ClickedItem as EpisodeViewModel;

            //var content = new ToastContent()
            //{
            //    Launch = null,
            //    Visual = new ToastVisual()
            //    {
            //        TitleText = new ToastText()
            //        {
            //            Text = $"Listening to {episode.Title}"
            //        },
            //        BodyTextLine1 = new ToastText()
            //        {
            //            Text = $"By {episode.Author}"
            //        },
            //        AppLogoOverride = new ToastAppLogo()
            //        {
            //            Crop = ToastImageCrop.None,
            //            Source = new ToastImageSource(episode.ImageUrl.OriginalString)
            //        },
            //    }
            //};

            //var t = content.GetContent();

            //var toast = new ToastNotification(content.GetXml());

            //ToastNotificationManager.CreateToastNotifier().Show(toast);

            MessengerInstance.Send(new PlayEpisodeMessage(episodeViewModel.Episode));
        }
Example #32
0
        private async void itemListView_ItemClick(object sender, ItemClickEventArgs e)
        {
            var myItem = ((MyTileItem)e.ClickedItem);

            switch (myItem.UniqueId)
            {
                case "Calculer-Vente-PrixDeVente":
                    {
                        //this.Frame.Navigate(typeof(SalePricePage), myItem);
                        var messageDialog =
                            new MessageDialog("Pas implémenté");
                        await messageDialog.ShowAsync();
                    }
                    break;
                case "Calculer-Outils-Convertisseur":
                    {
                        //this.Frame.Navigate(typeof(ConverterPage), myItem);
                        this.Frame.Navigate((typeof(ConverterPage)));
                    }
                    break;
                default:
                    {
                        var messageDialog =
                            new MessageDialog(string.Format(
                                        "Impossible de trouver l'id {0}",
                                        myItem.UniqueId));
                        await messageDialog.ShowAsync();
                    }
                    break;
            }
        }
Example #33
0
  private void studentList_ItemClick(object sender, ItemClickEventArgs e)
  {
      Downloads download = (Downloads)e.ClickedItem;
      OpenFile(download);
 
   
  }
Example #34
0
        /// <summary>
        /// Handles the click event on a book
        /// </summary>
        /// <param name="args"></param>
        public void UserClick(ItemClickEventArgs args)
        {
            var book = args.ClickedItem as WorkViewModel;
            if (book == null) return;

            App.NavigationService.Navigate(typeof(BookPage), book.Id);
        }
Example #35
0
        private void item_clicked(object sender, Windows.UI.Xaml.Controls.ItemClickEventArgs e)
        {
            return;

            var item = ((sender as ListView).ContainerFromItem(e.ClickedItem) as ListViewItem).ContentTemplateRoot as Grid;

            var   pos          = item.TransformToVisual(Window.Current.Content);
            Point screenCoords = pos.TransformPoint(new Point(0, 0));
            Grid  inner        = item.Children[0] as Grid;


            int x = 0;
        }
        private void uiFileListView_ItemClick(object sender, Windows.UI.Xaml.Controls.ItemClickEventArgs e)
        {
            // Get Selected File Obejct
            FileObjectViewItem fileObjectViewItem = e.ClickedItem as FileObjectViewItem;

            // Launch files to other reader app.
            if (NetworkInterface.GetIsNetworkAvailable())
            {
                this.LaunchFileAsync(fileObjectViewItem);
            }
            else
            {
                base.ShowMessageDialog(AppResources.InternetUnavailableMessage, OK_MODE);
            }
        }
        private void uiPickFileList_ItemClick(object sender, Windows.UI.Xaml.Controls.ItemClickEventArgs e)
        {
            // Get Selected File Obejct
            FileObjectViewItem fileObjectViewItem = e.ClickedItem as FileObjectViewItem;

            // If it is view mode, click is preview.
            // If it is edit mode, click is selection.
            BitmapImage currentEditViewModeBitmapImage = (BitmapImage)uiPickFileListEditViewButtonImage.Source;
            string      currentEditViewMode            = currentEditViewModeBitmapImage.UriSource.ToString();

            if (currentEditViewMode.Equals(EDIT_IMAGE_URI))  // View mode
            {
                if (fileObjectViewItem.SelectFileImage.Equals(FileObjectViewModel.DOWNLOAD_IMAGE_URI))
                {
                    // Launch files to other reader app.
                    if (NetworkInterface.GetIsNetworkAvailable())
                    {
                        this.LaunchFileAsync(fileObjectViewItem);
                    }
                    else
                    {
                        base.ShowMessageDialog(AppResources.InternetUnavailableMessage, OK_MODE);
                    }
                }
            }
            else if (currentEditViewMode.Equals(VIEW_IMAGE_URI))  // Edit mode
            {
                if (fileObjectViewItem.SelectFileImage.Equals(FileObjectViewModel.CHECK_NOT_IMAGE_URI))
                {
                    this.PickSelectedFileList.Add(fileObjectViewItem);
                    fileObjectViewItem.SelectFileImage = FileObjectViewModel.CHECK_IMAGE_URI;
                    uiPickDeleteAppBarButton.IsEnabled = true;
                }

                else if (fileObjectViewItem.SelectFileImage.Equals(FileObjectViewModel.CHECK_IMAGE_URI))
                {
                    this.PickSelectedFileList.Remove(fileObjectViewItem);
                    fileObjectViewItem.SelectFileImage = FileObjectViewModel.CHECK_NOT_IMAGE_URI;
                    if (this.PickSelectedFileList.Count < 1)
                    {
                        uiPickDeleteAppBarButton.IsEnabled = false;
                    }
                }
            }
        }
Example #38
0
        public AnalysisViewModel(INavigationService navigationService, IMainCommandBar commandBar)
        {
            this._navigationService = navigationService;
            this.AnalystDataList    = new ObservableCollection <Robot.AnalystData>();
            this._commandBar        = commandBar;

            Messenger.Default.Register <SecurityListLoadedMessage>(this, (msg) =>
            {
                this.SecurityList = msg.SecurityList.Where(s => s.AlgoTrade).ToList();
            });

            this.StartAnalyst = new RelayCommand(() =>
            {
                this._analyst = new Robot.Analyst(new Robot.AnalystStrategy(), SecurityList);

                this._analyst.Run();
            });

            SelectSecurityCmd = new RelayCommand <object>((parameter) =>
            {
                Windows.UI.Xaml.Controls.ItemClickEventArgs e = (Windows.UI.Xaml.Controls.ItemClickEventArgs)parameter;
                Robot.AnalystData selected = (Robot.AnalystData)e.ClickedItem;

                this._navigationService.NavigateTo("AnalysisDetails", _candles[selected.Sec]);
            });

            Messenger.Default.Register <ShowDataMessage>(this, (msg) =>
            {
                _candles = msg.Сandles;

                dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
                {
                    AnalystDataList.Clear();

                    foreach (AnalystData data in msg.AnalystDatalist)
                    {
                        this.AnalystDataList.Add(data);
                    }
                });
            });
        }
        private void uiSpotGridView_ItemClick(object sender, Windows.UI.Xaml.Controls.ItemClickEventArgs e)
        {
            // Get Selected Spot View Item
            SpotViewItem spotViewItem = e.ClickedItem as SpotViewItem;

            //if (spotViewItem.IsPrivateImage.Equals(FileObjectViewModel.IS_PRIVATE_IMAGE_URI))
            //{
            //    SubmitSpotPasswordPopup submitSpotPasswordPopup =
            //        new SubmitSpotPasswordPopup(this.SubmitSpotPasswordParentPopup, spotViewItem.SpotId, spotViewItem.SpotPassword,
            //            uiPickPivot.ActualWidth, uiPickPivot.ActualHeight, uiPivotTitleGrid.ActualHeight);
            //    this.SubmitSpotPasswordParentPopup.Child = submitSpotPasswordPopup;
            //    this.SubmitSpotPasswordParentPopup.IsOpen = true;
            //    this.SubmitSpotPasswordParentPopup.Closed += (senderObject, args) =>
            //    {
            //        if (((SubmitSpotPasswordPopup)((Popup)senderObject).Child).result)
            //            this.NavigateToFileListPage(spotViewItem);
            //    };
            //}
            //else
            //{
            //    this.NavigateToFileListPage(spotViewItem);
            //}
            this.Frame.Navigate(typeof(ExplorerPage), spotViewItem);
        }
Example #40
0
        public EmitentListViewModel(INavigationService navigationService, IMainCommandBar commandBar)
        {
            this._navigationService = navigationService;
            this._commandBar        = commandBar;

            this.EmitentList = new ObservableCollection <Entities.Emitent>();

            Messenger.Default.Register <EmitentListLoadedMessage>(this, (msg) =>
            {
                this.EmitentList.Clear();
                foreach (Entities.Emitent emitent in msg.EmitentList)
                {
                    this.EmitentList.Add(emitent);
                }
            });

            SelectEmitentCmd = new RelayCommand <object>((parameter) =>
            {
                Windows.UI.Xaml.Controls.ItemClickEventArgs e = (Windows.UI.Xaml.Controls.ItemClickEventArgs)parameter;
                Emitent SelectedEmitent = (Emitent)e.ClickedItem;

                this._navigationService.NavigateTo("EmitentDetails", SelectedEmitent);
            });
        }
 private void ListView_ItemClick(object sender, Windows.UI.Xaml.Controls.ItemClickEventArgs e)
 {
     ViewModel.GotoList(((TodoListViewModel)e.ClickedItem).TodoList.Id);
 }
Example #42
0
        // Handles when a user clicks on a item in the adaptive list to bring them to there chosen page
        public void AGVC_ItemClick(object sender, Windows.UI.Xaml.Controls.ItemClickEventArgs e)
        {
            String catagory;

            if ((e.ClickedItem as AdaptItem).Title == "b1")
            {
                catagory = "Boxing";

                MainPage.MyFrame.Navigate(typeof(DisplayDrills), catagory);
            }
            else if ((e.ClickedItem as AdaptItem).Title == "b2")
            {
                catagory = "Karate";

                MainPage.MyFrame.Navigate(typeof(DisplayDrills), catagory);
            }
            else if ((e.ClickedItem as AdaptItem).Title == "b3")
            {
                catagory = "TKD";

                MainPage.MyFrame.Navigate(typeof(DisplayDrills), catagory);
            }
            else if ((e.ClickedItem as AdaptItem).Title == "b4")
            {
                catagory = "Kickboxing";

                MainPage.MyFrame.Navigate(typeof(DisplayDrills), catagory);
            }
            else if ((e.ClickedItem as AdaptItem).Title == "b5")
            {
                catagory = "MuayThai";

                MainPage.MyFrame.Navigate(typeof(DisplayDrills), catagory);
            }
            else if ((e.ClickedItem as AdaptItem).Title == "b6")
            {
                catagory = "BJJ";

                MainPage.MyFrame.Navigate(typeof(DisplayDrills), catagory);
            }
            else if ((e.ClickedItem as AdaptItem).Title == "b7")
            {
                catagory = "Judo";

                MainPage.MyFrame.Navigate(typeof(DisplayDrills), catagory);
            }
            else if ((e.ClickedItem as AdaptItem).Title == "b8")
            {
                catagory = "MMA";

                MainPage.MyFrame.Navigate(typeof(DisplayDrills), catagory);
            }
            else if ((e.ClickedItem as AdaptItem).Title == "map")
            {
                try
                {
                    MainPage.MyFrame.Navigate(typeof(MapMenu));
                }
                catch (Exception ex)
                {
                    Debug.WriteLine(ex.Message);
                    Debug.WriteLine(ex.StackTrace);
                }
            }
            else if ((e.ClickedItem as AdaptItem).Title == "news")
            {
                try
                {
                    MainPage.MyFrame.Navigate(typeof(NewsMenu));
                }
                catch (Exception ex)
                {
                    Debug.WriteLine(ex.Message);
                    Debug.WriteLine(ex.StackTrace);
                }
            }
        }
 private void TestListView_ItemClick(object sender, Windows.UI.Xaml.Controls.ItemClickEventArgs e)
 {
     ValidateLightsOnPressed();
 }