}//FindRecoveryStartDateTime() #endregion #region FormEventTrigers /// <summary> /// The user clicks this button to load drop file. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void buttonLoadDropFile_Click(object sender, EventArgs e) { if (sender == this.buttonLoadDropFile) { // Load Drop File. Log.NewEntry(LogLevel.Minor, "The button of load drop file is clicked by user."); DateTime minDateTime = new DateTime(2000, 1, 1); if (m_UserSelectedRecoveryDropFileDateTime > minDateTime) { Log.NewEntry(LogLevel.Minor, "The user has chosen a drop file recovery date time of {0}.", m_UserSelectedRecoveryDropFileDateTime); // Check if the user name or fill hub name is empty or null. if (string.IsNullOrEmpty(m_UserName) || string.IsNullOrEmpty(m_FillHubOrFillManagerName)) { Log.NewEntry(LogLevel.Major, "There are no user name or fill hub name."); return; } // Clear the previous audit trail fill hub. if (m_AuditTrailFillHub != null) { m_AuditTrailFillHub.RequestStop(); } if (m_DropFilePlayer.TryPlayDropFileForOneFillHub(m_UserName, m_FillHubOrFillManagerName, m_UserSelectedRecoveryDropFileDateTime, out m_AuditTrailFillHub)) { // Create the books on the fill hub page and start. m_UserSelectedRecoveryDropFileDateTime = m_DropFilePlayer.SelectedDropDateTime; DropFileStartDateTime.Value = m_UserSelectedRecoveryDropFileDateTime; Log.NewEntry(LogLevel.Minor, "Successful in reading the drop file."); m_AuditTrailFillHub.Start(); // Try to get the final state of the fill hub. if (m_FillHubPage != null) { m_FillHubPage.Shutdown(); } m_FillHubPage = new FillHubPage(); m_FillHubPage.AddHub(m_AuditTrailFillHub); // Display the fill hub page onto the GUI. tabControlFillPageViewer.TabPages.Clear(); tabControlFillPageViewer.TabPages.Add(m_FillHubPage); m_AuditTrailFillHub.CreateBooksStatic(m_MarketTTAPIService); } else { Log.NewEntry(LogLevel.Major, "Failed to read the drop file."); return; } } } }//buttonLoadDropFile_Click()