static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); using (VisionSensorStore store = GetVisionSensorStore()) { Application.Run(new TelaSensor(store)); } }
public void Initialize(VisionSensorStore visionSensorStore) { store = visionSensorStore; UpdateControls(); CleanUp(); // Display Initial Program List. // Notify ActiveToolChanged event to imageDisplayControl to draw active tool window. }
private static VisionSensorStore GetVisionSensorStore() { VisionSensorStore store = null; try { store = new VisionSensorStore(); } catch (ApplicationException e) { // You may have tried multiple activations. MessageBox.Show(e.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); Environment.Exit(0); } ChooseNicInCaseMultiplyClientNicsAreAvailable(); return(store); }
public TelaSensor(VisionSensorStore store) { InitializeComponent(); telaPrincipal.Initialize(store); }