private void carousel_PositionSelected(object sender, PositionSelectedEventArgs e) { if (model != null) { // model.SelectedExe(e.NewValue + 1); } }
private void _carouselView_PositionSelected(object sender, PositionSelectedEventArgs e) { if (_carouselView.Position != e.NewValue || SelectedTabIndex != e.NewValue) { SetPosition(e.NewValue); } }
void OnPositionSelected(object sender, PositionSelectedEventArgs e) { try { if (this.Position < 0) { return; } if (this.Position == this.LastPosition) { return; } if (this.Position == 0 && this.LastPosition != 1 && this.LastPosition != -1) { if (this.LastPosition != this.ItemsSource.GetCount()) { return; } } this.SetPositionVisibility((this.Position - 2), false); this.SetPositionVisibility((this.Position - 1), true); this.SetPositionVisibility((this.Position), true); this.SetPositionVisibility((this.Position + 1), true); this.SetPositionVisibility((this.Position + 2), false); this.LastPosition = this.Position; } catch (Exception ex) { Helpers.AppCenter.TrackEvent(ex); } }
void CarouselPositionChanged(object sender, PositionSelectedEventArgs e) { _currentPage = e.NewValue; int currentPage = e.NewValue + 1; if (currentPage >= DictionaryClasses.generalDictionary.dictionary.First().Value&& currentPage <= DictionaryClasses.respDictionary.dictionary.First().Value - 1 && _categoryName != labelNames[0]) { _categoryName = labelNames[0]; //header.Text = _categoryName; HeaderControl(_categoryName); } else if (currentPage >= DictionaryClasses.apndxDictionary.dictionary.First().Value&& currentPage <= DictionaryClasses.apndxDictionary.dictionary.Last().Value&& _categoryName != labelNames[1]) //COVID19 edits here. Edits are to make sure that apndx doesn't behave like it's the last section (which it is w/o COVID19) { _categoryName = labelNames[1]; //header.Text = _categoryName; HeaderControl(_categoryName); } else if (currentPage >= DictionaryClasses.cardDictionary.dictionary.First().Value&& currentPage <= DictionaryClasses.medDictionary.dictionary.First().Value - 1 && _categoryName != labelNames[2]) { _categoryName = labelNames[2]; //header.Text = _categoryName; HeaderControl(_categoryName); } else if (currentPage >= DictionaryClasses.obDictionary.dictionary.First().Value&& currentPage <= DictionaryClasses.pedsDictionary.dictionary.First().Value - 1 && _categoryName != labelNames[3]) { _categoryName = labelNames[3]; //header.Text = _categoryName; HeaderControl(_categoryName); } else if (currentPage >= DictionaryClasses.traumaDictionary.dictionary.First().Value&& currentPage <= DictionaryClasses.obDictionary.dictionary.First().Value - 1 && _categoryName != labelNames[4]) { _categoryName = labelNames[4]; //header.Text = _categoryName; HeaderControl(_categoryName); } else if (currentPage >= DictionaryClasses.pedsDictionary.dictionary.First().Value&& currentPage <= DictionaryClasses.apndxDictionary.dictionary.First().Value - 1 && _categoryName != labelNames[5]) { _categoryName = labelNames[5]; //header.Text = _categoryName; HeaderControl(_categoryName); } else if (currentPage >= DictionaryClasses.respDictionary.dictionary.First().Value&& currentPage <= DictionaryClasses.cardDictionary.dictionary.First().Value - 1 && _categoryName != labelNames[6]) { _categoryName = labelNames[6]; //header.Text = _categoryName; HeaderControl(_categoryName); } else if (currentPage >= DictionaryClasses.medDictionary.dictionary.First().Value&& currentPage <= DictionaryClasses.traumaDictionary.dictionary.First().Value - 1 && _categoryName != labelNames[7]) { _categoryName = labelNames[7]; //header.Text = _categoryName; HeaderControl(_categoryName); } else if (currentPage > DictionaryClasses.apndxDictionary.dictionary.Last().Value&& _categoryName != labelNames[8]) //Inserting COVID information here. There will be no covid dictionary class. Just insert covid header info after appendix (the last section) { _categoryName = labelNames[8]; HeaderControl(_categoryName); } }
private void carouselView_PositionSelected(object sender, PositionSelectedEventArgs e) { AbMediaContent curMedia = cardMediaViewModels[carouselView.Position].media; isFavoritedImage.Source = (curMedia.isFavorited ? "FavoriteIcon.png" : "NonFavoriteIcon"); mediaLinkCaptureView.setLinkToMedia(curMedia); }
private void OnPositionSelected(object sender, PositionSelectedEventArgs e) { var carousel = (CarouselViewControl)sender; var array = (Array)carousel.ItemsSource; SkipLabel.Text = e.NewValue == (array.Length - 1) ? AppResources.CarouselStart : AppResources.CarouselSkip; }
private void OnCarouselPositionSelected(object sender, PositionSelectedEventArgs e) { var currentView = _views[e.NewValue]; var index = _views.IndexOf(currentView); GetStarted.IsVisible = _views.Length == (index + 1); Skip.IsVisible = _views.Length != (index + 1); }
void OnPositionSelected(object sender, PositionSelectedEventArgs e) { if (MembresListView.ItemsSource != null) { List <Member> list = new List <Member>(); list.AddRange(MembresListView.ItemsSource as IEnumerable <Member>); if (list.Count() != 0 && MembresListView.SelectedItem != list[e.NewValue]) { MembresListView.SelectedItem = list[e.NewValue]; } } }
void Handle_PositionSelected(object sender, PositionSelectedEventArgs e) { ConfigureButtons(); Debug.WriteLine("Position " + myCarousel.Position + " selected"); }
public void Handle_PositionSelected(object sender, PositionSelectedEventArgs e) { _currentIndex = e.NewValue; Wrapper.SlidePosition = 0; }
public async void RecordSelected(object sender, PositionSelectedEventArgs e) { var cvc = sender as CarouselViewControl; var item = cvc.ItemsSource.GetItem(e.NewValue) as Record; if (item.IsDownloaded) { } else { var httpConnectorDesc = new HTTPConector(); httpConnectorDesc.Address = $"record/description"; var contentDesc = new { Id = item.Id, IsPublic = true }; httpConnectorDesc.Content = ("Record", contentDesc); var respDesc = string.Empty; try { respDesc = await httpConnectorDesc.SendAsync <UserMiniSerializer>(); } catch (Exception ex) { return; } var respRec = JsonSerializer.Deserialize <Record>(respDesc, new JsonSerializerOptions { PropertyNameCaseInsensitive = true }); item.Description = respRec.Description; item.IsDownloaded = true; } var httpConnector = new HTTPConector(); httpConnector.Address = $"record/listen"; var content = new { Id = item.Id, IsPublic = true }; httpConnector.Content = ("Record", content); var resp = string.Empty; try { resp = await httpConnector.SendAsync <UserMiniSerializer>(true); } catch (Exception ex) { return; } //var path = Path.Combine(Android.OS.Environment.ExternalStorageDirectory.AbsolutePath, item.Id.ToString() + ".wav"); //if (System.IO.File.Exists(path)) // System.IO.File.Delete(path); //var file = System.IO.File.Create(path); //var ar = await httpConnector.Response.Content.ReadAsByteArrayAsync(); //await file.WriteAsync(ar, 0, ar.Length); //file.Close(); ////file.Seek(0, SeekOrigin.Begin); /// if (Device.RuntimePlatform == Device.Android) { var path = Path.Combine(Environment.GetExternalStoragePublicDirectory(Environment.DirectoryMusic).AbsolutePath, "123.wav"); var f = new File(path); if (f.Exists()) { f.Delete(); } f.CreateNewFile(); var fd = new Java.IO.FileWriter(f); //{ var bytes = await httpConnector.Response.Content.ReadAsByteArrayAsync(); var chars = System.Text.Encoding.ASCII.GetChars(bytes); fd.Write(chars, 0, chars.Length); //} IMediaItem media = new MediaItem(); await MediaManager.CrossMediaManager.Current.Play(new FileInfo(f.AbsolutePath)); //MediaPlayer mp = new MediaPlayer(); //var mp = new MediaPlayer(); //mp.SetDataSource(f.AbsolutePath); //mp. //mp.Prepared += (sender, args) => //{ // mp.Start(); //}; //mp.PrepareAsync(); //Player.Play(); } else { Player.Load(await httpConnector.Response.Content.ReadAsStreamAsync()); Player.Play(); } }
void Handle_PositionSelected(object sender, PositionSelectedEventArgs e) { var control = (CarouselViewControl)sender; Debug.WriteLine(control.SelectedItem); }
private void OnCarouselPositionSelected(object sender, PositionSelectedEventArgs e) { }
private void Carousel_OnPositionSelected(object sender, PositionSelectedEventArgs e) { Debug.WriteLine("Position " + e.NewValue + " selected."); }
private void CarouselViewControlOnPositionSelected(object sender, PositionSelectedEventArgs e) { _isActive = e.NewValue == _viewModel.Slides.IndexOf(BindingContext as Slide); }
private void _carouselView_PositionSelected(object sender, PositionSelectedEventArgs e) { SetPosition(e.NewValue); }
private void carouselView_PositionSelected(object sender, PositionSelectedEventArgs e) { AbMediaContent curMedia = cardMediaViewModels[carouselView.Position].media; isFavoriteBarItem.Icon = (curMedia.isFavorited ? "FavoriteIcon.png" : "NonFavoriteIcon"); }
void Handle_PositionSelected(object sender, PositionSelectedEventArgs e) { ConfigureButtons(); }
private void LettersView_ItemSelected(object sender, PositionSelectedEventArgs e) { HighlightLetter(LettersView.Position); }
private void BannerPositionSelected(object sender, PositionSelectedEventArgs e) { //throw new NotImplementedException(); _ultimaRotacao = DateTime.Now; }