private void contextMenuStrip1_Opening(object sender, CancelEventArgs e)
        {
            foreach (var cameraInfoWindow in CameraInfoWindow.AllForms)
            {
                var item1 = new ToolStripMenuItem()
                {
                    Text = cameraInfoWindow.Name,
                };
                item1.Click += (s, args) => {
                    InitialCameraWindow = cameraInfoWindow;
                };

                var item2 = new ToolStripMenuItem()
                {
                    Text = cameraInfoWindow.Name,
                };
                item2.Click += (s, args) => {
                    CalibratedCameraWindow = cameraInfoWindow;
                };
                CameraInfoToolStripMenuItem.DropDownItems.Add(item1);
                calibratedCameraInfoToolStripMenuItem.DropDownItems.Add(item2);
            }

            foreach (var cameraSimulationFrm in CameraSimulationFrm.AllForms)
            {
                var item = new ToolStripMenuItem()
                {
                    Text = cameraSimulationFrm.Name,
                };
                item.Click += (s, args) => {
                    cameraFrm = cameraSimulationFrm;
                };
                cameraSimulationViewToolStripMenuItem.DropDownItems.Add(item);
            }
        }
示例#2
0
        public Form1()
        {
            InitializeComponent();

            ZhangSimulationForm simfrm = new ZhangSimulationForm();

            simfrm.Show(dockPanel1);

            LogForm logform = new LogForm();

            logform.Show(simfrm.Pane, DockAlignment.Bottom, .2);

            CameraInfoWindow cifo = new CameraInfoWindow();

            cifo.Show(simfrm.Pane, DockAlignment.Right, .5);

            CameraSimulationFrm cfrm = new CameraSimulationFrm();

            cfrm.Show(cifo.Pane, DockAlignment.Bottom, .35);


            CameraInfoWindow cifo2 = new CameraInfoWindow();

            cifo2.Show(cifo.Pane, DockAlignment.Right, .5);


            PinholeCamera c = PinholeCamera.getTestCamera();

            cifo.Camera = c;

            simfrm.InitialCameraWindow    = cifo;
            simfrm.CalibratedCameraWindow = cifo2;
            simfrm.cameraFrm = cfrm;


            Log.AddReader(logform);
        }
示例#3
0
        private void cameraSimulationToolStripMenuItem_Click(object sender, EventArgs e)
        {
            CameraSimulationFrm window = new CameraSimulationFrm();

            window.Show(dockPanel1, DockState.Float);
        }