private void MainWindow_Loaded(object sender, RoutedEventArgs e) { #region [ Initalization UI ] lvLog.Items.Clear(); lvTask.Items.Clear(); _detailsOption = (DetailsOption)frOption.Content; _vertManager = (VertificationManager)frVertManager.Content; _exportOption = (ExportOption)frExportOption.Content; _taskReport = (TaskReport)frTaskReport.Content; _taskReport.ExportRequest += _taskReport_ExportRequest; if (!AccessDBFormat <ISearchResult> .AccessConnectorInstalled()) { AddLog("Access DB에 올바르게 접근 할 수 없습니다. 내보내기 옵션의 Access DB에서 문제를 해결하세요.", TaskLogType.System); } else { _exportOption.HiddenInstall(); } #endregion this.Activate(); }
public static bool AccessDBExport <TResult>(string fileLocation, IEnumerable <TResult> searchResult) where TResult : ISearchResult { try { AccessDBFormat <TResult> dbFormat = new AccessDBFormat <TResult>(fileLocation); dbFormat.FormattingData(searchResult); } catch (Exception ex) { throw ex; } return(true); }
private void Wc_DownloadFileCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e) { Dispatcher.Invoke(() => { runDownloadPercent.Text = string.Empty; runBaseText.Text = "설치중입니다."; Thread thr = new Thread(() => { Process p = Process.Start(FullPath); while (!p.HasExited) { } if (!AccessDBFormat <ISearchResult> .AccessConnectorInstalled()) { Dispatcher.Invoke(() => { runBaseText.Text = "설치가 제대로 완료되지 않았습니다. 설치 버튼으로 재시도해보세요."; }); } else { Dispatcher.Invoke(() => { runBaseText.Text = "설치가 완료되었습니다. 이제 5초뒤에 자동으로 재시작합니다."; }); Thread.Sleep(5000); Process.Start(WinApplication.ResourceAssembly.Location); Dispatcher.Invoke(() => WinApplication.Current.Shutdown()); } }); thr.Start(); }); }