void Control_StopTrackingTouch(object sender, SeekBar.StopTrackingTouchEventArgs e)
        {
            var slider = (CustomSlider)Element;

            slider.Value = Control.Progress + slider.Minimum;
            slider.OnStoppedDragging();
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Ons the playback slider touch up.
        /// </summary>
        /// <param name="sender">Sender.</param>
        /// <param name="e">E.</param>
        private void OnPlaybackSliderTouchUp(object sender, SeekBar.StopTrackingTouchEventArgs e)
        {
            float progress = (float)(((SeekBar)sender).Progress) / 1000;

            // PlaybackSlider側にイベント通知
            _slider.TouchUpEvent(progress, e);
        }
Ejemplo n.º 3
0
        private void OnProgressChanged(object sender, SeekBar.StopTrackingTouchEventArgs e)
        {
            if (e?.SeekBar == null)
            {
                return;
            }

            Progress = e.SeekBar.Progress;
        }
        private void StopTrackingTouch(object sender, SeekBar.StopTrackingTouchEventArgs e)
        {
            if (_command == null || !_command.CanExecute(null))
            {
                return;
            }

            _command.Execute(SeekBar.Progress);
        }
Ejemplo n.º 5
0
        private void SeekBarTiempo_StopTrackingTouch(object sender, SeekBar.StopTrackingTouchEventArgs e)
        {
            ActualizadorCorriendo = true;
            var seekBarTiempo = View.FindViewById <SeekBar>(Resource.Id.seekBarTiempo);
            var longitud      = Reproductor.Duration;
            var miliSegundos  = (longitud * seekBarTiempo.Progress) / VALOR_MAXIMO_SLIDER_TIEMPO;

            Reproductor.SeekTo(miliSegundos);
            CancionCorriendo = true;
        }
Ejemplo n.º 6
0
        void OnSeekBarStopTrackingTouch(object sender, SeekBar.StopTrackingTouchEventArgs e)
        {
            var seekBar   = (SeekBar)sender;
            var toValue   = seekBar.Progress;
            var fromValue = this._seekBar2.Progress;

            var objAnim = ObjectAnimator.OfInt(this._seekBar2, "Progress", fromValue, toValue);

            objAnim.SetDuration(1000);
            objAnim.Start();
        }
Ejemplo n.º 7
0
 private void LED2SeekBar_StopTrackingTouch(object sender, SeekBar.StopTrackingTouchEventArgs e)
 {
     if (Send(LED.LED2, LED2SeekBar.Progress.ToString()) == true)
     {
         Toast.MakeText(this, "已调整到亮度" + LED2SeekBar.Progress.ToString(), ToastLength.Long).Show();
     }
     else
     {
         Toast.MakeText(this, "发送失败", ToastLength.Long).Show();
     }
 }
Ejemplo n.º 8
0
 private void SeekBarTimerNotifications_StopTrackingTouch(object sender, SeekBar.StopTrackingTouchEventArgs e)
 {
     timerNotifications = e.SeekBar.Progress;
     using (ISharedPreferences prefs = PreferenceManager.GetDefaultSharedPreferences(ApplicationContext))
     {
         using (ISharedPreferencesEditor editor = prefs.Edit())
         {
             editor.PutInt("TimerNotifications", timerNotifications);
             editor.Apply();
         }
     }
 }
Ejemplo n.º 9
0
        private void BlurImageHandler(object sender, SeekBar.StopTrackingTouchEventArgs e)
        {
            int radius = e.SeekBar.Progress;

            if (radius == 0)
            {
                // We don't want to blur, so just load the un-altered image.
                _imageView.SetImageResource(Resource.Drawable.dog_and_monkeys);
            }
            else
            {
                DisplayBlurredImage(radius);
            }
        }
Ejemplo n.º 10
0
        private void SkbSeekSongTime_StopTrackingTouch(object sender, SeekBar.StopTrackingTouchEventArgs e)
        {
            //When user stop dragging then seek to the position previously saved in ProgressChangedEvent
            Jukebox.SeekTo(e.SeekBar.Progress * 1000);

            if (Build.VERSION.SdkInt > BuildVersionCodes.LollipopMr1)
            {
                skbSeekSongTime.SetProgress(e.SeekBar.Progress, true);
            }
            else
            {
                skbSeekSongTime.Progress = e.SeekBar.Progress;
            }
        }
Ejemplo n.º 11
0
        private async void TimeShiftSeekbar_StopTrackingTouch(object sender, SeekBar.StopTrackingTouchEventArgs e)
        {
            switch (e.SeekBar.Progress)
            {
            case 3:     //-10 Seconds
                await Client.SetRelativePosition(-10);

                break;

            case 2:     //-30 Seconds
                await Client.SetRelativePosition(-30);

                break;

            case 1:     //-1:00 Seconds
                await Client.SetRelativePosition(-60);

                break;

            case 0:     //-1:30 Seconds
                await Client.SetRelativePosition(-90);

                break;

            case 5:     //+10 Seconds
                await Client.SetRelativePosition(10);

                break;

            case 6:     //+30 Seconds
                await Client.SetRelativePosition(30);

                break;

            case 7:     //+1:00 Seconds
                await Client.SetRelativePosition(60);

                break;

            case 8:     //+1:30 Seconds
                await Client.SetRelativePosition(90);

                break;
            }

            RunOnUiThread(() => TimeShiftSeekbar.SetProgress(4, true));
        }
Ejemplo n.º 12
0
 private void SeekBarFontSize_StopTrackingTouch(object sender, SeekBar.StopTrackingTouchEventArgs e)
 {
     fontSize = e.SeekBar.Progress;
     if (fontSize < 10)
     {
         fontSize           = 10;
         e.SeekBar.Progress = 10;
     }
     using (ISharedPreferences prefs = PreferenceManager.GetDefaultSharedPreferences(ApplicationContext))
     {
         using (ISharedPreferencesEditor editor = prefs.Edit())
         {
             editor.PutInt("FontSize", fontSize);
             editor.Apply();
         }
     }
     SetFontSize();
 }
Ejemplo n.º 13
0
        private void Opacity_StopTrackingTouch(object sender, SeekBar.StopTrackingTouchEventArgs e)
        {
            wallpaperPreview.Background.Alpha = e.SeekBar.Progress;

            if (currentSpinnerOptionSelected == DefaultWallpaperConfig)
            {
                configurationManager.SaveAValue(ConfigurationParameters.OpacityLevel, e.SeekBar.Progress);
                defaultOpacityLevel = e.SeekBar.Progress;
            }
            else if (currentSpinnerOptionSelected == AlbumArtConfig)
            {
                configurationManager.SaveAValue(ConfigurationParameters.AlbumArtOpacityLevel, e.SeekBar.Progress);
                albumArtOpacityLevel = e.SeekBar.Progress;
            }
            else if (currentSpinnerOptionSelected == CustomWallpaperConfig)
            {
                configurationManager.SaveAValue(ConfigurationParameters.OpacityLevel, e.SeekBar.Progress);
                defaultOpacityLevel = e.SeekBar.Progress;
            }
        }
Ejemplo n.º 14
0
        private void Blur_StopTrackingTouch(object sender, SeekBar.StopTrackingTouchEventArgs e)
        {
            Drawable drawable = null;

            wallpaperManager.ForgetLoadedWallpaper();
            ThreadPool.QueueUserWorkItem(m =>
            {
                using (var backgroundcopy = (BitmapDrawable)wallpaperManager.Drawable)
                {
                    BlurImage blurImage = new BlurImage(Application.Context);
                    blurImage.Load(backgroundcopy.Bitmap).Intensity(e.SeekBar.Progress).Async(true);
                    drawable = new BitmapDrawable(Resources, blurImage.GetImageBlur());
                    RunOnUiThread(() =>
                    {
                        var previousAlpha                 = wallpaperPreview.Background.Alpha;
                        wallpaperPreview.Background       = drawable;
                        wallpaperPreview.Background.Alpha = previousAlpha;
                    });
                }
            });
            configurationManager.SaveAValue(ConfigurationParameters.BlurLevel, e.SeekBar.Progress);
            GC.Collect(0);
        }
Ejemplo n.º 15
0
 private void SkbSeekSongTime_StopTrackingTouch(object sender, SeekBar.StopTrackingTouchEventArgs e)
 {
     //When user stop dragging then seek to the position previously saved in ProgressChangedEvent
     Jukebox.SeekTo(e.SeekBar.Progress);
     skbSeekSongTime.SetProgress(e.SeekBar.Progress, true);
 }
Ejemplo n.º 16
0
 private void SeekBar_StopTrackingTouch(object sender, SeekBar.StopTrackingTouchEventArgs e)
 {
     currentPage = e.SeekBar.Progress;
     ExecListingsSearch();
 }
Ejemplo n.º 17
0
 private void CustomSeekBar_StopTrackingTouch(object sender, SeekBar.StopTrackingTouchEventArgs e)
 {
     CrossMediaManager.Current.SeekTo(TimeSpan.FromSeconds(e.SeekBar.Progress));
     CrossMediaManager.Current.PositionChanged += Current_PositionChanged;
 }
Ejemplo n.º 18
0
        private void Blur_StopTrackingTouch(object sender, SeekBar.StopTrackingTouchEventArgs e)
        {
            if (e.SeekBar.Progress == 0)
            {
                return;
            }

            Drawable drawable = null;

            if (currentSpinnerOptionSelected == WallpaperConfig)
            {
                Bitmap wallpaper = null;
                switch (configurationManager.RetrieveAValue(ConfigurationParameters.ChangeWallpaper, "0"))
                {
                case "1":     //Default Wallpaper (system)
                    wallpaperManager.ForgetLoadedWallpaper();
                    wallpaper = ((BitmapDrawable)wallpaperManager.Drawable).Bitmap;
                    break;

                case "2":     //User picked a custom wallpaper.
                    var imagePath = configurationManager.RetrieveAValue(ConfigurationParameters.ImagePath, "");
                    wallpaper = BitmapFactory.DecodeFile(configurationManager.RetrieveAValue(ConfigurationParameters.ImagePath, imagePath));
                    break;
                }
                ThreadPool.QueueUserWorkItem(m =>
                {
                    using (wallpaper)
                    {
                        BlurImage blurImage = new BlurImage(Application.Context);
                        blurImage.Load(wallpaper).Intensity(e.SeekBar.Progress);
                        drawable = new BitmapDrawable(Resources, blurImage.GetImageBlur());
                        RunOnUiThread(() =>
                        {
                            var previousAlpha                 = wallpaperPreview.Background.Alpha;
                            wallpaperPreview.Background       = drawable;
                            wallpaperPreview.Background.Alpha = previousAlpha;
                        });
                    }
                });
                configurationManager.SaveAValue(ConfigurationParameters.BlurLevel, e.SeekBar.Progress);
                defaultBlurLevel = e.SeekBar.Progress;
            }
            else if (currentSpinnerOptionSelected == AlbumArtConfig)
            {
                ThreadPool.QueueUserWorkItem(m =>
                {
                    using (var albumart = BitmapFactory.DecodeResource(Resources, Resource.Drawable.album_artwork))
                    {
                        //Bitmap bitmap = Bitmap.CreateBitmap(albumart);
                        BlurImage blurImage = new BlurImage(Application.Context);
                        blurImage.Load(albumart).Intensity(e.SeekBar.Progress);
                        drawable = new BitmapDrawable(Resources, blurImage.GetImageBlur());
                        RunOnUiThread(() =>
                        {
                            var previousAlpha                 = wallpaperPreview.Background.Alpha;
                            wallpaperPreview.Background       = drawable;
                            wallpaperPreview.Background.Alpha = previousAlpha;
                        });
                    }
                });

                configurationManager.SaveAValue(ConfigurationParameters.AlbumArtBlurLevel, e.SeekBar.Progress);
                albumArtBlurLevel = e.SeekBar.Progress;
            }
        }
        private async void PositionStopTrackingTouch(object sender, SeekBar.StopTrackingTouchEventArgs e)
        {
            await ExecuteCommandAsync(Command.Position, Position.Progress);

            IsPositionChanging = false;
        }
        private async void VolumeStopTrackingTouch(object sender, SeekBar.StopTrackingTouchEventArgs e)
        {
            await ExecuteCommandAsync(Command.Volume, Volume.Progress);

            IsVolumeChanging = false;
        }
 void SeekBar_HandleEventHandler(object sender, SeekBar.StopTrackingTouchEventArgs e)
 {
     UpdateRealmObject();
 }
Ejemplo n.º 22
0
        private void SeekBar_StopTrackingTouch(object sender, SeekBar.StopTrackingTouchEventArgs e)
        {
            var duration = musicViev.FindViewById <SeekBar>(Resource.Id.duration);

            MediaPlayer.Media_player.CurrentPosition = duration.Progress;
        }
Ejemplo n.º 23
0
 private void Opacity_StopTrackingTouch(object sender, SeekBar.StopTrackingTouchEventArgs e)
 {
     wallpaperPreview.Background.Alpha = e.SeekBar.Progress;
     configurationManager.SaveAValue(ConfigurationParameters.OpacityLevel, e.SeekBar.Progress);
 }
Ejemplo n.º 24
0
 private async void VolumeSeekbar_StopTrackingTouch(object sender, SeekBar.StopTrackingTouchEventArgs e)
 {
     CanProgressBeSet = true;
     await Client.SetPercentageVolume(VolumeSeekbar.Progress);
 }
Ejemplo n.º 25
0
        private void Blur_StopTrackingTouch(object sender, SeekBar.StopTrackingTouchEventArgs e)
        {
            Drawable drawable = null;

            switch (configurationManager.RetrieveAValue(ConfigurationParameters.ChangeWallpaper, "0"))
            {
            case "1":     //Default Wallpaper
                wallpaperManager.ForgetLoadedWallpaper();
                ThreadPool.QueueUserWorkItem(m =>
                {
                    using (var backgroundcopy = (BitmapDrawable)wallpaperManager.Drawable)
                    {
                        BlurImage blurImage = new BlurImage(Application.Context);
                        blurImage.Load(backgroundcopy.Bitmap).Intensity(e.SeekBar.Progress).Async(true);
                        drawable = new BitmapDrawable(Resources, blurImage.GetImageBlur());
                        RunOnUiThread(() =>
                        {
                            var previousAlpha                 = wallpaperPreview.Background.Alpha;
                            wallpaperPreview.Background       = drawable;
                            wallpaperPreview.Background.Alpha = previousAlpha;
                        });
                    }
                });
                break;

            case "2":
                ThreadPool.QueueUserWorkItem(m =>
                {
                    var imagePath = configurationManager.RetrieveAValue(ConfigurationParameters.ImagePath, "");
                    using (var backgroundcopy = BitmapFactory.DecodeFile(configurationManager.RetrieveAValue(ConfigurationParameters.ImagePath, imagePath)))
                    {
                        BlurImage blurImage = new BlurImage(Application.Context);
                        blurImage.Load(backgroundcopy).Intensity(e.SeekBar.Progress).Async(true);
                        drawable = new BitmapDrawable(Resources, blurImage.GetImageBlur());
                        RunOnUiThread(() =>
                        {
                            var previousAlpha                 = wallpaperPreview.Background.Alpha;
                            wallpaperPreview.Background       = drawable;
                            wallpaperPreview.Background.Alpha = previousAlpha;
                        });
                    }
                });
                break;
            }

            if (currentSpinnerOptionSelected == DefaultWallpaperConfig)
            {
                configurationManager.SaveAValue(ConfigurationParameters.BlurLevel, e.SeekBar.Progress);
                defaultBlurLevel = e.SeekBar.Progress;
            }
            else if (currentSpinnerOptionSelected == AlbumArtConfig)
            {
                configurationManager.SaveAValue(ConfigurationParameters.AlbumArtBlurLevel, e.SeekBar.Progress);
                albumArtBlurLevel = e.SeekBar.Progress;
            }
            else if (currentSpinnerOptionSelected == CustomWallpaperConfig)
            {
                configurationManager.SaveAValue(ConfigurationParameters.BlurLevel, e.SeekBar.Progress);
                defaultBlurLevel = e.SeekBar.Progress;
            }
            GC.Collect(0);
        }
Ejemplo n.º 26
0
        /// <summary>
        /// User started doing a drag of the slider.
        /// </summary>
        /// <param name="sender">The sender of the event.</param>
        /// <param name="stopTrackingTouchEventArgs">The event parameters.</param>
        private void SeekbarOnStopTrackingTouch(object sender, SeekBar.StopTrackingTouchEventArgs stopTrackingTouchEventArgs)
        {
            double newProgress = stopTrackingTouchEventArgs.SeekBar.Progress * formsSlider.Maximum / 1000;

            formsSlider?.TouchUpEvent?.Invoke(sender, new ValueEventArgs(newProgress));
        }
Ejemplo n.º 27
0
 private void M_seekbarTime_StopTrackingTouch(object sender, SeekBar.StopTrackingTouchEventArgs e)
 {
     MobileCenter_Helper.TrackEvent(new FileAccessManager(), GetType().Name, MethodBase.GetCurrentMethod().Name + ", " + e.SeekBar.Progress);
 }