Beispiel #1
0
        private void InitializeCameraSelectionData()
        {
            HideGigEInformation();
            m_busMgr          = new ManagedBusManager();
            m_cameraInfoPanel = new CameraInformationDisplayPanel();
            m_cameraInfoDisplayPanel.Controls.Add(m_cameraInfoPanel);
            m_GigEEnumerationIsDisabled = EnumerationController.IsEnumerationDisabled(InterfaceType.GigE);
            m_gigEInfoPanel             = new GigEInformationDisplayPanel();
            m_gigeInfoDisplayPanel.Controls.Add(m_gigEInfoPanel);

            m_activeDialogs = new Dictionary <uint, DialogHolder>();

            m_timer          = new System.Windows.Forms.Timer();
            m_timer.Interval = 2000;
            m_timer.Tick    += new EventHandler(m_timer_Tick);

            try
            {
                m_busResetHandle = m_busMgr.RegisterCallback(OnBusReset, ManagedCallbackType.BusReset, IntPtr.Zero);
            }
            catch (FC2Exception ex)
            {
                BasePage.ShowErrorMessageDialog("Error registering bus reset callback.", ex);
                ex.Dispose();
            }

            m_isLadybugGUI = LadybugChecker.IsLadybugDLLPresent();
            if (m_isLadybugGUI == true)
            {
                this.Text = "Ladybug Camera Selection";
            }
            else
            {
                FC2Version version = ManagedUtilities.libraryVersion;
                this.Text = string.Format(
                    "FlyCapture2 Camera Selection {0}.{1}.{2}.{3}",
                    version.major,
                    version.minor,
                    version.type,
                    version.build);
            }
        }
Beispiel #2
0
        private void InitializeBasicInformation()
        {
            m_cameraInformationTable = new CameraInformationDisplayPanel();
            m_cameraInformationTable.SetCopyButtonVisible(true);
            m_cameraInformationTable.OnCopyClick += new EventHandler(OnCopyButtonClick);
            m_cameraInformationTable.Dock         = DockStyle.Fill;
            m_basicInfoPanel.Controls.Add(m_cameraInformationTable);

            m_gigEInformationTable      = new GigEInformationDisplayPanel();
            m_gigEInformationTable.Dock = DockStyle.Fill;
            m_gigEInfoPanel.Controls.Add(m_gigEInformationTable);

            if (m_camera == null || m_camera.IsConnected() == false)
            {
                return;
            }

            m_cameraInformationTable.Camera = m_camera;
            m_cameraInformationTable.UpdateCameraInformation(m_camInfo);
            m_basicInfoPanel.Height = m_cameraInformationTable.MinimumSize.Height;
            if (m_camInfo.interfaceType != InterfaceType.GigE)
            {
                m_gigeLabel.Hide();
                m_gigEInformationTable.Hide();
                m_mainTableLayoutPanel.Controls.Remove(m_gigEInfoPanel);
                m_mainTableLayoutPanel.SetColumnSpan(m_basicInfoPanel, 2);
            }
            else
            {
                m_gigEInformationTable.Camera = m_camera;
                m_gigEInformationTable.UpdateGigECameraInformation(m_camInfo);
                m_gigEInfoPanel.Height = m_gigEInformationTable.MinimumSize.Height;
                m_gigeLabel.Show();
                m_gigEInformationTable.Show();
            }
        }