private void MyCarousel_PositionSelected(object sender, CarouselView.FormsPlugin.Abstractions.PositionSelectedEventArgs e)
 {
     if (views.Count > e.NewValue)
     {
         views[e.NewValue].ScrollTo(StartDateTime);
     }
 }
        /// <summary>
        /// TODO : To Define On Carousel Changed event...
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Carousel_PositionSelected(object sender, CarouselView.FormsPlugin.Abstractions.PositionSelectedEventArgs e)
        {
            var index = e.NewValue;

            //var item = e.SelectedItem as Value;
            if (IntroVM.IntroductionList != null)
            {
                var item = IntroVM.IntroductionList.ElementAt(index);

                //For Indicators
                foreach (var inditem in IntroVM.IndicatorList)
                {
                    if (inditem.Id == item.ID)
                    {
                        inditem.IsCurrent    = true;
                        inditem.IsNotCurrent = false;
                    }
                    else
                    {
                        inditem.IsCurrent    = false;
                        inditem.IsNotCurrent = true;
                    }
                }
                LvIndicators.ItemsSource = null;
                LvIndicators.ItemsSource = IntroVM.IndicatorList;
            }
        }
Ejemplo n.º 3
0
        private void OnCarouselPositionSelected(object sender, CarouselView.FormsPlugin.Abstractions.PositionSelectedEventArgs e)
        {
            var currentView = _views[e.NewValue];

            if (currentView is IAnimatedView animatedView)
            {
                animatedView.StartAnimation();
            }

            if (currentView is ChartView)
            {
                btnSkip.Text = "Login";
                //ThirdIndicator.Color = Color.FromHex("#FFC106");
                //SecondIndicator.Color = Color.White;
                //FirstIndicator.Color = Color.White;
            }

            if (currentView is CloudSync)
            {
                btnSkip.Text = "Skip";
                //ThirdIndicator.Color = Color.White;
                //SecondIndicator.Color = Color.FromHex("#FFC106");
                //FirstIndicator.Color = Color.White;
            }

            if (currentView is WelcomeView)
            {
                btnSkip.Text = "Skip";
                //ThirdIndicator.Color = Color.White;
                //SecondIndicator.Color = Color.White;
                //FirstIndicator.Color = Color.FromHex("#FFC106");
            }
        }
Ejemplo n.º 4
0
        private void OnCarouselPositionSelected(object sender, CarouselView.FormsPlugin.Abstractions.PositionSelectedEventArgs e)
        {
            var currentView = _views[e.NewValue];

            if (currentView is IAnimatedView animatedView)
            {
                animatedView.StartAnimation();
            }
        }
Ejemplo n.º 5
0
 private void Caro_PositionSelected(object sender, CarouselView.FormsPlugin.Abstractions.PositionSelectedEventArgs e)
 {
     if (caro.Position + 1 == list.Count)
     {
         NextBtn.IsVisible = false;
     }
     else
     {
         NextBtn.IsVisible = true;
     }
 }
        /// <summary>
        /// TODO : To Define On Carousel Changed event...
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Carousel_PositionSelected(object sender, CarouselView.FormsPlugin.Abstractions.PositionSelectedEventArgs e)
        {
            var index = e.NewValue;

            if (islistRefresh == false)
            {
                pkgPosition = LvPackages.Position;
            }

            PackageVM.SelectedPackage = PackageVM.PackageList.Where(a => a.Id == LvPackages.Position + 1).FirstOrDefault();
        }
Ejemplo n.º 7
0
 void Handle_PositionSelected(object sender, CarouselView.FormsPlugin.Abstractions.PositionSelectedEventArgs e)
 {
     if (e.NewValue + 1 == _introVM.MyItemsSource.Count)
     {
         _introVM.btnText = "Başla";
     }
     else
     {
         _introVM.btnText = "Atla";
     }
 }
Ejemplo n.º 8
0
        void Handle_PositionSelected(object sender, CarouselView.FormsPlugin.Abstractions.PositionSelectedEventArgs e)
        {
            foreach (var item in container.Children)
            {
                item.BackgroundColor = grey;
            }

            if (container.Children.Any())
            {
                container.Children[e.NewValue].BackgroundColor = red;
            }
        }
Ejemplo n.º 9
0
 void pos_sel(object sender, CarouselView.FormsPlugin.Abstractions.PositionSelectedEventArgs e)
 {
     /*   if(CarouselPics.ItemsSource != null) {
      *     up = (UserPicture)CarouselPics.ItemsSource
      * }
      */
     if (pic.Count != 0)
     {
         current_pic_id = e.NewValue;
         Debug.WriteLine("Current Pic Id: " + current_pic_id.ToString());
         lstView.ItemsSource = comment.Where((comment) => comment.PictureId.Contains(e.NewValue.ToString()));
     }
     counter = pic.Count;
     Debug.WriteLine("Comment Counter: " + comment.Count);
 }
 private void OnCarouselPositionSelected(object sender, CarouselView.FormsPlugin.Abstractions.PositionSelectedEventArgs e)
 {
     if (!((IAnimatedView)_views[current] is BikingCoolView))
     {
         label.Opacity           = 0;
         label1.Opacity          = 0;
         LottieAnimation.Opacity = 0;
         Button.Opacity          = 0;
         Button.IsEnabled        = false;
     }
     current       = e.NewValue;
     img.IsEnabled = true;
     if (!((IAnimatedView)_views[current] is BikingCoolView))
     {
         label.Opacity           = 0;
         label1.Opacity          = 0;
         LottieAnimation.Opacity = 0;
         Button.Opacity          = 0;
         Button.IsEnabled        = false;
     }
 }
