Exemplo n.º 1
0
        private void generateImageOnRow(double imageOriginalScale, double imageHeightMargin, System.Int32 startCount,
                                        double imageGap, int zIndex)
        {
            Image temp = generateImageSource(INIT_IMAGE_HEIGHT * imageOriginalScale, INIT_IMAGE_WIDTH * imageOriginalScale);

            Canvas.SetTop(temp, screenHeight - IMAGE_HEIGHT_MARGIN * imageHeightMargin + (double)generateHeightAdjustValue());
            Canvas.SetLeft(temp, ((_windowUI.ImageLayer.Children.Count - startCount)) * imageGap);
            Canvas.SetZIndex(temp, zIndex);
            _windowUI.ImageLayer.Children.Add(temp);
            ImagePlayer ip = new ImagePlayer(_windowUI, "ImageScreenShot", videoName, 0, TotalFrameNum, true, 0.25f, intervalTime, temp);

            ip.Play();
            parentTimer.Dispose();
        }
        public MainWindow()
        {
            InitializeComponent();

            this._DoUsePolling = true;
            if (this._DoUsePolling)
            {
                CompositionTarget.Rendering += CompositionTarget_Rendering;
            }
            else
            {
                KinectSensor.KinectSensors.StatusChanged += KinectSensors_StatusChanged;
                this.KinectDevice = KinectSensor.KinectSensors.FirstOrDefault(x => x.Status == KinectStatus.Connected);
            }
            screenHeight = this.Height;
            screenWidth = this.Width;
            PNGPlayerElement.Height = screenHeight;
            PNGPlayerElement.Width = screenWidth;
            ImagePlayer ip = new ImagePlayer(this, "smoke_0305", "smoke", 0, 100, false, 0, 50, PNGPlayerElement);
            ip.Play();
        }
Exemplo n.º 3
0
        public MainWindow()
        {
            InitializeComponent();

            this._DoUsePolling = true;
            if (this._DoUsePolling)
            {
                CompositionTarget.Rendering += CompositionTarget_Rendering;
            }
            else
            {
                KinectSensor.KinectSensors.StatusChanged += KinectSensors_StatusChanged;
                this.KinectDevice = KinectSensor.KinectSensors.FirstOrDefault(x => x.Status == KinectStatus.Connected);
            }
            screenHeight            = this.Height;
            screenWidth             = this.Width;
            PNGPlayerElement.Height = screenHeight;
            PNGPlayerElement.Width  = screenWidth;
            ImagePlayer ip = new ImagePlayer(this, "smoke_0305", "smoke", 0, 100, false, 0, 50, PNGPlayerElement);

            ip.Play();
        }
Exemplo n.º 4
0
 private void generateImageOnRow(double imageOriginalScale,double imageHeightMargin,System.Int32 startCount,
     double imageGap, int zIndex)
 {
     Image temp = generateImageSource(INIT_IMAGE_HEIGHT * imageOriginalScale, INIT_IMAGE_WIDTH * imageOriginalScale);
     Canvas.SetTop(temp, screenHeight - IMAGE_HEIGHT_MARGIN * imageHeightMargin + (double)generateHeightAdjustValue());
     Canvas.SetLeft(temp, ((_windowUI.ImageLayer.Children.Count - startCount)) * imageGap);
     Canvas.SetZIndex(temp, zIndex);
     _windowUI.ImageLayer.Children.Add(temp);
     ImagePlayer ip = new ImagePlayer(_windowUI, "ImageScreenShot", videoName, 0, TotalFrameNum, true, 0.25f, intervalTime, temp);
     ip.Play();
     parentTimer.Dispose();
 }