Exemplo n.º 1
0
        //public VideoSourcePlayer VideoPlayer
        //{
        //    get
        //    {
        //        return this.videoSourcePlayerDepth;
        //    }
        //    set
        //    {
        //        this.videoSourcePlayerDepth = value;
        //    }
        //}


        private bool SaveBitmaps()
        {
            //prepareSave = true;
            colorPendingForSave = depthPendingForSave = true;
            System.Threading.Thread.Sleep(100);
            for (int i = 0; i < 100; i++)
            {
                if (this.colorPendingForSave || depthPendingForSave)
                {
                    System.Threading.Thread.Sleep(100);
                }
                else
                {
                    try
                    {
                        StopScanner();
                        this.bitmapColorForSave.SaveImage(PathModels, ImageExtensions.DateTimeString() + "Color_" + this.ScannerID.ToString() + "_", false);

                        //this.bitmapDepthTest.SaveImage(pathModels, "DepthTest_", true);
                        this.bitmapDepthSave.SaveImage(PathModels, ImageExtensions.DateTimeString() + "Depth_" + this.ScannerID.ToString() + "_", false);
                        this.bitmapIRSave.SaveImage(PathModels, ImageExtensions.DateTimeString() + "IR_" + this.ScannerID.ToString() + "_", false);
                        //this.bitmapIRTest.SaveImage(pathModels, "IR_test_" , true);
                        return(true);
                    }
                    catch (Exception err)
                    {
                        System.Windows.Forms.MessageBox.Show("Error saving bitmaps " + err.Message);
                        return(false);
                    }
                }
            }
            return(false);
        }