refactor: Chrome 옵션 중복 제거 및 코드 구조 개선
This commit is contained in:
		| @@ -26,7 +26,7 @@ | ||||
|     <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> | ||||
|       <dependentAssembly> | ||||
|         <assemblyIdentity name="Renci.SshNet" publicKeyToken="1cee9f8bde3db106" culture="neutral" /> | ||||
|         <bindingRedirect oldVersion="0.0.0.0-2020.0.1.0" newVersion="2020.0.1.0" /> | ||||
|         <bindingRedirect oldVersion="0.0.0.0-2025.0.0.1" newVersion="2025.0.0.1" /> | ||||
|       </dependentAssembly> | ||||
|       <dependentAssembly> | ||||
|         <assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> | ||||
| @@ -44,6 +44,14 @@ | ||||
|         <assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" /> | ||||
|         <bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" /> | ||||
|       </dependentAssembly> | ||||
|       <dependentAssembly> | ||||
|         <assemblyIdentity name="System.Text.Json" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" /> | ||||
|         <bindingRedirect oldVersion="0.0.0.0-8.0.0.5" newVersion="8.0.0.5" /> | ||||
|       </dependentAssembly> | ||||
|       <dependentAssembly> | ||||
|         <assemblyIdentity name="AngleSharp" publicKeyToken="e83494dcdc6d31ea" culture="neutral" /> | ||||
|         <bindingRedirect oldVersion="0.0.0.0-1.3.0.0" newVersion="1.3.0.0" /> | ||||
|       </dependentAssembly> | ||||
|     </assemblyBinding> | ||||
|   </runtime> | ||||
|   <userSettings> | ||||
|   | ||||
| @@ -1,34 +0,0 @@ | ||||
| using System; | ||||
| using System.Collections.Generic; | ||||
| using System.Linq; | ||||
| using System.Text; | ||||
| using System.Threading.Tasks; | ||||
| using System.Windows.Forms; | ||||
|  | ||||
| namespace UniMarc | ||||
| { | ||||
|     public static class CUtill | ||||
|     { | ||||
|         public static arUtil.Log mLog; | ||||
|  | ||||
|         public static void MsgI(string m) | ||||
|         { | ||||
|             //MessageWindow.VisibleAll(false); | ||||
|             MessageBox.Show(m, "CHECK", MessageBoxButtons.OK, MessageBoxIcon.Information); | ||||
|             //MessageWindow.VisibleAll(true); | ||||
|         } | ||||
|         public static void MsgE(string m) | ||||
|         { | ||||
|             //MessageWindow.VisibleAll(false); | ||||
|             MessageBox.Show(m, "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error); | ||||
|             //MessageWindow.VisibleAll(true); | ||||
|         } | ||||
|         public static DialogResult MsgQ(string m) | ||||
|         { | ||||
|             //MessageWindow.VisibleAll(false); | ||||
|             DialogResult dlg = MessageBox.Show(m, "CHECK", MessageBoxButtons.YesNo, MessageBoxIcon.Question); | ||||
|             //MessageWindow.VisibleAll(true); | ||||
|             return dlg; | ||||
|         } | ||||
|     } | ||||
| } | ||||
| @@ -41,26 +41,16 @@ namespace WindowsFormsApp1 | ||||
|         public Main() | ||||
|         { | ||||
|             InitializeComponent(); | ||||
|  | ||||
|           | ||||
|             PUB.Init(); | ||||
|         } | ||||
|  | ||||
|         public string User_Name { get; internal set; } | ||||
|  | ||||
|         private void Main_Load(object sender, EventArgs e) | ||||
|         { | ||||
|  | ||||
|  | ||||
|  | ||||
|             this.Visible = false;   // 메인폼을 먼저 숨김 | ||||
|              | ||||
|             #region "Log setting" | ||||
|             var logsubdir = "{yyyy|MM|dd}"; | ||||
|             string tPath = string.Format("{0}\\LOG", AppDomain.CurrentDomain.BaseDirectory).Replace("\\\\", "\\"); ; | ||||
|             CUtill.mLog = new arUtil.Log(tPath); | ||||
|             CUtill.mLog.SubDirectory = logsubdir; | ||||
|             CUtill.mLog.FileNameFormat = "{yyMMdd}"; | ||||
|             #endregion | ||||
|            | ||||
|             login login = new login(); | ||||
|             VersionText.Text = string.Format("UniMarc Ver.{0}", ip.VersionInfo()); | ||||
|  | ||||
| @@ -1202,7 +1192,7 @@ namespace WindowsFormsApp1 | ||||
|             { | ||||
|                 Mac_dLS_Copy = new DLS_Copy(this); | ||||
|                 Mac_dLS_Copy.MdiParent = this; | ||||
|                 Mac_dLS_Copy.WindowState = FormWindowState.Maximized; | ||||
|                 //Mac_dLS_Copy.WindowState = FormWindowState.Maximized; | ||||
|                 Mac_dLS_Copy.FormClosed += (o, ea) => Mac_dLS_Copy = null; | ||||
|                 Mac_dLS_Copy.Show(); | ||||
|             } | ||||
|   | ||||
							
								
								
									
										26
									
								
								unimarc/unimarc/PUB.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								unimarc/unimarc/PUB.cs
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,26 @@ | ||||
| using System; | ||||
| using System.Collections.Generic; | ||||
| using System.Linq; | ||||
| using System.Text; | ||||
| using System.Threading.Tasks; | ||||
| using System.Windows.Forms; | ||||
|  | ||||
| namespace UniMarc | ||||
| { | ||||
|     public static class PUB | ||||
|     { | ||||
|         public static arUtil.Log log; | ||||
|  | ||||
|         public static void Init() | ||||
|         { | ||||
|             #region "Log setting" | ||||
|             var logsubdir = "{yyyy|MM|dd}"; | ||||
|             string tPath = string.Format("{0}\\LOG", AppDomain.CurrentDomain.BaseDirectory).Replace("\\\\", "\\"); ; | ||||
|             PUB.log = new arUtil.Log(tPath); | ||||
|             PUB.log.SubDirectory = logsubdir; | ||||
|             PUB.log.FileNameFormat = "{yyMMdd}"; | ||||
|             #endregion | ||||
|         } | ||||
|  | ||||
|     } | ||||
| } | ||||
| @@ -26,20 +26,6 @@ namespace BokBonCheck | ||||
|             }; | ||||
|         } | ||||
|  | ||||
|         public async Task<List<BookSearchResult>> SearchBooksAsync(string searchTerm) | ||||
|         { | ||||
|             var results = new List<BookSearchResult>(); | ||||
|  | ||||
|             foreach (var searcher in _searchers) | ||||
|             { | ||||
|                 searcher.StartDriver(); | ||||
|                 var result = await searcher.SearchAsync(searchTerm); | ||||
|                 results.Add(result); | ||||
|                 //searcher.StopDriver(); | ||||
|             } | ||||
|  | ||||
|             return results; | ||||
|         } | ||||
|  | ||||
|         /// <summary> | ||||
|         /// Return Searcher | ||||
|   | ||||
| @@ -8,17 +8,60 @@ using System.Reflection; | ||||
| using System.Net.Http; | ||||
| using System.Threading; | ||||
| using System.IO.Compression; | ||||
| using System.Linq; | ||||
| using System.Security.Principal; | ||||
| using OpenQA.Selenium; | ||||
| using OpenQA.Selenium.Chrome; | ||||
|  | ||||
| namespace BokBonCheck | ||||
| { | ||||
|     public static class ChromeDriverManager | ||||
|     { | ||||
|         private static string _driverPath = null; | ||||
|         private static readonly object _lockObject = new object(); | ||||
|         private static readonly int MaxRetryCount = 3; | ||||
|         private static readonly int RetryDelayMs = 2000; | ||||
|         private static readonly string UserDataDir = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "ChromeDriverUserData"); | ||||
|  | ||||
|         public static async Task<string> SetupChromeDriverAsync(DownloadProgressForm progressForm = null) | ||||
|         { | ||||
|             lock (_lockObject) | ||||
|             { | ||||
|                 if (!string.IsNullOrEmpty(_driverPath) && File.Exists(_driverPath)) | ||||
|                 { | ||||
|                     // 이미 설정된 드라이버가 있고 정상 동작하면 재사용 | ||||
|                     if (IsDriverReady()) | ||||
|                     { | ||||
|                         if (progressForm != null) | ||||
|                         { | ||||
|                             progressForm.UpdateProgress(100, "기존 드라이버 사용"); | ||||
|                             progressForm.SetCompleted("기존 드라이버를 사용합니다."); | ||||
|                         } | ||||
|                         return _driverPath; | ||||
|                     } | ||||
|                 } | ||||
|             } | ||||
|  | ||||
|             try | ||||
|             { | ||||
|                 // Chrome 설치 여부 확인 | ||||
|                 if (!IsChromeInstalled()) | ||||
|                 { | ||||
|                     var errorMsg = "Chrome이 설치되어 있지 않습니다. Chrome을 설치한 후 다시 시도해주세요."; | ||||
|                     Console.WriteLine(errorMsg); | ||||
|                     if (progressForm != null) | ||||
|                     { | ||||
|                         progressForm.SetError(errorMsg); | ||||
|                     } | ||||
|                     throw new InvalidOperationException(errorMsg); | ||||
|                 } | ||||
|  | ||||
|                 // 사용자 데이터 디렉토리 생성 | ||||
|                 EnsureUserDataDirectory(); | ||||
|                  | ||||
|                 // 사용자 디렉토리 생성 후 기존 Chrome/ChromeDriver 프로세스 정리 | ||||
|                 CleanupChromeProcesses(); | ||||
|  | ||||
|                 // Chrome 버전 확인 | ||||
|                 var chromeVersion = GetChromeVersion(); | ||||
|                 Console.WriteLine($"설치된 Chrome 버전: {chromeVersion}"); | ||||
| @@ -34,7 +77,12 @@ namespace BokBonCheck | ||||
|                 { | ||||
|                     Console.WriteLine($"기존 드라이버 발견: {existingDriverPath}"); | ||||
|                      | ||||
|                     // 기존 드라이버 테스트 | ||||
|                     if (progressForm != null) | ||||
|                     { | ||||
|                         progressForm.UpdateProgress(20, "기존 드라이버 테스트 중..."); | ||||
|                     } | ||||
|                      | ||||
|                     // 기존 드라이버 테스트 (한 번만) | ||||
|                     if (await TestExistingDriver(existingDriverPath)) | ||||
|                     { | ||||
|                         if (progressForm != null) | ||||
| @@ -43,14 +91,17 @@ namespace BokBonCheck | ||||
|                             progressForm.SetCompleted("기존 드라이버를 사용합니다."); | ||||
|                         } | ||||
|                          | ||||
|                         _driverPath = existingDriverPath; | ||||
|                         Environment.SetEnvironmentVariable("webdriver.chrome.driver", existingDriverPath); | ||||
|                         lock (_lockObject) | ||||
|                         { | ||||
|                             _driverPath = existingDriverPath; | ||||
|                             Environment.SetEnvironmentVariable("webdriver.chrome.driver", existingDriverPath); | ||||
|                         } | ||||
|                         return existingDriverPath; | ||||
|                     } | ||||
|                     else | ||||
|                     { | ||||
|                         Console.WriteLine("기존 드라이버 테스트 실패 - 새로 다운로드"); | ||||
|                         // 기존 드라이버가 작동하지 않으면 삭제 | ||||
|                         // 기존 드라이버 삭제 | ||||
|                         try | ||||
|                         { | ||||
|                             File.Delete(existingDriverPath); | ||||
| @@ -63,43 +114,137 @@ namespace BokBonCheck | ||||
|                     } | ||||
|                 } | ||||
|  | ||||
|                 // 드라이버 다운로드 | ||||
|                 if (progressForm != null) | ||||
|                 { | ||||
|                     progressForm.UpdateProgress(30, "Chrome 버전에 맞는 드라이버 다운로드 중..."); | ||||
|                     progressForm.UpdateProgress(30, "Chrome 드라이버 다운로드 중..."); | ||||
|                 } | ||||
|  | ||||
|                 // WebDriverManager를 사용하여 설치된 Chrome 버전에 맞는 드라이버 다운로드 | ||||
|                 var driverManager = new DriverManager(); | ||||
|                 var driverPath = driverManager.SetUpDriver(new ChromeConfig(), "MatchingBrowser"); | ||||
|                  | ||||
|                 // 다운로드된 드라이버 경로 저장 | ||||
|                 _driverPath = driverPath; | ||||
|                  | ||||
|                 // 환경 변수 설정 | ||||
|                 Environment.SetEnvironmentVariable("webdriver.chrome.driver", driverPath); | ||||
|                 var driverPath = await DownloadChromeDriverWithRetryAsync(progressForm); | ||||
|                  | ||||
|                 // 다운로드된 드라이버 테스트 (한 번만) | ||||
|                 if (progressForm != null) | ||||
|                 { | ||||
|                     progressForm.UpdateProgress(100, "드라이버 다운로드 완료"); | ||||
|                     progressForm.SetCompleted("드라이버 다운로드 완료!"); | ||||
|                     progressForm.UpdateProgress(80, "다운로드된 드라이버 테스트 중..."); | ||||
|                 } | ||||
|                  | ||||
|                 Console.WriteLine($"ChromeDriver 경로: {driverPath}"); | ||||
|                 Console.WriteLine($"환경 변수 설정: webdriver.chrome.driver = {driverPath}"); | ||||
|                  | ||||
|                 return driverPath; | ||||
|                 if (await TestExistingDriver(driverPath)) | ||||
|                 { | ||||
|                     lock (_lockObject) | ||||
|                     { | ||||
|                         _driverPath = driverPath; | ||||
|                         Environment.SetEnvironmentVariable("webdriver.chrome.driver", driverPath); | ||||
|                     } | ||||
|                      | ||||
|                     if (progressForm != null) | ||||
|                     { | ||||
|                         progressForm.UpdateProgress(100, "드라이버 설정 완료"); | ||||
|                         progressForm.SetCompleted("드라이버 설정 완료!"); | ||||
|                     } | ||||
|                      | ||||
|                     Console.WriteLine($"ChromeDriver 경로: {driverPath}"); | ||||
|                     Console.WriteLine($"환경 변수 설정: webdriver.chrome.driver = {driverPath}"); | ||||
|                      | ||||
|                     return driverPath; | ||||
|                 } | ||||
|                 else | ||||
|                 { | ||||
|                     throw new InvalidOperationException("다운로드된 드라이버 테스트에 실패했습니다."); | ||||
|                 } | ||||
|             } | ||||
|             catch (Exception ex) | ||||
|             { | ||||
|                 Console.WriteLine($"ChromeDriver 설정 오류: {ex.Message}"); | ||||
|                 var errorMsg = $"ChromeDriver 설정 오류: {ex.Message}"; | ||||
|                 Console.WriteLine(errorMsg); | ||||
|                 if (progressForm != null) | ||||
|                 { | ||||
|                     progressForm.SetError($"설정 오류: {ex.Message}"); | ||||
|                     progressForm.SetError(errorMsg); | ||||
|                 } | ||||
|                 throw; | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         private static void EnsureUserDataDirectory() | ||||
|         { | ||||
|             try | ||||
|             { | ||||
|                 if (!Directory.Exists(UserDataDir)) | ||||
|                 { | ||||
|                     Directory.CreateDirectory(UserDataDir); | ||||
|                     Console.WriteLine($"사용자 데이터 디렉토리 생성: {UserDataDir}"); | ||||
|                 } | ||||
|  | ||||
|                 // 임시 파일 디렉토리도 생성 | ||||
|                 var tempDir = Path.Combine(UserDataDir, "temp"); | ||||
|                 if (!Directory.Exists(tempDir)) | ||||
|                 { | ||||
|                     Directory.CreateDirectory(tempDir); | ||||
|                 } | ||||
|  | ||||
|                 // 로그 디렉토리 생성 | ||||
|                 var logDir = Path.Combine(UserDataDir, "logs"); | ||||
|                 if (!Directory.Exists(logDir)) | ||||
|                 { | ||||
|                     Directory.CreateDirectory(logDir); | ||||
|                 } | ||||
|             } | ||||
|             catch (Exception ex) | ||||
|             { | ||||
|                 Console.WriteLine($"사용자 데이터 디렉토리 생성 실패: {ex.Message}"); | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         private static async Task<string> DownloadChromeDriverWithRetryAsync(DownloadProgressForm progressForm) | ||||
|         { | ||||
|             Exception lastException = null; | ||||
|              | ||||
|             for (int attempt = 1; attempt <= MaxRetryCount; attempt++) | ||||
|             { | ||||
|                 try | ||||
|                 { | ||||
|                     if (progressForm != null) | ||||
|                     { | ||||
|                         progressForm.UpdateProgress(30 + (attempt - 1) * 10,  | ||||
|                             $"Chrome 드라이버 다운로드 중... (시도 {attempt}/{MaxRetryCount})"); | ||||
|                     } | ||||
|  | ||||
|                     Console.WriteLine($"드라이버 다운로드 시도 {attempt}/{MaxRetryCount}"); | ||||
|                      | ||||
|                     // WebDriverManager를 사용하여 설치된 Chrome 버전에 맞는 드라이버 다운로드 | ||||
|                     var driverManager = new DriverManager(); | ||||
|                     var driverPath = driverManager.SetUpDriver(new ChromeConfig(), "MatchingBrowser"); | ||||
|                      | ||||
|                     if (!string.IsNullOrEmpty(driverPath) && File.Exists(driverPath)) | ||||
|                     { | ||||
|                         Console.WriteLine($"드라이버 다운로드 성공: {driverPath}"); | ||||
|                         return driverPath; | ||||
|                     } | ||||
|                     else | ||||
|                     { | ||||
|                         throw new InvalidOperationException("드라이버 파일을 찾을 수 없습니다."); | ||||
|                     } | ||||
|                 } | ||||
|                 catch (Exception ex) | ||||
|                 { | ||||
|                     lastException = ex; | ||||
|                     Console.WriteLine($"드라이버 다운로드 시도 {attempt} 실패: {ex.Message}"); | ||||
|                      | ||||
|                     if (attempt < MaxRetryCount) | ||||
|                     { | ||||
|                         if (progressForm != null) | ||||
|                         { | ||||
|                             progressForm.UpdateProgress(30 + attempt * 10,  | ||||
|                                 $"다운로드 실패. 재시도 중... ({attempt + 1}/{MaxRetryCount})"); | ||||
|                         } | ||||
|                          | ||||
|                         // 재시도 전 잠시 대기 | ||||
|                         await Task.Delay(RetryDelayMs); | ||||
|                     } | ||||
|                 } | ||||
|             } | ||||
|              | ||||
|             throw new InvalidOperationException($"드라이버 다운로드를 {MaxRetryCount}번 시도했지만 실패했습니다. 마지막 오류: {lastException?.Message}"); | ||||
|         } | ||||
|  | ||||
|         private static string GetExistingDriverPath() | ||||
|         { | ||||
|             try | ||||
| @@ -111,25 +256,45 @@ namespace BokBonCheck | ||||
|                     return envPath; | ||||
|                 } | ||||
|  | ||||
|                 // 사용자 디렉토리에서 확인 (관리자 권한 없이도 접근 가능) | ||||
|                 var userDriverPath = Path.Combine(UserDataDir, "chromedriver.exe"); | ||||
|                 if (File.Exists(userDriverPath)) | ||||
|                 { | ||||
|                     return userDriverPath; | ||||
|                 } | ||||
|  | ||||
|                 // WebDriverManager 캐시 폴더에서 확인 | ||||
|                 var cachePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile),  | ||||
|                                            ".cache", "selenium"); | ||||
|                 if (Directory.Exists(cachePath)) | ||||
|                 { | ||||
|                     var chromeDriverFiles = Directory.GetFiles(cachePath, "chromedriver*", SearchOption.AllDirectories); | ||||
|                     foreach (var file in chromeDriverFiles) | ||||
|                     var chromeDriverFiles = Directory.GetFiles(cachePath, "chromedriver*", SearchOption.AllDirectories) | ||||
|                         .Where(f => f.EndsWith(".exe") || !Path.HasExtension(f)) | ||||
|                         .OrderByDescending(f => File.GetLastWriteTime(f)) | ||||
|                         .ToArray(); | ||||
|                      | ||||
|                     if (chromeDriverFiles.Length > 0) | ||||
|                     { | ||||
|                         if (file.EndsWith(".exe") || !Path.HasExtension(file)) | ||||
|                         { | ||||
|                             return file; | ||||
|                         } | ||||
|                         return chromeDriverFiles[0]; // 가장 최근 파일 반환 | ||||
|                     } | ||||
|                 } | ||||
|  | ||||
|                 // 현재 실행 파일과 같은 디렉토리에서 확인 | ||||
|                 var currentDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); | ||||
|                 if (!string.IsNullOrEmpty(currentDir)) | ||||
|                 { | ||||
|                     var localDriverPath = Path.Combine(currentDir, "chromedriver.exe"); | ||||
|                     if (File.Exists(localDriverPath)) | ||||
|                     { | ||||
|                         return localDriverPath; | ||||
|                     } | ||||
|                 } | ||||
|  | ||||
|                 return null; | ||||
|             } | ||||
|             catch | ||||
|             catch (Exception ex) | ||||
|             { | ||||
|                 Console.WriteLine($"기존 드라이버 경로 확인 실패: {ex.Message}"); | ||||
|                 return null; | ||||
|             } | ||||
|         } | ||||
| @@ -149,6 +314,10 @@ namespace BokBonCheck | ||||
|                     @"C:\Program Files\Google\Chrome\Application\chrome.exe", | ||||
|                     @"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe", | ||||
|                     Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),  | ||||
|                                 @"Google\Chrome\Application\chrome.exe"), | ||||
|                     Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles),  | ||||
|                                 @"Google\Chrome\Application\chrome.exe"), | ||||
|                     Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86),  | ||||
|                                 @"Google\Chrome\Application\chrome.exe") | ||||
|                 }; | ||||
|  | ||||
| @@ -163,6 +332,27 @@ namespace BokBonCheck | ||||
|                     } | ||||
|                 } | ||||
|  | ||||
|                 // 레지스트리에서 확인 (추가 방법) | ||||
|                 try | ||||
|                 { | ||||
|                     using (var key = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Google\Chrome\BLBeacon")) | ||||
|                     { | ||||
|                         if (key != null) | ||||
|                         { | ||||
|                             var version = key.GetValue("version") as string; | ||||
|                             if (!string.IsNullOrEmpty(version)) | ||||
|                             { | ||||
|                                 Console.WriteLine($"레지스트리에서 Chrome 버전 감지: {version}"); | ||||
|                                 return version; | ||||
|                             } | ||||
|                         } | ||||
|                     } | ||||
|                 } | ||||
|                 catch (Exception ex) | ||||
|                 { | ||||
|                     Console.WriteLine($"레지스트리 확인 실패: {ex.Message}"); | ||||
|                 } | ||||
|  | ||||
|                 return "알 수 없음"; | ||||
|             } | ||||
|             catch (Exception ex) | ||||
| @@ -181,6 +371,10 @@ namespace BokBonCheck | ||||
|                     @"C:\Program Files\Google\Chrome\Application\chrome.exe", | ||||
|                     @"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe", | ||||
|                     Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),  | ||||
|                                 @"Google\Chrome\Application\chrome.exe"), | ||||
|                     Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles),  | ||||
|                                 @"Google\Chrome\Application\chrome.exe"), | ||||
|                     Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86),  | ||||
|                                 @"Google\Chrome\Application\chrome.exe") | ||||
|                 }; | ||||
|  | ||||
| @@ -192,10 +386,27 @@ namespace BokBonCheck | ||||
|                     } | ||||
|                 } | ||||
|  | ||||
|                 // 레지스트리에서도 확인 | ||||
|                 try | ||||
|                 { | ||||
|                     using (var key = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Google\Chrome\BLBeacon")) | ||||
|                     { | ||||
|                         if (key != null) | ||||
|                         { | ||||
|                             return true; | ||||
|                         } | ||||
|                     } | ||||
|                 } | ||||
|                 catch | ||||
|                 { | ||||
|                     // 레지스트리 접근 실패는 무시 | ||||
|                 } | ||||
|  | ||||
|                 return false; | ||||
|             } | ||||
|             catch | ||||
|             catch (Exception ex) | ||||
|             { | ||||
|                 Console.WriteLine($"Chrome 설치 확인 실패: {ex.Message}"); | ||||
|                 return false; | ||||
|             } | ||||
|         } | ||||
| @@ -211,32 +422,7 @@ namespace BokBonCheck | ||||
|                     progressForm.UpdateProgress(50, "드라이버 테스트 중..."); | ||||
|                 } | ||||
|                  | ||||
|                 // ChromeDriver 서비스 설정 | ||||
|                 var service = OpenQA.Selenium.Chrome.ChromeDriverService.CreateDefaultService(Path.GetDirectoryName(driverPath)); | ||||
|                 service.HideCommandPromptWindow = true; | ||||
|                 // 간단한 테스트 실행 | ||||
|                 var options = new OpenQA.Selenium.Chrome.ChromeOptions(); | ||||
|                 options.AddArgument("--headless"); | ||||
|                 options.AddArgument("--no-sandbox"); | ||||
|                 options.AddArgument("--disable-dev-shm-usage"); | ||||
|                 options.AddArgument("--disable-gpu"); | ||||
|                 options.AddArgument("--remote-debugging-port=0"); | ||||
|  | ||||
|                 using (var driver = new OpenQA.Selenium.Chrome.ChromeDriver(service, options)) | ||||
|                 { | ||||
|                     driver.Navigate().GoToUrl("https://www.google.com"); | ||||
|                     var title = driver.Title; | ||||
|                      | ||||
|                     Console.WriteLine($"드라이버 테스트 성공: {title}"); | ||||
|                      | ||||
|                     if (progressForm != null) | ||||
|                     { | ||||
|                         progressForm.UpdateProgress(100, "드라이버 테스트 성공!"); | ||||
|                         progressForm.SetCompleted("드라이버 테스트 성공!"); | ||||
|                     } | ||||
|                      | ||||
|                     return !string.IsNullOrEmpty(title); | ||||
|                 } | ||||
|                 return await TestExistingDriver(driverPath); | ||||
|             } | ||||
|             catch (Exception ex) | ||||
|             { | ||||
| @@ -255,6 +441,20 @@ namespace BokBonCheck | ||||
|             { | ||||
|                 Console.WriteLine("Chrome 드라이버 캐시 정리 시작..."); | ||||
|                  | ||||
|                 // 사용자 데이터 디렉토리 정리 | ||||
|                 if (Directory.Exists(UserDataDir)) | ||||
|                 { | ||||
|                     try | ||||
|                     { | ||||
|                         Directory.Delete(UserDataDir, true); | ||||
|                         Console.WriteLine($"사용자 데이터 디렉토리 정리됨: {UserDataDir}"); | ||||
|                     } | ||||
|                     catch (Exception ex) | ||||
|                     { | ||||
|                         Console.WriteLine($"사용자 데이터 디렉토리 정리 실패: {ex.Message}"); | ||||
|                     } | ||||
|                 } | ||||
|  | ||||
|                 // WebDriverManager 캐시 폴더 정리 | ||||
|                 var cachePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile),  | ||||
|                                            ".cache", "selenium"); | ||||
| @@ -280,20 +480,23 @@ namespace BokBonCheck | ||||
|                 } | ||||
|  | ||||
|                 // 저장된 드라이버 경로도 정리 | ||||
|                 if (!string.IsNullOrEmpty(_driverPath) && File.Exists(_driverPath)) | ||||
|                 lock (_lockObject) | ||||
|                 { | ||||
|                     try | ||||
|                     if (!string.IsNullOrEmpty(_driverPath) && File.Exists(_driverPath)) | ||||
|                     { | ||||
|                         File.Delete(_driverPath); | ||||
|                         Console.WriteLine($"저장된 드라이버 삭제됨: {_driverPath}"); | ||||
|                     } | ||||
|                     catch (Exception ex) | ||||
|                     { | ||||
|                         Console.WriteLine($"저장된 드라이버 삭제 실패: {ex.Message}"); | ||||
|                         try | ||||
|                         { | ||||
|                             File.Delete(_driverPath); | ||||
|                             Console.WriteLine($"저장된 드라이버 삭제됨: {_driverPath}"); | ||||
|                         } | ||||
|                         catch (Exception ex) | ||||
|                         { | ||||
|                             Console.WriteLine($"저장된 드라이버 삭제 실패: {ex.Message}"); | ||||
|                         } | ||||
|                     } | ||||
|                     _driverPath = null; | ||||
|                 } | ||||
|  | ||||
|                 _driverPath = null; | ||||
|                 Environment.SetEnvironmentVariable("webdriver.chrome.driver", null); | ||||
|                  | ||||
|                 Console.WriteLine("Chrome 드라이버 캐시 정리 완료"); | ||||
| @@ -316,24 +519,24 @@ namespace BokBonCheck | ||||
|                 } | ||||
|  | ||||
|                 Console.WriteLine($"드라이버 준비 상태 확인: {driverPath}"); | ||||
|  | ||||
|                 // 간단한 테스트 실행 | ||||
|                 var service = OpenQA.Selenium.Chrome.ChromeDriverService.CreateDefaultService(Path.GetDirectoryName(driverPath)); | ||||
|                 service.HideCommandPromptWindow = true; | ||||
|                 var options = new OpenQA.Selenium.Chrome.ChromeOptions(); | ||||
|                 options.AddArgument("--headless"); | ||||
|                 options.AddArgument("--no-sandbox"); | ||||
|                 options.AddArgument("--disable-dev-shm-usage"); | ||||
|                 options.AddArgument("--disable-gpu"); | ||||
|                 options.AddArgument("--remote-debugging-port=0"); | ||||
|  | ||||
|                 using (var driver = new OpenQA.Selenium.Chrome.ChromeDriver(service, options)) | ||||
|                  | ||||
|                 // 파일 크기와 수정 날짜로 기본 검증 | ||||
|                 var fileInfo = new FileInfo(driverPath); | ||||
|                 if (fileInfo.Length < 1000) // 1KB 미만이면 의심스러움 | ||||
|                 { | ||||
|                     driver.Navigate().GoToUrl("https://www.google.com"); | ||||
|                     var result = !string.IsNullOrEmpty(driver.Title); | ||||
|                     Console.WriteLine($"드라이버 준비 상태: {(result ? "준비됨" : "실패")}"); | ||||
|                     return result; | ||||
|                     Console.WriteLine("드라이버 파일이 너무 작습니다."); | ||||
|                     return false; | ||||
|                 } | ||||
|                  | ||||
|                 // 최근 30일 내 파일인지 확인 | ||||
|                 if (fileInfo.LastWriteTime < DateTime.Now.AddDays(-30)) | ||||
|                 { | ||||
|                     Console.WriteLine("드라이버 파일이 너무 오래되었습니다."); | ||||
|                     return false; | ||||
|                 } | ||||
|                  | ||||
|                 Console.WriteLine("드라이버 준비 상태: 준비됨"); | ||||
|                 return true; | ||||
|             } | ||||
|             catch (Exception ex) | ||||
|             { | ||||
| @@ -342,26 +545,121 @@ namespace BokBonCheck | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         /// <summary> | ||||
|         /// 기본 Chrome 옵션을 생성하는 헬퍼 메서드 | ||||
|         /// </summary> | ||||
|         public static ChromeOptions CreateBaseChromeOptions(bool hideBrowser = true,int width = 800,int height = 600) | ||||
|         { | ||||
|             var options = new ChromeOptions(); | ||||
|              | ||||
|             if (hideBrowser) | ||||
|             { | ||||
|                 options.AddArgument("--headless"); | ||||
|             } | ||||
|  | ||||
|             if(width > 0 && height > 0) | ||||
|             { | ||||
|                 options.AddArgument($"--window-size={width},{height}"); | ||||
|             } | ||||
|  | ||||
|             // 기본 안정성 옵션 | ||||
|             options.AddArgument("--no-sandbox"); | ||||
|             options.AddArgument("--remote-debugging-port=0"); | ||||
|             options.AddArgument("--disable-extensions"); | ||||
|             options.AddArgument("--disable-plugins"); | ||||
|             options.AddArgument("--disable-images"); | ||||
|             options.AddArgument("--disable-javascript"); | ||||
|             options.AddArgument("--disable-java"); | ||||
|             options.AddArgument("--disable-flash"); | ||||
|             options.AddArgument("--disable-web-security"); | ||||
|             options.AddArgument("--allow-running-insecure-content"); | ||||
|              | ||||
|             // 메모리 및 성능 최적화 | ||||
|             options.AddArgument("--memory-pressure-off"); | ||||
|             options.AddArgument("--max_old_space_size=4096"); | ||||
|             options.AddArgument("--disable-background-timer-throttling"); | ||||
|             options.AddArgument("--disable-backgrounding-occluded-windows"); | ||||
|             options.AddArgument("--disable-renderer-backgrounding"); | ||||
|             options.AddArgument("--disable-features=TranslateUI"); | ||||
|             options.AddArgument("--disable-ipc-flooding-protection"); | ||||
|             options.AddArgument("--disable-default-apps"); | ||||
|             options.AddArgument("--disable-sync"); | ||||
|             options.AddArgument("--disable-translate"); | ||||
|             options.AddArgument("--disable-logging"); | ||||
|             options.AddArgument("--disable-notifications"); | ||||
|             options.AddArgument("--disable-popup-blocking"); | ||||
|             options.AddArgument("--disable-prompt-on-repost"); | ||||
|             options.AddArgument("--disable-hang-monitor"); | ||||
|             options.AddArgument("--disable-client-side-phishing-detection"); | ||||
|             options.AddArgument("--disable-component-update"); | ||||
|             options.AddArgument("--disable-domain-reliability"); | ||||
|              | ||||
|             // 프로세스 관련 안정성 옵션 | ||||
|             options.AddArgument("--single-process"); | ||||
|             options.AddArgument("--no-zygote"); | ||||
|             options.AddArgument("--disable-background-networking"); | ||||
|              | ||||
|             // 캐시 및 저장소 비활성화 | ||||
|             options.AddArgument("--disable-application-cache"); | ||||
|             options.AddArgument("--disable-offline-load-stale-cache"); | ||||
|             options.AddArgument("--disk-cache-size=0"); | ||||
|             options.AddArgument("--media-cache-size=0"); | ||||
|             options.AddArgument("--aggressive-cache-discard"); | ||||
|             options.AddArgument("--enable-aggressive-domstorage-flushing"); | ||||
|              | ||||
|             // 기타 안정성 옵션 | ||||
|             options.AddArgument("--enable-low-end-device-mode"); | ||||
|             options.AddArgument("--force-fieldtrials=*BackgroundTracing/default/"); | ||||
|              | ||||
|             // 사용자 데이터 디렉토리 설정 (관리자 권한 없이도 접근 가능) | ||||
|             options.AddArgument($"--user-data-dir={UserDataDir}"); | ||||
|             options.AddArgument("--no-first-run"); | ||||
|             options.AddArgument("--no-default-browser-check"); | ||||
|              | ||||
|             return options; | ||||
|         } | ||||
|  | ||||
|  | ||||
|         /// <summary> | ||||
|         /// 검색 최적화된 Chrome 옵션을 반환합니다 | ||||
|         /// </summary> | ||||
|         public static ChromeOptions GetSearchOptimizedOptions() | ||||
|         { | ||||
|             var options = CreateBaseChromeOptions(true); | ||||
|              | ||||
|             // 검색에 필요한 기능만 활성화 | ||||
|             options.AddArgument("--enable-javascript"); | ||||
|             options.AddArgument("--enable-images"); | ||||
|              | ||||
|             return options; | ||||
|         } | ||||
|  | ||||
|         private static async Task<bool> TestExistingDriver(string driverPath) | ||||
|         { | ||||
|             try | ||||
|             { | ||||
|                 Console.WriteLine($"기존 드라이버 테스트: {driverPath}"); | ||||
|                 Console.WriteLine($"드라이버 테스트: {driverPath}"); | ||||
|                  | ||||
|                 // ChromeDriver 서비스 설정 | ||||
|                 var service = OpenQA.Selenium.Chrome.ChromeDriverService.CreateDefaultService(Path.GetDirectoryName(driverPath)); | ||||
|                 service.HideCommandPromptWindow = true;  | ||||
|  | ||||
|                 // 간단한 테스트 실행 | ||||
|                 var options = new OpenQA.Selenium.Chrome.ChromeOptions(); | ||||
|                 options.AddArgument("--headless"); | ||||
|                 options.AddArgument("--no-sandbox"); | ||||
|                 options.AddArgument("--disable-dev-shm-usage"); | ||||
|                 options.AddArgument("--disable-gpu"); | ||||
|                 options.AddArgument("--remote-debugging-port=0"); | ||||
|                 // 기본 Chrome 옵션 사용하고 테스트용 추가 옵션 설정 | ||||
|                 var options = CreateBaseChromeOptions(true); | ||||
|                  | ||||
|                 // 테스트용 추가 옵션들 | ||||
|                 options.AddArgument("--log-level=3"); // 오류만 표시 | ||||
|                 options.AddArgument("--silent"); | ||||
|                 options.AddArgument("--window-size=1920,1080"); | ||||
|                 options.AddArgument("--start-maximized"); | ||||
|                 options.AddArgument("--disable-blink-features=AutomationControlled"); | ||||
|                 options.AddArgument("--enable-aggressive-domstorage-flushing"); | ||||
|  | ||||
|                 using (var driver = new OpenQA.Selenium.Chrome.ChromeDriver(service, options)) | ||||
|                 { | ||||
|                     driver.Manage().Timeouts().PageLoad = TimeSpan.FromSeconds(15); | ||||
|                     driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10); | ||||
|                      | ||||
|                     driver.Navigate().GoToUrl("https://www.google.com"); | ||||
|                     var title = driver.Title; | ||||
|                     Console.WriteLine($"드라이버 테스트 성공: {title}"); | ||||
| @@ -370,9 +668,114 @@ namespace BokBonCheck | ||||
|             } | ||||
|             catch (Exception ex) | ||||
|             { | ||||
|                 Console.WriteLine($"기존 드라이버 테스트 실패: {ex.Message}"); | ||||
|                 Console.WriteLine($"드라이버 테스트 실패: {ex.Message}"); | ||||
|                  | ||||
|                 // DevToolsActivePort 및 Chrome 크래시 관련 특별 처리 | ||||
|                 if (ex.Message.Contains("DevToolsActivePort file doesn't exist") ||  | ||||
|                     ex.Message.Contains("was killed") ||  | ||||
|                     ex.Message.Contains("Chrome has crashed")) | ||||
|                 { | ||||
|                     Console.WriteLine("DevToolsActivePort 또는 Chrome 크래시 감지됨. 사용자 데이터 디렉토리 정리 시도..."); | ||||
|                     try | ||||
|                     { | ||||
|                         // 사용자 데이터 디렉토리 정리 | ||||
|                         if (Directory.Exists(UserDataDir)) | ||||
|                         { | ||||
|                             Directory.Delete(UserDataDir, true); | ||||
|                             Console.WriteLine("사용자 데이터 디렉토리 정리 완료"); | ||||
|                         } | ||||
|                          | ||||
|                         // Chrome 프로세스 정리 시도 | ||||
|                         CleanupChromeProcesses(); | ||||
|                          | ||||
|                         // 잠시 대기 | ||||
|                         await Task.Delay(1000); | ||||
|                     } | ||||
|                     catch (Exception cleanupEx) | ||||
|                     { | ||||
|                         Console.WriteLine($"사용자 데이터 디렉토리 정리 실패: {cleanupEx.Message}"); | ||||
|                     } | ||||
|                 } | ||||
|                  | ||||
|                 return false; | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         // Chrome 프로세스 정리 메서드 추가 | ||||
|         private static void CleanupChromeProcesses() | ||||
|         { | ||||
|             try | ||||
|             { | ||||
|                 Console.WriteLine("Chrome 프로세스 정리 시작..."); | ||||
|                  | ||||
|                 // Chrome 관련 프로세스들 찾기 | ||||
|                 var chromeProcesses = System.Diagnostics.Process.GetProcessesByName("chrome"); | ||||
|                 var chromedriverProcesses = System.Diagnostics.Process.GetProcessesByName("chromedriver"); | ||||
|  | ||||
|                 // Chrome 프로세스 정리 | ||||
|                 bool KILLPROC = false; | ||||
|                 foreach (var process in chromeProcesses) | ||||
|                 { | ||||
|                     try | ||||
|                     { | ||||
|                         if (!process.HasExited) | ||||
|                         { | ||||
|                             KILLPROC = true; | ||||
|                             process.Kill(); | ||||
|                             Console.WriteLine($"Chrome 프로세스 종료: PID {process.Id}"); | ||||
|                         } | ||||
|                     } | ||||
|                     catch (Exception ex) | ||||
|                     { | ||||
|                         Console.WriteLine($"Chrome 프로세스 종료 실패 (PID {process.Id}): {ex.Message}"); | ||||
|                     } | ||||
|                 } | ||||
|                  | ||||
|                 // ChromeDriver 프로세스 정리 | ||||
|                 foreach (var process in chromedriverProcesses) | ||||
|                 { | ||||
|                     try | ||||
|                     { | ||||
|                         if (!process.HasExited) | ||||
|                         { | ||||
|                             KILLPROC = true; | ||||
|                             process.Kill(); | ||||
|                             Console.WriteLine($"ChromeDriver 프로세스 종료: PID {process.Id}"); | ||||
|                         } | ||||
|                     } | ||||
|                     catch (Exception ex) | ||||
|                     { | ||||
|                         Console.WriteLine($"ChromeDriver 프로세스 종료 실패 (PID {process.Id}): {ex.Message}"); | ||||
|                     } | ||||
|                 } | ||||
|                  | ||||
|                 // 잠시 대기하여 프로세스 완전 종료 확인 | ||||
|                 if(KILLPROC) | ||||
|                 System.Threading.Thread.Sleep(2000); | ||||
|                  | ||||
|                 Console.WriteLine("Chrome 프로세스 정리 완료"); | ||||
|             } | ||||
|             catch (Exception ex) | ||||
|             { | ||||
|                 Console.WriteLine($"Chrome 프로세스 정리 실패: {ex.Message}"); | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         public static void Dispose() | ||||
|         { | ||||
|             try | ||||
|             { | ||||
|                 lock (_lockObject) | ||||
|                 { | ||||
|                     _driverPath = null; | ||||
|                 } | ||||
|                 Environment.SetEnvironmentVariable("webdriver.chrome.driver", null); | ||||
|                 Console.WriteLine("ChromeDriverManager 리소스 해제 완료"); | ||||
|             } | ||||
|             catch (Exception ex) | ||||
|             { | ||||
|                 Console.WriteLine($"ChromeDriverManager 리소스 해제 실패: {ex.Message}"); | ||||
|             } | ||||
|         } | ||||
|     } | ||||
| }  | ||||
| @@ -1,15 +1,21 @@ | ||||
| using OpenQA.Selenium.Chrome; | ||||
| using OpenQA.Selenium; | ||||
| using OpenQA.Selenium.Support.UI; | ||||
| using System.IO; | ||||
| using System; | ||||
| using System.Threading.Tasks; | ||||
| using Org.BouncyCastle.Bcpg; | ||||
|  | ||||
| namespace BokBonCheck | ||||
| { | ||||
|   | ||||
|     public interface ILibrarySearcher | ||||
|     { | ||||
|         int No { get;  set; } | ||||
|         int No { get; set; } | ||||
|         string SiteName { get; } | ||||
|         string SiteUrl { get; } | ||||
|         Task<BookSearchResult> SearchAsync(string searchTerm); | ||||
|         void StartDriver(); | ||||
|         void StartDriver(bool showBrowser); | ||||
|         void StopDriver(); | ||||
|  | ||||
|         Task WaitForPageChange(WebDriverWait wait); | ||||
|   | ||||
| @@ -61,7 +61,7 @@ namespace BokBonCheck | ||||
|     } | ||||
|     public abstract class KwangjuCityLibrarySearcher : ILibrarySearcher | ||||
|     { | ||||
|         public int No { get;  set; } | ||||
|         public int No { get; set; } | ||||
|         public string SiteName { get; protected set; } = "광주시교육청통합도서관"; | ||||
|         public string SiteUrl => "https://lib.gen.go.kr/main/site/search/bookSearch.do#simple"; | ||||
|  | ||||
| @@ -81,28 +81,55 @@ namespace BokBonCheck | ||||
|             this.No = no; | ||||
|         } | ||||
|  | ||||
|         public void StartDriver() | ||||
|         public void StartDriver(bool showBrowser) | ||||
|         { | ||||
|             try | ||||
|             { | ||||
|                 // 동기적으로 실행 (권장하지 않음) | ||||
|                 StartDriverAsync( showBrowser).GetAwaiter().GetResult(); | ||||
|             } | ||||
|             catch (Exception ex) | ||||
|             { | ||||
|                 Console.WriteLine($"StartDriver 실패: {ex.Message}"); | ||||
|                 throw; | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         public async Task StartDriverAsync( bool showdriver = false) | ||||
|         { | ||||
|             if (_driver == null) | ||||
|             { | ||||
|                 var driverPath = ChromeDriverManager.GetDriverPath(); | ||||
|                 if (string.IsNullOrEmpty(driverPath) || !File.Exists(driverPath)) | ||||
|                 try | ||||
|                 { | ||||
|                     driverPath = ChromeDriverManager.SetupChromeDriverAsync().GetAwaiter().GetResult(); | ||||
|                     // ChromeDriverManager를 사용하여 안정적으로 드라이버 설정 | ||||
|                     var driverPath = await ChromeDriverManager.SetupChromeDriverAsync(); | ||||
|  | ||||
|                     // ChromeDriver 서비스 생성 | ||||
|                     _service = ChromeDriverService.CreateDefaultService(Path.GetDirectoryName(driverPath), Path.GetFileName(driverPath)); | ||||
|                     _service.HideCommandPromptWindow = true; | ||||
|  | ||||
|                     // 안정적인 Chrome 옵션 가져오기 (브라우저 창 숨김) | ||||
|                     var options = ChromeDriverManager.CreateBaseChromeOptions(!showdriver); | ||||
|  | ||||
|                     // 추가 보안 및 안정성 옵션 | ||||
|                     options.AddArgument("--user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36"); | ||||
|                     options.AddArgument("--disable-blink-features=AutomationControlled"); | ||||
|                     options.AddExcludedArgument("enable-automation"); | ||||
|                     options.AddAdditionalOption("useAutomationExtension", false); | ||||
|  | ||||
|                     // ChromeDriver 생성 | ||||
|                     _driver = new ChromeDriver(_service, options); | ||||
|  | ||||
|                     // 웹드라이버 감지 방지 | ||||
|                     ((IJavaScriptExecutor)_driver).ExecuteScript("Object.defineProperty(navigator, 'webdriver', {get: () => undefined})"); | ||||
|  | ||||
|                     Console.WriteLine("NamguLibrarySearcher ChromeDriver 초기화 완료"); | ||||
|                 } | ||||
|                 catch (Exception ex) | ||||
|                 { | ||||
|                     Console.WriteLine($"ChromeDriver 초기화 실패: {ex.Message}"); | ||||
|                     throw new InvalidOperationException($"ChromeDriver 초기화에 실패했습니다: {ex.Message}", ex); | ||||
|                 } | ||||
|                 _service = ChromeDriverService.CreateDefaultService(Path.GetDirectoryName(driverPath), Path.GetFileName(driverPath)); | ||||
|                 _service.HideCommandPromptWindow = true; | ||||
|                 var options = new ChromeOptions(); | ||||
|                 options.AddArgument("--no-sandbox"); | ||||
|                 options.AddArgument("--disable-dev-shm-usage"); | ||||
|                 options.AddArgument("--disable-gpu"); | ||||
|                 options.AddArgument("--window-size=640,700"); | ||||
|                 options.AddArgument("--user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36"); | ||||
|                 options.AddArgument("--disable-blink-features=AutomationControlled"); | ||||
|                 options.AddExcludedArgument("enable-automation"); | ||||
|                 options.AddAdditionalOption("useAutomationExtension", false); | ||||
|                 _driver = new ChromeDriver(_service, options); | ||||
|                 ((IJavaScriptExecutor)_driver).ExecuteScript("Object.defineProperty(navigator, 'webdriver', {get: () => undefined})"); | ||||
|             } | ||||
|         } | ||||
|  | ||||
| @@ -150,7 +177,7 @@ namespace BokBonCheck | ||||
|             try | ||||
|             { | ||||
|                 if (_driver == null) | ||||
|                    throw new InvalidOperationException("드라이버가 시작되지 않았습니다. StartDriver()를 먼저 호출하세요."); | ||||
|                     throw new InvalidOperationException("드라이버가 시작되지 않았습니다. StartDriver()를 먼저 호출하세요."); | ||||
|  | ||||
|                 _driver.Navigate().GoToUrl(SiteUrl); | ||||
|  | ||||
|   | ||||
| @@ -9,6 +9,7 @@ using WebDriverManager.DriverConfigs.Impl; | ||||
| using System.IO; | ||||
| using System.Runtime.InteropServices; | ||||
| using System.Threading; | ||||
| using UniMarc.마크; | ||||
|  | ||||
| namespace BokBonCheck | ||||
| { | ||||
| @@ -116,7 +117,7 @@ namespace BokBonCheck | ||||
|                 } | ||||
|                 return true; | ||||
|             } | ||||
|             catch(Exception ex) | ||||
|             catch (Exception ex) | ||||
|             { | ||||
|                 Console.WriteLine(ex.Message); | ||||
|                 return false; | ||||
| @@ -130,7 +131,7 @@ namespace BokBonCheck | ||||
|             SiteName = "남구통합도서관(효천어울림도서관)"; | ||||
|         } | ||||
|  | ||||
|       | ||||
|  | ||||
|         protected override bool SelectLibrary(WebDriverWait wait) | ||||
|         { | ||||
|             IWebElement searchBox = null; | ||||
| @@ -176,11 +177,11 @@ namespace BokBonCheck | ||||
|                 var selector = "#clickAll"; | ||||
|                 searchBox = wait.Until(d => d.FindElement(By.CssSelector(selector))); | ||||
|                 if (searchBox == null) return false; | ||||
|                 if ( searchBox.Selected == true) | ||||
|                 if (searchBox.Selected == true) | ||||
|                 { | ||||
|                     SafeClick(searchBox); | ||||
|                 } | ||||
|                | ||||
|  | ||||
|  | ||||
|                 selector = "#libSQ"; | ||||
|                 searchBox = wait.Until(d => d.FindElement(By.CssSelector(selector))); | ||||
| @@ -203,7 +204,7 @@ namespace BokBonCheck | ||||
|         public string SiteName { get; protected set; } = "남구통합도서관(전체)"; | ||||
|         public string SiteUrl => "https://lib.namgu.gwangju.kr/main/bookSearch"; | ||||
|  | ||||
|         public int No { get;  set; } | ||||
|         public int No { get; set; } | ||||
|  | ||||
|         private ChromeDriver _driver; | ||||
|         private ChromeDriverService _service; | ||||
| @@ -219,28 +220,56 @@ namespace BokBonCheck | ||||
|             this.No = no; | ||||
|         } | ||||
|  | ||||
|         public void StartDriver() | ||||
|         //public async Task StartDriverAsync(bool showdriver=false) | ||||
|         //{ | ||||
|         //    if (_driver == null) | ||||
|         //    { | ||||
|         //        try | ||||
|         //        { | ||||
|         //            // ChromeDriverManager를 사용하여 안정적으로 드라이버 설정 | ||||
|         //            var driverPath = await ChromeDriverManager.SetupChromeDriverAsync(); | ||||
|  | ||||
|         //            // ChromeDriver 서비스 생성 | ||||
|         //            _service = ChromeDriverService.CreateDefaultService(Path.GetDirectoryName(driverPath), Path.GetFileName(driverPath)); | ||||
|         //            _service.HideCommandPromptWindow = true; | ||||
|  | ||||
|         //            // 안정적인 Chrome 옵션 가져오기 (브라우저 창 숨김) | ||||
|         //            var options = ChromeDriverManager.CreateBaseChromeOptions(!showdriver); | ||||
|  | ||||
|         //            // 추가 보안 및 안정성 옵션 | ||||
|         //            options.AddArgument("--user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36"); | ||||
|         //            options.AddArgument("--disable-blink-features=AutomationControlled"); | ||||
|         //            options.AddExcludedArgument("enable-automation"); | ||||
|         //            options.AddAdditionalOption("useAutomationExtension", false); | ||||
|  | ||||
|         //            // ChromeDriver 생성 | ||||
|         //            _driver = new ChromeDriver(_service, options); | ||||
|  | ||||
|         //            // 웹드라이버 감지 방지 | ||||
|         //            ((IJavaScriptExecutor)_driver).ExecuteScript("Object.defineProperty(navigator, 'webdriver', {get: () => undefined})"); | ||||
|  | ||||
|         //            Console.WriteLine("NamguLibrarySearcher ChromeDriver 초기화 완료"); | ||||
|         //        } | ||||
|         //        catch (Exception ex) | ||||
|         //        { | ||||
|         //            Console.WriteLine($"ChromeDriver 초기화 실패: {ex.Message}"); | ||||
|         //            throw new InvalidOperationException($"ChromeDriver 초기화에 실패했습니다: {ex.Message}", ex); | ||||
|         //        } | ||||
|         //    } | ||||
|         //} | ||||
|  | ||||
|         // 기존 StartDriver 메서드를 유지하여 호환성 보장 | ||||
|         public void StartDriver(bool showBrowser) | ||||
|         { | ||||
|             if (_driver == null) | ||||
|             try | ||||
|             { | ||||
|                 var driverPath = ChromeDriverManager.GetDriverPath(); | ||||
|                 if (string.IsNullOrEmpty(driverPath) || !File.Exists(driverPath)) | ||||
|                 { | ||||
|                     driverPath = ChromeDriverManager.SetupChromeDriverAsync().GetAwaiter().GetResult(); | ||||
|                 } | ||||
|                 _service = ChromeDriverService.CreateDefaultService(Path.GetDirectoryName(driverPath), Path.GetFileName(driverPath)); | ||||
|                 _service.HideCommandPromptWindow = true; | ||||
|                 var options = new ChromeOptions(); | ||||
|                 options.AddArgument("--no-sandbox"); | ||||
|                 options.AddArgument("--disable-dev-shm-usage"); | ||||
|                 options.AddArgument("--disable-gpu"); | ||||
|                 options.AddArgument("--window-size=640,700"); | ||||
|                 options.AddArgument("--user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36"); | ||||
|                 options.AddArgument("--disable-blink-features=AutomationControlled"); | ||||
|                 options.AddExcludedArgument("enable-automation"); | ||||
|                 options.AddAdditionalOption("useAutomationExtension", false); | ||||
|                 _driver = new ChromeDriver(_service, options); | ||||
|                 ((IJavaScriptExecutor)_driver).ExecuteScript("Object.defineProperty(navigator, 'webdriver', {get: () => undefined})"); | ||||
|                 // 동기적으로 실행 (권장하지 않음) | ||||
|                 StartDriverAsync(showBrowser).GetAwaiter().GetResult(); | ||||
|             } | ||||
|             catch (Exception ex) | ||||
|             { | ||||
|                 Console.WriteLine($"StartDriver 실패: {ex.Message}"); | ||||
|                 throw; | ||||
|             } | ||||
|         } | ||||
|  | ||||
| @@ -259,6 +288,45 @@ namespace BokBonCheck | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         public async Task StartDriverAsync(bool showdriver = false) | ||||
|         { | ||||
|             if (_driver == null) | ||||
|             { | ||||
|                 try | ||||
|                 { | ||||
|                     // ChromeDriverManager를 사용하여 안정적으로 드라이버 설정 | ||||
|                     var driverPath = await ChromeDriverManager.SetupChromeDriverAsync(); | ||||
|  | ||||
|                     // ChromeDriver 서비스 생성 | ||||
|                     _service = ChromeDriverService.CreateDefaultService(Path.GetDirectoryName(driverPath), Path.GetFileName(driverPath)); | ||||
|                     _service.HideCommandPromptWindow = true; | ||||
|  | ||||
|                     // 안정적인 Chrome 옵션 가져오기 (브라우저 창 숨김) | ||||
|                     var options = ChromeDriverManager.CreateBaseChromeOptions(!showdriver); | ||||
|  | ||||
|                     // 추가 보안 및 안정성 옵션 | ||||
|                     options.AddArgument("--user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36"); | ||||
|                     options.AddArgument("--disable-blink-features=AutomationControlled"); | ||||
|                     options.AddExcludedArgument("enable-automation"); | ||||
|                     options.AddAdditionalOption("useAutomationExtension", false); | ||||
|  | ||||
|                     // ChromeDriver 생성 | ||||
|                     _driver = new ChromeDriver(_service, options); | ||||
|  | ||||
|                     // 웹드라이버 감지 방지 | ||||
|                     ((IJavaScriptExecutor)_driver).ExecuteScript("Object.defineProperty(navigator, 'webdriver', {get: () => undefined})"); | ||||
|  | ||||
|                     Console.WriteLine("NamguLibrarySearcher ChromeDriver 초기화 완료"); | ||||
|                 } | ||||
|                 catch (Exception ex) | ||||
|                 { | ||||
|                     Console.WriteLine($"ChromeDriver 초기화 실패: {ex.Message}"); | ||||
|                     throw new InvalidOperationException($"ChromeDriver 초기화에 실패했습니다: {ex.Message}", ex); | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
|  | ||||
|  | ||||
|  | ||||
|         virtual protected bool SelectLibrary(WebDriverWait wait) | ||||
|         { | ||||
| @@ -330,8 +398,11 @@ namespace BokBonCheck | ||||
|  | ||||
|             try | ||||
|             { | ||||
|                 // 드라이버가 없으면 자동으로 시작 | ||||
|                 if (_driver == null) | ||||
|                     throw new InvalidOperationException("드라이버가 시작되지 않았습니다. StartDriver()를 먼저 호출하세요."); | ||||
|                 { | ||||
|                     await StartDriverAsync(); | ||||
|                 } | ||||
|  | ||||
|                 _driver.Navigate().GoToUrl(SiteUrl); | ||||
|  | ||||
| @@ -347,7 +418,7 @@ namespace BokBonCheck | ||||
|                 //} | ||||
|  | ||||
|                 //대상도서관 선택 | ||||
|                 if(SelectLibrary(wait)==false) | ||||
|                 if (SelectLibrary(wait) == false) | ||||
|                 { | ||||
|                     result.ErrorMessage = "도서관선택실패"; | ||||
|                     result.BookCount = -1; | ||||
| @@ -496,7 +567,7 @@ namespace BokBonCheck | ||||
|                 var match = System.Text.RegularExpressions.Regex.Match(text, @"전체\s*(\d+)"); | ||||
|                 if (match.Success) | ||||
|                 { | ||||
|                     if(int.TryParse(match.Groups[1].Value,out int vqty)==false) | ||||
|                     if (int.TryParse(match.Groups[1].Value, out int vqty) == false) | ||||
|                     { | ||||
|                         errmessage = $"수량값오류({match.Groups[1].Value})"; | ||||
|                         return -1; | ||||
| @@ -521,7 +592,7 @@ namespace BokBonCheck | ||||
|             } | ||||
|         } | ||||
|  | ||||
|          | ||||
|  | ||||
|  | ||||
|         // 페이지 변경을 감지하는 메서드 | ||||
|         public async Task WaitForPageChange(WebDriverWait wait) | ||||
| @@ -540,9 +611,22 @@ namespace BokBonCheck | ||||
|                 // 방법 5: 특정 텍스트가 페이지에 나타날 때까지 대기 | ||||
|                 wait.Until(d => | ||||
|                 { | ||||
|                     var pageText = d.FindElement(By.ClassName("search-result")).Text; | ||||
|                     if (pageText.Contains("검색결과가 없습니다")) return true; | ||||
|                     return pageText.Contains("에 대하여") && pageText.Contains("검색되었습니다"); | ||||
|                     try | ||||
|                     { | ||||
|                         var byclassname = By.ClassName("search-result"); | ||||
|                         var elm = d.FindElement(byclassname); | ||||
|                         if (elm == null) | ||||
|                         { | ||||
|                             return false; | ||||
|                         } | ||||
|                         var pageText = elm.Text; | ||||
|                         if (pageText.Contains("검색결과가 없습니다")) return true; | ||||
|                         return pageText.Contains("에 대하여") && pageText.Contains("검색되었습니다"); | ||||
|                     } | ||||
|                     catch | ||||
|                     { | ||||
|                         return false; | ||||
|                     } | ||||
|                 }); | ||||
|  | ||||
|             } | ||||
|   | ||||
| @@ -2961,17 +2961,22 @@ namespace WindowsFormsApp1 | ||||
|         } | ||||
|         public string VersionInfo() | ||||
|         { | ||||
|             string version = ""; | ||||
|             StreamReader sr = new StreamReader(Application.StartupPath + "\\update.inf"); | ||||
|             while (!sr.EndOfStream) | ||||
|             string version = "0"; | ||||
|             var fn = Application.StartupPath + "\\update.inf"; | ||||
|             if(System.IO.File.Exists(fn)) | ||||
|             { | ||||
|                 string line = sr.ReadLine(); | ||||
|                 if (line.IndexOf("count=", 0) != -1) | ||||
|                 StreamReader sr = new StreamReader(fn); | ||||
|                 while (!sr.EndOfStream) | ||||
|                 { | ||||
|                     version = line.Replace("count=", ""); | ||||
|                     break; | ||||
|                     string line = sr.ReadLine(); | ||||
|                     if (line.IndexOf("count=", 0) != -1) | ||||
|                     { | ||||
|                         version = line.Replace("count=", ""); | ||||
|                         break; | ||||
|                     } | ||||
|                 } | ||||
|             } | ||||
|              | ||||
|             return version; | ||||
|         } | ||||
|     } | ||||
|   | ||||
| @@ -78,8 +78,8 @@ | ||||
|     <ApplicationIcon>UniMarc.ico</ApplicationIcon> | ||||
|   </PropertyGroup> | ||||
|   <ItemGroup> | ||||
|     <Reference Include="AngleSharp, Version=1.0.4.0, Culture=neutral, PublicKeyToken=e83494dcdc6d31ea, processorArchitecture=MSIL"> | ||||
|       <HintPath>..\packages\AngleSharp.1.0.4\lib\net472\AngleSharp.dll</HintPath> | ||||
|     <Reference Include="AngleSharp, Version=1.3.0.0, Culture=neutral, PublicKeyToken=e83494dcdc6d31ea, processorArchitecture=MSIL"> | ||||
|       <HintPath>..\packages\AngleSharp.1.3.0\lib\net472\AngleSharp.dll</HintPath> | ||||
|     </Reference> | ||||
|     <Reference Include="arCommUtil"> | ||||
|       <HintPath>..\dll\arCommUtil.dll</HintPath> | ||||
| @@ -90,14 +90,23 @@ | ||||
|     <Reference Include="ArLog.Net4"> | ||||
|       <HintPath>..\dll\ArLog.Net4.dll</HintPath> | ||||
|     </Reference> | ||||
|     <Reference Include="BouncyCastle.Cryptography, Version=2.0.0.0, Culture=neutral, PublicKeyToken=072edcf4a5328938, processorArchitecture=MSIL"> | ||||
|       <HintPath>..\packages\BouncyCastle.Cryptography.2.5.1\lib\net461\BouncyCastle.Cryptography.dll</HintPath> | ||||
|     </Reference> | ||||
|     <Reference Include="CarlosAg.ExcelXmlWriter"> | ||||
|       <HintPath>..\dll\CarlosAg.ExcelXmlWriter.dll</HintPath> | ||||
|     </Reference> | ||||
|     <Reference Include="ICSharpCode.SharpZipLib, Version=1.4.2.13, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL"> | ||||
|       <HintPath>..\packages\SharpZipLib.1.4.2\lib\netstandard2.0\ICSharpCode.SharpZipLib.dll</HintPath> | ||||
|     </Reference> | ||||
|     <Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> | ||||
|       <HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.7.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath> | ||||
|     <Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> | ||||
|       <HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.8.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath> | ||||
|     </Reference> | ||||
|     <Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions, Version=8.0.0.2, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> | ||||
|       <HintPath>..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.8.0.2\lib\net462\Microsoft.Extensions.DependencyInjection.Abstractions.dll</HintPath> | ||||
|     </Reference> | ||||
|     <Reference Include="Microsoft.Extensions.Logging.Abstractions, Version=8.0.0.3, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> | ||||
|       <HintPath>..\packages\Microsoft.Extensions.Logging.Abstractions.8.0.3\lib\net462\Microsoft.Extensions.Logging.Abstractions.dll</HintPath> | ||||
|     </Reference> | ||||
|     <Reference Include="Microsoft.VisualBasic" /> | ||||
|     <Reference Include="Microsoft.Win32.Registry, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> | ||||
| @@ -105,10 +114,10 @@ | ||||
|     </Reference> | ||||
|     <Reference Include="MySql.Data, Version=8.0.21.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL" /> | ||||
|     <Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> | ||||
|       <HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath> | ||||
|       <HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath> | ||||
|     </Reference> | ||||
|     <Reference Include="Renci.SshNet, Version=2020.0.1.0, Culture=neutral, PublicKeyToken=1cee9f8bde3db106, processorArchitecture=MSIL"> | ||||
|       <HintPath>..\packages\SSH.NET.2020.0.1\lib\net40\Renci.SshNet.dll</HintPath> | ||||
|     <Reference Include="Renci.SshNet, Version=2025.0.0.1, Culture=neutral, PublicKeyToken=1cee9f8bde3db106, processorArchitecture=MSIL"> | ||||
|       <HintPath>..\packages\SSH.NET.2025.0.0\lib\net462\Renci.SshNet.dll</HintPath> | ||||
|     </Reference> | ||||
|     <Reference Include="System" /> | ||||
|     <Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> | ||||
| @@ -116,6 +125,9 @@ | ||||
|     </Reference> | ||||
|     <Reference Include="System.Core" /> | ||||
|     <Reference Include="System.DirectoryServices" /> | ||||
|     <Reference Include="System.Formats.Asn1, Version=8.0.0.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> | ||||
|       <HintPath>..\packages\System.Formats.Asn1.8.0.2\lib\net462\System.Formats.Asn1.dll</HintPath> | ||||
|     </Reference> | ||||
|     <Reference Include="System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> | ||||
|       <HintPath>..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll</HintPath> | ||||
|     </Reference> | ||||
| @@ -134,14 +146,14 @@ | ||||
|       <HintPath>..\packages\System.Security.Principal.Windows.5.0.0\lib\net461\System.Security.Principal.Windows.dll</HintPath> | ||||
|     </Reference> | ||||
|     <Reference Include="System.ServiceModel" /> | ||||
|     <Reference Include="System.Text.Encoding.CodePages, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> | ||||
|       <HintPath>..\packages\System.Text.Encoding.CodePages.6.0.0\lib\net461\System.Text.Encoding.CodePages.dll</HintPath> | ||||
|     <Reference Include="System.Text.Encoding.CodePages, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> | ||||
|       <HintPath>..\packages\System.Text.Encoding.CodePages.8.0.0\lib\net462\System.Text.Encoding.CodePages.dll</HintPath> | ||||
|     </Reference> | ||||
|     <Reference Include="System.Text.Encodings.Web, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> | ||||
|       <HintPath>..\packages\System.Text.Encodings.Web.7.0.0\lib\net462\System.Text.Encodings.Web.dll</HintPath> | ||||
|     <Reference Include="System.Text.Encodings.Web, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> | ||||
|       <HintPath>..\packages\System.Text.Encodings.Web.8.0.0\lib\net462\System.Text.Encodings.Web.dll</HintPath> | ||||
|     </Reference> | ||||
|     <Reference Include="System.Text.Json, Version=7.0.0.3, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> | ||||
|       <HintPath>..\packages\System.Text.Json.7.0.3\lib\net462\System.Text.Json.dll</HintPath> | ||||
|     <Reference Include="System.Text.Json, Version=8.0.0.5, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> | ||||
|       <HintPath>..\packages\System.Text.Json.8.0.5\lib\net462\System.Text.Json.dll</HintPath> | ||||
|     </Reference> | ||||
|     <Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> | ||||
|       <HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath> | ||||
| @@ -161,13 +173,13 @@ | ||||
|     <Reference Include="System.Windows.Forms" /> | ||||
|     <Reference Include="System.Xml" /> | ||||
|     <Reference Include="WebDriver, Version=4.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||||
|       <HintPath>..\packages\Selenium.WebDriver.4.16.2\lib\netstandard2.0\WebDriver.dll</HintPath> | ||||
|       <HintPath>..\packages\Selenium.WebDriver.4.34.0\lib\netstandard2.0\WebDriver.dll</HintPath> | ||||
|     </Reference> | ||||
|     <Reference Include="WebDriver.Support, Version=4.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||||
|       <HintPath>..\packages\Selenium.Support.4.16.2\lib\netstandard2.0\WebDriver.Support.dll</HintPath> | ||||
|       <HintPath>..\packages\Selenium.Support.4.34.0\lib\netstandard2.0\WebDriver.Support.dll</HintPath> | ||||
|     </Reference> | ||||
|     <Reference Include="WebDriverManager, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||||
|       <HintPath>..\packages\WebDriverManager.2.17.1\lib\net462\WebDriverManager.dll</HintPath> | ||||
|     <Reference Include="WebDriverManager, Version=2.17.6.0, Culture=neutral, processorArchitecture=MSIL"> | ||||
|       <HintPath>..\packages\WebDriverManager.2.17.6\lib\net472\WebDriverManager.dll</HintPath> | ||||
|     </Reference> | ||||
|   </ItemGroup> | ||||
|   <ItemGroup> | ||||
| @@ -182,7 +194,7 @@ | ||||
|       <DesignTime>True</DesignTime> | ||||
|       <DependentUpon>Reference.svcmap</DependentUpon> | ||||
|     </Compile> | ||||
|     <Compile Include="CUtill.cs" /> | ||||
|     <Compile Include="PUB.cs" /> | ||||
|     <Compile Include="SearchModel\BookSearchService.cs" /> | ||||
|     <Compile Include="SearchModel\ChromeDriverManager.cs" /> | ||||
|     <Compile Include="SearchModel\DownloadProgressForm.cs"> | ||||
| @@ -1944,11 +1956,11 @@ | ||||
|     <Content Include="Resources\3_2_2_편목.png" /> | ||||
|   </ItemGroup> | ||||
|   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||||
|   <Import Project="..\packages\Selenium.WebDriver.4.16.2\build\Selenium.WebDriver.targets" Condition="Exists('..\packages\Selenium.WebDriver.4.16.2\build\Selenium.WebDriver.targets')" /> | ||||
|   <Import Project="..\packages\Selenium.WebDriver.4.34.0\build\Selenium.WebDriver.targets" Condition="Exists('..\packages\Selenium.WebDriver.4.34.0\build\Selenium.WebDriver.targets')" /> | ||||
|   <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> | ||||
|     <PropertyGroup> | ||||
|       <ErrorText>이 프로젝트는 이 컴퓨터에 없는 NuGet 패키지를 참조합니다. 해당 패키지를 다운로드하려면 NuGet 패키지 복원을 사용하십시오. 자세한 내용은 http://go.microsoft.com/fwlink/?LinkID=322105를 참조하십시오. 누락된 파일은 {0}입니다.</ErrorText> | ||||
|     </PropertyGroup> | ||||
|     <Error Condition="!Exists('..\packages\Selenium.WebDriver.4.16.2\build\Selenium.WebDriver.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Selenium.WebDriver.4.16.2\build\Selenium.WebDriver.targets'))" /> | ||||
|     <Error Condition="!Exists('..\packages\Selenium.WebDriver.4.34.0\build\Selenium.WebDriver.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Selenium.WebDriver.4.34.0\build\Selenium.WebDriver.targets'))" /> | ||||
|   </Target> | ||||
| </Project> | ||||
| @@ -1,23 +1,27 @@ | ||||
| <?xml version="1.0" encoding="utf-8"?> | ||||
| <packages> | ||||
|   <package id="AngleSharp" version="1.0.4" targetFramework="net472" /> | ||||
|   <package id="Microsoft.Bcl.AsyncInterfaces" version="7.0.0" targetFramework="net472" /> | ||||
|   <package id="AngleSharp" version="1.3.0" targetFramework="net472" /> | ||||
|   <package id="BouncyCastle.Cryptography" version="2.5.1" targetFramework="net472" /> | ||||
|   <package id="Microsoft.Bcl.AsyncInterfaces" version="8.0.0" targetFramework="net472" /> | ||||
|   <package id="Microsoft.Extensions.DependencyInjection.Abstractions" version="8.0.2" targetFramework="net472" /> | ||||
|   <package id="Microsoft.Extensions.Logging.Abstractions" version="8.0.3" targetFramework="net472" /> | ||||
|   <package id="Microsoft.Win32.Registry" version="5.0.0" targetFramework="net472" /> | ||||
|   <package id="Newtonsoft.Json" version="13.0.1" targetFramework="net472" /> | ||||
|   <package id="Selenium.Support" version="4.16.2" targetFramework="net472" /> | ||||
|   <package id="Selenium.WebDriver" version="4.16.2" targetFramework="net472" /> | ||||
|   <package id="Newtonsoft.Json" version="13.0.3" targetFramework="net472" /> | ||||
|   <package id="Selenium.Support" version="4.34.0" targetFramework="net472" /> | ||||
|   <package id="Selenium.WebDriver" version="4.34.0" targetFramework="net472" /> | ||||
|   <package id="SharpZipLib" version="1.4.2" targetFramework="net472" /> | ||||
|   <package id="SSH.NET" version="2020.0.1" targetFramework="net472" /> | ||||
|   <package id="SSH.NET" version="2025.0.0" targetFramework="net472" /> | ||||
|   <package id="System.Buffers" version="4.5.1" targetFramework="net472" /> | ||||
|   <package id="System.Formats.Asn1" version="8.0.2" targetFramework="net472" /> | ||||
|   <package id="System.Memory" version="4.5.5" targetFramework="net472" /> | ||||
|   <package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net472" /> | ||||
|   <package id="System.Runtime.CompilerServices.Unsafe" version="6.0.0" targetFramework="net472" /> | ||||
|   <package id="System.Security.AccessControl" version="5.0.0" targetFramework="net472" /> | ||||
|   <package id="System.Security.Principal.Windows" version="5.0.0" targetFramework="net472" /> | ||||
|   <package id="System.Text.Encoding.CodePages" version="6.0.0" targetFramework="net472" /> | ||||
|   <package id="System.Text.Encodings.Web" version="7.0.0" targetFramework="net472" /> | ||||
|   <package id="System.Text.Json" version="7.0.3" targetFramework="net472" /> | ||||
|   <package id="System.Text.Encoding.CodePages" version="8.0.0" targetFramework="net472" /> | ||||
|   <package id="System.Text.Encodings.Web" version="8.0.0" targetFramework="net472" /> | ||||
|   <package id="System.Text.Json" version="8.0.5" targetFramework="net472" /> | ||||
|   <package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net472" /> | ||||
|   <package id="System.ValueTuple" version="4.5.0" targetFramework="net472" /> | ||||
|   <package id="WebDriverManager" version="2.17.1" targetFramework="net472" /> | ||||
|   <package id="WebDriverManager" version="2.17.6" targetFramework="net472" /> | ||||
| </packages> | ||||
| @@ -1,4 +1,5 @@ | ||||
| using ExcelTest; | ||||
| using AR; | ||||
| using ExcelTest; | ||||
| using System; | ||||
| using System.Collections.Generic; | ||||
| using System.ComponentModel; | ||||
| @@ -91,7 +92,7 @@ namespace UniMarc | ||||
|                 return; | ||||
|             } | ||||
|             string tText = string.Format("{0} 를 수정 하시겠습니까?", dgvList.SelectedRows[0].Cells["comp_name"].Value.ToString()); | ||||
|             if (CUtill.MsgQ(tText) == DialogResult.Yes) | ||||
|             if (UTIL.MsgQ(tText) == DialogResult.Yes) | ||||
|             { | ||||
|                 CheckText(); | ||||
|                 string[] tEdit_tbl = { | ||||
| @@ -121,7 +122,7 @@ namespace UniMarc | ||||
|                 return; | ||||
|             } | ||||
|             string tText = string.Format("{0} 를 삭제 하시겠습니까?", dgvList.SelectedRows[0].Cells["comp_name"].Value.ToString()); | ||||
|             if (CUtill.MsgQ(tText) == DialogResult.Yes) | ||||
|             if (UTIL.MsgQ(tText) == DialogResult.Yes) | ||||
|             { | ||||
|                 string tD_cmd = mDb.DB_Delete("Comp", "idx", dgvList.SelectedRows[0].Cells["dbIDX"].Value.ToString(), "comp_name", dgvList.SelectedRows[0].Cells["comp_name"].Value.ToString()); | ||||
|                 mDb.DB_Send_CMD_reVoid(tD_cmd); | ||||
|   | ||||
| @@ -335,7 +335,7 @@ namespace UniMarc.마크 | ||||
|             //        break; | ||||
|             //} | ||||
|             string UpCMD = db.More_Update(Table, EditTable, EditColumn, SearchTable, SearchColumn); | ||||
|             CUtill.mLog.Add("ADDMarcUPDATE", string.Format("{0}({1}) : {2}", mUserName, mCompidx, UpCMD.Replace("\r", " ").Replace("\n", " "))); | ||||
|             PUB.log.Add("ADDMarcUPDATE", string.Format("{0}({1}) : {2}", mUserName, mCompidx, UpCMD.Replace("\r", " ").Replace("\n", " "))); | ||||
|             db.DB_Send_CMD_reVoid(UpCMD); | ||||
|         } | ||||
|         #region UpdateSub | ||||
| @@ -386,7 +386,7 @@ namespace UniMarc.마크 | ||||
|             }; | ||||
|  | ||||
|             string InCMD = db.DB_INSERT(Table, InsertTable, InsertColumn); | ||||
|             CUtill.mLog.Add("ADDMarcINSERT", string.Format("{0}({1}) : {2}", mUserName, mCompidx, InCMD.Replace("\r", " ").Replace("\n", " "))); | ||||
|             PUB.log.Add("ADDMarcINSERT", string.Format("{0}({1}) : {2}", mUserName, mCompidx, InCMD.Replace("\r", " ").Replace("\n", " "))); | ||||
|             db.DB_Send_CMD_reVoid(InCMD); | ||||
|         } | ||||
|  | ||||
|   | ||||
							
								
								
									
										71
									
								
								unimarc/unimarc/마크/Check_copyWD.Designer.cs
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										71
									
								
								unimarc/unimarc/마크/Check_copyWD.Designer.cs
									
									
									
										generated
									
									
									
								
							| @@ -28,7 +28,7 @@ | ||||
|         /// </summary> | ||||
|         private void InitializeComponent() | ||||
|         { | ||||
|             System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); | ||||
|             System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); | ||||
|             this.panel1 = new System.Windows.Forms.Panel(); | ||||
|             this.chkRetryErrData = new System.Windows.Forms.CheckBox(); | ||||
|             this.groupBox1 = new System.Windows.Forms.GroupBox(); | ||||
| @@ -66,8 +66,7 @@ | ||||
|             this.btn_GridReset = new System.Windows.Forms.Button(); | ||||
|             this.btn_OpenMemo = new System.Windows.Forms.Button(); | ||||
|             this.chk_spChar = new System.Windows.Forms.CheckBox(); | ||||
|             this.panel5 = new System.Windows.Forms.Panel(); | ||||
|             this.webBrowser1 = new System.Windows.Forms.WebBrowser(); | ||||
|             this.chkShowBrowser = new System.Windows.Forms.CheckBox(); | ||||
|             this.panel1.SuspendLayout(); | ||||
|             this.groupBox1.SuspendLayout(); | ||||
|             ((System.ComponentModel.ISupportInitialize)(this.SearchCount)).BeginInit(); | ||||
| @@ -77,12 +76,12 @@ | ||||
|             this.panel6.SuspendLayout(); | ||||
|             this.statusStrip1.SuspendLayout(); | ||||
|             this.panel4.SuspendLayout(); | ||||
|             this.panel5.SuspendLayout(); | ||||
|             this.SuspendLayout(); | ||||
|             //  | ||||
|             // panel1 | ||||
|             //  | ||||
|             this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; | ||||
|             this.panel1.Controls.Add(this.chkShowBrowser); | ||||
|             this.panel1.Controls.Add(this.chkRetryErrData); | ||||
|             this.panel1.Controls.Add(this.groupBox1); | ||||
|             this.panel1.Controls.Add(this.rb_isNumber); | ||||
| @@ -93,7 +92,7 @@ | ||||
|             this.panel1.Dock = System.Windows.Forms.DockStyle.Top; | ||||
|             this.panel1.Location = new System.Drawing.Point(0, 34); | ||||
|             this.panel1.Name = "panel1"; | ||||
|             this.panel1.Size = new System.Drawing.Size(629, 106); | ||||
|             this.panel1.Size = new System.Drawing.Size(637, 106); | ||||
|             this.panel1.TabIndex = 0; | ||||
|             //  | ||||
|             // chkRetryErrData | ||||
| @@ -281,7 +280,7 @@ | ||||
|             this.panel2.Dock = System.Windows.Forms.DockStyle.Top; | ||||
|             this.panel2.Location = new System.Drawing.Point(0, 0); | ||||
|             this.panel2.Name = "panel2"; | ||||
|             this.panel2.Size = new System.Drawing.Size(629, 34); | ||||
|             this.panel2.Size = new System.Drawing.Size(637, 34); | ||||
|             this.panel2.TabIndex = 0; | ||||
|             //  | ||||
|             // btn_SiteDenote | ||||
| @@ -318,14 +317,14 @@ | ||||
|             this.dataGridView1.BackgroundColor = System.Drawing.SystemColors.Control; | ||||
|             this.dataGridView1.BorderStyle = System.Windows.Forms.BorderStyle.None; | ||||
|             this.dataGridView1.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single; | ||||
|             dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; | ||||
|             dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control; | ||||
|             dataGridViewCellStyle1.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129))); | ||||
|             dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText; | ||||
|             dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; | ||||
|             dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText; | ||||
|             dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True; | ||||
|             this.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; | ||||
|             dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; | ||||
|             dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Control; | ||||
|             dataGridViewCellStyle3.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129))); | ||||
|             dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.WindowText; | ||||
|             dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight; | ||||
|             dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText; | ||||
|             dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True; | ||||
|             this.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle3; | ||||
|             this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; | ||||
|             this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { | ||||
|             this.book_name, | ||||
| @@ -336,7 +335,7 @@ | ||||
|             this.dataGridView1.Location = new System.Drawing.Point(0, 0); | ||||
|             this.dataGridView1.Name = "dataGridView1"; | ||||
|             this.dataGridView1.RowTemplate.Height = 23; | ||||
|             this.dataGridView1.Size = new System.Drawing.Size(629, 542); | ||||
|             this.dataGridView1.Size = new System.Drawing.Size(637, 542); | ||||
|             this.dataGridView1.TabIndex = 1; | ||||
|             this.dataGridView1.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.dataGridView1_RowPostPaint); | ||||
|             this.dataGridView1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.dataGridView1_KeyDown); | ||||
| @@ -384,10 +383,10 @@ | ||||
|             this.panel3.Controls.Add(this.panel4); | ||||
|             this.panel3.Controls.Add(this.panel1); | ||||
|             this.panel3.Controls.Add(this.panel2); | ||||
|             this.panel3.Dock = System.Windows.Forms.DockStyle.Left; | ||||
|             this.panel3.Dock = System.Windows.Forms.DockStyle.Fill; | ||||
|             this.panel3.Location = new System.Drawing.Point(0, 0); | ||||
|             this.panel3.Name = "panel3"; | ||||
|             this.panel3.Size = new System.Drawing.Size(629, 738); | ||||
|             this.panel3.Size = new System.Drawing.Size(637, 738); | ||||
|             this.panel3.TabIndex = 3; | ||||
|             //  | ||||
|             // panel6 | ||||
| @@ -397,7 +396,7 @@ | ||||
|             this.panel6.Dock = System.Windows.Forms.DockStyle.Fill; | ||||
|             this.panel6.Location = new System.Drawing.Point(0, 174); | ||||
|             this.panel6.Name = "panel6"; | ||||
|             this.panel6.Size = new System.Drawing.Size(629, 564); | ||||
|             this.panel6.Size = new System.Drawing.Size(637, 564); | ||||
|             this.panel6.TabIndex = 3; | ||||
|             //  | ||||
|             // statusStrip1 | ||||
| @@ -406,7 +405,7 @@ | ||||
|             this.lblStatus}); | ||||
|             this.statusStrip1.Location = new System.Drawing.Point(0, 542); | ||||
|             this.statusStrip1.Name = "statusStrip1"; | ||||
|             this.statusStrip1.Size = new System.Drawing.Size(629, 22); | ||||
|             this.statusStrip1.Size = new System.Drawing.Size(637, 22); | ||||
|             this.statusStrip1.TabIndex = 2; | ||||
|             this.statusStrip1.Text = "statusStrip1"; | ||||
|             //  | ||||
| @@ -428,7 +427,7 @@ | ||||
|             this.panel4.Dock = System.Windows.Forms.DockStyle.Top; | ||||
|             this.panel4.Location = new System.Drawing.Point(0, 140); | ||||
|             this.panel4.Name = "panel4"; | ||||
|             this.panel4.Size = new System.Drawing.Size(629, 34); | ||||
|             this.panel4.Size = new System.Drawing.Size(637, 34); | ||||
|             this.panel4.TabIndex = 2; | ||||
|             //  | ||||
|             // chk_RemoveBrit | ||||
| @@ -481,31 +480,21 @@ | ||||
|             this.chk_spChar.Text = "특수문자 제거"; | ||||
|             this.chk_spChar.UseVisualStyleBackColor = true; | ||||
|             //  | ||||
|             // panel5 | ||||
|             // chkShowBrowser | ||||
|             //  | ||||
|             this.panel5.Controls.Add(this.webBrowser1); | ||||
|             this.panel5.Dock = System.Windows.Forms.DockStyle.Fill; | ||||
|             this.panel5.Location = new System.Drawing.Point(629, 0); | ||||
|             this.panel5.Name = "panel5"; | ||||
|             this.panel5.Size = new System.Drawing.Size(662, 738); | ||||
|             this.panel5.TabIndex = 4; | ||||
|             //  | ||||
|             // webBrowser1 | ||||
|             //  | ||||
|             this.webBrowser1.Dock = System.Windows.Forms.DockStyle.Fill; | ||||
|             this.webBrowser1.Location = new System.Drawing.Point(0, 0); | ||||
|             this.webBrowser1.MinimumSize = new System.Drawing.Size(20, 20); | ||||
|             this.webBrowser1.Name = "webBrowser1"; | ||||
|             this.webBrowser1.ScriptErrorsSuppressed = true; | ||||
|             this.webBrowser1.Size = new System.Drawing.Size(662, 738); | ||||
|             this.webBrowser1.TabIndex = 2; | ||||
|             this.chkShowBrowser.AutoSize = true; | ||||
|             this.chkShowBrowser.Location = new System.Drawing.Point(515, 81); | ||||
|             this.chkShowBrowser.Name = "chkShowBrowser"; | ||||
|             this.chkShowBrowser.Size = new System.Drawing.Size(96, 16); | ||||
|             this.chkShowBrowser.TabIndex = 8; | ||||
|             this.chkShowBrowser.Text = "브라우저표시"; | ||||
|             this.chkShowBrowser.UseVisualStyleBackColor = true; | ||||
|             //  | ||||
|             // Check_copyWD | ||||
|             //  | ||||
|             this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); | ||||
|             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; | ||||
|             this.ClientSize = new System.Drawing.Size(1291, 738); | ||||
|             this.Controls.Add(this.panel5); | ||||
|             this.ClientSize = new System.Drawing.Size(637, 738); | ||||
|             this.Controls.Add(this.panel3); | ||||
|             this.Name = "Check_copyWD"; | ||||
|             this.Text = "복본조사(WebDriver)"; | ||||
| @@ -526,7 +515,6 @@ | ||||
|             this.statusStrip1.PerformLayout(); | ||||
|             this.panel4.ResumeLayout(false); | ||||
|             this.panel4.PerformLayout(); | ||||
|             this.panel5.ResumeLayout(false); | ||||
|             this.ResumeLayout(false); | ||||
|  | ||||
|         } | ||||
| @@ -547,7 +535,6 @@ | ||||
|         private System.Windows.Forms.Panel panel3; | ||||
|         private System.Windows.Forms.Panel panel6; | ||||
|         private System.Windows.Forms.Panel panel4; | ||||
|         private System.Windows.Forms.Panel panel5; | ||||
|         private System.Windows.Forms.CheckBox chk_spChar; | ||||
|         private System.Windows.Forms.CheckBox chk_RemoveBrit; | ||||
|         public System.Windows.Forms.NumericUpDown SearchCount; | ||||
| @@ -559,7 +546,6 @@ | ||||
|         public System.Windows.Forms.Label lbl_PW; | ||||
|         public System.Windows.Forms.Label lbl_ID; | ||||
|         private System.Windows.Forms.Button btn_SiteDenote; | ||||
|         private System.Windows.Forms.WebBrowser webBrowser1; | ||||
|         private System.Windows.Forms.StatusStrip statusStrip1; | ||||
|         private System.Windows.Forms.ToolStripLabel lblStatus; | ||||
|         private System.Windows.Forms.RadioButton radTargetAll; | ||||
| @@ -572,5 +558,6 @@ | ||||
|         private System.Windows.Forms.DataGridViewTextBoxColumn dvc_remark; | ||||
|         public System.Windows.Forms.CheckBox chkRetryErrData; | ||||
|         public System.Windows.Forms.GroupBox groupBox1; | ||||
|         public System.Windows.Forms.CheckBox chkShowBrowser; | ||||
|     } | ||||
| } | ||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @@ -132,4 +132,7 @@ | ||||
|   <metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> | ||||
|     <value>17, 17</value> | ||||
|   </metadata> | ||||
|   <metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> | ||||
|     <value>17, 17</value> | ||||
|   </metadata> | ||||
| </root> | ||||
							
								
								
									
										262
									
								
								unimarc/unimarc/마크/DLS_Copy.Designer.cs
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										262
									
								
								unimarc/unimarc/마크/DLS_Copy.Designer.cs
									
									
									
										generated
									
									
									
								
							| @@ -29,11 +29,15 @@ | ||||
