public MainForm() { try { //OpenTK.Toolkit.Init(); InitializeComponent(); AddScannerControl(); } catch (Exception ex) { System.Windows.Forms.MessageBox.Show("Error loading - OpenGL problems? - " + ex.Message); } if (!PointCloudScannerSettings.IsInitializedFromSettings) { PointCloudScannerSettings.InitFromSettings(); } if (!GLSettings.IsInitializedFromSettings) { GLSettings.InitFromSettings(); } this.Height = PointCloudScannerSettings.Height; this.Width = PointCloudScannerSettings.Width; //ScannerUC.ScannerTypeDisplayed = PointCloudScannerSettings.ScannerTypeDefault; }
protected override void OnClosed(EventArgs e) { GLSettings.Height = this.Height; GLSettings.Width = this.Width; GLSettings.SaveSettings(); base.OnClosed(e); }
protected override void OnClosed(EventArgs e) { GlobalVariables.FormFast = null; GLSettings.Height = this.Height; GLSettings.Width = this.Width; GLSettings.SaveSettings(); base.OnClosed(e); }
public OpenTKFormAlternative() { InitializeComponent(); InitComboBox(); if (!GLSettings.IsInitializedFromSettings) { GLSettings.InitFromSettings(); } this.Height = GLSettings.Height; this.Width = GLSettings.Width; }
protected override void OnClosed(EventArgs e) { PointCloudScannerSettings.Height = this.Height; PointCloudScannerSettings.Width = this.Width; PointCloudScannerSettings.SaveSettings(); GLSettings.SaveSettings(); if (scannerUC != null) { scannerUC.StopScanner(); } base.OnClosed(e); }
public ucUI() { Thread.CurrentThread.CurrentUICulture = new CultureInfo(CultureInfo.CurrentCulture.LCID); InitializeComponent(); AddOpenGLControl(); if (!GLSettings.IsInitializedFromSettings) { GLSettings.InitFromSettings(); } this.Height = GLSettings.Height; this.Width = GLSettings.Width; this.Text = "UI"; Timer timer = new System.Windows.Forms.Timer() { Interval = 1000, }; timer.Tick += Tick; timer.Enabled = true; }