public static void InitialiseCount(LeapInterface leap, GestureSpace space, StartMenu menu)
    {
        // Create gesture detector
        CountDetector count = new CountDetector(leap, space);

        // Register regions of interest
        ActivityROIs.ConnectROIs(count);
        count.RegisterObserver(menu);
    }
    static void Main(string[] args)
    {
        StartMenu menu = new StartMenu();
        LeapInterface leap = new LeapInterface();
        GestureSpace space = new GestureSpace();

        InitialiseCount(leap, space, menu);

        Console.ReadLine();

        leap.Stop();
        leap.Destroy();
    }
        public void WindowLoaded(object sender, RoutedEventArgs e)
        {
            ActiveControl = startScreen;
            LeapInterface leap = new LeapInterface();
            GestureSpace space = new GestureSpace();

            Program.InitialiseCount(leap, space, startScreen);
            //System.Threading.Thread.Sleep(1000);

            Console.ReadLine();

            //leap.Stop();
            //leap.Destroy();
        }