/// <summary> /// Default Constructor /// </summary> public SplashScreen() { InitializeComponent(); CurrentState = State.DirectoryCheck; CurrentStatus = CheckStatus.Checking; CurrentAppStatus = LoadStatus.Loading; ApplicationIOLibarary.ApplicationFiles.FileUtils fileUtils = new ApplicationIOLibarary.ApplicationFiles.FileUtils(); // Supply the information regarding the access file we will use for our // datbase to the DatabaseManager. DatabaseManager.Configure(new AccessInfo(fileUtils.DbPath)); }
/// <summary> /// Starts the threads to import the PRPO reports. /// </summary> /// <param name="_excelFile"></param> private void ImportPrpoExcelFile(PrpoExcelFile _excelFile) { ApplicationIOLibarary.ApplicationFiles.FileUtils fileUtils = new ApplicationIOLibarary.ApplicationFiles.FileUtils(); ms_applicaitonMenuStrip.Enabled = false; // Lock the navigation functionality navigationSettings.Status = Navigation.Functionality.Locked; if (_excelFile is UsPrpoExcelFile) { reportSettings.PrpoUsReportFileName = _excelFile.Path; // import only the US PRPO file Importer usImport = new Importer( new ExcelInfo() { FileName = _excelFile.Path, HasHeaders = true, SheetName = ExcelInfo.sheetName[(int)ExcelInfo.SheetNames.US_PRPO] }, new AccessInfo(fileUtils.DbPath) { TableName = AccessInfo.mainTableNames[(int)AccessInfo.MainTables.US_PRPO] } ); usThread = new Thread((mainThread) => { try { usImport.Run(); } catch (ThreadInterruptedException) { ShowPage(Pages.DragDropDash); } }); usThread.Name = "US"; usThread.Start(Thread.CurrentThread); } if (_excelFile is MxPrpoExcelFile) { reportSettings.PrpoMxReportFileName = _excelFile.Path; // Import only the MX PRPO file. Importer mxImport = new Importer( new ExcelInfo() { FileName = _excelFile.Path, HasHeaders = true, SheetName = ExcelInfo.sheetName[(int)ExcelInfo.SheetNames.MX_PRPO] }, new AccessInfo(fileUtils.DbPath) { TableName = AccessInfo.mainTableNames[(int)AccessInfo.MainTables.MX_PRPO] } ); mxThread = new Thread((mainThread) => { try { mxImport.Run(); } catch (ThreadInterruptedException) { ShowPage(Pages.DragDropDash); } }); mxThread.Name = "MX"; mxThread.Start(Thread.CurrentThread); } }