Inheritance: AutoNotifyPropertyChanged
コード例 #1
0
        public SignWordPage(SystemStatusCollection systemStatusCollection)
        {
            InitializeComponent();
            this.DataContext = systemStatusCollection;

            systemStatusCollection.ColorBitmap = new WriteableBitmap(640, 480, 96.0, 96.0, PixelFormats.Bgr32, null);

            sensor = systemStatusCollection.CurrentKinectSensor;

            _colorPixels = new byte[systemStatusCollection.CurrentKinectSensor.ColorStream.FramePixelDataLength];
            _depthPixels = new DepthImagePixel[this.sensor.DepthStream.FramePixelDataLength];
            capturedSkeletons = new List<Skeleton> {Capacity = 500};
            templateModel = LoadSkeleton("sign.txt");
            systemStatusCollection.CurrentKinectSensor.AllFramesReady += AllFrameReady;

            m_timer = new Timer();
            m_timer.Elapsed += (sender, args) =>
            {
                var timer = sender as Timer;
                if (timer != null) timer.Stop();
                ScoreSign();
            };
            m_timer.Interval = 10000;
            m_timer.Enabled = true;
        }
コード例 #2
0
        public SignWordPage(SystemStatusCollection systemStatusCollection)
        {
            InitializeComponent();
            this.DataContext = systemStatusCollection;

            systemStatusCollection.ColorBitmap = new WriteableBitmap(640, 480, 96.0, 96.0, PixelFormats.Bgr32, null);

            sensor = systemStatusCollection.CurrentKinectSensor;

            _colorPixels      = new byte[systemStatusCollection.CurrentKinectSensor.ColorStream.FramePixelDataLength];
            _depthPixels      = new DepthImagePixel[this.sensor.DepthStream.FramePixelDataLength];
            capturedSkeletons = new List <Skeleton> {
                Capacity = 500
            };
            templateModel = LoadSkeleton("sign.txt");
            systemStatusCollection.CurrentKinectSensor.AllFramesReady += AllFrameReady;

            m_timer          = new Timer();
            m_timer.Elapsed += (sender, args) =>
            {
                var timer = sender as Timer;
                if (timer != null)
                {
                    timer.Stop();
                }
                ScoreSign();
            };
            m_timer.Interval = 10000;
            m_timer.Enabled  = true;
        }
コード例 #3
0
 public HomePage(SystemStatusCollection systemStatusCollection)
 {
     InitializeComponent();
     this.DataContext = systemStatusCollection;
     KinectRegion.AddHandPointerEnterHandler(btnLearn, btnLearn_Enter);
     KinectRegion.AddHandPointerEnterHandler(btnWatchVideo, btnWatchVideo_Enter);
     KinectRegion.AddHandPointerLeaveHandler(btnLearn, btnLearn_Leave);
     KinectRegion.AddHandPointerLeaveHandler(btnWatchVideo, btnWatchVideo_Leave);
 }
コード例 #4
0
 public HomePage(SystemStatusCollection systemStatusCollection)
 {
     InitializeComponent();
     this.DataContext = systemStatusCollection;
     KinectRegion.AddHandPointerEnterHandler(btnLearn, btnLearn_Enter);
     KinectRegion.AddHandPointerEnterHandler(btnWatchVideo, btnWatchVideo_Enter);
     KinectRegion.AddHandPointerLeaveHandler(btnLearn, btnLearn_Leave);
     KinectRegion.AddHandPointerLeaveHandler(btnWatchVideo, btnWatchVideo_Leave);
 }
コード例 #5
0
        public MainWindow()
        {
            InitializeComponent();
            this.DataContext = systemStatusCollection = new SystemStatusCollection();
            this.startPage   = new StartPage(systemStatusCollection);
            this.kinectRegionGrid.Children.Add(this.startPage);

            Loaded += MainWindow_Loaded;
        }
コード例 #6
0
        public MainWindow()
        {
            InitializeComponent();
            this.DataContext = systemStatusCollection = new SystemStatusCollection();
            this.startPage = new StartPage(systemStatusCollection);
            this.kinectRegionGrid.Children.Add(this.startPage);

            Loaded += MainWindow_Loaded;
        }
コード例 #7
0
        public SignBrowserPage(SystemStatusCollection systemStatusCollection)
        {
            InitializeComponent();
            this.DataContext = systemStatusCollection;

            foreach (DataRow row in systemStatusCollection.SignWordTable.Rows) {
                string name = (string)row["Chinese Name"];
                string id = (string)row["Sign ID"];
                panelSignList.Children.Add(createKinectButton(new SignWord(name, id)));
            }
        }
コード例 #8
0
        public SignWordPage(SystemStatusCollection systemStatusCollection)
        {
            InitializeComponent();
            this.DataContext = systemStatusCollection;

            systemStatusCollection.ColorBitmap = new WriteableBitmap(640, 480, 96.0, 96.0, PixelFormats.Bgr32, null);

            systemStatusCollection.CurrentKinectSensor.ColorStream.Enable();
            _colorPixels = new byte[systemStatusCollection.CurrentKinectSensor.ColorStream.FramePixelDataLength];
            systemStatusCollection.CurrentKinectSensor.ColorFrameReady += CurrentKinectSensor_ColorFrameReady;
        }
コード例 #9
0
        public SignBrowserPage(SystemStatusCollection systemStatusCollection)
        {
            InitializeComponent();
            this.DataContext = systemStatusCollection;

            foreach (DataRow row in systemStatusCollection.SignWordTable.Rows)
            {
                string name = (string)row["Chinese Name"];
                string id   = (string)row["Sign ID"];
                panelSignList.Children.Add(createKinectButton(new SignWord(name, id)));
            }
        }
コード例 #10
0
        public StartPage(SystemStatusCollection systemStatusCollection)
        {
            InitializeComponent();
            this.DataContext = systemStatusCollection;

            BitmapImage bi = new BitmapImage();
            bi.BeginInit();
            bi.UriSource = new Uri("Data/Images/back01.png", UriKind.Relative);
            bi.EndInit();

            ImageBrush b = new ImageBrush(bi);
            b.AlignmentY = 0;
            b.Stretch = Stretch.Fill;
            btnStart.Background = b;
        }
コード例 #11
0
        public StartPage(SystemStatusCollection systemStatusCollection)
        {
            InitializeComponent();
            this.DataContext = systemStatusCollection;

            BitmapImage bi = new BitmapImage();

            bi.BeginInit();
            bi.UriSource = new Uri("Data/Images/back01.png", UriKind.Relative);
            bi.EndInit();

            ImageBrush b = new ImageBrush(bi);

            b.AlignmentY        = 0;
            b.Stretch           = Stretch.Fill;
            btnStart.Background = b;
        }