//gESTURES
        private void ProcessGesture(Joint head, Joint left, Joint right)
        {

            if (right.Position.Y > head.Position.Y && left.Position.Y > head.Position.Y)
            {
                if (tabPictures.IsSelected)
                {
                    if (fullPic)
                    {
                        fPic.exit();
                        fullPic = false;
                    }
                    else
                    {
                        fPic = new FullscreenPics(currentImg, this, picFiles);
                        fullPic = true;
                        fPic.Show();
                    }
                }
                else if (tabVideos.IsSelected)
                {
                    if (fullVid)
                    {
                        fVid.exit();
                        fullVid = false;
                    }
                    else
                    {
                        setFullVid();
                    }
                }
                checking = false;
                waiting.Interval = TimeSpan.FromMilliseconds(2000);
                waiting.Tick += stop_Waiting;
                waiting.Start();
            }
            else if (right.Position.Y < left.Position.Y && right.Position.X < left.Position.X)
            {
                if (tabPictures.IsSelected)
                {
                    if (picFiles.Length > 0)
                    {
                        if (fullPic == true)
                        {
                            fPic.next();
                        }
                        else
                        {
                            currentImg = currentImg == picFiles.Length - 1 ? 0 : ++currentImg;
                            ShowCurrentImage();
                            ShowNextImage();
                            ShowSecondNextImage();
                            ShowPreviousImage();
                            ShowSecondPreviousImage();
                            
                        }
                    }
                }
                else if (tabVideos.IsSelected)
                {
                    if (vidFiles.Length > 0)
                    {
                        if (fullVid == true)
                        {
                            fVid.next();
                        }
                        else
                        {
                            myMediaElement.Stop();
                            isPlaying = false;

                            currentVid = currentVid == vidFiles.Length - 1 ? 0 : ++currentVid;
                            ShowCurrentVideo();
                        }
                    }
                }


                checking = false;
                waiting.Interval = TimeSpan.FromMilliseconds(1000);
                waiting.Tick += stop_Waiting;
                waiting.Start();

            }
            else if (right.Position.Y > left.Position.Y && right.Position.X < left.Position.X)
            {
                if (tabPictures.IsSelected)
                {
                    if (picFiles.Length > 0)
                    {
                        if (fullPic == true)
                        {
                            fPic.previous();
                        }
                        else
                        {
                            currentImg = currentImg == 0 ? picFiles.Length - 1 : --currentImg;
                            ShowCurrentImage();
                            ShowNextImage();
                            ShowSecondNextImage();
                            ShowPreviousImage();
                            ShowSecondPreviousImage();
                            
                        }
                    }
                }
                else if (tabVideos.IsSelected)
                {
                    if (vidFiles.Length > 0)
                    {
                        if (fullVid == true)
                        {
                            fVid.next();
                        }
                        else
                        {
                            
                            myMediaElement.Stop();
                            isPlaying = false;
                            
                            currentVid = currentVid == 0 ? vidFiles.Length - 1 : --currentVid;
                            ShowCurrentVideo();
                            
                        }
                    }
                }
                checking = false;
                waiting.Interval = TimeSpan.FromMilliseconds(1000);
                waiting.Tick += stop_Waiting;
                waiting.Start();   
            }
    
        }
 private void slideBtn_Click(object sender, RoutedEventArgs e)
 {
     FullscreenPics f = new FullscreenPics(currentImg, this, picFiles);
     f.Show();
     f.slideShow();
 }
 private void fullscrnBtn_Click(object sender, RoutedEventArgs e)
 {
     fPic = new FullscreenPics(currentImg, this, picFiles);
     fullPic = true;
     fPic.Show();
 }
 void pressFullsrnButton(object sender, object e)
 {
     FullscreenPics f = new FullscreenPics(currentImg, this, picFiles);
     f.Show();
     buttonTimer.Stop();
     this.Cursor = System.Windows.Input.Cursors.Hand;
 }
        private void fullscrnBtn_Click(object sender, RoutedEventArgs e)
        {
            FullscreenPics f = new FullscreenPics(currentImg, this);

            f.Show();
        }
        private void vid_Prev_Click(object sender, RoutedEventArgs e)
        {
            myMediaElement.Stop();
            isPlaying = false;
            if (vidFiles.Length > 0)
            {
                currentVid = currentVid == 0 ? vidFiles.Length - 1 : --currentVid;
                ShowCurrentVideo();
            }
            /*
            var source = myMediaElement.Source;

            VideoScreenShot.CaptureScreenAsync(source, new Dictionary<TimeSpan, object> {
                {TimeSpan.FromSeconds(5), "image1"} ,
            }, .1, makeJpeg, makeThumbnails);
             */
            FullscreenPics f = new FullscreenPics(currentImg, this);
            f.Show();
            f.slideShow();
        }
 private void fullscrnBtn_Click(object sender, RoutedEventArgs e)
 {
     FullscreenPics f = new FullscreenPics(currentImg, this);
     f.Show();
 }