Ejemplo n.º 1
0
        public Form1(RS.Session session)
        {
            InitializeComponent();
            pb_Main.Paint += Pb_Main_Paint;

            this.session          = session;
            streams.UpdateStatus += Streams_UpdateStatus;
            streams.RenderFrame  += Streams_RenderFrame;
            ResetStreamTypes();
            PopulateDevice();

            render.SetHWND(pb_Main);
        }
Ejemplo n.º 2
0
        public MainForm(PXCMSession session)
        {
            InitializeComponent();

            this.session = session;
            PopulateDeviceMenu();

            FormClosing      += new FormClosingEventHandler(MainForm_FormClosing);
            MainPanel.Paint  += new PaintEventHandler(Panel_Paint);
            MainPanel.Resize += new EventHandler(Panel_Resize);
            render.SetHWND(MainPanel);

            // Configure the default scanning mode.
            ScanningArea.SelectedIndex = ScanningArea.Items.IndexOf("Object");
        }
Ejemplo n.º 3
0
        public MainForm(PXCMSession session)
        {
            InitializeComponent();

            this.m_session = session;

            streaming.RenderFrame += new EventHandler <RenderFrameEventArgs>(RenderFrameHandler);

            FormClosing += new FormClosingEventHandler(FormClosingHandler);

            picbox_Main.Paint  += new PaintEventHandler(PaintHandler);
            picbox_Main.Resize += new EventHandler(ResizeHandler);

            render.SetHWND(picbox_Main);

            streaming.File = "record.rssdk";
            streaming.MarkAsRecord();

            button_stop.Enabled = false;
        }
Ejemplo n.º 4
0
        /// <summary>
        /// 将流显示在窗口中,显示的流种类与初始化传入种类对应.仅支持单独的PictureBox
        /// </summary>
        /// <param name="pb"></param>
        /// <returns></returns>
        public bool OpenDisplay(System.Windows.Forms.PictureBox pb)
        {
            if (this.m_display)
            {
                System.Windows.Forms.MessageBox.Show("Already Display");
                return(false);
            }

            if (!this.m_display_once)
            {
                this.RenderFrame += new EventHandler <RenderFrameEventArgs>(RenderFrameHandler);
                render.SetHWND(pb);
                pb.Paint  += new System.Windows.Forms.PaintEventHandler(PaintHandler);
                pb.Resize += new EventHandler(ResizeHandler);

                this.m_display_once = true;
            }

            this.m_display = true;
            return(true);
        }
Ejemplo n.º 5
0
        public Form1()
        {
            InitializeComponent();
            rm = new RealsenseManager();
            rm.RGBImageRetreived   += Rm_RGBImageRetreived;
            rm.DepthImageRetreived += Rm_DepthImageRetreived;
            rm.HandDataChanged     += Rm_HandDataChanged;
            rm.DataStreamUpdate    += Rm_DataStreamUpdate;
            rm.ImageCaptured       += Rm_ImageCaptured;

            pb_ImgCam.Paint     += Pb_ImgCam_Paint;
            pb_DepthImage.Paint += Pb_DepthImage_Paint;

            renderRGB   = new D2D1Render();
            renderDepth = new D2D1Render();
            renderRGB.SetHWND(pb_ImgCam);
            renderDepth.SetHWND(pb_DepthImage);
            rm.Init();

            preditionEngine = new MLNetHierarchicalSignPrediciton(MLNetClassifier.LightGBM);
            InitiateDitionary();
        }