private void Init() { try { // Create a network monitor and connect to events of the display's InSight mMonitor = new CvsNetworkMonitor(); mMonitor.PingInterval = 0; newDevices = new Dictionary <string, IPAddress>(); station1 = new Dictionary <string, IPAddress>(); dgvNewdevices.SelectionMode = DataGridViewSelectionMode.FullRowSelect; dgvNewdevices.Sort(dgvNewdevices.Columns[0], ListSortDirection.Ascending); dgvNewdevices.MultiSelect = false; dgvSt1.SelectionMode = DataGridViewSelectionMode.FullRowSelect; dgvSt1.Sort(dgvSt1.Columns[0], ListSortDirection.Ascending); dgvSt1.MultiSelect = false; mMonitor.HostsChanged += new EventHandler(mMonitor_HostsChanged); mMonitor.Enabled = true; } catch (Exception) { } }
private void Init() { // Create a network monitor and connect to events of the display's InSight mMonitor = new CvsNetworkMonitor(); mMonitor.PingInterval = 0; // Setup InSightDisplay and InSight object. // 인사이트 디스플레이를 mInsight에 넣어줍니다. mInSight = cvsInSightDisplay2.InSight; cvsInSightDisplay2.ShowGrid = true; cvsInSightDisplay2.ShowGraphics = true; cvsInSightDisplay2.ShowImage = true; cvsInSightDisplay2.ShowScrollBars = true; cvsInSightDisplay2.GridOpacity = 0.7; cvsInSightDisplay2.ImageScale = 1.0; cvsInSightDisplay2.ImageZoomMode = Cognex.InSight.Controls.Display.CvsDisplayZoom.Fit; mMonitor.HostsChanged += new EventHandler(mMonitor_HostsChanged); mMonitor.Enabled = true; cvsInSightDisplay2.InSightChanged += new System.EventHandler(this.cvsInSightDisplay1_InSightChanged); //InSight.ResultsChanged += new EventHandler(senserChangedHandler); }
private void ConnectedCam(DataGridView St1, CvsNetworkMonitor nMonitor) { string[] cCamName = new string[St1.Rows.Count]; for (int i = 0; i < St1.Rows.Count - 1; i++) { cCamName[i] = St1.Rows[i].Cells[0].Value.ToString(); } }
private void Initilize() { mMonitor = new CvsNetworkMonitor(); mMonitor.PingInterval = 0; mMonitor.HostsChanged += new EventHandler(mMonitor_HostsChanged); mMonitor.Enabled = true; cvsInSightDisplay1.InSightChanged += new System.EventHandler(this.cvsInSightDisplay1_InSightChanged); cvsInSightDisplay1.StatusInformationChanged += new System.EventHandler(cvsInSightDisplay1_StatusInformationChanged); mInsightConfigure = new InsightConfigure(this.cvsInSightDisplay1); mInsightConfigure.Hide(); }
private void GetData(DataGridView St1, CvsNetworkMonitor nMonitor) { // 모니터 정보를 넣어 줍니다. mMonitor = nMonitor; // 카메라 정보를 넣어 줍니다. St1Cam = St1; // 카메라 갯수를 넣어 줍니다. cCamCount = St1.Rows.Count - 1; // 카메라 이름의 갯수를 만들어 줍니다. cCamName = new string[cCamCount]; for (int i = 0; i < St1.Rows.Count - 1; i++) { // 카메라 이름을 각각에 맞게 넣어 줍니다. cCamName[i] = St1.Rows[i].Cells[0].Value.ToString(); } }