|         private void InitializeComponent() | ||||
|         { | ||||
|             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DLS_Copy)); | ||||
|             this.label1 = new System.Windows.Forms.Label(); | ||||
|             this.label1 = new System.Windows.Forms.Button(); | ||||
|             this.panel1 = new System.Windows.Forms.Panel(); | ||||
|             this.panel8 = new System.Windows.Forms.Panel(); | ||||
|             this.dataGridView1 = new System.Windows.Forms.DataGridView(); | ||||
|             this.Book_name = new System.Windows.Forms.DataGridViewTextBoxColumn(); | ||||
|             this.ISBN = new System.Windows.Forms.DataGridViewTextBoxColumn(); | ||||
|             this.Check = new System.Windows.Forms.DataGridViewTextBoxColumn(); | ||||
|             this.panel5 = new System.Windows.Forms.Panel(); | ||||
|             this.chkShowBrowser = new System.Windows.Forms.CheckBox(); | ||||
|             this.chk_RemoveBrit = new System.Windows.Forms.CheckBox(); | ||||
|             this.chk_spChar = new System.Windows.Forms.CheckBox(); | ||||
|             this.btn_ApplyFilter = new System.Windows.Forms.Button(); | ||||
| @@ -41,46 +45,37 @@ | ||||
|             this.btn_Reflesh008 = new System.Windows.Forms.Button(); | ||||
|             this.label2 = new System.Windows.Forms.Label(); | ||||
|             this.rBtn_ISBN = new System.Windows.Forms.RadioButton(); | ||||
|             this.btnStop = new System.Windows.Forms.Button(); | ||||
|             this.btn_Search = new System.Windows.Forms.Button(); | ||||
|             this.rBtn_BookName = new System.Windows.Forms.RadioButton(); | ||||
|             this.panel2 = new System.Windows.Forms.Panel(); | ||||
|             this.btn_SiteDenote = new System.Windows.Forms.Button(); | ||||
|             this.btn_Connect = new System.Windows.Forms.Button(); | ||||
|             this.lbl_PW = new System.Windows.Forms.Label(); | ||||
|             this.lbl_Area = new System.Windows.Forms.Label(); | ||||
|             this.lbl_ID = new System.Windows.Forms.Label(); | ||||
|             this.lbl_Client = new System.Windows.Forms.Label(); | ||||
|             this.tb_SearchClient = new System.Windows.Forms.TextBox(); | ||||
|             this.btn_Close = new System.Windows.Forms.Button(); | ||||
|             this.panel4 = new System.Windows.Forms.Panel(); | ||||
|             this.panel7 = new System.Windows.Forms.Panel(); | ||||
|             this.webBrowser1 = new System.Windows.Forms.WebBrowser(); | ||||
|             this.panel6 = new System.Windows.Forms.Panel(); | ||||
|             this.btn_Back = new System.Windows.Forms.Button(); | ||||
|             this.btn_Forward = new System.Windows.Forms.Button(); | ||||
|             this.tb_URL = new System.Windows.Forms.TextBox(); | ||||
|             this.btnStop = new System.Windows.Forms.Button(); | ||||
|             this.Book_name = new System.Windows.Forms.DataGridViewTextBoxColumn(); | ||||
|             this.ISBN = new System.Windows.Forms.DataGridViewTextBoxColumn(); | ||||
|             this.Check = new System.Windows.Forms.DataGridViewTextBoxColumn(); | ||||
|             this.statusStrip1 = new System.Windows.Forms.StatusStrip(); | ||||
|             this.lblStatus = new System.Windows.Forms.ToolStripLabel(); | ||||
|             this.panel1.SuspendLayout(); | ||||
|             this.panel8.SuspendLayout(); | ||||
|             ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); | ||||
|             this.panel5.SuspendLayout(); | ||||
|             this.panel3.SuspendLayout(); | ||||
|             this.panel2.SuspendLayout(); | ||||
|             this.panel4.SuspendLayout(); | ||||
|             this.panel7.SuspendLayout(); | ||||
|             this.panel6.SuspendLayout(); | ||||
|             this.statusStrip1.SuspendLayout(); | ||||
|             this.SuspendLayout(); | ||||
|             //  | ||||
|             // label1 | ||||
|             //  | ||||
|             this.label1.AutoSize = true; | ||||
|             this.label1.Location = new System.Drawing.Point(7, 10); | ||||
|             this.label1.Location = new System.Drawing.Point(7, 5); | ||||
|             this.label1.Name = "label1"; | ||||
|             this.label1.Size = new System.Drawing.Size(53, 12); | ||||
|             this.label1.Size = new System.Drawing.Size(63, 22); | ||||
|             this.label1.TabIndex = 0; | ||||
|             this.label1.Text = "납품처명"; | ||||
|             this.label1.Click += new System.EventHandler(this.label1_Click); | ||||
|             //  | ||||
|             // panel1 | ||||
|             //  | ||||
| @@ -89,10 +84,10 @@ | ||||
|             this.panel1.Controls.Add(this.panel5); | ||||
|             this.panel1.Controls.Add(this.panel3); | ||||
|             this.panel1.Controls.Add(this.panel2); | ||||
|             this.panel1.Dock = System.Windows.Forms.DockStyle.Left; | ||||
|             this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; | ||||
|             this.panel1.Location = new System.Drawing.Point(0, 0); | ||||
|             this.panel1.Name = "panel1"; | ||||
|             this.panel1.Size = new System.Drawing.Size(397, 734); | ||||
|             this.panel1.Size = new System.Drawing.Size(499, 712); | ||||
|             this.panel1.TabIndex = 1; | ||||
|             //  | ||||
|             // panel8 | ||||
| @@ -101,7 +96,7 @@ | ||||
|             this.panel8.Dock = System.Windows.Forms.DockStyle.Fill; | ||||
|             this.panel8.Location = new System.Drawing.Point(0, 103); | ||||
|             this.panel8.Name = "panel8"; | ||||
|             this.panel8.Size = new System.Drawing.Size(395, 629); | ||||
|             this.panel8.Size = new System.Drawing.Size(497, 607); | ||||
|             this.panel8.TabIndex = 5; | ||||
|             //  | ||||
|             // dataGridView1 | ||||
| @@ -118,27 +113,58 @@ | ||||
|             this.dataGridView1.Name = "dataGridView1"; | ||||
|             this.dataGridView1.RowHeadersWidth = 31; | ||||
|             this.dataGridView1.RowTemplate.Height = 23; | ||||
|             this.dataGridView1.Size = new System.Drawing.Size(395, 629); | ||||
|             this.dataGridView1.Size = new System.Drawing.Size(497, 607); | ||||
|             this.dataGridView1.TabIndex = 0; | ||||
|             this.dataGridView1.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.dataGridView1_RowPostPaint); | ||||
|             this.dataGridView1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.dataGridView1_KeyDown); | ||||
|             //  | ||||
|             // Book_name | ||||
|             //  | ||||
|             this.Book_name.HeaderText = "도서명"; | ||||
|             this.Book_name.Name = "Book_name"; | ||||
|             this.Book_name.Width = 140; | ||||
|             //  | ||||
|             // ISBN | ||||
|             //  | ||||
|             this.ISBN.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None; | ||||
|             this.ISBN.HeaderText = "ISBN"; | ||||
|             this.ISBN.Name = "ISBN"; | ||||
|             this.ISBN.Width = 140; | ||||
|             //  | ||||
|             // Check | ||||
|             //  | ||||
|             this.Check.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; | ||||
|             this.Check.HeaderText = "Y/N"; | ||||
|             this.Check.Name = "Check"; | ||||
|             //  | ||||
|             // panel5 | ||||
|             //  | ||||
|             this.panel5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; | ||||
|             this.panel5.Controls.Add(this.chkShowBrowser); | ||||
|             this.panel5.Controls.Add(this.chk_RemoveBrit); | ||||
|             this.panel5.Controls.Add(this.chk_spChar); | ||||
|             this.panel5.Controls.Add(this.btn_ApplyFilter); | ||||
|             this.panel5.Dock = System.Windows.Forms.DockStyle.Top; | ||||
|             this.panel5.Location = new System.Drawing.Point(0, 68); | ||||
|             this.panel5.Name = "panel5"; | ||||
|             this.panel5.Size = new System.Drawing.Size(395, 35); | ||||
|             this.panel5.Size = new System.Drawing.Size(497, 35); | ||||
|             this.panel5.TabIndex = 4; | ||||
|             //  | ||||
|             // chkShowBrowser | ||||
|             //  | ||||
|             this.chkShowBrowser.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); | ||||
|             this.chkShowBrowser.AutoSize = true; | ||||
|             this.chkShowBrowser.Location = new System.Drawing.Point(395, 7); | ||||
|             this.chkShowBrowser.Name = "chkShowBrowser"; | ||||
|             this.chkShowBrowser.Size = new System.Drawing.Size(96, 16); | ||||
|             this.chkShowBrowser.TabIndex = 209; | ||||
|             this.chkShowBrowser.Text = "브라우저표시"; | ||||
|             this.chkShowBrowser.UseVisualStyleBackColor = true; | ||||
|             //  | ||||
|             // chk_RemoveBrit | ||||
|             //  | ||||
|             this.chk_RemoveBrit.AutoSize = true; | ||||
|             this.chk_RemoveBrit.Location = new System.Drawing.Point(169, 8); | ||||
|             this.chk_RemoveBrit.Location = new System.Drawing.Point(116, 8); | ||||
|             this.chk_RemoveBrit.Name = "chk_RemoveBrit"; | ||||
|             this.chk_RemoveBrit.Size = new System.Drawing.Size(128, 16); | ||||
|             this.chk_RemoveBrit.TabIndex = 3; | ||||
| @@ -157,6 +183,7 @@ | ||||
|             //  | ||||
|             // btn_ApplyFilter | ||||
|             //  | ||||
|             this.btn_ApplyFilter.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); | ||||
|             this.btn_ApplyFilter.Location = new System.Drawing.Point(314, 3); | ||||
|             this.btn_ApplyFilter.Name = "btn_ApplyFilter"; | ||||
|             this.btn_ApplyFilter.Size = new System.Drawing.Size(75, 24); | ||||
| @@ -176,7 +203,7 @@ | ||||
|             this.panel3.Dock = System.Windows.Forms.DockStyle.Top; | ||||
|             this.panel3.Location = new System.Drawing.Point(0, 33); | ||||
|             this.panel3.Name = "panel3"; | ||||
|             this.panel3.Size = new System.Drawing.Size(395, 35); | ||||
|             this.panel3.Size = new System.Drawing.Size(497, 35); | ||||
|             this.panel3.TabIndex = 4; | ||||
|             //  | ||||
|             // btn_Reflesh008 | ||||
| @@ -185,7 +212,7 @@ | ||||
|             this.btn_Reflesh008.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btn_Reflesh008.BackgroundImage"))); | ||||
|             this.btn_Reflesh008.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; | ||||
|             this.btn_Reflesh008.Dock = System.Windows.Forms.DockStyle.Right; | ||||
|             this.btn_Reflesh008.Location = new System.Drawing.Point(360, 0); | ||||
|             this.btn_Reflesh008.Location = new System.Drawing.Point(462, 0); | ||||
|             this.btn_Reflesh008.Name = "btn_Reflesh008"; | ||||
|             this.btn_Reflesh008.Size = new System.Drawing.Size(33, 33); | ||||
|             this.btn_Reflesh008.TabIndex = 208; | ||||
| @@ -213,6 +240,16 @@ | ||||
|             this.rBtn_ISBN.Text = "ISBN"; | ||||
|             this.rBtn_ISBN.UseVisualStyleBackColor = true; | ||||
|             //  | ||||
|             // btnStop | ||||
|             //  | ||||
|             this.btnStop.Location = new System.Drawing.Point(283, 5); | ||||
|             this.btnStop.Name = "btnStop"; | ||||
|             this.btnStop.Size = new System.Drawing.Size(65, 23); | ||||
|             this.btnStop.TabIndex = 2; | ||||
|             this.btnStop.Text = "중 지"; | ||||
|             this.btnStop.UseVisualStyleBackColor = true; | ||||
|             this.btnStop.Click += new System.EventHandler(this.btnStop_Click); | ||||
|             //  | ||||
|             // btn_Search | ||||
|             //  | ||||
|             this.btn_Search.Location = new System.Drawing.Point(217, 5); | ||||
| @@ -236,6 +273,7 @@ | ||||
|             // panel2 | ||||
|             //  | ||||
|             this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; | ||||
|             this.panel2.Controls.Add(this.btn_SiteDenote); | ||||
|             this.panel2.Controls.Add(this.btn_Connect); | ||||
|             this.panel2.Controls.Add(this.lbl_PW); | ||||
|             this.panel2.Controls.Add(this.lbl_Area); | ||||
| @@ -246,16 +284,28 @@ | ||||
|             this.panel2.Dock = System.Windows.Forms.DockStyle.Top; | ||||
|             this.panel2.Location = new System.Drawing.Point(0, 0); | ||||
|             this.panel2.Name = "panel2"; | ||||
|             this.panel2.Size = new System.Drawing.Size(395, 33); | ||||
|             this.panel2.Size = new System.Drawing.Size(497, 33); | ||||
|             this.panel2.TabIndex = 3; | ||||
|             //  | ||||
|             // btn_SiteDenote | ||||
|             //  | ||||
|             this.btn_SiteDenote.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); | ||||
|             this.btn_SiteDenote.Location = new System.Drawing.Point(414, 5); | ||||
|             this.btn_SiteDenote.Name = "btn_SiteDenote"; | ||||
|             this.btn_SiteDenote.Size = new System.Drawing.Size(77, 23); | ||||
|             this.btn_SiteDenote.TabIndex = 6; | ||||
|             this.btn_SiteDenote.Text = "사이트 표출"; | ||||
|             this.btn_SiteDenote.UseVisualStyleBackColor = true; | ||||
|             this.btn_SiteDenote.Click += new System.EventHandler(this.btn_SiteDenote_Click); | ||||
|             //  | ||||
|             // btn_Connect | ||||
|             //  | ||||
|             this.btn_Connect.Location = new System.Drawing.Point(278, 5); | ||||
|             this.btn_Connect.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); | ||||
|             this.btn_Connect.Location = new System.Drawing.Point(338, 5); | ||||
|             this.btn_Connect.Name = "btn_Connect"; | ||||
|             this.btn_Connect.Size = new System.Drawing.Size(110, 23); | ||||
|             this.btn_Connect.Size = new System.Drawing.Size(70, 23); | ||||
|             this.btn_Connect.TabIndex = 5; | ||||
|             this.btn_Connect.Text = "접    속"; | ||||
|             this.btn_Connect.Text = "접속"; | ||||
|             this.btn_Connect.UseVisualStyleBackColor = true; | ||||
|             this.btn_Connect.Click += new System.EventHandler(this.btn_Connect_Click); | ||||
|             //  | ||||
| @@ -297,132 +347,37 @@ | ||||
|             //  | ||||
|             // tb_SearchClient | ||||
|             //  | ||||
|             this.tb_SearchClient.Location = new System.Drawing.Point(65, 6); | ||||
|             this.tb_SearchClient.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)  | ||||
|             | System.Windows.Forms.AnchorStyles.Right))); | ||||
|             this.tb_SearchClient.Location = new System.Drawing.Point(76, 6); | ||||
|             this.tb_SearchClient.Name = "tb_SearchClient"; | ||||
|             this.tb_SearchClient.Size = new System.Drawing.Size(198, 21); | ||||
|             this.tb_SearchClient.Size = new System.Drawing.Size(256, 21); | ||||
|             this.tb_SearchClient.TabIndex = 1; | ||||
|             this.tb_SearchClient.KeyDown += new System.Windows.Forms.KeyEventHandler(this.tb_SearchClient_KeyDown); | ||||
|             //  | ||||
|             // btn_Close | ||||
|             // statusStrip1 | ||||
|             //  | ||||
|             this.btn_Close.Location = new System.Drawing.Point(820, 5); | ||||
|             this.btn_Close.Name = "btn_Close"; | ||||
|             this.btn_Close.Size = new System.Drawing.Size(75, 23); | ||||
|             this.btn_Close.TabIndex = 2; | ||||
|             this.btn_Close.Text = "닫    기"; | ||||
|             this.btn_Close.UseVisualStyleBackColor = true; | ||||
|             this.btn_Close.Click += new System.EventHandler(this.btn_Close_Click); | ||||
|             this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { | ||||
|             this.lblStatus}); | ||||
|             this.statusStrip1.Location = new System.Drawing.Point(0, 712); | ||||
|             this.statusStrip1.Name = "statusStrip1"; | ||||
|             this.statusStrip1.Size = new System.Drawing.Size(499, 22); | ||||
|             this.statusStrip1.TabIndex = 3; | ||||
|             this.statusStrip1.Text = "statusStrip1"; | ||||
|             //  | ||||
|             // panel4 | ||||
|             // lblStatus | ||||
|             //  | ||||
|             this.panel4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; | ||||
|             this.panel4.Controls.Add(this.panel7); | ||||
|             this.panel4.Controls.Add(this.panel6); | ||||
|             this.panel4.Dock = System.Windows.Forms.DockStyle.Fill; | ||||
|             this.panel4.Location = new System.Drawing.Point(397, 0); | ||||
|             this.panel4.Name = "panel4"; | ||||
|             this.panel4.Size = new System.Drawing.Size(931, 734); | ||||
|             this.panel4.TabIndex = 2; | ||||
|             //  | ||||
|             // panel7 | ||||
|             //  | ||||
|             this.panel7.Controls.Add(this.webBrowser1); | ||||
|             this.panel7.Dock = System.Windows.Forms.DockStyle.Fill; | ||||
|             this.panel7.Location = new System.Drawing.Point(0, 35); | ||||
|             this.panel7.Name = "panel7"; | ||||
|             this.panel7.Size = new System.Drawing.Size(929, 697); | ||||
|             this.panel7.TabIndex = 7; | ||||
|             //  | ||||
|             // webBrowser1 | ||||
|             //  | ||||
|             this.webBrowser1.Dock = System.Windows.Forms.DockStyle.Fill; | ||||
|             this.webBrowser1.Location = new System.Drawing.Point(0, 0); | ||||
|             this.webBrowser1.MinimumSize = new System.Drawing.Size(20, 20); | ||||
|             this.webBrowser1.Name = "webBrowser1"; | ||||
|             this.webBrowser1.ScriptErrorsSuppressed = true; | ||||
|             this.webBrowser1.Size = new System.Drawing.Size(929, 697); | ||||
|             this.webBrowser1.TabIndex = 5; | ||||
|             this.webBrowser1.DocumentCompleted += new System.Windows.Forms.WebBrowserDocumentCompletedEventHandler(this.webBrowser1_DocumentCompleted); | ||||
|             //  | ||||
|             // panel6 | ||||
|             //  | ||||
|             this.panel6.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; | ||||
|             this.panel6.Controls.Add(this.btn_Back); | ||||
|             this.panel6.Controls.Add(this.btn_Forward); | ||||
|             this.panel6.Controls.Add(this.tb_URL); | ||||
|             this.panel6.Controls.Add(this.btn_Close); | ||||
|             this.panel6.Dock = System.Windows.Forms.DockStyle.Top; | ||||
|             this.panel6.Location = new System.Drawing.Point(0, 0); | ||||
|             this.panel6.Name = "panel6"; | ||||
|             this.panel6.Size = new System.Drawing.Size(929, 35); | ||||
|             this.panel6.TabIndex = 6; | ||||
|             //  | ||||
|             // btn_Back | ||||
|             //  | ||||
|             this.btn_Back.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); | ||||
|             this.btn_Back.Location = new System.Drawing.Point(10, 5); | ||||
|             this.btn_Back.Name = "btn_Back"; | ||||
|             this.btn_Back.Size = new System.Drawing.Size(43, 23); | ||||
|             this.btn_Back.TabIndex = 1; | ||||
|             this.btn_Back.Text = "<<"; | ||||
|             this.btn_Back.UseVisualStyleBackColor = true; | ||||
|             this.btn_Back.Click += new System.EventHandler(this.btn_Back_Click); | ||||
|             //  | ||||
|             // btn_Forward | ||||
|             //  | ||||
|             this.btn_Forward.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); | ||||
|             this.btn_Forward.Location = new System.Drawing.Point(59, 5); | ||||
|             this.btn_Forward.Name = "btn_Forward"; | ||||
|             this.btn_Forward.Size = new System.Drawing.Size(43, 23); | ||||
|             this.btn_Forward.TabIndex = 1; | ||||
|             this.btn_Forward.Text = ">>"; | ||||
|             this.btn_Forward.UseVisualStyleBackColor = true; | ||||
|             this.btn_Forward.Click += new System.EventHandler(this.btn_Forward_Click); | ||||
|             //  | ||||
|             // tb_URL | ||||
|             //  | ||||
|             this.tb_URL.Location = new System.Drawing.Point(108, 6); | ||||
|             this.tb_URL.Name = "tb_URL"; | ||||
|             this.tb_URL.Size = new System.Drawing.Size(706, 21); | ||||
|             this.tb_URL.TabIndex = 0; | ||||
|             this.tb_URL.KeyDown += new System.Windows.Forms.KeyEventHandler(this.tb_URL_KeyDown); | ||||
|             //  | ||||
|             // btnStop | ||||
|             //  | ||||
|             this.btnStop.Location = new System.Drawing.Point(283, 5); | ||||
|             this.btnStop.Name = "btnStop"; | ||||
|             this.btnStop.Size = new System.Drawing.Size(65, 23); | ||||
|             this.btnStop.TabIndex = 2; | ||||
|             this.btnStop.Text = "중 지"; | ||||
|             this.btnStop.UseVisualStyleBackColor = true; | ||||
|             this.btnStop.Click += new System.EventHandler(this.btnStop_Click); | ||||
|             //  | ||||
|             // Book_name | ||||
|             //  | ||||
|             this.Book_name.HeaderText = "도서명"; | ||||
|             this.Book_name.Name = "Book_name"; | ||||
|             this.Book_name.Width = 140; | ||||
|             //  | ||||
|             // ISBN | ||||
|             //  | ||||
|             this.ISBN.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None; | ||||
|             this.ISBN.HeaderText = "ISBN"; | ||||
|             this.ISBN.Name = "ISBN"; | ||||
|             this.ISBN.Width = 140; | ||||
|             //  | ||||
|             // Check | ||||
|             //  | ||||
|             this.Check.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; | ||||
|             this.Check.HeaderText = "Y/N"; | ||||
|             this.Check.Name = "Check"; | ||||
|             this.lblStatus.Name = "lblStatus"; | ||||
|             this.lblStatus.Size = new System.Drawing.Size(27, 20); | ||||
|             this.lblStatus.Text = "WD"; | ||||
|             //  | ||||
|             // DLS_Copy | ||||
|             //  | ||||
|             this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); | ||||
|             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; | ||||
|             this.ClientSize = new System.Drawing.Size(1328, 734); | ||||
|             this.Controls.Add(this.panel4); | ||||
|             this.ClientSize = new System.Drawing.Size(499, 734); | ||||
|             this.Controls.Add(this.panel1); | ||||
|             this.Controls.Add(this.statusStrip1); | ||||
|             this.Name = "DLS_Copy"; | ||||
|             this.Text = "DLS 복본조사"; | ||||
|             this.Load += new System.EventHandler(this.DLS_Copy_Load); | ||||
| @@ -435,21 +390,19 @@ | ||||
|             this.panel3.PerformLayout(); | ||||
|             this.panel2.ResumeLayout(false); | ||||
|             this.panel2.PerformLayout(); | ||||
|             this.panel4.ResumeLayout(false); | ||||
|             this.panel7.ResumeLayout(false); | ||||
|             this.panel6.ResumeLayout(false); | ||||
|             this.panel6.PerformLayout(); | ||||
|             this.statusStrip1.ResumeLayout(false); | ||||
|             this.statusStrip1.PerformLayout(); | ||||
|             this.ResumeLayout(false); | ||||
|             this.PerformLayout(); | ||||
|  | ||||
|         } | ||||
|  | ||||
|         #endregion | ||||
|  | ||||
|         private System.Windows.Forms.Label label1; | ||||
|         private System.Windows.Forms.Button label1; | ||||
|         private System.Windows.Forms.Panel panel1; | ||||
|         private System.Windows.Forms.Panel panel3; | ||||
|         private System.Windows.Forms.Panel panel2; | ||||
|         private System.Windows.Forms.Button btn_Close; | ||||
|         public System.Windows.Forms.TextBox tb_SearchClient; | ||||
|         public System.Windows.Forms.Label lbl_PW; | ||||
|         public System.Windows.Forms.Label lbl_ID; | ||||
| @@ -461,13 +414,6 @@ | ||||
|         private System.Windows.Forms.Label label2; | ||||
|         private System.Windows.Forms.Button btn_Search; | ||||
|         public System.Windows.Forms.Label lbl_Area; | ||||
|         private System.Windows.Forms.WebBrowser webBrowser1; | ||||
|         private System.Windows.Forms.Panel panel4; | ||||
|         private System.Windows.Forms.Panel panel6; | ||||
|         private System.Windows.Forms.TextBox tb_URL; | ||||
|         private System.Windows.Forms.Button btn_Back; | ||||
|         private System.Windows.Forms.Button btn_Forward; | ||||
|         private System.Windows.Forms.Panel panel7; | ||||
|         private System.Windows.Forms.Button btn_Reflesh008; | ||||
|         private System.Windows.Forms.Button btn_Connect; | ||||
|         private System.Windows.Forms.CheckBox chk_RemoveBrit; | ||||
| @@ -478,5 +424,9 @@ | ||||
|         private System.Windows.Forms.DataGridViewTextBoxColumn ISBN; | ||||
|         private System.Windows.Forms.DataGridViewTextBoxColumn Check; | ||||
|         private System.Windows.Forms.Button btnStop; | ||||
|         private System.Windows.Forms.Button btn_SiteDenote; | ||||
|         public System.Windows.Forms.CheckBox chkShowBrowser; | ||||
|         private System.Windows.Forms.StatusStrip statusStrip1; | ||||
|         private System.Windows.Forms.ToolStripLabel lblStatus; | ||||
|     } | ||||
| } | ||||
| @@ -1,4 +1,5 @@ | ||||
| using System; | ||||
| using BokBonCheck; | ||||
| using System; | ||||
| using System.Collections.Generic; | ||||
| using System.ComponentModel; | ||||
| using System.Data; | ||||
| @@ -14,7 +15,7 @@ namespace WindowsFormsApp1.Mac | ||||
|     { | ||||
|         Main main; | ||||
|         public string compidx; | ||||
|         string url = "https://reading.jnei.go.kr"; | ||||
|         string URL = "https://reading.jnei.go.kr"; | ||||
|         public DLS_Copy(Main _main) | ||||
|         { | ||||
|             InitializeComponent(); | ||||
| @@ -22,7 +23,7 @@ namespace WindowsFormsApp1.Mac | ||||
|             compidx = main.com_idx; | ||||
|  | ||||
|  | ||||
|             url = "https://dls.edunet.net/DLS/totalLoginMain"; | ||||
|             URL = "https://dls.edunet.net/DLS/totalLoginMain"; | ||||
|             //url = "https://read365.edunet.net/TotalSearch"; | ||||
|  | ||||
|             //변경된 홈페이지: https://dls.edunet.net/DLS/totalLoginMain사용 ID / 비번 : t5191774 / tb5191774 | ||||
| @@ -30,9 +31,99 @@ namespace WindowsFormsApp1.Mac | ||||
|  | ||||
|         private void DLS_Copy_Load(object sender, EventArgs e) | ||||
|         { | ||||
|             webBrowser1.Navigate(url); | ||||
|         } | ||||
|              | ||||
|             this.Show(); | ||||
|             Application.DoEvents(); | ||||
|  | ||||
|             //크롤링  | ||||
|             InitializeChromeDriver(); | ||||
|              | ||||
|         } | ||||
|         #region 크롤링 | ||||
|  | ||||
|         private readonly BookSearchService _searchService; | ||||
|         private bool _isSearching = false; | ||||
|         private bool _isDriverReady = false; | ||||
|  | ||||
|         private async void InitializeChromeDriver() | ||||
|         { | ||||
|             var lblStatus = this.lblStatus;// (Label)this.Controls["lblStatus"]; | ||||
|             lblStatus.Text = "WebDriver:Chrome 드라이버 확인 중..."; | ||||
|             lblStatus.ForeColor = Color.Blue; | ||||
|  | ||||
|             try | ||||
|             { | ||||
|                 // Chrome 설치 확인 | ||||
|                 if (!ChromeDriverManager.IsChromeInstalled()) | ||||
|                 { | ||||
|                     MessageBox.Show("Google Chrome이 설치되어 있지 않습니다. Chrome을 설치한 후 프로그램을 다시 실행해주세요.", | ||||
|                         "Chrome 필요", MessageBoxButtons.OK, MessageBoxIcon.Warning); | ||||
|                     lblStatus.Text = "WebDriver:Chrome이 설치되지 않음"; | ||||
|                     lblStatus.ForeColor = Color.Red; | ||||
|                     return; | ||||
|                 } | ||||
|  | ||||
|                 // 기존 드라이버가 준비되어 있는지 확인 | ||||
|                 if (ChromeDriverManager.IsDriverReady()) | ||||
|                 { | ||||
|                     lblStatus.Text = "WebDriver:Ready"; | ||||
|                     lblStatus.ForeColor = Color.Green; | ||||
|                     _isDriverReady = true; | ||||
|                     return; | ||||
|                 } | ||||
|  | ||||
|                 // 드라이버가 없거나 작동하지 않으면 다운로드 진행 창 표시 | ||||
|                 using (var progressForm = new DownloadProgressForm()) | ||||
|                 { | ||||
|                     progressForm.Show(); | ||||
|  | ||||
|                     try | ||||
|                     { | ||||
|                         // ChromeDriver 설정 | ||||
|                         await ChromeDriverManager.SetupChromeDriverAsync(progressForm); | ||||
|  | ||||
|                         // 드라이버 테스트 | ||||
|                         var isWorking = await ChromeDriverManager.TestChromeDriverAsync(progressForm); | ||||
|  | ||||
|                         if (isWorking) | ||||
|                         { | ||||
|                             _isDriverReady = true; | ||||
|                             lblStatus.Text = "WebDriver:Ready"; | ||||
|                             lblStatus.ForeColor = Color.Green; | ||||
|                         } | ||||
|                         else | ||||
|                         { | ||||
|                             lblStatus.Text = "WebDriver:Chrome 드라이버 테스트 실패"; | ||||
|                             lblStatus.ForeColor = Color.Red; | ||||
|                             MessageBox.Show("Chrome 드라이버 테스트에 실패했습니다. 인터넷 연결을 확인하고 프로그램을 다시 실행해주세요.", | ||||
|                                 "드라이버 오류", MessageBoxButtons.OK, MessageBoxIcon.Error); | ||||
|                         } | ||||
|                     } | ||||
|                     catch (OperationCanceledException) | ||||
|                     { | ||||
|                         lblStatus.Text = "WebDriver:드라이버 다운로드가 취소되었습니다."; | ||||
|                         lblStatus.ForeColor = Color.Orange; | ||||
|                         return; | ||||
|                     } | ||||
|                     catch (Exception ex) | ||||
|                     { | ||||
|                         lblStatus.Text = "WebDriver:Chrome 드라이버 설정 실패"; | ||||
|                         lblStatus.ForeColor = Color.Red; | ||||
|                         MessageBox.Show($"Chrome 드라이버 설정 중 오류가 발생했습니다: {ex.Message}", | ||||
|                             "설정 오류", MessageBoxButtons.OK, MessageBoxIcon.Error); | ||||
|                         return; | ||||
|                     } | ||||
|                 } | ||||
|             } | ||||
|             catch (Exception ex) | ||||
|             { | ||||
|                 lblStatus.Text = "WebDriver:Chrome 드라이버 설정 실패"; | ||||
|                 lblStatus.ForeColor = Color.Red; | ||||
|                 MessageBox.Show($"Chrome 드라이버 설정 중 오류가 발생했습니다: {ex.Message}", | ||||
|                     "설정 오류", MessageBoxButtons.OK, MessageBoxIcon.Error); | ||||
|             } | ||||
|         } | ||||
| #endregion | ||||
|         private void dataGridView1_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e) | ||||
|         { | ||||
|             Skill_Grid sg = new Skill_Grid(); | ||||
| @@ -75,36 +166,8 @@ namespace WindowsFormsApp1.Mac | ||||
|                 MessageBox.Show("설정된 지역이 없습니다. 납품처 관리에서 확인해주세요."); | ||||
|                 return; | ||||
|             } | ||||
|  | ||||
|             string url = webBrowser1.Url.AbsoluteUri; | ||||
|  | ||||
|             webBrowser1.Document.GetElementById("headerLoginBtn").InvokeMember("click"); | ||||
|  | ||||
|             Delay(5000); | ||||
|  | ||||
|             DLS_Login(url); | ||||
|         } | ||||
|         #region Connect_SUB | ||||
|  | ||||
|         private void DLS_Login(string url) | ||||
|         { | ||||
|             if (lbl_ID.Text == "" || lbl_PW.Text == "") | ||||
|             { | ||||
|                 MessageBox.Show("ID 혹은 PW가 없습니다."); | ||||
|                 return; | ||||
|             } | ||||
|             string ID = lbl_ID.Text, PW = lbl_PW.Text; | ||||
|             url = webBrowser1.Document.GetElementById(SetArea(lbl_Area.Text)).GetAttribute("value"); | ||||
|  | ||||
|             webBrowser1.Document.GetElementById("s_id").SetAttribute("value", ID); | ||||
|             webBrowser1.Document.GetElementById("s_pwd").SetAttribute("value", PW); | ||||
|  | ||||
|             webBrowser1.Document.GetElementById("s_login").InvokeMember("click"); | ||||
|  | ||||
|             Delay(4000); | ||||
|             webBrowser1.Navigate(url + "/r/dls_new/bookInfo/collectionFormMA.jsp"); | ||||
|         } | ||||
|         #endregion | ||||
|       | ||||
|         private bool tStop = false; | ||||
|         private int tSearchIDX = 0; | ||||
|         private void btn_Search_Click(object sender, EventArgs e) | ||||
| @@ -120,134 +183,11 @@ namespace WindowsFormsApp1.Mac | ||||
|                 MessageBox.Show("도서명이 입력되지않았습니다!"); | ||||
|                 return; | ||||
|             } | ||||
|             if (!SearchCopy(rBtn_ISBN.Checked)) | ||||
|                 return; | ||||
|             | ||||
|  | ||||
|             MessageBox.Show("완료되었습니다."); | ||||
|         } | ||||
|         #region SearchClick_Sub | ||||
|  | ||||
|         private bool SearchCopy(bool isISBN) | ||||
|         { | ||||
|             if (!webBrowser1.Url.AbsoluteUri.Contains("collectionFormMA")) | ||||
|             { | ||||
|                 MessageBox.Show("자료관리 창이 아닙니다!"); | ||||
|                 return false; | ||||
|             } | ||||
|  | ||||
|             int count = dataGridView1.Rows.Count; | ||||
|  | ||||
|             for (int a = 0; a < count; a++) | ||||
|             { | ||||
|                 if (tSearchIDX != 0) a = tSearchIDX; | ||||
|                 string Check; | ||||
|                 if (isISBN) | ||||
|                 { | ||||
|                     string Target = dataGridView1.Rows[a].Cells["ISBN"].Value.ToString(); | ||||
|                     Check = SearchISBN(Target); | ||||
|                 } | ||||
|                 else | ||||
|                 { | ||||
|                     string Target = dataGridView1.Rows[a].Cells["Book_name"].Value.ToString(); | ||||
|                     Check = SearchName(Target); | ||||
|                 } | ||||
|                 if (Check == "0") | ||||
|                     Check = ""; | ||||
|                 dataGridView1.Rows[a].Cells["Check"].Value = Check; | ||||
|                 if (Check == "") | ||||
|                     dataGridView1.Rows[a].DefaultCellStyle.BackColor = Color.LightGray; | ||||
|                 else | ||||
|                     dataGridView1.Rows[a].DefaultCellStyle.BackColor = Color.Yellow; | ||||
|  | ||||
|                 if (tStop) | ||||
|                 { | ||||
|                     tSearchIDX = a + 1; | ||||
|                     break; | ||||
|                 } | ||||
|             } | ||||
|             if (tStop) MessageBox.Show("검색이 중지 되었습니다."); | ||||
|             return true; | ||||
|         } | ||||
|         /// <summary> | ||||
|         /// 도서명 필터로 DLS복본 검색 | ||||
|         /// </summary> | ||||
|         /// <param name="Target">도서명</param> | ||||
|         /// <param name="row">행 번호</param> | ||||
|         private string SearchName(string Target) | ||||
|         { | ||||
|             HtmlElementCollection search = webBrowser1.Document.GetElementsByTagName("input"); | ||||
|             foreach (HtmlElement Search in search) | ||||
|             { | ||||
|                 if (Search.Id == "bib1") | ||||
|                     Search.SetAttribute("value", Target); | ||||
|  | ||||
|                 if (Search.GetAttribute("className") == "button_search") | ||||
|                     Search.InvokeMember("click"); | ||||
|             } | ||||
|             Delay(5000); | ||||
|  | ||||
|             string InnerText = ""; | ||||
|  | ||||
|             HtmlElementCollection paging_nav = webBrowser1.Document.GetElementsByTagName("div"); | ||||
|             foreach (HtmlElement div in paging_nav) | ||||
|             { | ||||
|                 if (div.GetAttribute("className") == "paging_nav") | ||||
|                 { | ||||
|                     HtmlElementCollection span = div.GetElementsByTagName("span"); | ||||
|                     foreach (HtmlElement count in span) | ||||
|                     { | ||||
|                         InnerText = count.InnerText; | ||||
|                         break; | ||||
|                     } | ||||
|                 } | ||||
|             } | ||||
|  | ||||
|             return InnerText; | ||||
|         } | ||||
|         /// <summary> | ||||
|         /// ISBN 필터로 DLS복본 검색 | ||||
|         /// </summary> | ||||
|         /// <param name="Target">ISBN</param> | ||||
|         /// <param name="row">행 번호</param> | ||||
|         private string SearchISBN(string Target) | ||||
|         { | ||||
|             HtmlElementCollection combo = webBrowser1.Document.GetElementsByTagName("select"); | ||||
|             foreach (HtmlElement Search in combo) | ||||
|             { | ||||
|                 if (Search.Id == "bibKind2") | ||||
|                     Search.SetAttribute("selectedIndex", "2"); | ||||
|             } | ||||
|  | ||||
|             HtmlElementCollection search = webBrowser1.Document.GetElementsByTagName("input"); | ||||
|             foreach (HtmlElement Search in search) | ||||
|             { | ||||
|                 if (Search.Id == "bib2") | ||||
|                     Search.SetAttribute("value", Target); | ||||
|  | ||||
|                 if (Search.GetAttribute("className") == "button_search") | ||||
|                     Search.InvokeMember("click"); | ||||
|             } | ||||
|             Delay(5000); | ||||
|  | ||||
|             string InnerText = ""; | ||||
|  | ||||
|             HtmlElementCollection paging_nav = webBrowser1.Document.GetElementsByTagName("div"); | ||||
|             foreach (HtmlElement div in paging_nav) | ||||
|             { | ||||
|                 if (div.GetAttribute("className") == "paging_nav") | ||||
|                 { | ||||
|                     HtmlElementCollection span = div.GetElementsByTagName("span"); | ||||
|                     foreach (HtmlElement count in span) | ||||
|                     { | ||||
|                         InnerText = count.InnerText; | ||||
|                         break; | ||||
|                     } | ||||
|                 } | ||||
|             } | ||||
|  | ||||
|             return InnerText; | ||||
|         } | ||||
|         #endregion | ||||
|         | ||||
|  | ||||
|         /// <summary> | ||||
|         /// DLS지역 코드 변환 | ||||
| @@ -278,18 +218,7 @@ namespace WindowsFormsApp1.Mac | ||||
|                 idx++; | ||||
|             } | ||||
|  | ||||
|             if (move) | ||||
|             { | ||||
|                 try | ||||
|                 { | ||||
|                     webBrowser1.Navigate(webBrowser1.Document.GetElementById(Code[idx]).GetAttribute("value")); | ||||
|                 } | ||||
|                 catch (Exception ex) | ||||
|                 { | ||||
|                     AR.UTIL.MsgE("지역변경실패, 사이트가 변경되었을 수 있습니다.\n잠시 후 다시시도하세요\n"+ex.Message); | ||||
|                 } | ||||
|             } | ||||
|  | ||||
|              | ||||
|  | ||||
|             return Code[idx]; | ||||
|         } | ||||
| @@ -311,35 +240,6 @@ namespace WindowsFormsApp1.Mac | ||||
|             return; | ||||
|         } | ||||
|  | ||||
|         private void btn_Close_Click(object sender, EventArgs e) | ||||
|         { | ||||
|             this.Close(); | ||||
|         } | ||||
|  | ||||
|         private void btn_Back_Click(object sender, EventArgs e) | ||||
|         { | ||||
|             webBrowser1.GoBack(); | ||||
|         } | ||||
|  | ||||
|         private void btn_Forward_Click(object sender, EventArgs e) | ||||
|         { | ||||
|             webBrowser1.GoForward(); | ||||
|         } | ||||
|  | ||||
|         private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e) | ||||
|         { | ||||
|             tb_URL.Text = webBrowser1.Url.AbsoluteUri; | ||||
|         } | ||||
|  | ||||
|         private void tb_URL_KeyDown(object sender, KeyEventArgs e) | ||||
|         { | ||||
|             if (e.KeyCode == Keys.Enter) | ||||
|             { | ||||
|                 string url = tb_URL.Text; | ||||
|                 webBrowser1.Navigate(url); | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         private void btn_Reflesh008_Click(object sender, EventArgs e) | ||||
|         { | ||||
|             tSearchIDX = 0; | ||||
| @@ -356,5 +256,15 @@ namespace WindowsFormsApp1.Mac | ||||
|             tStop = true; | ||||
|         } | ||||
|  | ||||
|         private void btn_SiteDenote_Click(object sender, EventArgs e) | ||||
|         { | ||||
|             if (URL == null) return; | ||||
|             AR.UTIL.RunExplorer(URL); | ||||
|         } | ||||
|  | ||||
|         private void label1_Click(object sender, EventArgs e) | ||||
|         { | ||||
|             ClientSearch(); | ||||
|         } | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -132,37 +132,41 @@ | ||||
|         iVBORw0KGgoAAAANSUhEUgAAAOEAAADhCAMAAAAJbSJIAAAABGdBTUEAALGPC/xhBQAAAIFQTFRF//// | ||||
|         AAAAlJSU4ODgU1NT6enp+Pj4w8PDxMTEkpKS/Pz81tbW5eXlRERE3NzcmZmZzMzMZGRkTU1Nb29vg4OD | ||||
|         urq6KioqW1tb8vLyf39/sbGxEhISPz8/i4uL0NDQZmZmIyMjoqKiNTU1tLS0GRkZp6end3d3Li4uOjo6 | ||||
|         Dg4OJSUlLUB5vgAABwxJREFUeF7tnX97ojAMx6ceIqDi/DXndJ47vZt7/y/wFOMUSKG0SWE8+fxz9zxl | ||||
|         ZN8BaZq26ZMgCIIgCIIgCIIgCIIgCIIgCIIgCIIgCELrWHnDsb8+7uNuvD+u/fHQW0GLOT34t276kb99 | ||||
|         nn51siynu60f9eEqA7Zb+E+d9P1g9AaKcN42gR/C1dUIOl34X12E43gDMsrYxGP4IX26nZoVRtt/8Ovr | ||||
|         8bmtJvIssE6Fq/3n9feuxOao73wuAutTGD0nv7AJM80HmQisS6E/TaybMh3AfYq4CqxH4ULXuagp1wgC | ||||
|         61A4MPn88kzf4X44N4HuFQ5/gWV7dh7cE+FboGuF/S3YpSFWhQF3gY4VTqp1f+V8RnDnNA8C3Sr8C0Yp | ||||
|         wcLOR4EuFUYnsEnLMjd4SAl0qDAGi/SswQKQFuhMYWgewpTzF4wkZAS6Ujj8DfZ4+LzHqlmBjhROwBob | ||||
|         p1uomhPoRuEajJUzms3jtT+JxtHEP3bnM/3w7hrF5QU6UbgHW8V8BAsvl60I+8M/2w+4opjF+XJEoAuF | ||||
|         mNkMy3lhIB0uZhrf8RG3xK8wAEtKvrZ4YJJmMitO5ZzB3TW7wrIn+OLrJtJWa73XNQO3wpJvcFYtmzkY | ||||
|         wc9VgFnhHzCDMysY/iiYVNbIq/AdrKC8VE8OXlhUHJ+wKvTACMZJJ9WCEpb6rhScCsN8kv6bV7MU9pVe | ||||
|         lTwPp8IZ2MhzmMAlpmj0sTcYFard6LP9jNKktHe8wadwDBbyBHCFFStdp8qnUBlnGbuYDJo5ETaFr2Ag | ||||
|         y5tOiKaHnk/lUqjqCQ9DuIACrUELk8JQEUIe7H3MI8Uh0xUmhQpvTixQK7vFo1ARzLxRvqJntHpFHoU7 | ||||
|         uHsGOieToNftsyhUuBkfmonQjGtYFOLTn8SmdAM3DoV47vAZWonQFciiEH2ExG5UWyCHQvwR2o4m0ugL | ||||
|         5FD4ArdO8QqNNFQQyKCwB3dOcbIZ8OaoIpBBIRryU40nEioJpFfYhxuneIFGEqoJpFeIzsKYZdVwKgqk | ||||
|         V4h1FTNoo6CqQHKFqJ+pnvhVUi2TeIFaITaeIXyElZ8gvUIsP0S30tpAILVCbGBI50hNBFIrPMJtHyEb | ||||
|         NBkJpFaIRGxLi4X2KcwEUiuEuz5CtRvAUCCxQmxwT5S6MBVIrBD5DP9BkyXGAokVIp/hHJrsMBdIrBCZ | ||||
|         qyAZVVSPZO6QKhzCTR+BJitsBNIqRBzNBppssHhFz5AqRBwNwVyhnUBahcjw/rLazA6rV/QMqULElVoP | ||||
|         nGwF0sw430AGFrYhWzjuWUKZp10dQNadETS1BGToRJm/aABId0gT0TQGJEcTQ1NLQCYsMlshfjoLkPUA | ||||
|         8aRo3SAKaWecagdJdxPP3NcNEpZSpvMbQPufYfu/w/b70vb3h+2Padofl7Z/bNH+8SHHGL9hcORpmgVL | ||||
|         rq1R8ORLmwRTzrtBcM1bNAiuuafmwDZ/2BgQV7OEppbAOI/fFEDVI+5e02D6Kwc00YFs+idbT1PGCqnw | ||||
|         k6rrQgLyITob52PbvOhDKt51bcVgiwYZ3h9sAa2bKrARWHuEeBdLAvP60gKQvpglTcS9RliJO8Pc67xV | ||||
|         YKVbdtBGC/tafRx0QyBPTMy/3wIFqzd5gjZq0D0z3H0ikm7nS9Zig0TifU850BenQ7yt+g7mton3rmVB | ||||
|         3xv6iO2Gi/2HaQZgIw1joOFiD+kjWMjN1VVccbIP+AH0s+DtodCHyJZYxAv3cj5CRffL1WWgHUWnQ1y+ | ||||
|         IYubmgoJir8md2ZBURfjRP+HRQPuM+yJBcXKZXKH6inKRfHProeKuuvEEhXvSmcK7ZwoPg/aAi69/JTs | ||||
|         FSdZBQd1opTlsx2tj1DW+qLqNHy4Xw5X813qem00+wPUi/idzTuz1txb4aHaBYfTzuq6iW+2I42Jysdw | ||||
|         j9MyLMEoglXty1Dlxs64Xd+i6q4unMwdjl9wBMHB8fIWVa+YYFiDdqz+As84X7JLXkfYQxMW39Qwp05b | ||||
|         C7qndl4JtazeKds9qF/PO/QL388zR7jSMaXb677mOoFcNC+tAb2HS52jsQe0pK7+02Be0PHcqOkJXtAq | ||||
|         M9r5xM5GeOp7i0Cv8nOtC64rnW/RPSbnW7z763g+0y0WXPua+cJ+kYTa17R4BcXLCfjgSzdrEyrSbyQ0 | ||||
|         ZDU533lPNTrRNJF6xGPD7ybtHiuOKc1wOhwsh/zsvI/GbR0jPv8w4J1aNmNYFj7r88I8+2LMwP6c1Quj | ||||
|         Ju9tJDhLdtT0jRy+fsCJMao5CtXC5kznn7Kw2tubvKyb+EdtpYo0z8W7sdRKBzSLcBzrfpIf8biJ3Z8O | ||||
|         fT8YFR/9c9gE2gmrptKP/O3zNJ+N+Zrutovop6u7s/KG48H6uI+78X6/9qOh14ChrSAIgiAIgiAIgiAI | ||||
|         giAIgiAIgiAIgiAIAilPT/8BzuZT5uV+S2QAAAAASUVORK5CYII= | ||||
|         Dg4OJSUlLUB5vgAABzdJREFUeF7tne12ojAQhosuIqBiRa212q7dult7/xe4R6wKwwRCMhMoZ56fPSnj | ||||
|         K8l8BeLDgyAIgiAIgiAIgiAIgiAIgiAIgiAIgiAIQt/Y+JNZsD0ekkFyOG6D2cTfwCGNGcI/tMQoDvaP | ||||
|         iy8Psl687YN4BIfrs9/Dv7TAKAinL1BagZddGETw37QIvQH8k2OiWbKDehTskhn871oGXssK4/0/qKOS | ||||
|         z30zkQOvVYWbwydUoMHuqO98zgLbUxg/ws+uTap5IzOBbSkMFvBjN2IxhhdEuAhsR+FK17moqdf4LbAN | ||||
|         hWOT5Vdm8QovXOAq0L3Cya/iB7XgzYcXv3MT6FrhaF/4jLYkqjTgLtCxwnmz8FfPZwxNZOQEulX4N2eY | ||||
|         CiztzAt0qTA+5Q2TsS4VDwWBDhUmBbuUbIuGigKdKYzMU5h6/uYtAYGuFE5+A7u0fN5zVSjQkcI5NEvN | ||||
|         6ZqqlgS6UbiFVpVM02WyDebxLJ4Hx8Ey1U/vLllcWaAThQdoFOU9XPmlbkU0mvzZv8OhKCtcoAuFmFnA | ||||
|         elmZSEerVGMdH3FL/ApDaBLytccTkyLztLqV43ke7q7ZFaLfa46noDQ1FWy2etMVwK2wZg2mpYSkkvEU | ||||
|         XqAeZoV/oL0CaUX5o2DeWCOvwldoLs+TZrsFsGpYn7Aq9KG1HKdK71lFVOu7CnAqjMpN+hvPqtpVh6F+ | ||||
|         IsCrMIXGbnzM4diG1HnoHIwK1W70Ub+pq2JeGx2v8CmcQVM3QjjUhI2uU+VTqMyzjF0MQLMnwqbwGVr6 | ||||
|         5kUnRdNDz6dyKVRFwo8JHGmBeqXnYFIYKVLID3sfk6c6ZbrApFDhzYkFanW3eBQqkpkXyimq/h6L8Ch8 | ||||
|         g2Yu0DmZDC2BPAoVbiaA4+zQE8ijEN/+JDalKZDabAbeO3yEw+zQFciiEL2FxG5UWyCHQvwW2lYTRfQF | ||||
|         cih8gjbOPMNRVjQQyKBwCE2cOdkUvCWaCGRQiKb8VPVERiOB9ApH0MKZJzjKhmYC6RWiuzBmXTWchgLp | ||||
|         FWKhIoWDLGgqkFwh6meaN36V6FW9eagVYvUM4S1sfAfpFWL9oWZ7E1UYCKRWiBWGdI7URCC1wiO8PmXR | ||||
|         ZCSQWiGSsa119wfrMBNIrRBeXvFYlgmGAokVYsU9UevCVCCxQmQZ/oNjzDAWSKwQWYZLOMYIc4HECpG9 | ||||
|         CpKqonkmc4dU4QRe3fM8OMYEG4G0ChFHs4NjDLCYotQKEUdDsFdoJ5BWIVLen582s8NqilIrRFypdeFk | ||||
|         K5BiFt1BCgvblC2aDS2h7NNuPqA+bwrH/GyQ0omw+O0CSDikyWg6A9KjSeCYnw2yYQFehfjprKA+wvq+ | ||||
|         GyAKaXecWgdpdxOVv10BSUsp2/kdoP/3sP/rEFHYM1/a/3jY/5ym/3lp/2uL/teHHDV+x+Do03QLll5b | ||||
|         p0ASU9JOV/sw9bw7BBIQSfYtOgTX3lN3QJxpz7IaxNWs4ZifDeJq+lYEQ3lOp2m4+FUCjrEGeemf7Hma | ||||
|         OjbICT+Fc11IQBaiszofe82LPqVCCijC59qqQfJ+jsQfe4CW7tnEKmJolv4tlgzm50srQGIxS5sI6dW4 | ||||
|         KaHcGcamqYubiHhx7w0OIgFpfLto7mO5BlNOzP++BQp23uQJDiICKfT5YyLSbudr1mJFIvF7TyXQieNR | ||||
|         PmdSAHPbxO+uQdB5Q5+xXUG2L5h3ocbQWAZjooEFDOp3SPNgKTdXqLiA30SODOoCuix4IxR6E9kai/jB | ||||
|         vZy3UBF+uUIGGig8j/j4BoibMxUyFN8md2cBKxPPUZH+i0UTbp7CsIjiyWVyh+orjoviKJuKRIpz14kl | ||||
|         KuaKt4ADGVAsD9oDXIblLdkLjMH+joNzopTHZ3Ol3ABkD+MCVdAI4IWvuNrvUp/XRvN+gPohfpbeBYb6 | ||||
|         JC6CM/c2eKp2hr5HqkR9buKLbaUxV/kY7joNsIbW71idfRmp3Jjz51tU4erMydzhBCofeg647MlMEVVU | ||||
|         zDA8g3amXoHcNRMGtltyx+AcYR9tWNzg6R9WonaoGQ3Pgh6qnVeGQzd6R5GD39A/zzsKKudndip7K6gj | ||||
|         8zdfS51ELl7WngF9gP/jirq7WH+u/sN4WRF4rrR0B8/UrMVvPrHfRngY+atQ7+Rn/pKwAnS3BmWaLgfH | ||||
|         7PctXoNtskyxfV0c8/BKQmVcJEFnKbPiVxxeTsC7fSpvTaRov5HgYgdWA2yHn4YWnWiRWF3x2PDbeSpa | ||||
|         QXVOaYbTcrAe8t/Oe7ctpckh/v3D0KaO5mJSlz7r80TZe6VkrJeF1THt3ATNQfBbstNWSsEGBPoJJ8a0 | ||||
|         5SxUC5vfdG49CdXEP5hM1l3SvLnTIrHm7+JdWWu1A7pFNEt0l+R7Muti+NNhFIRTxV7uNx+7ULth1VVG | ||||
|         cbB/XJS7MV+Lt/0q/unq7mz8yWy8PR6SQXI4bIN44negtBUEQRAEQRAEQRAEQRAEQRAEQRAEQRAEQSDm | ||||
|         P87mU+ZvyRQDAAAAAElFTkSuQmCC | ||||
| </value> | ||||
|   </data> | ||||
|   <metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> | ||||
|     <value>17, 17</value> | ||||
|   </metadata> | ||||
| </root> | ||||
| @@ -579,7 +579,7 @@ namespace ExcelTest | ||||
|                     date, mCompidx }; | ||||
|  | ||||
|                 string Incmd = db.DB_INSERT(table_name, Insert_tbl, Insert_col); | ||||
|                 CUtill.mLog.Add("INSERT", string.Format( "{0}({1},{2}) : {3}", mUserName, mCompidx, List_Book.Rows[SaveRowIdx].DefaultCellStyle.ForeColor, Incmd)); | ||||
|                 PUB.log.Add("INSERT", string.Format( "{0}({1},{2}) : {3}", mUserName, mCompidx, List_Book.Rows[SaveRowIdx].DefaultCellStyle.ForeColor, Incmd)); | ||||
|                 db.DB_Send_CMD_reVoid(Incmd); | ||||
|                 isNewData = true; | ||||
|             } | ||||
| @@ -631,7 +631,7 @@ namespace ExcelTest | ||||
|                 //    } | ||||
|                 //} | ||||
|                 string U_cmd = db.More_Update(table_name, Edit_tbl, Edit_col, Sear_tbl, Sear_col); | ||||
|                 CUtill.mLog.Add("Update", string.Format( "{0}({1},{2}) : {3}", mUserName, mCompidx, List_Book.Rows[SaveRowIdx].DefaultCellStyle.ForeColor , U_cmd.Replace("\r", " ").Replace("\n", " "))); | ||||
|                 PUB.log.Add("Update", string.Format( "{0}({1},{2}) : {3}", mUserName, mCompidx, List_Book.Rows[SaveRowIdx].DefaultCellStyle.ForeColor , U_cmd.Replace("\r", " ").Replace("\n", " "))); | ||||
|                 db.DB_Send_CMD_reVoid(U_cmd); | ||||
|                 isNewData = false; | ||||
|             } | ||||
| @@ -645,14 +645,14 @@ namespace ExcelTest | ||||
|  | ||||
|             if (isNewData) { | ||||
|                 string MidxQuery = string.Format("SELECT `idx` FROM Marc WHERE isbn = {0} AND `compidx` = {1};", grid_data[0], mCompidx); | ||||
|                 CUtill.mLog.Add("MarcInsert", string.Format( "{0}({1}) : {2}", mUserName, mCompidx, MidxQuery)); | ||||
|                 PUB.log.Add("MarcInsert", string.Format( "{0}({1}) : {2}", mUserName, mCompidx, MidxQuery)); | ||||
|                 Midx = db.DB_Send_CMD_Search(MidxQuery).Replace("|", ""); | ||||
|                 List_Book.Rows[SaveRowIdx].Cells["marc_idx"].Value = Midx; | ||||
|             } | ||||
|  | ||||
|             string UpdateListIndex = string.Format("UPDATE `Obj_List_Book` SET `m_idx` = {0} WHERE `idx` = {1} AND 'compidx' ={2};", | ||||
|                 Midx, List_Book.Rows[SaveRowIdx].Cells["list_idx"].Value.ToString(), mCompidx); | ||||
|             CUtill.mLog.Add("MarcUpdate", string.Format( "{0}({1}) : {2}", mUserName, mCompidx, UpdateListIndex)); | ||||
|             PUB.log.Add("MarcUpdate", string.Format( "{0}({1}) : {2}", mUserName, mCompidx, UpdateListIndex)); | ||||
|             db.DB_Send_CMD_reVoid(UpdateListIndex); | ||||
|             MessageBox.Show("저장되었습니다!"); | ||||
|         } | ||||
|   | ||||
| @@ -1,4 +1,5 @@ | ||||
| using ExcelTest; | ||||
| using AR; | ||||
| using ExcelTest; | ||||
| using MySqlX.XDevAPI.Relational; | ||||
| using System; | ||||
| using System.Collections.Generic; | ||||
| @@ -278,7 +279,7 @@ namespace WindowsFormsApp1.Home | ||||
|                 return; | ||||
|             } | ||||
|             string tText = string.Format("{0} 를 수정 하시겠습니까?", dataGridView1.SelectedRows[0].Cells["ID"].Value.ToString()); | ||||
|             if (CUtill.MsgQ(tText) == DialogResult.Yes) | ||||
|             if (UTIL.MsgQ(tText) == DialogResult.Yes) | ||||
|             { | ||||
|                 if (tb_ID.Text == "" || tb_PW.Text == "" || tb_Name.Text == "") | ||||
|                 { | ||||
| @@ -366,7 +367,7 @@ namespace WindowsFormsApp1.Home | ||||
|                 return; | ||||
|             } | ||||
|             string tText = string.Format("{0} 를 삭제 하시겠습니까?", dataGridView1.SelectedRows[0].Cells["ID"].Value.ToString()); | ||||
|             if (CUtill.MsgQ(tText) == DialogResult.Yes) | ||||
|             if (UTIL.MsgQ(tText) == DialogResult.Yes) | ||||
|             { | ||||
|                 int row = dataGridView1.CurrentRow.Index; | ||||
|                 string tID = dataGridView1.SelectedRows[0].Cells["id"].Value.ToString(); | ||||
|   | ||||
| @@ -126,7 +126,7 @@ namespace WindowsFormsApp1.Home | ||||
|             if (RowIndex < 0) | ||||
|                 return; | ||||
|             string tText = string.Format("{0} 를 추가 하시겠습니까?", tb_sangho.Text); | ||||
|             if (CUtill.MsgQ(tText) != DialogResult.Yes) return; | ||||
|             if (UTIL.MsgQ(tText) != DialogResult.Yes) return; | ||||
|  | ||||
|             if (tb_sangho.Text == "") | ||||
|             { | ||||
| @@ -188,7 +188,7 @@ namespace WindowsFormsApp1.Home | ||||
|             if (tRowIndex < 0) | ||||
|                 return; | ||||
|             string tText = string.Format("{0} 를 수정 하시겠습니까?", dv1.Rows[tRowIndex].Cells["sangho"].Value.ToString()); | ||||
|             if (CUtill.MsgQ(tText) != DialogResult.Yes) return; | ||||
|             if (UTIL.MsgQ(tText) != DialogResult.Yes) return; | ||||
|             if (tb_sangho.Text == "") | ||||
|             { | ||||
|                 MessageBox.Show("업체명이 비어있습니다."); | ||||
| @@ -268,7 +268,7 @@ namespace WindowsFormsApp1.Home | ||||
|             if (RowIndex < 0) | ||||
|                 return; | ||||
|             string tText = string.Format("{0} 를 삭제 하시겠습니까?", dv1.Rows[RowIndex].Cells["sangho"].Value.ToString()); | ||||
|             if (CUtill.MsgQ(tText) != DialogResult.Yes) return; | ||||
|             if (UTIL.MsgQ(tText) != DialogResult.Yes) return; | ||||
|             string D_cmd = db.DB_Delete("Client", "idx", dv1.Rows[RowIndex].Cells["idx"].Value.ToString(), "c_sangho", tb_sangho.Text); | ||||
|             db.DB_Send_CMD_reVoid(D_cmd); | ||||
|             Made_Grid(); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user