private void Validate_Click(object sender, RoutedEventArgs e) { int ret = 0; try { ret = ETDevice.iV_Validate(); if (ret == 1) { logger4.Text = "iV_Validate: calibration started successfully"; } if (ret != 1) { logger4.Text = "iV_Validate failed: " + ret; } if (ret == 1) { // own validation visualization, with callbacks m_CalibrationWindow.WindowStyle = WindowStyle.None; switch (comboBox2.Text) { default: case "Primary Device": // validate on primary window m_CalibrationWindow.Left = 0; m_CalibrationWindow.Top = 0; m_CalibrationWindow.Width = System.Windows.SystemParameters.PrimaryScreenWidth; m_CalibrationWindow.Height = System.Windows.SystemParameters.PrimaryScreenHeight; break; case "Secondary Device": // validate on secondary window // change the following settings to your setup and resolution m_CalibrationWindow.Left = System.Windows.SystemParameters.PrimaryScreenWidth; m_CalibrationWindow.Top = 0; m_CalibrationWindow.Width = 1680; m_CalibrationWindow.Height = 1050; break; } m_CalibrationWindow.ShowDialog(); } } catch (System.Exception exc) { logger3.Text = "Validation Exception: " + exc.Message; } }
private void validate_Click(object sender, EventArgs e) { int ret = 0; try { ret = ETDevice.iV_Validate(); if (ret == 1) { logger.Text = "iV_Validate: validation finished successfully"; } if (ret != 1) { logger.Text = "iV_Validate: failed to validate: " + ret; } } catch (System.Exception exc) { logger.Text = "iV_Validate Exception: " + exc.Message; } }