private void WindowLoaded(object sender, RoutedEventArgs e)
        {
            this.Cursor = Cursors.None;

            My_Image        = new Image <Gray, byte>((int)Image.Width, (int)Image.Height, new Gray(0));
            imgBox.Source   = BitmapSourceConvert.ToBitmapSource(My_Image);
            dispatcherTimer = new DispatcherTimer();

            hand       = new Hand(20);
            dabCounter = new DabCounter();

            CreateAnEllipse(mouseEllipse);
            CreateAnEllipse(mouseEllipseSmall);

            mouseEllipse.Height = hand.radiusBig * 2;
            mouseEllipse.Width  = hand.radiusBig * 2;

            mouseEllipseSmall.Height = hand.radiusBig * 2;
            mouseEllipseSmall.Width  = hand.radiusBig * 2;

            SolidColorBrush GreenYellowBrush = new SolidColorBrush();

            GreenYellowBrush.Color = Colors.GreenYellow;
            SolidColorBrush WhiteBrush = new SolidColorBrush();

            WhiteBrush.Color = Colors.White;

            mouseEllipse.StrokeThickness = 1;
            mouseEllipse.Stroke          = WhiteBrush;

            mouseEllipseSmall.Stroke          = GreenYellowBrush;
            mouseEllipseSmall.StrokeThickness = 1;


            SetupDispatcher();
            //dispatcherTimer.Start();
            //mouseEllipse.
            SetupKinectSensor();
            skeletonDraw = new SkeletonDraw(sensor, Image);
        }
        public MainWindow()
        {
            InitializeComponent();
            //Ukrywanie wyświetlania debugowania
            layoutGrid.Visibility = Visibility.Hidden;

            userControls = new List <UserControl>();
            UserControl autobusUC = new UserControlAutobus();

            userControls.Add(autobusUC);
            UserControl dabUC = new UserControlDab();

            userControls.Add(dabUC);


            userControlGrid.Children.Add(userControls[0]);

            hand       = new Hand(20);
            dabCounter = new DabCounter();

            SetupSlideDispatcher();
        }