static void Main() { BrewingProcessHandler brewingProcessHandler = BrewingProcessHandler.GetInstance(); //brewingProcessHandler.StartNewBrew("09/09/2018", "Maltina", "258"); //ApplicationSettings appsettings = new ApplicationSettings(); MyAppSettings appSettings = MyAppSettings.GetInstance(); //string connectionString = appsettings.ConnectionString; //string templateFilePath = appsettings.TemplateFilePath; string connectionString = appSettings.ConnectionString; string periodTemplateFilePath = appSettings.PeriodTemplateFilePath; //string templateFilePath = $"{AppDomain.CurrentDomain.BaseDirectory}period_template.xlsx"; // Setup Datasource Handler Datasource datasource = new XlDatasource(connectionString, periodTemplateFilePath); DatasourceHandler datasourceHandler = DatasourceHandler.GetInstance(datasource); // Gui Thread ThreadStart guiRef = new ThreadStart(StartGui); Thread guiThread = new Thread(guiRef); guiThread.Start(); // Main thread //BrewMonitorTimer brewMonitorTimer = BrewMonitorTimer.GetInstance(); //BrewMonitorTimer.Startup(); StartBrewMonitor(); //TestDataSource(); }
public XlReportGenerator() { MyAppSettings appSettings = MyAppSettings.GetInstance(); string connectionString = appSettings.ConnectionString; string templatePath = appSettings.PeriodTemplateFilePath; Datasource xlDatasource = new XlDatasource(connectionString, templatePath); datasourceHandler = DatasourceHandler.GetInstance(xlDatasource); }