Esempio n. 1
0
        public FormCaptureSetupHight(CaptureBase capture, TriggerBase trigger)
        {
            InitializeComponent();
            this.userControlMutiDicomImages.SignImg = TIcon.Change4dDisplay;
            TCursor.LoadAllCursors(System.Windows.Forms.Application.StartupPath);

            ImgCapture = capture;
            Trigger    = trigger;
            ImgCapture.RefreshHostHandle(this.Handle);

            this.Shown -= new EventHandler(FormCapture_Shown);
            this.Shown += new EventHandler(FormCapture_Shown);

            bool showBeamButton = CapturePub.readCaptrueValue("ShowBeamButton", false) == "T";


            bool showCaptureButton = CapturePub.readCaptrueValue("HaveImagePanel") == "T";

            showCaptureButton = showCaptureButton || (CapturePub.readCaptrueValue("SimImagePanel") == "T");
            //btnCapture.Visible = showCaptureButton;
            //btnOverlay.Visible = showCaptureButton;
            GraphicButton.ShowButtonToolTip           -= new GraphicButton.ShowButtonTooltip(GraphicButton_ShowButtonToolTip);
            GraphicButton.ShowButtonToolTip           += new GraphicButton.ShowButtonTooltip(GraphicButton_ShowButtonToolTip);
            GraphicButton.LeaveButton                 -= new GraphicButton.ShowButtonTooltip(GraphicButton_LeaveButton);
            GraphicButton.LeaveButton                 += new GraphicButton.ShowButtonTooltip(GraphicButton_LeaveButton);
            userControlMutiDicomImages.MayCancelSelect = true;
        }
Esempio n. 2
0
        public static CaptureBase GetCapture()
        {
            string linkPanelStr = CapturePub.readCaptrueValue(XmlField.LinkPanel, false);
            bool   linkPanel    = linkPanelStr.ToUpper() != "F";

            CaptureBase capture = null;

            if (linkPanel)
            {
                //string panelBrandName = CapturePub.readCaptrueValue(XmlField.PanelBrandName, false);
                //if (panelBrandName.ToUpper() == "CareRay".ToUpper())
                //{
                //    capture = new CaptureCareRay();
                //}
                //else
                //{
                capture = new Capture1800I_096();
                //}
            }
            else
            {
                //capture = new CaptureSim();
                //capture.InitParam();
            }
            return(capture);
        }
Esempio n. 3
0
        public FormGainSeqCapture(CaptureBase capture)
        {
            InitializeComponent();
            this.userControlMutiDicomImages.SignImg = TIcon.Change4dDisplay;
            imgShow.Dock = DockStyle.Fill;
            this.panelMain.Controls.Add(imgShow);
            try
            {
                string s = CapturePub.readCaptrueValue("FORM_SIZE", false);
                if (s != "")
                {
                    string[] s_ = s.Split(',');
                    this.Size = new Size(int.Parse(s_[0]), int.Parse(s_[1]));
                }
            }
            catch
            { }

            ImgCapture = capture;
            Trigger    = capture.GetTrigger();
            ImgCapture.RefreshHostHandle(this.Handle);

            int size = pictureBox1.Size.Height;

            linkImage = new Bitmap(size, size);
            grayImage = new Bitmap(size, size);
            Graphics g     = Graphics.FromImage(linkImage);
            int      radis = (int)((size - 2) / 2.0F);

            g.DrawEllipse(Pens.LightSteelBlue, new Rectangle(size / 2 - radis, size / 2 - radis, radis * 2, radis * 2));
            g.FillEllipse(Brushes.Green, new Rectangle(size / 2 - radis, size / 2 - radis, radis * 2, radis * 2));
            g = Graphics.FromImage(grayImage);
            //g.Clear(Color.Black);
            g.DrawEllipse(Pens.LightSteelBlue, new Rectangle(size / 2 - radis, size / 2 - radis, radis * 2, radis * 2));
            g.FillEllipse(Brushes.Gray, new Rectangle(size / 2 - radis, size / 2 - radis, radis * 2, radis * 2));

            timerStatus.Interval = 500;
            timerStatus.Elapsed -= new System.Timers.ElapsedEventHandler(timerStatus_Elapsed);
            timerStatus.Elapsed += new System.Timers.ElapsedEventHandler(timerStatus_Elapsed);
            timerStatus.Start();


            this.Shown -= new EventHandler(FormCapture_Shown);
            this.Shown += new EventHandler(FormCapture_Shown);
            GraphicButton.ShowButtonToolTip           -= new GraphicButton.ShowButtonTooltip(GraphicButton_ShowButtonToolTip);
            GraphicButton.ShowButtonToolTip           += new GraphicButton.ShowButtonTooltip(GraphicButton_ShowButtonToolTip);
            GraphicButton.LeaveButton                 -= new GraphicButton.ShowButtonTooltip(GraphicButton_LeaveButton);
            GraphicButton.LeaveButton                 += new GraphicButton.ShowButtonTooltip(GraphicButton_LeaveButton);
            userControlMutiDicomImages.MayCancelSelect = true;
        }
Esempio n. 4
0
        public TestCapture()
        {
            InitializeComponent();
            panelMain.Controls.Add(imgShow);
            imgShow.Dock = DockStyle.Fill;

            ImgCapture = CaptureBase.GetCapture();
            ImgCapture.RefreshHostHandle(this.Handle);
            ImgCapture.SetTrigger();
            ImgCapture.AsyncInitLink();

            PanelStatusThread      = new Thread(new ThreadStart(PanelStatusThreadFun));
            PanelStatusThread.Name = "PanelStatusThread";
            PanelStatusThread.Start();

            ImageProcessThread      = new Thread(new ThreadStart(ImageProcessThreadFun));
            ImageProcessThread.Name = "Process image refresh";
            ImageProcessThread.Start();

            this.Shown -= new EventHandler(FormCapture_Shown);
            this.Shown += new EventHandler(FormCapture_Shown);
        }