public Form1() { InitializeComponent(); tabArea = tabControl1.GetTabRect(0); tabTextArea = (RectangleF)tabControl1.GetTabRect(0); logger_ = new Logger(richTextBox, "mvMAQLClient.log", "mvMAQLClient"); Trace.Listeners.Add(logger_); cfg_ = new ConfigHandling(); exc_ = new SpreadsheetHandling(cfg_); if (cfg_.DatabaseProvider() != string.Empty) { if (cfg_.DatabaseProvider() == "oracle") { sqldata_ = new mvOSQLDataHandling(cfg_.DatabaseName(), cfg_.ConnectionString()); } else { throw new SystemException("No valid database provider found in config.xml"); } } else { throw new SystemException("Couldn't determine database provider from config.xml"); } string[] sTypes = cfg_.GetAllTypes(); for (int i = 0; i < sTypes.Length; i++) { comboBoxType.Items.Add(sTypes[i]); } comboBoxType.SelectedIndex = 0; textBoxInsertLicense.Text = @"C:\Users\matrix\halcon\mvBlueGEMINI\old\license_000c8d000cf1.dat"; textBoxMACLicenseFile.Text = "00:0C:8D:00:0C:F1"; }
public MAQLWorker(TextWriterTraceListener logger) { logger_ = logger as Logger; cfg_ = new ConfigHandling(); sqldata_ = new mvOSQLDataHandling(cfg_.DatabaseName(), cfg_.ConnectionString()); LicenseStoreDir = cfg_.LicenseStoreDir(); if (System.Environment.OSVersion.Platform == PlatformID.Unix) { LinuxOS = true; } }