public TestWindow()
 {
     InitializeComponent();
     WindowStartupLocation = WindowStartupLocation.CenterScreen;
     WindowState = WindowState.Maximized;
     WindowStyle = WindowStyle.None;
     db = new DbFileManager();
     Product p = new Product(db.musics[0]);
     DemoRelateds a = new DemoRelateds(GetRelateds(p));
     this.contentControl.Content = a;
 }
Ejemplo n.º 2
0
        public Demo()
        {
            InitializeComponent();

            // variable initialization
            isPointed = false;
            checkedButton = false;
            paused = false;
            counterFrames = 0;
            counterFramesBody = 0;
            mainHandId = 0;
            PointerMovedAssigned = false;
            MediaEndedAssigned = false;

            relatedBackup = null;

            // object initialization
            IdleAnimateFirstHand();
            kc = new KinectController();
            hue = new HueController("192.168.0.2");
            hue.Connect();
            hue.isBright = true;
            kc.bodyReader.FrameArrived += HandleFrame;

            idle = new DemoIdle();
            this.contentControl.Content = idle;
            KinectRegion.SetKinectRegion(this, kinectRegion);

            App app = ((App)Application.Current);
            app.KinectRegion = kinectRegion;

            windowProducts = new SortedList<int, Model.Product>();
            db = new DbFileManager();

            state = 1;

            playimage = new BitmapImage(new Uri("Images\\play.png", UriKind.Relative));
            pauseimage = new BitmapImage(new Uri("Images\\pause.png", UriKind.Relative));

            InitProducts();

            idle.label.Opacity = 0;

            kWin = KinectCoreWindow.GetForCurrentThread();
            if (!PointerMovedAssigned)
            {
                kWin.PointerMoved += KWin_PointerMoved;
                kWin.PointerExited += KWin_PointerExited;
                kWin.PointerEntered += KWin_PointerEntered;
                PointerMovedAssigned = true;
            }

            /*
            this.MouseMove += Demo_MouseMove;

            currentProduct = 1;
            StartTrailer(windowProducts[currentProduct].GetTrailer());
            isPointed = true;*/
        }
 public DatabaseWindow()
 {
     InitializeComponent();
     db = new DbFileManager();
 }