示例#1
0
        public override void UpdatePercent(int percent, ScanData data)
        {
            base.UpdatePercent(percent, data);
            IScene3DViewer viewer = Settings.Get <IScene3DViewer>();

            if (viewer != null)
            {
                Control ctl = viewer as Control;
                if (ctl == null || !ctl.InvokeRequired)
                {
                    viewer.Scene.Clear();
                    if (data != null)
                    {
                        viewer.Scene.Add(data);
                    }
                    viewer.Invalidate();
                }
                else
                {
                    ctl.BeginInvoke(new Action(() =>
                    {
                        viewer.Scene.Clear();
                        if (data != null)
                        {
                            viewer.Scene.Add(data);
                        }
                        viewer.Invalidate();
                    }));
                }
            }
        }
示例#2
0
        void SetRunButtonState(bool start)
        {
            Image img = global::Sardauscan.Properties.Resources.Play;

            if (!start)
            {
                img = global::Sardauscan.Properties.Resources.Stop;
            }
            this.DeleteBox.Enabled = start;
            ListDragTarget.Lock    = !start;
            ListDragSource.Lock    = !start;
            this.RunButton.Image   = img;
            ViewControler controler = Settings.Get <ViewControler>();

            if (controler != null)
            {
                controler.Lock = !start;
            }
            this.Refresh();

            if (start)
            {
                IScene3DViewer viewer = Settings.Get <IScene3DViewer>();
                if (viewer != null)
                {
                    viewer.Invalidate();
                }
            }
        }
示例#3
0
        private void button1_Click(object sender, EventArgs e)
        {
            IScene3DViewer viewer = Settings.Get <IScene3DViewer>();

            if (viewer != null)
            {
                ScanData points = OpenColoreddPointArray(viewer);
                if (points != null)
                {
                    //viewer.Scene = Scene3D.MeshFromScan(points, this.object3DView1.Invalidate); ;
                    viewer.Invalidate();
                }
            }
        }
示例#4
0
        protected void UpdateViewer(ScanData points)
        {
            IScene3DViewer viewer = Settings.Get <IScene3DViewer>();

            if (viewer != null)
            {
                viewer.Scene.Clear();
                if (points != null)
                {
                    viewer.Scene.Add(points);
                }
                viewer.Invalidate();
            }
        }
示例#5
0
        public ScanData OpenColoreddPointArray(IScene3DViewer viewer)
        {
            if (this.OpenPointsDlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                string   path   = Path.Combine(Program.UserDataPath, this.OpenPointsDlg.FileName);
                ScanData points = ScanDataIO.Read(path);

                if (viewer != null)
                {
                    viewer.Scene.Clear();
                    viewer.Scene.Add(points);
                    viewer.Invalidate();
                }
                return(points);
            }
            return(null);
        }
示例#6
0
        public ScanData OpenColoreddPointArray(IScene3DViewer viewer)
        {
            if (this.OpenPointsDlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
							string path = Path.Combine(Program.UserDataPath, this.OpenPointsDlg.FileName);
                ScanData points = ScanDataIO.Read(path);

                if (viewer != null)
                {
                    viewer.Scene.Clear();
                    viewer.Scene.Add(points);
                    viewer.Invalidate();
                }
                return points;
            }
            return null;
        }