Ejemplo n.º 11
0
        private void Caroussel_PositionSelected(object sender, CarouselView.FormsPlugin.Abstractions.PositionSelectedEventArgs e)
        {
            if (!this.Inicio.viewModel.IsBusy)
            {
                if (this.Inicio.viewModel.Imovels != null)
                {
                    if (this.Inicio.viewModel.Imovels.Count > 0)
                    {
                        Imovel imovel = this.Inicio.viewModel.Imovels[e.NewValue];
                        if (imovel == null)
                        {
                            return;
                        }


                        Mapa.MoveToRegion(MapSpan.FromCenterAndRadius(
                                              new Position(imovel.localizacao.Latitude, imovel.localizacao.Longitude),
                                              Distance.FromMiles(0.5)));
                    }
                }
            }
        }
Ejemplo n.º 12
0
        void Handle_PositionSelected(object sender, CarouselView.FormsPlugin.Abstractions.PositionSelectedEventArgs e)
        {
            int inicio;

            quantidadeImagem = service.QuantidadeMidiaQuestoes(idquestao);
            Debug.WriteLine("Posição " + e.NewValue + " Selecionada.");
            posicaoimagem = e.NewValue;
            if (quantidadeImagem > 0)
            {
                inicio = Convert.ToInt32(posicaoimagem + 1);
            }
            else
            {
                left.IsVisible  = false;
                de.IsVisible    = false;
                right.IsVisible = false;
                inicio          = Convert.ToInt32(posicaoimagem);
            }

            right.Text = inicio.ToString();
            left.Text  = quantidadeImagem.ToString();
        }
 /// <summary>
 /// control the carousel page positions
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void Handle_PositionSelected(object sender, CarouselView.FormsPlugin.Abstractions.PositionSelectedEventArgs e)
 {
     try
     {
         CurrentCarocelPageIndex  = e.NewValue;
         CurrentlyOpenCarocelPage = dayTasksViewModel.TaskForDayList[e.NewValue];
         ToolbarItems.Remove(addToolbarItem); // firstly romove the Add toolbar item
         string dateForCurrentPage = CurrentlyOpenCarocelPage.CurrentDateForCurrentCarocel.ToString("d MMMM yyyy");
         currentDate = CurrentlyOpenCarocelPage.CurrentDateForCurrentCarocel.ToString("yyyy-MM-dd");
         if (Convert.ToDateTime(Convert.ToDateTime(dateForCurrentPage).ToString("d MMMM yyyy")).CompareTo(Convert.ToDateTime(DateTime.Now.ToString("d MMMM yyyy"))) <= 0)
         { // if page date is same as current date or previous than the current date then show the add button on toolbar
             var s = dayTasksViewModel.GetAllDayTasksBaseOnDayMonth(dateForCurrentPage);
             if (s.Count > 0)
             {
                 ToolbarItems.Add(addToolbarItem);
             }
         }
     }
     catch (Exception ex)
     {
         MessagingCenter.Send((App)Xamarin.Forms.Application.Current, AppConstant.ErrorEvent, ex.ToString());
     }
 }
Ejemplo n.º 14
0
        private async void BtExcluirQuestao_Clicked(object sender, CarouselView.FormsPlugin.Abstractions.PositionSelectedEventArgs e)
        {
            var midia = service.GetMidiaQuestoes(idquestao);

            if (midia.Count() > 0)
            {
                bool answer = await DisplayAlert("", "Deseja remover a imagem da galeria?", "Sim", "Não");

                if (answer)
                {
                    for (int i = 0; i <= midia.Count; i++)
                    {
                        if (i == posicaoimagem)
                        {
                            ExcluirImagemAsyncLocal(midia[i].caminho);
                            quantidadeImagem--;
                            await DisplayAlert("", "Operação efetuada com sucesso.", "Ok");

                            BindingContext = cv = new CarouselViewModel(idquestao);
                        }
                    }
                }
            }
        }
Ejemplo n.º 15
0
 void Handle_PositionSelected(object sender, CarouselView.FormsPlugin.Abstractions.PositionSelectedEventArgs e)
 {
     Debug.WriteLine("Position " + e.NewValue + " selected.");
 }
Ejemplo n.º 16
0
 void OnCarouselPositionChanged(object sender, CarouselView.FormsPlugin.Abstractions.PositionSelectedEventArgs e)
 {
     gameSize = carouselSlides[e.NewValue].Value;
 }
Ejemplo n.º 17
0
 private void carousel_PositionSelected(object sender, CarouselView.FormsPlugin.Abstractions.PositionSelectedEventArgs e)
 {
     NavigateMarker(e.NewValue);
 }
Ejemplo n.º 18
0
 void Handle_PositionSelected(object sender, CarouselView.FormsPlugin.Abstractions.PositionSelectedEventArgs e)
 {
     //
 }
Ejemplo n.º 19
0
 void Handle_PositionSelected(object sender, CarouselView.FormsPlugin.Abstractions.PositionSelectedEventArgs e)
 {
     btnNavigation.Text = e.NewValue == 3 ? "Got It." : "Next >";
 }
 private void OnCarouselPositionSelected(object sender, CarouselView.FormsPlugin.Abstractions.PositionSelectedEventArgs e)
 {
     current        = e.NewValue;
     img.IsEnabled  = true;
     img1.IsEnabled = true;
 }
Ejemplo n.º 21
0
 private void TabbedCarousel_PositionSelected(object sender, CarouselView.FormsPlugin.Abstractions.PositionSelectedEventArgs e)
 {
     System.Diagnostics.Debug.WriteLine($"Position Selected : {e.NewValue}");
     setSelectedPosition(e.NewValue);
 }