curtis
14小時前 10220027159dc90f19f7c62a7b84bb00c6453d4c
feat: spec 定義
修改9個檔案
刪除2個檔案
修改1個檔案名稱
新增29個檔案
16615 ■■■■■ 已變更過的檔案
doc/curtis/Business_Logic_Analysis.md 2 ●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
doc/curtis/Delphi_套件相依.md 9 ●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
doc/curtis/Image_Processer_Analysis.md 55 ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
doc/curtis/Local_IO_抽像方法列表.md 修補檔 | 檢視 | 原始 | 究查 | 歷程
doc/curtis/Local_IO_路徑與檔案操作分析.md 4 ●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
doc/curtis/OCX_溝通與_抽象層抽換.md 14 ●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
doc/curtis/ScanImp_源碼分析.md 2 ●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
doc/curtis/Scanner_Controller_Analysis.md 12 ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
doc/curtis/Transport_Manager_Analysis.md 2 ●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
doc/curtis/UI_View_Analysis.md 2 ●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
doc/curtis/prompt/dfm_to_web/dfm_to_web_prompt_CB_IMGPSScanImp.md 37 ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
doc/curtis/prompt/dfm_to_web/dfm_to_web_prompt_ErrList.md 39 ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
doc/curtis/prompt/dfm_to_web/dfm_to_web_prompt_PatchFom.md 37 ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
doc/curtis/prompt/dfm_to_web/dfm_to_web_prompt_template.md 37 ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
doc/curtis/prompt/dfm_to_web/dfm_to_web_requirement.json 16 ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
doc/curtis/prompt/dfm_to_web/readme.md 4 ●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
doc/curtis/prompt/scanimpl_analysis/01/scanimpl_annalysis.md 167 ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
doc/curtis/prompt/scanimpl_analysis/01/scanimpl_annalysis_step_ver.md 145 ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
doc/curtis/prompt/scanimpl_analysis/02/readme.md 7 ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
doc/curtis/prompt/scanimpl_analysis/02/scanimpl_ann_addon.md 55 ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
doc/curtis/prompt/scanimpl_analysis/02/team_tasks_classification.json 882 ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
doc/curtis/prompt/scanimpl_analysis/03/scanimpl_ann_annotate.md 70 ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
doc/curtis/prompt/scanimpl_analysis/04/scanimpl_reAssemble.md 139 ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
doc/curtis/prompt/scanimpl_analysis/readme.md 33 ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
doc/curtis/prompt/scanimpl_analysis/scanimpl_annalysis.BusinessLogic.json 363 ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
doc/curtis/prompt/scanimpl_analysis/scanimpl_annalysis.ImageProcessor.json 71 ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
doc/curtis/prompt/scanimpl_analysis/scanimpl_annalysis.ScannerController.json 118 ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
doc/curtis/prompt/scanimpl_analysis/scanimpl_annalysis.TransportManager.json 98 ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
doc/curtis/prompt/scanimpl_analysis/scanimpl_annalysis.UIView.json 5530 ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
doc/curtis/prompt/scanimpl_analysis/scanimpl_annalysis.remainings.txt 65 ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
doc/curtis/prompt/scanimpl_analysis/scanimpl_annalysis.ts 27 ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
doc/curtis/prompt/scanimpl_analysis/step1_raw_methods.json 2417 ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
doc/curtis/prompt/scanimpl_analysis/step2_classified_methods.json 5318 ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
doc/curtis/screenShot/CB_DocList.png 修補檔 | 檢視 | 原始 | 究查 | 歷程
doc/curtis/screenShot/CB_DocPrt.png 修補檔 | 檢視 | 原始 | 究查 | 歷程
doc/curtis/screenShot/CB_ErrList.png 修補檔 | 檢視 | 原始 | 究查 | 歷程
doc/curtis/screenShot/CB_IMGPSScanImp.png 修補檔 | 檢視 | 原始 | 究查 | 歷程
doc/curtis/screenShot/CB_OldCaseInfo.png 修補檔 | 檢視 | 原始 | 究查 | 歷程
doc/curtis/screenShot/CB_PatchFom.png 修補檔 | 檢視 | 原始 | 究查 | 歷程
doc/curtis/todos.md 8 ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
doc/curtis/分析_尚進行中.md 830 ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
doc/curtis/Business_Logic_Analysis.md
@@ -1,6 +1,6 @@
# 業務邏輯與資料解析模組 (Business Logic & Parser) 深度分析
在 `CB_IMGPSScanImp.pas` 中,「業務邏輯與資料解析模組」扮演了將底層掃描影像與上層銀行/保險業務需求結合的橋樑。它將前端網頁傳入的原始設定資料,轉換為系統可理解的「案件 (Case)」、「文件 (Document)」與「表單 (Form)」結構,並執行極度複雜的業務規則檢核 (OMR 檢核)。
在 `CB_IMGPSScanImp.pas.bk` 中,「業務邏輯與資料解析模組」扮演了將底層掃描影像與上層銀行/保險業務需求結合的橋樑。它將前端網頁傳入的原始設定資料,轉換為系統可理解的「案件 (Case)」、「文件 (Document)」與「表單 (Form)」結構,並執行極度複雜的業務規則檢核 (OMR 檢核)。
若要將此模組進一步細拆,其內部組成可分為以下四大子分類:
doc/curtis/Delphi_套件相依.md
@@ -1,12 +1,13 @@
# **相依套件分析報告**
本報告針對 ActiveX 元件核心實作檔 CB_IMGPSScanImp.pas 進行功能解構,並分析其與第三方套件的綁定關係,以作為後續維護或現代化升級之參考。
本報告針對 ActiveX 元件核心實作檔 CB_IMGPSScanImp.pas.bk 進行功能解構,並分析其與第三方套件的綁定關係,以作為後續維護或現代化升級之參考。
## **壹、 依功能拆分模組與第三方套件綁定分析**
根據原始碼結構,CB_IMGPSScanImp.pas 是一個將介面、硬體、網路與業務邏輯高度耦合的「上帝物件 (God Object)」。若要進行重構或拆件,建議依據以下五個核心模組進行解耦:
根據原始碼結構,CB_IMGPSScanImp.pas.bk 是一個將介面、硬體、網路與業務邏輯高度耦合的「上帝物件 (God Object)」。若要進行重構或拆件,建議依據以下五個核心模組進行解耦:
### **1. 硬體掃描控制模組 (Scanner Controller)**
detail: [Scanner_Controller_Analysis.md](Scanner_Controller_Analysis.md)
- **功能描述**:負責與實體掃描機溝通,處理 TWAIN 介面初始化、設定掃描參數(DPI、色彩、雙面)、觸發掃描指令,以及接收掃描完成的記憶體影像 (DibHandle)。
- **子模組細分建議**:
@@ -19,6 +20,7 @@
  - 依賴 EnMisc 處理底層記憶體或雜項運算。
### **2. 影像處理與轉換模組 (Image Processor)**
detail: [Image_Processer_Analysis.md](Image_Processer_Analysis.md)
- **功能描述**:負責對擷取到的原始影像進行後製處理,包括:裁切(如 A3 裁 A4)、去斜 (Deskew)、旋轉、二值化 (轉黑白)、格式轉換 (轉 TIFF/JPEG),以及讀取影像上的條碼。
- **子模組細分建議**:
@@ -32,6 +34,7 @@
  - 依賴 **MPS Barcode** (mpsBarco, BarcodesFinder) 進行影像條碼掃描與解析。
### **3. 安全傳輸與 API 通訊模組 (Transport Manager)**
detail: [Transport_Manager_Analysis.md](Transport_Manager_Analysis.md)
- **功能描述**:負責將掃描並壓縮後的檔案上傳至伺服器,或從伺服器下載檔案。同時處理與後端 Java Servlet 的參數交換(如校時、取得 FTP 資訊、更新案件狀態)。
- **子模組細分建議**:
@@ -46,6 +49,7 @@
  - 依賴自訂/第三方加密庫 (Encryp) 處理字串加解密。
### **4. 業務邏輯與資料解析模組 (Business Logic & Parser)**
detail: [Business_Logic_Analysis.md](Business_Logic_Analysis.md)
- **功能描述**:專案核心的領域邏輯,包含接收網頁端傳入的參數字串進行解析、定義文件歸類邏輯(由條碼推導文件類型)、OMR (光學標記辨識) 檢核定義等。
- **子模組細分建議**:
@@ -59,6 +63,7 @@
  - 依賴 **VCLZip** (VCLZip, VCLUnZip) 將多個影像檔打包成 ZIP 進行單一傳輸。
### **5. UI 與介面呈現模組 (UI View)**
detail: [UI_View_Analysis.md](UI_View_Analysis.md)
- **功能描述**:負責 ActiveX 控制項的視覺化介面,包含左側的樹狀文件清單 (TreeView)、右側的影像預覽區 (ScrollBox),以及按鈕與多國語言切換。
- **子模組細分建議**:
doc/curtis/Image_Processer_Analysis.md
@@ -1,6 +1,6 @@
# 影像處理與轉換模組 (Image Processor) 深度分析
在 `CB_IMGPSScanImp.pas` 中,「影像處理與轉換模組」負責在硬體掃描取得原始影像後,以及上傳/顯示之前,對影像進行一系列的強化、分析與格式轉換。這個模組是決定影像品質、檔案大小與後續 OMR 辨識準確率的關鍵。
在 `CB_IMGPSScanImp.pas.bk` 中,「影像處理與轉換模組」負責在硬體掃描取得原始影像後,以及上傳/顯示之前,對影像進行一系列的強化、分析與格式轉換。這個模組是決定影像品質、檔案大小與後續 OMR 辨識準確率的關鍵。
若要將此模組進一步細拆,其內部組成可分為以下四大子分類:
@@ -57,6 +57,53 @@
---
## 影像相關關鍵字:
```js
[
'TTiffGraphic',
'TDibGraphic',
'DeskewImg',
'Rotate',
'CropImg',
'ImageReSize_FormID',
'ImageReSize_tmp',
'CheckNeedCrop',
'ImageProcessor.transformer',
'ConvertToBW',
'ConvertToGray',
'Image_Smooth',
'NegativeImg',
'CleanupBorder',
'ImageProcessor.converter',
'MpsGetBarcode',
'Get_OMR',
'ImageProcessor.barcodeRecognizer',
'FindPoint',
'CheckSize',
'GetSiteOMR',
'ImageProcessor.anchorAnalyzer',
'TJpegGraphic',
'DpiResize',
// 以下可省
'SaveQuality',
'FJpgCompression',
'ifTrueColor',
'ifGray256',
'ConvertToBW',
'ConvertToGray',
'Image_Smooth',
'NegativeImg',
'CleanupBorder',
'ifBlackWhite',
'tcGroup4',
'tcPackBits',
'tcJpeg',
'ifColor25'
]
```
## 💡 未來重構與微服務化建議
若要對此影像處理模組進行重構,建議方向如下:
@@ -67,3 +114,9 @@
    目前大量依賴畫面上隱藏的 `ISB_BW` (TImageScrollBox) 來進行二值化和條碼辨識。這違反了 MVC 原則且耗費額外的 GDI 資源。應改用純記憶體物件 (如獨立的 `TDibGraphic` 或 `TBitmap`) 在背景執行緒中進行這些運算,不要綁定可見的 UI 元件。
3.  **引入更現代的影像引擎 (如 OpenCV)**:
    早期依賴的 Envision SDK 在尋找十字定位點 (FindPoint) 和去斜 (DeskewImg) 的演算法可能較為老舊。若未來轉型為微服務架構,可將這部分邏輯移植為 Python/C++ 並使用 OpenCV 來達成更精準的高速運算。
doc/curtis/Local_IO_抽像方法列表.md
doc/curtis/Local_IO_路徑與檔案操作分析.md
@@ -1,6 +1,6 @@
# **IO 路徑與檔案操作分析**
本報告詳列了 CB_IMGPSScanImp.pas 檔案中定義的所有 IO 相關變數,以及執行目錄與檔案管理的關鍵方法,並定義了抽像化所需的介面原型。
本報告詳列了 CB_IMGPSScanImp.pas.bk 檔案中定義的所有 IO 相關變數,以及執行目錄與檔案管理的關鍵方法,並定義了抽像化所需的介面原型。
## **壹、 關鍵路徑與檔案變數 (Variables)**
@@ -150,7 +150,7 @@
## **陸、 IO 方法具體實作邏輯細部說明 (Detailed Implementation Logic)**
本節針對 CB_IMGPSScanImp.pas 內部如何透過 Windows API 實作這些 IO 操作進行細部解說。
本節針對 CB_IMGPSScanImp.pas.bk 內部如何透過 Windows API 實作這些 IO 操作進行細部解說。
### **1. Str2Dir(Path: string) 的運作機制**
doc/curtis/OCX_溝通與_抽象層抽換.md
@@ -59,10 +59,10 @@
}
/**
 * 掃描服務抽象介面 (IScanService)
 * 掃描服務抽象介面 (IOCXService)
 * UI 層僅與此介面溝通,不直接操作底層實作
 */
export interface IScanService {
export interface IOCXService {
  initialize(config: ScanConfig): Promise<void>;
  startScan(): Promise<boolean>;
  uploadFiles(): Promise<boolean>;
@@ -75,7 +75,7 @@
 * 實作 A: ActiveX 適配器 (Legacy Adapter)
 * 用於目前環境:UI (TS) -> Delphi Browser -> ActiveX (OCX)
 */
export class ActiveXScanAdapter implements IScanService {
export class ActiveXScanAdapter implements IOCXService {
  private ocx: any;
  constructor() {
@@ -122,7 +122,7 @@
 * 實作 B: Backend Server 適配器 (Future Adapter)
 * 用於未來環境:UI (TS) -> REST API / WebSocket -> Rust/Go Backend
 */
export class BackendServerAdapter implements IScanService {
export class BackendServerAdapter implements IOCXService {
  private apiUrl = "http://localhost:8080/api/scanner";
  async initialize(config: ScanConfig): Promise<void> {
@@ -164,7 +164,7 @@
 * 根據環境自動切換實作
 */
export class ScannerFactory {
  static getService(): IScanService {
  static getService(): IOCXService {
    if ((window as any).OCX_INSTANCE) {
      console.log("偵測到 ActiveX 環境,啟用 ActiveX 適配器");
      return new ActiveXScanAdapter();
@@ -184,14 +184,14 @@
ActiveX 的方法通常是同步阻塞的,而後端 API 是非同步的。
- **建議**:在抽象介面(IScanService)中,所有方法都回傳 Promise。
- **建議**:在抽象介面(IOCXService)中,所有方法都回傳 Promise。
- **原因**:這樣當你未來切換到後端伺服器(fetch API)時,UI 的調用邏輯(await service.startScan())不需要做任何修改。
### **3. 實作「心跳」或「狀態輪詢」**
原本 GetSetInf1~7 主要是靠宿主程式主動去「問」OCX。
- **抽象層建議**:在 IScanService 中實作一個 subscribeStatus(callback) 的觀察者模式。
- **抽象層建議**:在 IOCXService 中實作一個 subscribeStatus(callback) 的觀察者模式。
- **ActiveX 模式下**:在適配器內部啟動一個 setInterval 去輪詢 GetSetInf。
- **未來後端模式下**:適配器改用 **WebSocket** 接收後端主動推播的掃描事件。
- **UI 層感受**:UI 只需要處理 onStatusUpdate 事件,根本不用管底層是用輪詢還是 WebSocket。
doc/curtis/ScanImp_源碼分析.md
@@ -1,6 +1,6 @@
# **核心源碼與物件實作解析**
本文件針對 CB_IMGPSScanImp.pas 中的核心方法與隱藏物件進行原始碼級別的邏輯拆解與推導。
本文件針對 CB_IMGPSScanImp.pas.bk 中的核心方法與隱藏物件進行原始碼級別的邏輯拆解與推導。
## **壹、 核心方法源碼說明**
doc/curtis/Scanner_Controller_Analysis.md
@@ -1,6 +1,6 @@
# 硬體掃描控制模組 (Scanner Controller) 深度分析
在 `CB_IMGPSScanImp.pas` 中,「硬體掃描控制模組」是系統與實體掃描設備溝通的唯一橋樑。它深度依賴 TWAIN 協定(透過第三方元件 `EnScan` 封裝),負責控制硬體行為並將紙本文件轉換為記憶體中的數位影像資料。
在 `CB_IMGPSScanImp.pas.bk` 中,「硬體掃描控制模組」是系統與實體掃描設備溝通的唯一橋樑。它深度依賴 TWAIN 協定(透過第三方元件 `EnScan` 封裝),負責控制硬體行為並將紙本文件轉換為記憶體中的數位影像資料。
若要將此模組進一步細拆,其內部組成可分為以下三大子分類:
@@ -60,3 +60,13 @@
    該服務可以透過 **WebSocket** 或 **Local REST API** 接收來自網頁端的掃描指令,控制 TWAIN 掃描機,並將接收到的影像轉為 Base64 或二進位流回傳給網頁前端。
3.  **單一職責分離 (Separation of Concerns)**:
    應將 `OnAcquire` 中厚重的「條碼辨識」、「A3 裁切」與「黑邊處理」移出此模組。Scanner Controller 的唯一職責應該只有:**「將紙本轉為電腦中的 Bitmap」**。後續的處理應交給 `Image Processor` (影像處理模組) 透過管線 (Pipeline) 的方式接手處理。
R_W_Scanini|GetDefScanIni
## 相關關鍵字:
OnAcquire|SelectScanner|scanner.SelectScanner|initkscan|CheckScannerConfig|PageEnd|PageDone|ScannerControl.twainWrapper|StatrTwainScan|Scanner.OpenSource|Scanner.AcquireWithSourceOpen|Scanner.CloseSource|Scanner
doc/curtis/Transport_Manager_Analysis.md
@@ -1,6 +1,6 @@
# 安全傳輸與 API 通訊模組 (Transport Manager) 深度分析
在 `CB_IMGPSScanImp.pas` 中,「安全傳輸與 API 通訊模組」負責處理 ActiveX 客戶端與後端伺服器 (如 Java Servlet 平台) 之間的所有資料交換與檔案傳輸。由於涉及機敏的金融/保險文件,此模組高度依賴加密與安全通訊協定。
在 `CB_IMGPSScanImp.pas.bk` 中,「安全傳輸與 API 通訊模組」負責處理 ActiveX 客戶端與後端伺服器 (如 Java Servlet 平台) 之間的所有資料交換與檔案傳輸。由於涉及機敏的金融/保險文件,此模組高度依賴加密與安全通訊協定。
若要將此模組進一步細拆,其內部組成可分為以下四大子分類:
doc/curtis/UI_View_Analysis.md
@@ -1,6 +1,6 @@
# UI 視圖與介面呈現模組 (UI View) 深度分析
在 `CB_IMGPSScanImp.pas` 中,「UI 與介面呈現模組」主要負責與使用者的視覺互動,這是作為 ActiveX 控制項的核心表現形式。它管理了表單的佈局、多國語言切換、快捷鍵操作以及各種滑鼠拖拉 (Drag and Drop) 與捲動行為。
在 `CB_IMGPSScanImp.pas.bk` 中,「UI 與介面呈現模組」主要負責與使用者的視覺互動,這是作為 ActiveX 控制項的核心表現形式。它管理了表單的佈局、多國語言切換、快捷鍵操作以及各種滑鼠拖拉 (Drag and Drop) 與捲動行為。
以下是針對 UI View 模組的深度組成與分類分析:
doc/curtis/prompt/dfm_to_web/dfm_to_web_prompt_CB_IMGPSScanImp.md
比對新檔案
@@ -0,0 +1,37 @@
### 2.1 DFM 轉換需求: .dfm Delphi 轉換為 vue 實作
@/CB_IMGPSScanImp.dfm 為 Delphi 的 ui 介面定義, 請幫我轉換為相對應的 /uiOutput/ErrList/CB_IMGPSScanImp.vue
@/CB_IMGPSScanImp.pas 為 Delphi 的 ui 介面定義實作, 也請幫我轉換為相應的 /uiOutput/ErrList/CB_IMGPSScanImp.ts
@/doc/curtis/screenShot/CB_IMGPSScanImp.png 則是 @/CB_IMGPSScanImp.dfm 介面的截圖, 轉換後的 /uiOutput/ErrList/CB_IMGPSScanImp.vue 必須與 @/doc/curtis/screenShot/CB_IMGPSScanImp.png 一致
#### 2.2 轉換原則
##### 2.2.1 CB_IMGPSScanImp.vue 轉換原則
- ui layout 及風格請完全參照 CB_IMGPSScanImp.png, 因為這是使用者要的設計, 大小定義請完全參照 CB_IMGPSScanImp.dfm
- Delphi DFM 結構轉換為使用 Tailwind CSS, 請參考其 Left, Top, Width, Height 屬性來推斷相對位置
- dfm 檔案內所指向的物件進行轉換時請生成相對應的 vue 元件, 如下 TPanel 在轉換成 vue 時請生成對應的 TPanel元件
```dfm
object ErrlistForm: TErrlistForm
  Left = 0
  Top = 0
  ...
  object Panel2: TPanel
    Left = 0
    Top = 0
    Width = 841
    Height = 636
    Align = alClient
    Caption = 'Panel2'
```
- CB_IMGPSScanImp.dfm 參照 CB_IMGPSScanImp.png 的截圖回推 vue 的實作方式,並 以 vuejs 實作 CB_IMGPSScanImp.vue,
##### 2.2.2 CB_IMGPSScanImp.ts 轉換原則
- 將 CB_IMGPSScanImp.pas 的實作轉換為 ts 實作, 並完全保留其介面及大小寫, 將其 transpile 為 CB_IMGPSScanImp.ts
- 若 CB_IMGPSScanImp.pas 找不到相依方法的實作方式則於 ts 應完全保留該方法及界面,讓使用者另行實作
- 2.2.1 於實作 CB_IMGPSScanImp.vue 時能引用 CB_IMGPSScanImp.ts 用相關方法
#### 2.3 生成後輸出
- 生成後的檔案請輸出至對應的 /uiOutput/ErrList/CB_IMGPSScanImp.vue 和 /uiOutput/ErrList/CB_IMGPSScanImp.ts 路徑
#### 2.4 更新 preview 入口
- 2.4.1 preview 入口功能定義:
  - 2.4.1.1 確保 @/uiOutput/index.html 中的 `availableComponents` 陣列包含此新轉換的元件
  - 2.4.1.2 此新元件的設定應包含 id, name, vuePath, jsPath (指向 ts 檔案) 和 windowTitle
doc/curtis/prompt/dfm_to_web/dfm_to_web_prompt_ErrList.md
比對新檔案
@@ -0,0 +1,39 @@
### 2.1 DFM 轉換需求: .dfm Delphi 轉換為 vue 實作
@ErrList.dfm 為 Delphi 的 ui 介面定義, 請幫我轉換為相對應的 ErrList.vue
@ErrList.pas 為 Delphi 的 ui 介面定義實, 也請幫我轉換為相應的 ErrList.ts
@CB_ErrList.png 則是 @ErrList.dfm 介面的截圖, 轉換後的 ErrList.vue 必須與 @CB_ErrList.png 一致
#### 2.2 轉換原則
##### 2.2.1 ErrList.vue 轉換原則
- ui layout 及風格請完全參照 ErrList.png, 因為這是使用者要的設計, 大小定義請完全參照 ErrList.dfm
- Delphi DFM 結構轉換為使用 Tailwind CSS, 請參考其 Left, Top, Width, Height 屬性來推斷相對位置
- dfm 檔案內所指向的物件進行轉換時請生成相對應的 vue 元件, 如下 TPanel 在轉換成 vue 時請生成對應的 TPanel元件
```dfm
object ErrlistForm: TErrlistForm
  Left = 0
  Top = 0
  ...
  object Panel2: TPanel
    Left = 0
    Top = 0
    Width = 841
    Height = 636
    Align = alClient
    Caption = 'Panel2'
```
- ErrList.dfm 參照 CB_ErrList.png 的截圖回推 vue 的實作方式,並 以 vuejs 實作 ErrList.vue,
-
##### 2.2.2 ErrList.ts 轉換原則
- 將 ErrList.pas 的實作轉換為 ts 實作, 並完全保留其介面及大小寫, 將其 transpile 為 ErrList.ts
- 若 ErrList.pas 找不到相依方法的實作方式則於 ts 應完全保留該方法及界面,讓使用者另行實作
- 2.2.1 於實作 ErrList.vue 時能引用 ErrList.ts 用相關方法
#### 2.3 生成後輸出
- 生成後的檔案請輸出至 uiOutput/ErrList
#### 2.4 生成 preview 入口
- 2.4.1 preview 入口功能定義:
  - 2.4.1.1 preview 入口上方為 list button 區塊, 該區塊用來放致所有於 2.3 轉換生成的 vue 連結
  - 2.4.1.2 preview 入口下方為 preview viewer, 當點擊 2.4.1.1 的 vue 連結時, viewer 能載入相應的 vue 元件內容
- 2.4.2 prview 入口請輪出至 uiOutput/index.html
doc/curtis/prompt/dfm_to_web/dfm_to_web_prompt_PatchFom.md
比對新檔案
@@ -0,0 +1,37 @@
### 2.1 DFM 轉換需求: .dfm Delphi 轉換為 vue 實作
@/PatchFom.dfm 為 Delphi 的 ui 介面定義, 請幫我轉換為相對應的 /uiOutput/PatchFom/PatchFom.vue
@/PatchFom.pas 為 Delphi 的 ui 介面定義實作, 也請幫我轉換為相應的 /uiOutput/PatchFom/PatchFom.ts
@/doc/curtis/screenShot/PatchFom.png 則是 @/PatchFom.dfm 介面的截圖, 轉換後的 /uiOutput/PatchFom/PatchFom.vue 必須與 @/doc/curtis/screenShot/PatchFom.png 一致
#### 2.2 轉換原則
##### 2.2.1 PatchFom.vue 轉換原則
- ui layout 及風格請完全參照 PatchFom.png, 因為這是使用者要的設計, 大小定義請完全參照 PatchFom.dfm
- Delphi DFM 結構轉換為使用 Tailwind CSS, 請參考其 Left, Top, Width, Height 屬性來推斷相對位置
- dfm 檔案內所指向的物件進行轉換時請生成相對應的 vue 元件, 如下 TPanel 在轉換成 vue 時請生成對應的 TPanel元件
```dfm
object ErrlistForm: TErrlistForm
  Left = 0
  Top = 0
  ...
  object Panel2: TPanel
    Left = 0
    Top = 0
    Width = 841
    Height = 636
    Align = alClient
    Caption = 'Panel2'
```
- PatchFom.dfm 參照 PatchFom.png 的截圖回推 vue 的實作方式,並 以 vuejs 實作 PatchFom.vue,
##### 2.2.2 PatchFom.ts 轉換原則
- 將 PatchFom.pas 的實作轉換為 ts 實作, 並完全保留其介面及大小寫, 將其 transpile 為 PatchFom.ts
- 若 PatchFom.pas 找不到相依方法的實作方式則於 ts 應完全保留該方法及界面,讓使用者另行實作
- 2.2.1 於實作 PatchFom.vue 時能引用 PatchFom.ts 用相關方法
#### 2.3 生成後輸出
- 生成後的檔案請輸出至對應的 /uiOutput/PatchFom/PatchFom.vue 和 /uiOutput/PatchFom/PatchFom.ts 路徑
#### 2.4 更新 preview 入口
- 2.4.1 preview 入口功能定義:
  - 2.4.1.1 確保 @/uiOutput/index.html 中的 `availableComponents` 陣列包含此新轉換的元件
  - 2.4.1.2 此新元件的設定應包含 id, name, vuePath, jsPath (指向 ts 檔案) 和 windowTitle
doc/curtis/prompt/dfm_to_web/dfm_to_web_prompt_template.md
比對新檔案
@@ -0,0 +1,37 @@
### 2.1 DFM 轉換需求: .dfm Delphi 轉換為 vue 實作
@{{dfm}} 為 Delphi 的 ui 介面定義, 請幫我轉換為相對應的 {{vue}}
@{{pas}} 為 Delphi 的 ui 介面定義實作, 也請幫我轉換為相應的 {{ts}}
@{{png}} 則是 @{{dfm}} 介面的截圖, 轉換後的 {{vue}} 必須與 @{{png}} 一致
#### 2.2 轉換原則
##### 2.2.1 {{vue_filename}} 轉換原則
- ui layout 及風格請完全參照 {{png_filename}}, 因為這是使用者要的設計, 大小定義請完全參照 {{dfm_filename}}
- Delphi DFM 結構轉換為使用 Tailwind CSS, 請參考其 Left, Top, Width, Height 屬性來推斷相對位置
- dfm 檔案內所指向的物件進行轉換時請生成相對應的 vue 元件, 如下 TPanel 在轉換成 vue 時請生成對應的 TPanel元件
```dfm
object ErrlistForm: TErrlistForm
  Left = 0
  Top = 0
  ...
  object Panel2: TPanel
    Left = 0
    Top = 0
    Width = 841
    Height = 636
    Align = alClient
    Caption = 'Panel2'
```
- {{dfm_filename}} 參照 {{png_filename}} 的截圖回推 vue 的實作方式,並 以 vuejs 實作 {{vue_filename}},
##### 2.2.2 {{ts_filename}} 轉換原則
- 將 {{pas_filename}} 的實作轉換為 ts 實作, 並完全保留其介面及大小寫, 將其 transpile 為 {{ts_filename}}
- 若 {{pas_filename}} 找不到相依方法的實作方式則於 ts 應完全保留該方法及界面,讓使用者另行實作
- 2.2.1 於實作 {{vue_filename}} 時能引用 {{ts_filename}} 用相關方法
#### 2.3 生成後輸出
- 生成後的檔案請輸出至對應的 {{vue}} 和 {{ts}} 路徑
#### 2.4 更新 preview 入口
- 2.4.1 preview 入口功能定義:
  - 2.4.1.1 確保 @/uiOutput/index.html 中的 `availableComponents` 陣列包含此新轉換的元件
  - 2.4.1.2 此新元件的設定應包含 id, name, vuePath, jsPath (指向 ts 檔案) 和 windowTitle
doc/curtis/prompt/dfm_to_web/dfm_to_web_requirement.json
比對新檔案
@@ -0,0 +1,16 @@
[
  {
    "dfm": "/PatchFom.dfm",
    "pas": "/PatchFom.pas",
    "png": "/doc/curtis/screenShot/PatchFom.png",
    "vue": "/uiOutput/PatchFom/PatchFom.vue",
    "ts": "/uiOutput/PatchFom/PatchFom.ts"
  },
  {
    "dfm": "/CB_IMGPSScanImp.dfm",
    "pas": "/CB_IMGPSScanImp.pas",
    "png": "/doc/curtis/screenShot/CB_IMGPSScanImp.png",
    "vue": "/uiOutput/CB_IMGPSScanImp/CB_IMGPSScanImp.vue",
    "ts": "/uiOutput/CB_IMGPSScanImp/CB_IMGPSScanImp.ts"
  }
]
doc/curtis/prompt/dfm_to_web/readme.md
比對新檔案
@@ -0,0 +1,4 @@
### Delphi dfm 轉 vue
template: [dfm_to_web_prompt_template.md](dfm_to_web_prompt_template.md)
template_render: [batch_dfm_to_web.js](../../../../scripts/batch_dfm_to_web.js)
doc/curtis/prompt/scanimpl_analysis/01/scanimpl_annalysis.md
比對新檔案
@@ -0,0 +1,167 @@
---
base_path: "doc/curtis/prompt/scanimpl_analysis"
script_path: "script"
---
## B1.1 分析方法集合:
請依 @Delphi_套件相依.md 裡 「依功能拆分模組與第三方套件綁定分析」要項
對 @CB_IMGPSScanImp.pas 檔案進行分析,將合於該分類的方法名集合找出來
生成對應的 json 檔, 該生成的 json 檔可用來代表 @CB_IMGPSScanImp.pas.bk
拆分前的每個方法,其分類是什麼,其所在區段是什麼,最後該 json 檔將餵入
腳本,透過腳本執行,進行檔案拆分及測試,而不是透過 AI 拆分
以下是詳細規格需求:
### B1.1.1.  **輸入檔案**:
  *   程式需讀取同一目錄下的 `CB_IMGPSScanImp.pas.bk` 檔案。
### B1.1.2.  **方法擷取**:
  *   尋找檔案中所有以 `procedure TCB_IMGPSScanX.` 或 `function TCB_IMGPSScanX.` 開頭的行。
  *   紀錄每個方法的:
    *   `lIndex`:該方法在檔案中的起始行號(從 1 開始計算)。
    *   `methodName`:方法的完整簽名字串 (例如:`procedure TCB_IMGPSScanX.StatrTwainScan;`, `procedure TCB_IMGPSScanX.OnAcquire( const DibHandle    : THandle;`)。
### B1.1.3.  **計算 `rIndex`**:
  *   每個方法的結束行 (`rIndex`) 可以假設是下一個方法開始的前一行 (`lIndex - 1`)。
  *   如果是最後一個方法,它的 `rIndex` 應該是檔案的總行數。
### B1.1.4.  **分類邏輯 (tags)**:
    我需要你將找到的每個方法,分配到對應的 `tags`。
    請根據以下關鍵字進行簡單的字串比對分類 (如果不在此列表內,則預設分類到 `"UIView"` / `"UIView.misc"`):
  *   **ScannerControl (硬體掃描控制模組)**
    *   `StatrTwainScan`, `OnAcquire`, `initkscan`, `CheckScannerConfig`, `PageEnd`, `PageDone`, `R_W_Scanini`, `GetDefScanIni` -> `ScannerControl.twainWrapper`
  *   **ImageProcessor (影像處理與轉換模組)**
    *   `DeskewImg`, `Rotate`, `CropImg`, `ImageReSize_FormID`, `ImageReSize_tmp`, `CheckNeedCrop` -> `ImageProcessor.transformer`
    *   `ConvertToBW`, `ConvertToGray`, `Image_Smooth`, `NegativeImg`, `CleanupBorder` -> `ImageProcessor.converter`
    *   `MpsGetBarcode`, `Get_OMR` -> `ImageProcessor.barcodeRecognizer`
    *   `FindPoint`, `CheckSize`, `GetSiteOMR` -> `ImageProcessor.anchorAnalyzer`
  *   **TransportManager (安全傳輸與 API 通訊模組)**
    *   `ProcessServlet`, `ProcessServlet_Get`, `ProcessServlet_FormData` -> `TransportManager.requestWrapper`
    *   `upFile`, `dnFile`, `dnFile_Get`, `GetftpInfo`, `SetFtpInfo`, `FtpCaseComplete` -> `TransportManager.fileTransfer`
    *   `En_DecryptionStr_Base64`, `LoadFileGetMD5`, `HTTPSClientCertificateValidate` -> `TransportManager.utilities`
    *   `ZipMainFile`, `ZipMaskFile`, `ExecuteUnZip` -> `TransportManager.payloadArchiver`
  *   **BusinessLogic (業務邏輯與資料解析模組)**
    *   `SetSQLData`, `GetSQLData`, `FindSQLData`, `GetSetInf1`, `GetSetInf2`, `GetSetInf3`, `GetSetInf4`, `GetSetInf5`, `GetSetInf6`, `GetSetInf7` -> `BusinessLogic.paramState`
    *   `BarCode2FormID`, `BarCode2CaseID`, `FormCode2DocNo`, `DocNo2DocName`, `DocNoNeedDiv`, `CreateDocNo_Info`, `CreateCustDocNo_Info` -> `BusinessLogic.entityMapping`
    *   `OMRCheckCase`, `OMRErr2ini`, `OMRErrini2List` -> `BusinessLogic.ormRuleEngine`
    *   `SetUseCase`, `GetUseCase`, `OldCasetoNewCase`, `ErrFormtoCurrentForm`, `DeleteDocNoFileForESCAN` -> `BusinessLogic.caseManager`
  *   **UIView (UI 視圖與介面呈現模組)**
    *   包含 `TreeView` 的方法 (如 `TreeView1Click`, `DrawDocItem2` 等) -> `UIView.treeView`
    *   包含 `ISB`, `ImageScrollBox`, `ScrollBox` 的方法 (如 `ISB1Click`, `CreatePreViewISB` 等) -> `UIView.scrollView`
    *   `InitialLanguage`, `DownLanguage` -> `UIView.i18n`
    *   `DisplayMode`, `GoViewMode` -> `UIView.misc`
    *   `DataLoading`, `Timer2Timer`, `StatusBar1DblClick` -> `UIView.statusMessenger`
### B1.1.5.  **方法分類 tags 說明**:
#### ScannerController (掃描硬體控制模組)
- ScannerController.twainWrapper (TWAIN 介面與硬體初始化)
- ScannerController.acquisitionHandler (硬體取像非同步回呼與後處理)
#### ImageProcessor
- ImageProcessor.transformer (影像幾何與物理變換):如各種縮放 (ReSize)、裁切 (CheckNeedCrop)、旋轉 (Rotate)、去斜 (Deskew) 及所有 UI 比例變換等。
- ImageProcessor.converter (影像色彩與品質轉換):包含黑白轉換 (ConvertToBW)、平滑化 (Smooth)、遮罩處理 (Mask)、浮水印列印 (PrintImg)。
- ImageProcessor.anchorAnalyzer (特徵定位與 OMR 分析):包含了分析黑點密度的 GetSiteOMR。
#### TransportManager (傳輸與網路管理模組),新增了:
- TransportManager.apiClient (RESTful / Servlet 參數與組態拉取)
- TransportManager.fileTransfer (大檔、影像、FTP 實體傳輸)
- TransportManager.certificateManager (HTTPS 與 SSL 憑證驗證)
- TransportManager.payloadArchiver (ZIP 壓縮、解壓縮與進匯出封裝)
#### BusinessLogic
- BusinessLogic.systemInternal': 系統參數與組態儲存庫 (Config & Parameter Repository),
- BusinessLogic.configRepository: 系統參數與組態儲存庫 (Config & Parameter Repository),
- BusinessLogic.ormRuleEngine': OMR 與業務規則檢核引擎 (OMR & Business Rule Engine),
- BusinessLogic.entityMapping: 領域實體對映與結構管理器 (Entity Mapping & Structure Manager),
- BusinessLogic.entityModel: 領域實體對映與結構管理器 (Entity Mapping & Structure Manager),
- BusinessLogic.fileManager': 案件異動與舊案引用處理器 (Case Modification & Legacy Handler),
- BusinessLogic.caseManager': 案件異動與舊案引用處理器 (Case Modification & Legacy Handler),
- BusinessLogic.activeXWrapper': 處理 ActiveX 相關,
#### UIView
- UIView.treeView:樹狀結構呈現與操作 (如 TreeView 的節點刷新、拖曳、點擊)
- UIView.listView:清單結構呈現 (如 PageLV, AttListBox)
- UIView.imageScrollBox:影像預覽與捲動 (對應 EnImgScr / TImageScrollBox 相關的視覺控制與預覽)
- UIView.toolBar:互動工具與面板按鈕 (如各類 BtnClick、FC 分類按鈕)
- UIView.popupMenu:快顯選單控制 (各類 PMxxxClick 或是 PopupMenuPopup)
- UIView.i18n:多國語言與翻譯載入
- UIView.feedback:系統狀態與進度回饋 (包含 Timer、DataLoading、StatusBar)
### B1.1.5.  **輸出格式**:
  *   JSON 輸出的結構應該類似這樣:
```json
    [
        {
            "matcher": "procedure TCB_IMGPSScanX.OnAcquire( const DibHandle    : THandle;",
            "tags": [
                "ScannerController",
                "ScannerController.acquisitionHandler"
            ],
            "deps": [],
            "lIndex": "4444",
            "rIndex": "4476",
            "description": ""
        }
    ]
```
  * 盡量將相同 `tags` 的 items 群組在一個 block 內。
  * deps 保持空陣列
## B1.2 分類結果生成:
### B1.2.1 生成分類結果 json - tags 說明:
透過 B1.1 取得的結果將各個方法名進行分類,分類時請合於 @Delphi_套件相依.md
的分類方法,並依 "B1.1.5 方法分類 tags 說明" 判定其 tags 屬性
**example:**
```pascal
// CB_IMGPSScanImp.pas, 假定該分類為 ImageProcessor.anchorAnalyzer
function TCB_IMGPSScanX.GetSiteOMR(FileName,Site:String;bt: Integer): Integer;
```
```json
{
  "matcher": "function TCB_IMGPSScanX.GetSiteOMR(FileName,Site:String;bt: Integer): Integer;",
  "tags": [
    "ImageProcessor",
    "ImageProcessor.anchorAnalyzer"
  ],
  "deps": [],
  "lIndex": "5173",
  "rIndex": "5226",
  "description": ""
}
```
### B1.2.2 生成分類結果 json - 輸出位置說明:
- B1.2.2.1 - 若 tag 名其一綴包含 ScannerController:
  > output: `{{base_path}}/scanimpl_annalysis.ScannerController.json`
- B1.2.2.2 - 若 tag 名其一綴包含 BusinessLogic:
  > output: `{{base_path}}/scanimpl_annalysis.BusinessLogic.json`
- B1.2.2.3 - 若 tag 名其一綴包含 ImageProcessor:
  > output: `{{base_path}}/scanimpl_annalysis.ImageProcessor.json`
- B1.2.2.4 - 若 tag 名其一綴包含 TransportManager:
  > output: `{{base_path}}/scanimpl_annalysis.TransportManager.json`
- B1.2.2.5 - 若 tag 名其一綴包含 UIView:
  > output: `{{base_path}}/scanimpl_annalysis.UIView.json`
## B1.3 生成分類結果 json 驗證腳本
生成腳本,以驗證 "B1.2 分類結果生成" 是否正確,該腳本檔針對 @CB_IMGPSScanImp.pas.bk
與 '"B1.2 分類結果生成" 生成之 json'(以下簡程 [B1.2Jsons] ) 進行驗證
### B1.3.1 驗證原則說明:
- B1.3.1.1: [B1.2Jsons] 其方法名(matcher) 必須等於 @CB_IMGPSScanImp.pas 所對應的 lIndex
- B1.3.1.2: [B1.2Jsons] 裡的 rIndex, lIndex 不可能為 -1, 因為該值必須正確映射 @CB_IMGPSScanImp.pas.bk 的行號
- B1.3.1.3: 移除 @CB_IMGPSScanImp.pas 中於 [B1.2Jsons] 所標示之區段另存為文字檔,並於腳本結束時,顯其文字檔路徑,我想人工審核
  > output: `{{base_path}}/scanimpl_annalysis.remainings.txt`
### B1.3.2 驗證腳本路徑:
> output: `{{script_path}}/scanimpl_annalysis_json.test.js`
doc/curtis/prompt/scanimpl_analysis/01/scanimpl_annalysis_step_ver.md
比對新檔案
@@ -0,0 +1,145 @@
### 0.1.1. 專案背景與目標
本文件定義了將大型實體檔案 `CB_IMGPSScanImp.pas.bk` 進行解耦與重構的標準流程。
核心策略在於「步驟間解耦(Step Decoupling)」,透過引入中介產出物,確保流程中斷時可從失敗步驟直接重試,無需重複耗時的掃描作業。
### 0.1.2. 環境變數定義
- {{base_path}} = "doc/curtis/prompt/scanimpl_analysis"
- {{script_path}} = "script"
- {{source_file}} = "CB_IMGPSScanImp.pas.bk"
### 0.1.3. 四階段執行程序規格
### 0.1.3.1 階段一:原始碼結構提取 (Physical Extraction)
- **目標**:識別所有 `TCB_IMGPSScanX` 類別的方法實體邊界,建立物理行號索引。
- **輸入**:{{source_file}}。
- **處理邏輯**:
    1. 執行逐行掃描。
    2. 匹配正則表達式:`^(procedure|function)\s+TCB_IMGPSScanX\.`。
    3. 紀錄 `lIndex`:該方法宣告所在的起始行號(從 1 開始計算)。
    4. 紀錄 `matcher`:該行的完整原始碼字串。
    5. 計算 `rIndex`:將「下一個方法」的 `lIndex - 1` 作為當前方法的結束行;若為最後一個方法,則 `rIndex` 為檔案總行數。
- **中介輸出**:`{{base_path}}/step1_raw_methods.json`
- **中介輸出腳本**: `{{script_path}}/scanimpl_annalysis_extract_methods.js`
- **結構範例**:`[{"matcher": "...", "lIndex": 120, "rIndex": 150}]`
### 0.1.3.2 階段二:特徵比對與標籤分類 (Semantic Tagging)
- **目標**:讀取邊界索引,根據關鍵字字典規則賦予業務分類標籤 (Tags)。
- **輸入**:`{{base_path}}/step1_raw_methods.json`。
- **處理邏輯**:
    1. 遍歷中介 JSON 中的所有項目。
    2. 依據 `matcher` 內容進行關鍵字匹配(分類規則詳見第 4 節)。
    3. 賦予對應的主標籤(如 `UIView`)與次標籤(如 `UIView.treeView`)。
    4. 統一初始化 `deps: []` 與 `description: ""` 欄位。
- **中介輸出**:`{{base_path}}/step2_classified_methods.json`
- **中介輸出腳本**:`{{base_path}}/scanimpl_annalysis_classify.js`
### 0.1.3.3 階段三:模組分流實體化 (Module Disaggregation)
- **目標**:將分類完成的總集合,物理性地拆分為五個符合專案規範的正式模組 JSON。
- **輸入**:`{{base_path}}/step2_classified_methods.json`。
- **處理邏輯**:
    1. 依據項目中的主標籤(ScannerController, BusinessLogic, ImageProcessor, TransportManager, UIView)進行分流。
    2. 格式化 JSON:使用 UTF-8 編碼,縮排為 2 個空格。
- **目標產出**:
    - `{{base_path}}/scanimpl_annalysis.ScannerController.json`
    - `{{base_path}}/scanimpl_annalysis.BusinessLogic.json`
    - `{{base_path}}/scanimpl_annalysis.ImageProcessor.json`
    - `{{base_path}}/scanimpl_annalysis.TransportManager.json`
    - `{{base_path}}/scanimpl_annalysis.UIView.json`
- **目標產出腳本**: `{{script_path}}/scanimpl_annalysis_disaggregate.js`
### 0.1.3.4 階段四:邊界驗證與死角萃取 (Validation & Dead Zone Analysis)
- **目標**:產出並執行驗證腳本,確保 JSON 數據與原始碼 100% 對齊。
- **輸入**:上述 5 個模組 JSON 與 {{source_file}}。
- **驗證腳本規格** (`{{script_path}}/scanimpl_annalysis_json.test.js`):
    1. **字串對齊斷言**:斷言 JSON 裡的 `matcher` 必須精確等於原檔在 `lIndex` 行的內容。
    2. **範圍合法性斷言**:斷言所有 `lIndex` 與 `rIndex` 均 > 0,嚴禁出現 -1。
    3. **覆蓋率分析**:標記所有被捕捉的行區段,將未被標記的代碼區塊(如全域變數、Type 定義區)匯出至 `remainings.txt`。
- **驗證產出**:
    - `{{script_path}}/dist/scanimpl_annalysis.remainings.txt` (死角清單)
### 0.1.4. 方法分類 Tags 映射規則
請根據以下關鍵字進行簡單的字串比對分類 (如果不在此列表內,則預設分類到 `"UIView"` / `"UIView.misc"`), tags 應允許多組:
*   **ScannerControl (硬體掃描控制模組)**
  *   `StatrTwainScan`, `OnAcquire`, `initkscan`, `CheckScannerConfig`, `PageEnd`, `PageDone`, `R_W_Scanini`, `GetDefScanIni` -> `ScannerControl.twainWrapper`
*   **ImageProcessor (影像處理與轉換模組)**
  *   `DeskewImg`, `Rotate`, `CropImg`, `ImageReSize_FormID`, `ImageReSize_tmp`, `CheckNeedCrop` -> `ImageProcessor.transformer`
  *   `ConvertToBW`, `ConvertToGray`, `Image_Smooth`, `NegativeImg`, `CleanupBorder` -> `ImageProcessor.converter`
  *   `MpsGetBarcode`, `Get_OMR` -> `ImageProcessor.barcodeRecognizer`
  *   `FindPoint`, `CheckSize`, `GetSiteOMR` -> `ImageProcessor.anchorAnalyzer`
*   **TransportManager (安全傳輸與 API 通訊模組)**
  *   `ProcessServlet`, `ProcessServlet_Get`, `ProcessServlet_FormData` -> `TransportManager.requestWrapper`
  *   `upFile`, `dnFile`, `dnFile_Get`, `GetftpInfo`, `SetFtpInfo`, `FtpCaseComplete` -> `TransportManager.fileTransfer`
  *   `En_DecryptionStr_Base64`, `LoadFileGetMD5`, `HTTPSClientCertificateValidate` -> `TransportManager.utilities`
  *   `ZipMainFile`, `ZipMaskFile`, `ExecuteUnZip` -> `TransportManager.payloadArchiver`
*   **BusinessLogic (業務邏輯與資料解析模組)**
  *   `SetSQLData`, `GetSQLData`, `FindSQLData`, `GetSetInf1`, `GetSetInf2`, `GetSetInf3`, `GetSetInf4`, `GetSetInf5`, `GetSetInf6`, `GetSetInf7` -> `BusinessLogic.paramState`
  *   `BarCode2FormID`, `BarCode2CaseID`, `FormCode2DocNo`, `DocNo2DocName`, `DocNoNeedDiv`, `CreateDocNo_Info`, `CreateCustDocNo_Info` -> `BusinessLogic.entityMapping`
  *   `OMRCheckCase`, `OMRErr2ini`, `OMRErrini2List` -> `BusinessLogic.ormRuleEngine`
  *   `SetUseCase`, `GetUseCase`, `OldCasetoNewCase`, `ErrFormtoCurrentForm`, `DeleteDocNoFileForESCAN` -> `BusinessLogic.caseManager`
*   **UIView (UI 視圖與介面呈現模組)**
  *   包含 `TreeView` 的方法 (如 `TreeView1Click`, `DrawDocItem2` 等) -> `UIView.treeView`
  *   包含 `ISB`, `ImageScrollBox`, `ScrollBox` 的方法 (如 `ISB1Click`, `CreatePreViewISB` 等) -> `UIView.scrollView`
  *   `InitialLanguage`, `DownLanguage` -> `UIView.i18n`
  *   `DisplayMode`, `GoViewMode` -> `UIView.layouts`
  *   `DataLoading`, `Timer2Timer`, `StatusBar1DblClick` -> `UIView.statusMessenger`
**example:**
```pascal
// CB_IMGPSScanImp.pas, 假定該分類為 ImageProcessor.anchorAnalyzer
function TCB_IMGPSScanX.GetSiteOMR(FileName,Site:String;bt: Integer): Integer;
```
```json
{
  "matcher": "function TCB_IMGPSScanX.GetSiteOMR(FileName,Site:String;bt: Integer): Integer;",
  "tags": [
    "ImageProcessor",
    "ImageProcessor.anchorAnalyzer"
  ],
  "deps": [],
  "lIndex": "5173",
  "rIndex": "5226",
  "description": ""
}
```
#### 0.1.4.1 ScannerController (掃描硬體控制模組)
- ScannerController.twainWrapper (TWAIN 介面與硬體初始化)
- ScannerController.acquisitionHandler (硬體取像非同步回呼與後處理)
#### 0.1.4.2 ImageProcessor
- ImageProcessor.transformer (影像幾何與物理變換):如各種縮放 (ReSize)、裁切 (CheckNeedCrop)、旋轉 (Rotate)、去斜 (Deskew) 及所有 UI 比例變換等。
- ImageProcessor.converter (影像色彩與品質轉換):包含黑白轉換 (ConvertToBW)、平滑化 (Smooth)、遮罩處理 (Mask)、浮水印列印 (PrintImg)。
- ImageProcessor.anchorAnalyzer (特徵定位與 OMR 分析):包含了分析黑點密度的 GetSiteOMR。
#### 0.1.4.3 TransportManager (傳輸與網路管理模組),新增了:
- TransportManager.apiClient (RESTful / Servlet 參數與組態拉取)
- TransportManager.fileTransfer (大檔、影像、FTP 實體傳輸)
- TransportManager.certificateManager (HTTPS 與 SSL 憑證驗證)
- TransportManager.payloadArchiver (ZIP 壓縮、解壓縮與進匯出封裝)
#### 0.1.4.4 BusinessLogic
- BusinessLogic.systemInternal': 系統參數與組態儲存庫 (Config & Parameter Repository),
- BusinessLogic.configRepository: 系統參數與組態儲存庫 (Config & Parameter Repository),
- BusinessLogic.ormRuleEngine': OMR 與業務規則檢核引擎 (OMR & Business Rule Engine),
- BusinessLogic.entityMapping: 領域實體對映與結構管理器 (Entity Mapping & Structure Manager),
- BusinessLogic.entityModel: 領域實體對映與結構管理器 (Entity Mapping & Structure Manager),
- BusinessLogic.fileManager': 案件異動與舊案引用處理器 (Case Modification & Legacy Handler),
- BusinessLogic.caseManager': 案件異動與舊案引用處理器 (Case Modification & Legacy Handler),
- BusinessLogic.activeXWrapper': 處理 ActiveX 相關,
#### 0.1.4.5 UIView
- UIView.treeView:樹狀結構呈現與操作 (如 TreeView 的節點刷新、拖曳、點擊)
- UIView.listView:清單結構呈現 (如 PageLV, AttListBox)
- UIView.imageScrollBox:影像預覽與捲動 (對應 EnImgScr / TImageScrollBox 相關的視覺控制與預覽)
- UIView.toolBar:互動工具與面板按鈕 (如各類 BtnClick、FC 分類按鈕)
- UIView.popupMenu:快顯選單控制 (各類 PMxxxClick 或是 PopupMenuPopup)
- UIView.i18n:多國語言與翻譯載入
- UIView.feedback:系統狀態與進度回饋 (包含 Timer、DataLoading、StatusBar)
doc/curtis/prompt/scanimpl_analysis/02/readme.md
比對新檔案
@@ -0,0 +1,7 @@
- team_tasks_classification.json
  用於合併 excel 分類
excel[https://docs.google.com/spreadsheets/d/1500m32ysXtdHw16iCfuMZsQpDhZbtJksPkoK5aEg_Bg/edit?gid=370660718#gid=370660718]
doc/curtis/prompt/scanimpl_analysis/02/scanimpl_ann_addon.md
比對新檔案
@@ -0,0 +1,55 @@
---
base_path: "doc/curtis/prompt/scanimpl_analysis"
script_path: "script"
assets_json: "team_tasks_classification.json"
current_step: "02"
output_script: "scanimpl_annalysis_addon_json.js"
---
[定義:
- 以下 @{{json}} 指的是 @scanimpl_annalysis_step_ver.md 需求 "0.1.3.3 階段三:模組分流實體化 (Module Disaggregation)" 所輸出的五個檔案]()
## 0.3 處理額外分類
## 0.3.1 生成處理額外分類腳本
透過額外分類檔 @team_tasks_classification.json 生成一腳本, 能夠為 @{{jsons}} 額外添加新的分類
- 0.3.1.1 步驟1 變更資料
  由 @team_tasks_classification.json 中的 lineno 找出於 @{{jsons}} 所對應的 lineno,
  為其添加新的 tag, 並於 0.3.1.2 進行寫入
**範例A**
檔案: team_tasks_classification.json
用於為 需求0.2 生成的 json 額外新增新的 tag, 以下面為例,將為行號 4117 的 ActiveFormCreate 方法新增 tag "初始化與生命週期"
```json
{
  "tag": "初始化與生命週期",
  "methodName": "`ActiveFormCreate`",
  "lineno": "4117"
}
```
檔案: scanimpl_annalysis.UIView.json
行號 4117 的 ActiveFormCreate 方法位於 @scanimpl_annalysis.UIView.json 中,應為 @scanimpl_annalysis.UIView.json
添加新的 tag "初始化與生命週期", 結果應如下
```json
{
    "matcher": "procedure TCB_IMGPSScanX.ActiveFormCreate",
    "tags": [
      "UIView", "初始化與生命週期"
    ],
    "lIndex": "4117",
    "rIndex": "4137"
}
```
- 0.3.1.2 步驟2 寫入資料
  寫入 0.3.1.1 的結果至相應的 json 檔
**腳本檔案輸出位置:**
> output: {{script_path}}/{{output_script}}
doc/curtis/prompt/scanimpl_analysis/02/team_tasks_classification.json
比對新檔案
@@ -0,0 +1,882 @@
[
  {
    "tag": "初始化與生命週期",
    "methodName": "`ActiveFormCreate`",
    "lineno": "4117"
  },
  {
    "tag": "初始化與生命週期",
    "methodName": "`Timer1Timer`",
    "lineno": "14904"
  },
  {
    "tag": "初始化與生命週期",
    "methodName": "`Timer2Timer`",
    "lineno": "15338"
  },
  {
    "tag": "初始化與生命週期",
    "methodName": "`DestroyEvent`",
    "lineno": "1710"
  },
  {
    "tag": "初始化與生命週期",
    "methodName": "`ActivateEvent`",
    "lineno": "1685"
  },
  {
    "tag": "初始化與生命週期",
    "methodName": "`DeactivateEvent`",
    "lineno": "1705"
  },
  {
    "tag": "初始化與生命週期",
    "methodName": "`CreateEvent`",
    "lineno": "1695"
  },
  {
    "tag": "初始化與生命週期",
    "methodName": "`PaintEvent`",
    "lineno": "1805"
  },
  {
    "tag": "初始化與生命週期",
    "methodName": "`ClickEvent`",
    "lineno": "1690"
  },
  {
    "tag": "初始化與生命週期",
    "methodName": "`DblClickEvent`",
    "lineno": "1700"
  },
  {
    "tag": "初始化與生命週期",
    "methodName": "`MouseEnterEvent`",
    "lineno": "1795"
  },
  {
    "tag": "初始化與生命週期",
    "methodName": "`MouseLeaveEvent`",
    "lineno": "1800"
  },
  {
    "tag": "初始化與生命週期",
    "methodName": "`KeyPressEvent`",
    "lineno": "1756"
  },
  {
    "tag": "初始化與生命週期",
    "methodName": "`EventSinkChanged`",
    "lineno": "1254"
  },
  {
    "tag": "初始化與生命週期",
    "methodName": "`DefinePropertyPages`",
    "lineno": "1247"
  },
  {
    "tag": "初始化與生命週期",
    "methodName": "`InitialLanguage`",
    "lineno": "5095"
  },
  {
    "tag": "初始化與生命週期",
    "methodName": "`HotKeyDown`",
    "lineno": "5090"
  },
  {
    "tag": "API 呼叫相關",
    "methodName": "`GetServerDate`",
    "lineno": "5600"
  },
  {
    "tag": "API 呼叫相關",
    "methodName": "`GetSampleInf`",
    "lineno": "5632"
  },
  {
    "tag": "API 呼叫相關",
    "methodName": "`GetSetInf1`",
    "lineno": "5665"
  },
  {
    "tag": "API 呼叫相關",
    "methodName": "`GetSetInf2`",
    "lineno": "5708"
  },
  {
    "tag": "API 呼叫相關",
    "methodName": "`GetSetInf3`",
    "lineno": "5747"
  },
  {
    "tag": "API 呼叫相關",
    "methodName": "`GetSetInf4`",
    "lineno": "5787"
  },
  {
    "tag": "API 呼叫相關",
    "methodName": "`GetSetInf5`",
    "lineno": "5828"
  },
  {
    "tag": "API 呼叫相關",
    "methodName": "`GetSetInf6`",
    "lineno": "5867"
  },
  {
    "tag": "API 呼叫相關",
    "methodName": "`GetSetInf7`",
    "lineno": "5907"
  },
  {
    "tag": "API 呼叫相關",
    "methodName": "`GetOMRCheckSet`",
    "lineno": "14507"
  },
  {
    "tag": "API 呼叫相關",
    "methodName": "`GetKeyinSet`",
    "lineno": "14566"
  },
  {
    "tag": "API 呼叫相關",
    "methodName": "`CaseAsk`",
    "lineno": "14625"
  },
  {
    "tag": "API 呼叫相關",
    "methodName": "`CaseComplete`",
    "lineno": "14675"
  },
  {
    "tag": "API 呼叫相關",
    "methodName": "`DownLanguage`",
    "lineno": "13059"
  },
  {
    "tag": "API 呼叫相關",
    "methodName": "`DownLoadImage`",
    "lineno": "6840+"
  },
  {
    "tag": "API 呼叫相關",
    "methodName": "`Down_Img`",
    "lineno": "6988+"
  },
  {
    "tag": "API 呼叫相關",
    "methodName": "`TransCaseID`",
    "lineno": "6458"
  },
  {
    "tag": "API 呼叫相關",
    "methodName": "`TransOldCaseFile`",
    "lineno": "10877"
  },
  {
    "tag": "API 呼叫相關",
    "methodName": "`WriteLog`",
    "lineno": "10938"
  },
  {
    "tag": "API 呼叫相關",
    "methodName": "`CheckAvailable`",
    "lineno": "9835+"
  },
  {
    "tag": "FTP 相關",
    "methodName": "`GetFtpinfo`",
    "lineno": "10964"
  },
  {
    "tag": "FTP 相關",
    "methodName": "`SetFtpInfo`",
    "lineno": "11042"
  },
  {
    "tag": "FTP 相關",
    "methodName": "`FtpCaseComplete`",
    "lineno": "11072"
  },
  {
    "tag": "轉換區(名稱/格式轉換)",
    "methodName": "`FormCode2FormName`",
    "lineno": "11845"
  },
  {
    "tag": "轉換區(名稱/格式轉換)",
    "methodName": "`FormCode2FileName`",
    "lineno": "11896"
  },
  {
    "tag": "轉換區(名稱/格式轉換)",
    "methodName": "`FileName2FormCode`",
    "lineno": "11919"
  },
  {
    "tag": "轉換區(名稱/格式轉換)",
    "methodName": "`FileName2FormName`",
    "lineno": "11936"
  },
  {
    "tag": "轉換區(名稱/格式轉換)",
    "methodName": "`FileName2ScanPage`",
    "lineno": "11941"
  },
  {
    "tag": "轉換區(名稱/格式轉換)",
    "methodName": "`FileName2NoQuene_Filename`",
    "lineno": "11953"
  },
  {
    "tag": "轉換區(名稱/格式轉換)",
    "methodName": "`FileName2Index`",
    "lineno": "11966"
  },
  {
    "tag": "轉換區(名稱/格式轉換)",
    "methodName": "`FileName2NowDcoNo`",
    "lineno": "11980"
  },
  {
    "tag": "轉換區(名稱/格式轉換)",
    "methodName": "`FormCode2DocNo`",
    "lineno": "11994"
  },
  {
    "tag": "轉換區(名稱/格式轉換)",
    "methodName": "`FormCode2Version`",
    "lineno": "12019"
  },
  {
    "tag": "轉換區(名稱/格式轉換)",
    "methodName": "`FormCode2Page`",
    "lineno": "12024"
  },
  {
    "tag": "轉換區(名稱/格式轉換)",
    "methodName": "`DocNo2DocName`",
    "lineno": "12029"
  },
  {
    "tag": "轉換區(名稱/格式轉換)",
    "methodName": "`DocNo2FileName`",
    "lineno": "12067"
  },
  {
    "tag": "轉換區(名稱/格式轉換)",
    "methodName": "`FormCode2WorkNo`",
    "lineno": "12082"
  },
  {
    "tag": "轉換區(名稱/格式轉換)",
    "methodName": "`DocNo2WorkNo`",
    "lineno": "12091"
  },
  {
    "tag": "轉換區(名稱/格式轉換)",
    "methodName": "`DocNoNeedDiv`",
    "lineno": "12100"
  },
  {
    "tag": "轉換區(名稱/格式轉換)",
    "methodName": "`CaseNode2Info`",
    "lineno": "12113"
  },
  {
    "tag": "轉換區(名稱/格式轉換)",
    "methodName": "`DocNode2Info`",
    "lineno": "12127"
  },
  {
    "tag": "轉換區(名稱/格式轉換)",
    "methodName": "`FormNode2Info`",
    "lineno": "12145"
  },
  {
    "tag": "轉換區(名稱/格式轉換)",
    "methodName": "`Node2DocNo`",
    "lineno": "6780+"
  },
  {
    "tag": "轉換區(名稱/格式轉換)",
    "methodName": "`Node3DocNo`",
    "lineno": "6795+"
  },
  {
    "tag": "轉換區(名稱/格式轉換)",
    "methodName": "`Node3FormID`",
    "lineno": "6808+"
  },
  {
    "tag": "轉換區(名稱/格式轉換)",
    "methodName": "`GetNode2Name`",
    "lineno": "6821+"
  },
  {
    "tag": "轉換區(名稱/格式轉換)",
    "methodName": "`Path2DocDir`",
    "lineno": "10640"
  },
  {
    "tag": "掃描相關",
    "methodName": "`StatrTwainScan`",
    "lineno": "4390"
  },
  {
    "tag": "掃描相關",
    "methodName": "`OnAcquire`",
    "lineno": "4444"
  },
  {
    "tag": "掃描相關",
    "methodName": "`PageDone`",
    "lineno": "4684"
  },
  {
    "tag": "掃描相關",
    "methodName": "`PageEnd`",
    "lineno": "4734"
  },
  {
    "tag": "掃描相關",
    "methodName": "`R_W_ScanIni`",
    "lineno": "5254"
  },
  {
    "tag": "掃描相關",
    "methodName": "`GetDefScanIni`",
    "lineno": "5296"
  },
  {
    "tag": "影像處理",
    "methodName": "`CaseReSize`",
    "lineno": "6320"
  },
  {
    "tag": "影像處理",
    "methodName": "`ImageReSize_FormID`",
    "lineno": "6343"
  },
  {
    "tag": "影像處理",
    "methodName": "`ImageReSize_tmp`",
    "lineno": "6421"
  },
  {
    "tag": "影像處理",
    "methodName": "`ImageScrollBox1NewGraphic`",
    "lineno": "6447"
  },
  {
    "tag": "影像處理",
    "methodName": "`CheckNeedCrop`",
    "lineno": "9996"
  },
  {
    "tag": "影像處理",
    "methodName": "`Case2Mask`",
    "lineno": "9932"
  },
  {
    "tag": "OMR 檢核",
    "methodName": "`OMRCheckCase`",
    "lineno": "12255"
  },
  {
    "tag": "OMR 檢核",
    "methodName": "`OMRErr2ini`",
    "lineno": "12951"
  },
  {
    "tag": "OMR 檢核",
    "methodName": "`OMRErrini2List`",
    "lineno": "12991"
  },
  {
    "tag": "OMR 檢核",
    "methodName": "`OMRErrini2ListForLog`",
    "lineno": "13021"
  },
  {
    "tag": "OMR 檢核",
    "methodName": "`CheckRule2OMRErrInfo`",
    "lineno": "5983"
  },
  {
    "tag": "OMR 檢核",
    "methodName": "`GetSiteOMR`",
    "lineno": "5173"
  },
  {
    "tag": "OMR 檢核",
    "methodName": "`DistinctFormCode`",
    "lineno": "12209"
  },
  {
    "tag": "案件管理(TreeView / 案件操作)",
    "methodName": "`LoadImgFile`",
    "lineno": "9500+"
  },
  {
    "tag": "案件管理(TreeView / 案件操作)",
    "methodName": "`LoadImgFile1`",
    "lineno": "9685+"
  },
  {
    "tag": "案件管理(TreeView / 案件操作)",
    "methodName": "`LoadAttFile`",
    "lineno": "9785+"
  },
  {
    "tag": "案件管理(TreeView / 案件操作)",
    "methodName": "`NewTreeNodeRefresh`",
    "lineno": "6762"
  },
  {
    "tag": "案件管理(TreeView / 案件操作)",
    "methodName": "`MyTreeNode1Refresh`",
    "lineno": "6772"
  },
  {
    "tag": "案件管理(TreeView / 案件操作)",
    "methodName": "`MyTreeNode2ReFresh`",
    "lineno": "6779"
  },
  {
    "tag": "案件管理(TreeView / 案件操作)",
    "methodName": "`MyTreeNode3ReFresh`",
    "lineno": "6786"
  },
  {
    "tag": "案件管理(TreeView / 案件操作)",
    "methodName": "`DocNoExistsinTree`",
    "lineno": "12183"
  },
  {
    "tag": "案件管理(TreeView / 案件操作)",
    "methodName": "`DocnoNeedGroup`",
    "lineno": "12199"
  },
  {
    "tag": "案件管理(TreeView / 案件操作)",
    "methodName": "`CaseDelete_Enable`",
    "lineno": "11369"
  },
  {
    "tag": "清單管理",
    "methodName": "`SetFormID_DocNo`",
    "lineno": "5947"
  },
  {
    "tag": "清單管理",
    "methodName": "`SetIn_WH_DocNo`",
    "lineno": "5959"
  },
  {
    "tag": "檔案操作",
    "methodName": "`ReNameContext`",
    "lineno": "6011"
  },
  {
    "tag": "檔案操作",
    "methodName": "`DeleteImageFile`",
    "lineno": "6028"
  },
  {
    "tag": "檔案操作",
    "methodName": "`DeleteFormCodeFile`",
    "lineno": "6060"
  },
  {
    "tag": "檔案操作",
    "methodName": "`DeleteDocNoFile`",
    "lineno": "6115"
  },
  {
    "tag": "檔案操作",
    "methodName": "`DeleteDocNoFileForESCAN`",
    "lineno": "6141"
  },
  {
    "tag": "檔案操作",
    "methodName": "`DeleteShowFile`",
    "lineno": "6175"
  },
  {
    "tag": "檔案操作",
    "methodName": "`DeleteCustomDocDir`",
    "lineno": "10197"
  },
  {
    "tag": "檔案操作",
    "methodName": "`ReSortFileName`",
    "lineno": "14427"
  },
  {
    "tag": "檔案操作",
    "methodName": "`ReSortFileName_New`",
    "lineno": "14455"
  },
  {
    "tag": "檔案操作",
    "methodName": "`ReSortFileName2Scanlist`",
    "lineno": "14482"
  },
  {
    "tag": "上傳前置資料產生",
    "methodName": "`Case2upload`",
    "lineno": "11547"
  },
  {
    "tag": "上傳前置資料產生",
    "methodName": "`Download2Case`",
    "lineno": "11673"
  },
  {
    "tag": "上傳前置資料產生",
    "methodName": "`GetCaseFormID`",
    "lineno": "13890"
  },
  {
    "tag": "上傳前置資料產生",
    "methodName": "`CreateFormID_FormName`",
    "lineno": "13912"
  },
  {
    "tag": "上傳前置資料產生",
    "methodName": "`CreateDocNo_DocName`",
    "lineno": "13932"
  },
  {
    "tag": "上傳前置資料產生",
    "methodName": "`CreateIn_WH`",
    "lineno": "13954"
  },
  {
    "tag": "上傳前置資料產生",
    "methodName": "`CreateDocNo_Info`",
    "lineno": "13985"
  },
  {
    "tag": "上傳前置資料產生",
    "methodName": "`CreateCustDocNo_Info`",
    "lineno": "14069"
  },
  {
    "tag": "上傳前置資料產生",
    "methodName": "`CreateDocnoFrom_Info`",
    "lineno": "14122"
  },
  {
    "tag": "上傳前置資料產生",
    "methodName": "`CreateCustDocNoFrom_Info`",
    "lineno": "14187"
  },
  {
    "tag": "上傳前置資料產生",
    "methodName": "`CreateAttach_Info`",
    "lineno": "14245"
  },
  {
    "tag": "上傳前置資料產生",
    "methodName": "`CreateCaseNeedData`",
    "lineno": "10795"
  },
  {
    "tag": "文件份數/頁數/查詢",
    "methodName": "`GetDocNo_Count`",
    "lineno": "14292"
  },
  {
    "tag": "文件份數/頁數/查詢",
    "methodName": "`GetDocNo_Page`",
    "lineno": "14332"
  },
  {
    "tag": "文件份數/頁數/查詢",
    "methodName": "`GetDataDocNoPage`",
    "lineno": "6189"
  },
  {
    "tag": "文件份數/頁數/查詢",
    "methodName": "`CheckCaseDocNoPage`",
    "lineno": "6204"
  },
  {
    "tag": "文件份數/頁數/查詢",
    "methodName": "`FindFormCodePages`",
    "lineno": "6278"
  },
  {
    "tag": "文件份數/頁數/查詢",
    "methodName": "`GetDataFormCodePages`",
    "lineno": "6309"
  },
  {
    "tag": "文件份數/頁數/查詢",
    "methodName": "`GetDocNoEdit`",
    "lineno": "14252"
  },
  {
    "tag": "文件份數/頁數/查詢",
    "methodName": "`FormIDExists`",
    "lineno": "14359"
  },
  {
    "tag": "文件份數/頁數/查詢",
    "methodName": "`Case_DocNoExists`",
    "lineno": "14397"
  },
  {
    "tag": "文件份數/頁數/查詢",
    "methodName": "`GetDocNoCount`",
    "lineno": "11138"
  },
  {
    "tag": "文件份數/頁數/查詢",
    "methodName": "`GetDocDirCopies`",
    "lineno": "11168"
  },
  {
    "tag": "文件份數/頁數/查詢",
    "methodName": "`SetDocDirCopies`",
    "lineno": "11198"
  },
  {
    "tag": "文件份數/頁數/查詢",
    "methodName": "`GetDocDirCopies_Rec`",
    "lineno": "11226"
  },
  {
    "tag": "文件份數/頁數/查詢",
    "methodName": "`GetDocDir_Page`",
    "lineno": "10623"
  },
  {
    "tag": "自訂文件",
    "methodName": "`GetNewCustomDocNo`",
    "lineno": "10022"
  },
  {
    "tag": "自訂文件",
    "methodName": "`GetCustomDocName`",
    "lineno": "10087"
  },
  {
    "tag": "自訂文件",
    "methodName": "`GetCustomFormID`",
    "lineno": "10099"
  },
  {
    "tag": "自訂文件",
    "methodName": "`GetCustomDocDir`",
    "lineno": "10111"
  },
  {
    "tag": "自訂文件",
    "methodName": "`FindCustomDocName`",
    "lineno": "10138"
  },
  {
    "tag": "自訂文件",
    "methodName": "`GetCustomNameCount`",
    "lineno": "11278"
  },
  {
    "tag": "自訂文件",
    "methodName": "`GetCustomDocNoCount`",
    "lineno": "11302"
  },
  {
    "tag": "自訂文件",
    "methodName": "`Create_Cust_DocDir`",
    "lineno": "10365"
  },
  {
    "tag": "舊案/異動件處理",
    "methodName": "`OldCasetoNewCase`",
    "lineno": "10456"
  },
  {
    "tag": "舊案/異動件處理",
    "methodName": "`ErrFormtoCurrentForm`",
    "lineno": "10525"
  },
  {
    "tag": "舊案/異動件處理",
    "methodName": "`SetRecordEditedDocDir`",
    "lineno": "10575"
  },
  {
    "tag": "入庫文件/可見性",
    "methodName": "`GetDocNo_IS_WH`",
    "lineno": "10665"
  },
  {
    "tag": "入庫文件/可見性",
    "methodName": "`DocNoIs_In_WH`",
    "lineno": "10775"
  },
  {
    "tag": "入庫文件/可見性",
    "methodName": "`FormIDAppear`",
    "lineno": "11095"
  },
  {
    "tag": "入庫文件/可見性",
    "methodName": "`DocNoAppear`",
    "lineno": "11121"
  },
  {
    "tag": "入庫文件/可見性",
    "methodName": "`ISGuideFormID`",
    "lineno": "11326"
  },
  {
    "tag": "入庫文件/可見性",
    "methodName": "`ISDivPageFormID`",
    "lineno": "11341"
  },
  {
    "tag": "入庫文件/可見性",
    "methodName": "`FindDivFormCode`",
    "lineno": "9850+"
  },
  {
    "tag": "影像瀏覽/顯示",
    "methodName": "`FindISB2View`",
    "lineno": "5228"
  },
  {
    "tag": "影像瀏覽/顯示",
    "methodName": "`FindMpsView`",
    "lineno": "13864"
  },
  {
    "tag": "影像瀏覽/顯示",
    "methodName": "`DesableImage`",
    "lineno": "5499"
  },
  {
    "tag": "影像瀏覽/顯示",
    "methodName": "`EnableImage`",
    "lineno": "5485"
  },
  {
    "tag": "影像瀏覽/顯示",
    "methodName": "`ViewMouseMode`",
    "lineno": "5519"
  },
  {
    "tag": "影像瀏覽/顯示",
    "methodName": "`GoViewMode`",
    "lineno": "5544"
  },
  {
    "tag": "影像瀏覽/顯示",
    "methodName": "`DisplayMode`",
    "lineno": "5556"
  },
  {
    "tag": "影像瀏覽/顯示",
    "methodName": "`view_image_FormCode`",
    "lineno": "13084"
  },
  {
    "tag": "影像瀏覽/顯示",
    "methodName": "`view_image_DocNo`",
    "lineno": "13200"
  },
  {
    "tag": "影像瀏覽/顯示",
    "methodName": "`PriorPage`",
    "lineno": "12161"
  },
  {
    "tag": "影像瀏覽/顯示",
    "methodName": "`NextPage`",
    "lineno": "12172"
  },
  {
    "tag": "縮圖預覽(PreViewISB)",
    "methodName": "`CreatePreViewISB`",
    "lineno": "13502"
  },
  {
    "tag": "縮圖預覽(PreViewISB)",
    "methodName": "`FreePreViewISB`",
    "lineno": "13551"
  },
  {
    "tag": "縮圖預覽(PreViewISB)",
    "methodName": "`FitPreViewISB`",
    "lineno": "13581"
  },
  {
    "tag": "縮圖預覽(PreViewISB)",
    "methodName": "`PaintShape`",
    "lineno": "13618"
  },
  {
    "tag": "縮圖預覽(PreViewISB)",
    "methodName": "`FreeShapeobj`",
    "lineno": "13674"
  },
  {
    "tag": "縮圖預覽(PreViewISB)",
    "methodName": "`ISBClick`",
    "lineno": "13695"
  },
  {
    "tag": "縮圖預覽(PreViewISB)",
    "methodName": "`ISBMouseMove`",
    "lineno": "13734"
  },
  {
    "tag": "縮圖預覽(PreViewISB)",
    "methodName": "`ISBImageMouseDown`",
    "lineno": "13748"
  },
  {
    "tag": "縮圖預覽(PreViewISB)",
    "methodName": "`ISBImageMouseUp`",
    "lineno": "13822"
  },
  {
    "tag": "縮圖預覽(PreViewISB)",
    "methodName": "`ISBEndDrag`",
    "lineno": "13828"
  },
  {
    "tag": "縮圖預覽(PreViewISB)",
    "methodName": "`ISBDragDrop`",
    "lineno": "13833"
  },
  {
    "tag": "縮圖預覽(PreViewISB)",
    "methodName": "`ISBDragOver`",
    "lineno": "13843"
  },
  {
    "tag": "縮圖預覽(PreViewISB)",
    "methodName": "`ShapeName2PreViewISBName`",
    "lineno": "13395"
  },
  {
    "tag": "其他內部",
    "methodName": "`GetCurrentVersionNo`",
    "lineno": "1052"
  },
  {
    "tag": "其他內部",
    "methodName": "`WMMOUSEWHEEL`",
    "lineno": "1086"
  },
  {
    "tag": "其他內部",
    "methodName": "`InitExistImgList`",
    "lineno": "1338"
  }
]
doc/curtis/prompt/scanimpl_analysis/03/scanimpl_ann_annotate.md
比對新檔案
@@ -0,0 +1,70 @@
---
all_csv: "scripts/dist/deps.all.csv"
script_path: "script"
---
定義:
- 以下 @{{json}} 指的是 @scanimpl_annalysis_step_ver.md
  需求 "0.1.3.3 階段三:模組分流實體化 (Module Disaggregation)"
  所輸出的五個檔案。
## 0.4 處理方法描述,方法引用,方法分類
### 0.4.1 生成引用
- **目標**: 生成腳本, 該腳本能將{{all_csv}}所記錄的"引用相依"寫入至 @{{json}} deps 屬性中
- **輸入**:@{{json}}, {{all_csv}}
- **處理邏輯**:
    1. 遍歷 {{all_csv}} 取出 "方法名" 所對應的 "引用了什麼相依"
    2. 匹配 `1. 的"方法名"` 與 @{{json}} 中 matcher 所對應的 "方法名" 並將 `1. 的引用相依` 寫入 @{{json}} deps 屬性中
    3. 引用相依有多個,其格式為陣列
- **輸出腳本**:`{{script_path}}/scanimpl_annalysis_json_deps.js`
- **範例**:
若以下為 @{{json}}:
```json
{
    "matcher": "procedure TCB_IMGPSScanX.ImageScrollBox1NewGraphic(",
    "tags": [
      "ImageProcessor",
      "影像處理"
    ],
    "lIndex": "6447",
    "rIndex": "6455",
    "description": "載入新圖形事件"
}
```
若以下為 @deps.all.csv:
```csv
[ ],方法名,所在檔名,行號,引用了什麼相依,方法描述(請手動填寫),原始程式碼片段
[V],TCB_IMGPSScanX.ImageScrollBox1NewGraphic,CB_IMGPSScanImp.pas.bk,6447,TDibGraphic,,procedure TCB_IMGPSScanX.ImageScrollBox1NewGraphic(const Graphic: TDibGraphic);
[V],TCB_IMGPSScanX.ImageScrollBox1NewGraphic,CB_IMGPSScanImp.pas.bk,6453,ConvertToBW,,ConvertToBW(ISB_BW.Graphic);
```
則 @{{json}} 應寫入:
```json
{
    "matcher": "procedure TCB_IMGPSScanX.ImageScrollBox1NewGraphic(",
    "tags": [
      "ImageProcessor",
      "影像處理"
    ],
    "deps": [
      "TDibGraphic", "ConvertToBW"
    ],
    "lIndex": "6447",
    "rIndex": "6455",
    "description": "載入新圖形事件"
}
```
### 0.4.2 生成描述
- **目標**:針對重要方法生成方法描述
- **輸入**:@{{jsons}}, @CB_IMGPSScanImp.pas.bk
- **處理邏輯**:
    1. 請就 @{{json}} 中的方法進行描述,該方法的實作於 @CB_IMGPSScanImp.pas.bk,對應的 lIndex, rIndex 區段中
    2. 重要方法(行數大於 14 行)做詳盡描述, 簡易方法做簡易描述, 請使用中文作為描述語言
    3. 方法描述請寫入 @{{json}} 檔中的 description 欄位
    4. description 若為多行請考慮斷行符號
- **目標產出**: @{{json}}
doc/curtis/prompt/scanimpl_analysis/04/scanimpl_reAssemble.md
比對新檔案
@@ -0,0 +1,139 @@
---
description: 用於 CB_IMPSScan 檔案拆分
all_csv: "scripts/dist/deps.all.csv"
script_path: "script"
output_path: "reassemble"
---
定義:
- 以下 @{{json}} 指的是 @scanimpl_annalysis_step_ver.md
  需求 "0.1.3.3 階段三:模組分流實體化 (Module Disaggregation)"
  所輸出的五個檔案。
### 0.5 ScanImplScann 分類
@{{json}} 代表 @CB_IMGPSScanImp.pas 檔案中拆分前的每個方法,其分類是什麼(tags),其方法名(matcher)
對應的原始碼區段(lIndex, rIndex)在哪,及其引用相依(deps)為什麼,現欲使用 @{{json}} 對 @CB_IMGPSScanImp.pas
進行分類
#### 0.5.1 tags 與拆分檔案對應
##### 0.5.1.1 tags:ScannerController 拆分檔案對應
- ScannerController.acquisitionHandler: {{output_path}}/scan/acquisition.pas
- ScannerController.twainWrapper: {{output_path}}/scan/twain.pas
##### 0.5.1.2 tags:TransportManager 拆分檔案對應
- TransportManager.apiClient: {{output_path}}/transp/apiClient.pas
- TransportManager.fileTransfer: {{output_path}}/transp/fileClient.pas
- TransportManager.certificateManager: {{output_path}}/transp/certManager.pas
- TransportManager.payloadArchiver: {{output_path}}/transp/payloadArchiver.pas
##### 0.5.1.3 tags:ImageProcessor 拆分檔案對應
- ImageProcessor.transformer: {{output_path}}/img/transformer.pas
- ImageProcessor.converter: {{output_path}}/img/converter.pas
- ImageProcessor.anchorAnalyzer: {{output_path}}/img/anchor.pas
- ImageProcessor.payloadArchiver: {{output_path}}/img/imgArchiver.pas
##### 0.5.1.4 tags:BusinessLogic 拆分檔案對應
- BusinessLogic.systemInternal: {{output_path}}/bloc/sys.pas
- BusinessLogic.configRepository: {{output_path}}/bloc/cfg.pas
- BusinessLogic.ormRuleEngine: {{output_path}}/bloc/ormRuleEngine.pas
- BusinessLogic.entityMapping: {{output_path}}/bloc/entityMapping.pas
- BusinessLogic.fileManager: {{output_path}}/bloc/fileManager.pas
- BusinessLogic.caseManager: {{output_path}}/bloc/caseManager.pas
- BusinessLogic.entityModel: {{output_path}}/bloc/entityModel.pas
- BusinessLogic.activeXWrapper: {{output_path}}/bloc/ocx.pas
##### 0.5.1.5 tags:UIView 拆分檔案對應
- UIView.statusMessenger: {{output_path}}/view/msger.pas,
- UIView.events: {{output_path}}/view/events.pas,
- UIView.i18n: {{output_path}}/view/i18n.pas,
- UIView.inputHandler: {{output_path}}/view/input.pas,
- UIView.configRepository: {{output_path}}/view/cfg.pas,
- UIView.treeView: {{output_path}}/view/treeView.pas,
- UIView.toolBar: {{output_path}}/view/toolBar.pas,
- UIView.imageScrollBox: {{output_path}}/view/isb.pas,
- UIView.popupMenu: {{output_path}}/view/popupMenu.pas,
- UIView.listView: {{output_path}}/view/listView.pas,
- UIView.scrollView: {{output_path}}/view/scrollView.pas,
- UIView.misc: {{output_path}}/view/misc.pas
### 0.6 ScanImplScann 分類腳本生成
**目標**: 依據 @{{json}} 所提供的拆分資料及 需求 "0.5 ScanImplScann 分類" 規格寫一 javascript 腳本
並針對 @CB_IMGPSScanImp.pas, 檔案進行拆分
**輸入**:@{{json}}
**目標產出腳本**:scripts/final_classify_scanImp_pas.js
#### 0.6.1 拆分腳本原則
##### 0.6.1.1 檔案拆分前先複制確保乾淨
**目標**: 拆分應不影響原始檔案內容
**處理邏輯**:
- 拆分前將主檔案 @CB_IMGPSScanImp.pas.bk 複制一份並命名為 "CB_IMGPSScanImp.pas"
拆分作業請在 CB_IMGPSScanImp.pas 檔案中進行, 拆分時請透過 delphi include
語句將相應的檔案 include 至 CB_IMGPSScanImp.pas
- 若 "0.6 ScanImplScann 分類腳本生成"所定義之拆分腳本已存在,應保留其結構再行修改,因此拆分
  前請先行讀取 "0.6 ScanImplScann 分類腳本生成"所定義之拆分腳本,了解其結構
##### 0.6.1.2 生成人工審核資料
**目標**: 拆分後可人工審核
**處理邏輯**:移除 @CB_IMGPSScanImp.pas 中於 @{{json}} 所標示之區段,並於腳本
結束時顯示移除後的內容,我想人工審核
**中介輸出**: `scripts/dist/scanimpl_annalysis.remainings.txt`
#### 0.6.2 拆分腳請一併寫入相依及描述
**目標**: 依 @{{jsons}} 寫入 "0.5.1 tags 與拆分檔案對應" 時,需一併寫入相依(deps),及描述(description),描述需保持其可閱讀性
**處理邏輯**:
- 見 "0.6.2.1 方法描述 template"
- description: column 字元長為 60 字元,超過情加斷行符
- description: 若有標示 1., 2., 3., ... 等要點,請確保可閱讀性,也必須須一併斷行
##### 0.6.2.1 方法描述 template
**腳本-docstring-template**
```pascal
{ ==============================================================================
  方法名稱:StatrTwainScan
  引用相依:{{deps}}
  {{description}}
============================================================================== }
```
**example**
若 @{{jsons}} deps, description 分別為
- deps: Scanner (TEnScan), TTiffGraphic
-
```pascal
{ ==============================================================================
  方法名稱:StatrTwainScan
  引用相依:Scanner (TEnScan), TTiffGraphic
  方法描述:觸發實體掃描器進行取像的核心起點。將系統參數 (如解析度 ScanDpi、色彩格式
          ScanColor、雙面掃描 ScanDuplex、亮度、對比等) 寫入 Scanner 物件,並宣告
          TTiffGraphic 容器。最後呼叫 AcquireWithSourceOpen 開始掃描,並綁定
          OnAcquire 作為非同步接收影像的回呼函式。
============================================================================== }
```
### 0.7 測試柝分正確性
撰寫 js 測試, 驗證拆分前後是否正確, 細項如下
#### 0.7.1 拆分代碼字串比對
透過 @{{json}} 中對應的 rIndex, lIndex 由原始檔案 @CB_IMGPSScanImp.pas 中取得對應的代碼,與下列
拆分後的檔案與原始檔案進行字串比對
- 0.6.2.1.1 比對 ScannerControl 相關檔案
  相關檔案參照 0.5.1
- 0.6.2.1.2 比對 ImageProcessor 相關檔案
  相關檔案參照 0.5.1
- 0.6.2.1.3 比對 TransportManager 相關檔案
  相關檔案參照 0.5.1
- 0.6.2.1.4 比對 BusinessLogic 相關檔案
  相關檔案參照 0.5.1
- 0.6.2.1.5 比對 UIView 相關檔案
  相關檔案參照 0.5.1
> output: scripts/final_classify_scanImp_pas.test.js
doc/curtis/prompt/scanimpl_analysis/readme.md
比對新檔案
@@ -0,0 +1,33 @@
### 拆分說明:
#### UIView
- UIView.treeView:樹狀結構呈現與操作 (如 TreeView 的節點刷新、拖曳、點擊)
- UIView.toolBar: 'CB_IMGPSScanImp.view.toolbar.pas'
- UIView.listView:清單結構呈現 (如 PageLV, AttListBox)
- UIView.imageScrollBox:影像預覽與捲動 (對應 EnImgScr / TImageScrollBox 相關的視覺控制與預覽)
- UIView.toolBar:互動工具與面板按鈕 (如各類 BtnClick、FC 分類按鈕)
- UIView.popupMenu:快顯選單控制 (各類 PMxxxClick 或是 PopupMenuPopup)
- UIView.i18n:多國語言與翻譯載入
- UIView.feedback:系統狀態與進度回饋 (包含 Timer、DataLoading、StatusBar)
#### ScannerController (掃描硬體控制模組)
- ScannerController.twainWrapper (TWAIN 介面與硬體初始化)
- ScannerController.acquisitionHandler (硬體取像非同步回呼與後處理)
#### TransportManager (傳輸與網路管理模組),新增了:
- TransportManager.apiClient (RESTful / Servlet 參數與組態拉取)
- TransportManager.fileTransfer (大檔、影像、FTP 實體傳輸)
- TransportManager.certificateManager (HTTPS 與 SSL 憑證驗證)
- TransportManager.payloadArchiver (ZIP 壓縮、解壓縮與進匯出封裝)
#### ImageProcessor
- ImageProcessor.transformer (影像幾何與物理變換):如各種縮放 (ReSize)、裁切 (CheckNeedCrop)、旋轉 (Rotate)、去斜 (Deskew) 及所有 UI 比例變換等。
- ImageProcessor.converter (影像色彩與品質轉換):包含黑白轉換 (ConvertToBW)、平滑化 (Smooth)、遮罩處理 (Mask)、浮水印列印 (PrintImg)。
- ImageProcessor.anchorAnalyzer (特徵定位與 OMR 分析):包含了分析黑點密度的 GetSiteOMR。
doc/curtis/prompt/scanimpl_analysis/scanimpl_annalysis.BusinessLogic.json
比對新檔案
@@ -0,0 +1,363 @@
[
  {
    "matcher": "Function TCB_IMGPSScanX.GetSetInf1 : Boolean; //取系統設定資訊Mode1 DOC_INF",
    "tags": [
      "BusinessLogic",
      "BusinessLogic.paramState",
      "API 呼叫相關"
    ],
    "deps": [
      "En_DecryptionStr_Base64",
      "ProcessServlet_Get"
    ],
    "lIndex": "5665",
    "rIndex": "5707",
    "description": "向伺服器請求 DOC_INF 資料表資訊(模式 1)。方法會加密目前伺服器時間戳記並發送 HTTP GET 請求。若成功取得資料(狀態碼 '0'),則利用 SetSQLData 將結果解析並存入本地快取 Doc_Inf_List;若發生通訊錯誤或 Session 逾時(偵測到登入頁面標籤),則會記錄對應的 HttpErrStr 並返回 False。"
  },
  {
    "matcher": "Function TCB_IMGPSScanX.GetSetInf2 : Boolean; //取系統設定資訊Mode2  DM_FORM_INF",
    "tags": [
      "BusinessLogic",
      "BusinessLogic.paramState",
      "API 呼叫相關"
    ],
    "deps": [
      "En_DecryptionStr_Base64",
      "ProcessServlet_Get"
    ],
    "lIndex": "5708",
    "rIndex": "5746",
    "description": "向伺服器請求 DM_FORM_INF 表單關聯資訊(模式 2)。流程包含加密請求參數與發送 GET 請求。此方法負責取得表單間的主從關係、相依性以及互斥規則,並將回傳的資料行解析後存入本地的 DM_FORM_INF_List。若通訊失敗或 Session 過期,會設定錯誤訊息並中斷流程。"
  },
  {
    "matcher": "Function TCB_IMGPSScanX.GetSetInf3 : Boolean; //取系統設定資訊mode3  FORM_INF",
    "tags": [
      "BusinessLogic",
      "BusinessLogic.paramState",
      "API 呼叫相關"
    ],
    "deps": [
      "En_DecryptionStr_Base64",
      "ProcessServlet_Get"
    ],
    "lIndex": "5747",
    "rIndex": "5786",
    "description": "向伺服器請求 FORM_INF 表單詳細資料(模式 3)。方法會取得包含表單名稱、說明、分類、定位點類型(ANCHOR/FRAME)、最大頁數及預設高寬等中繼數據。取得的資料會被快取至 FORM_INF_List,作為影像處理(如自動縮放與 OMR 檢核)的重要依據。"
  },
  {
    "matcher": "Function TCB_IMGPSScanX.GetSetInf4 : Boolean; //取系統設定資訊mode4  CHECK_RULE_INF",
    "tags": [
      "BusinessLogic",
      "BusinessLogic.paramState",
      "API 呼叫相關"
    ],
    "deps": [
      "En_DecryptionStr_Base64",
      "ProcessServlet_Get"
    ],
    "lIndex": "5787",
    "rIndex": "5827",
    "description": "向伺服器請求 CHECK_RULE_INF 檢核規則資訊(模式 4)。此方法取得包含檢核代號、描述及顯示類型在內的驗證規則,並將其儲存於 CHECK_RULE_INF_List。最後會呼叫 CheckRule2OMRErrInfo,將取得的規則同步更新至 OMR 錯誤資訊記錄中,以確保前端檢核邏輯與伺服器同步。"
  },
  {
    "matcher": "Function TCB_IMGPSScanX.GetSetInf5 : Boolean; //取系統設定資訊mode5  MEMO_INF",
    "tags": [
      "BusinessLogic",
      "BusinessLogic.paramState",
      "API 呼叫相關"
    ],
    "deps": [
      "En_DecryptionStr_Base64",
      "ProcessServlet_Get"
    ],
    "lIndex": "5828",
    "rIndex": "5866",
    "description": "向伺服器請求 MEMO_INF 註記資訊(模式 5)。方法會取得預設的註記內容及其對應的類型名稱,並將其快取至 MEMO_INF_List。這些資料通常用於 UI 上的註記選擇選單,方便掃瞄人員在影像處理過程中快速標註預設的說明文字。"
  },
  {
    "matcher": "Function TCB_IMGPSScanX.GetSetInf6 : Boolean; //取系統設定資訊mode5  WORK_INF",
    "tags": [
      "BusinessLogic",
      "BusinessLogic.paramState",
      "API 呼叫相關"
    ],
    "deps": [
      "En_DecryptionStr_Base64",
      "ProcessServlet_Get"
    ],
    "lIndex": "5867",
    "rIndex": "5906",
    "description": "向伺服器請求 WORK_INF 工作參數資訊(模式 6)。此方法取得當前工作項目的全域參數(如 PARA_NO 與 PARA_CONTENT),並儲存於 WORK_INF_List。這些參數控制了掃瞄器的預設行為(如 DPI、雙面掃瞄等),是系統初始化環境設定的關鍵步驟。"
  },
  {
    "matcher": "Function TCB_IMGPSScanX.GetSetInf7 : Boolean; //取系統設定資訊mode5  LASTEST_FORM_INF",
    "tags": [
      "BusinessLogic",
      "BusinessLogic.paramState",
      "API 呼叫相關"
    ],
    "deps": [
      "En_DecryptionStr_Base64",
      "ProcessServlet_Get"
    ],
    "lIndex": "5907",
    "rIndex": "5946",
    "description": "向伺服器請求 LASTEST_FORM_INF 最新表單版本資訊(模式 7)。方法會獲取各文件編號對應的最新表單 ID 與版本號,並儲存於 LASTEST_FORM_INF_List。此資訊用於確保使用者掃瞄的是最新版表單,或是用於舊案件轉檔時的版本對照。"
  },
  {
    "matcher": "Function TCB_IMGPSScanX.DeleteDocNoFileForESCAN(Path,DocNo:String):Boolean;  //刪除指定DocNo文件",
    "tags": [
      "BusinessLogic",
      "BusinessLogic.caseManager",
      "檔案操作"
    ],
    "deps": [
      "DeleteDocNoFile",
      "SaveToFile",
      "LoadFromFile",
      "_DelTree"
    ],
    "lIndex": "6141",
    "rIndex": "6174",
    "description": "在補件模式 (ESCAN) 下刪除屬於特定文件類型 (DocNo) 的影像。方法會從索引清單 (ContextList) 的末尾開始向前遍歷,識別符合目標文件編號或附件名稱的圖檔。若該檔案並非預先存在的(ISExistImg 返回 False),則執行實體刪除並從索引清單中移除。若整個文件目錄因此清空,則會進一步移除該目錄並從文件清單中刪除紀錄。"
  },
  {
    "matcher": "Function TCB_IMGPSScanX.BarCode2CaseID : String; //Barcode依規則轉成CaseID",
    "tags": [
      "BusinessLogic",
      "BusinessLogic.entityMapping"
    ],
    "deps": [],
    "lIndex": "8155",
    "rIndex": "8172",
    "description": "從目前掃瞄到的條碼清單中提取案件編號 (CaseID)。方法會遍歷條碼暫存對象 (MpsBarcodeinf),並將第一個長度正好等於預設 CaseIDLength 的條碼值視為合法的案件編號返回。若遍歷結束仍未找到符合長度限制的條碼,則返回空字串。"
  },
  {
    "matcher": "Function TCB_IMGPSScanX.BarCode2FormID : String; //Barcode依規則轉成FormID",
    "tags": [
      "BusinessLogic",
      "BusinessLogic.entityMapping"
    ],
    "deps": [],
    "lIndex": "8173",
    "rIndex": "8195",
    "description": "從目前掃瞄到的條碼清單中識別有效的表單代碼 (FormID)。方法會過濾長度符合 FormIDLength 的條碼,並呼叫 FormIDAppear 驗證其格式。若初步驗證通過,會進一步呼叫 FormIDExists 確認該代碼在系統中已註冊且可用。返回第一個完全符合條件的表單代碼,否則返回空。"
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.SetSQLData(ColumeStr:String;FromList,ToList:TStringlist); //把SQL值塞入",
    "tags": [
      "BusinessLogic",
      "BusinessLogic.paramState"
    ],
    "deps": [],
    "lIndex": "8651",
    "rIndex": "8662",
    "description": "將 SQL 查詢結果格式化後塞入目標字串清單。此方法會先清除目標清單 (ToList),第一行加入欄位定義字串 (ColumeStr),隨後將來源清單 (FromList) 中扣除標題後的資料列依序填入,用於更新系統本地的資料快取。"
  },
  {
    "matcher": "Function TCB_IMGPSScanX.GetSQLData(TableList:TStringlist;Colname:String;colNo:Integer):String; //依欄位及索引取值",
    "tags": [
      "BusinessLogic",
      "BusinessLogic.paramState"
    ],
    "deps": [],
    "lIndex": "8663",
    "rIndex": "8723",
    "description": "從結構化字串清單中提取特定欄位的值。邏輯如下:1. 解析 TableList 的第一行(欄位定義)以確定目標欄位 (Colname) 的索引位置。2. 讀取指定行 (colNo) 的資料字串,該字串使用 '!@!' 作為欄位分隔符。3. 透過循環將資料拆分並存入臨時清單,最後返回對應欄位索引位置的數值內容。若找不到欄位或索引超出範圍,則返回空字串。"
  },
  {
    "matcher": "Function TCB_IMGPSScanX.FindSQLData(TableList:TStringlist;ColumeStr,KeyColumeStr,KeyStr:String;ColNo:Integer;Var ResultList:TStringlist):Boolean; //找指定的資料",
    "tags": [
      "BusinessLogic",
      "BusinessLogic.paramState"
    ],
    "deps": [],
    "lIndex": "8724",
    "rIndex": "8802",
    "description": "在資料快取清單中搜尋符合鍵值的紀錄。核心邏輯:1. 支援多個鍵值比對 (KeyColumeStr 與 KeyStr 可包含多個欄位)。2. 若 ColNo 為 0,則從頭搜尋清單;若非 0 則僅檢查該指定行。3. 搜尋時會調用 GetSQLData 提取欄位值並與目標鍵值比對。4. 一旦匹配成功,會將 ColumeStr 中指定的所有欄位名稱及其對應數值(格式為「欄位名,數值」)填入 ResultList 中並返回 True。若搜尋無結果則返回 False。"
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.OldCasetoNewCase(CaseID:String); //將舊案份數轉成新規則",
    "tags": [
      "BusinessLogic",
      "BusinessLogic.caseManager",
      "舊案/異動件處理"
    ],
    "deps": [
      "LoadFromFile",
      "SaveToFile"
    ],
    "lIndex": "10456",
    "rIndex": "10524",
    "description": "將舊系統格式的案件文件份數轉換為新系統規則。方法會載入案件的文件目錄清單 (CaseDocNo.dat),並解析由全域變數傳入的舊案文件編號與名稱清單(以 Tab 字串傳遞)。流程中會針對每個目錄編號統計其在舊資料中的出現次數,並將統計後的份數結果更新至 CaseDocNo_Copies.dat 檔案中,以完成歷史資料的規格對接。"
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.ErrFormtoCurrentForm(CaseID,EFormID,CFormID:String);//將舊案的錯誤FormID改正確的FormID",
    "tags": [
      "BusinessLogic",
      "BusinessLogic.caseManager",
      "舊案/異動件處理"
    ],
    "deps": [
      "LoadFromFile",
      "FileExists",
      "RenameFile",
      "SaveToFile",
      "MoveFile"
    ],
    "lIndex": "10525",
    "rIndex": "10574",
    "description": "修正案件中歸類錯誤的表單代碼及其關聯檔案。邏輯如下:1. 取得錯誤與正確表單對應的文件編號。2. 遍歷案件下的所有文件目錄,載入各目錄的影像索引檔 (Context.dat)。3. 識別檔名中包含 EFormID 的影像,執行實體重新命名並更新索引。4. 若該目錄編號與錯誤文件編號一致,則會執行 MoveFile 搬移整個目錄至新路徑,並同步更新總文件清單 (CaseDocNo.dat),確保影像與分類資訊的一致性。"
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.SetUseCase(Mode:Char;Path,DocDir,FormCaseID,ToCaseID:String);   //記錄引用其他案件 A:加入 D:刪掉",
    "tags": [
      "BusinessLogic",
      "BusinessLogic.caseManager"
    ],
    "deps": [],
    "lIndex": "11506",
    "rIndex": "11526",
    "description": "管理案件間的文件引用紀錄。此方法使用 Tinifile 操作案件目錄下的 UseCase.ini 檔案。當 Mode 為 'A' (Add) 時,會在指定的 DocDir 區段下紀錄來源案件 (FROM_CASEID) 與目標案件 (TO_CASEID) 的引用關係;當 Mode 為 'D' (Delete) 時,則會移除該目錄對應的引用資訊。這用於追蹤不同案件間影像資源的重複利用情況。"
  },
  {
    "matcher": "Function TCB_IMGPSScanX.GetUseCase(Mode:Char;Path,DocDir:String):String;  //F:取被引用 To:引用",
    "tags": [
      "BusinessLogic",
      "BusinessLogic.caseManager"
    ],
    "deps": [],
    "lIndex": "11527",
    "rIndex": "11546",
    "description": "取得指定目錄的文件引用資訊。方法讀取 UseCase.ini 設定檔,根據 Mode 參數返回對應的案件 ID:模式 'F' 返回被引用的來源案件 ID (FROM_CASEID),模式 'T' 返回執行引用的目標案件 ID (TO_CASEID)。若查無紀錄則返回空字串。"
  },
  {
    "matcher": "Function TCB_IMGPSScanX.FormCode2DocNo(FormCode:String):String;   //FormCode轉Docno",
    "tags": [
      "BusinessLogic",
      "BusinessLogic.entityMapping",
      "轉換區(名稱/格式轉換)"
    ],
    "deps": [],
    "lIndex": "11994",
    "rIndex": "12018",
    "description": "將表單代碼 (FormCode) 轉換為對應的文件編號 (DocNo)。方法遍歷預載的 FormID_List,若找到匹配的表單代碼,則返回 DocNo_List 中相同索引位置的數值。若表單代碼不在清單中(通常為使用者自訂的文件),則預設截取代碼的前 8 位字元作為文件編號返回。"
  },
  {
    "matcher": "Function TCB_IMGPSScanX.DocNo2DocName(CaseID,DocNo:String):String; //Docno轉Doc名稱",
    "tags": [
      "BusinessLogic",
      "BusinessLogic.entityMapping",
      "轉換區(名稱/格式轉換)"
    ],
    "deps": [],
    "lIndex": "12029",
    "rIndex": "12066",
    "description": "解析文件編號對應的描述性名稱。優先權邏輯為:1. 若編號符合附件名稱 (AttName),返回「未歸類」。2. 從系統定義快取 (Doc_Inf_List) 中搜尋對應的描述 (DOC_U_DESC)。3. 若系統定義查無結果,則呼叫 GetCustomDocName 從案件本地的自訂文件設定中尋找對應名稱。此方法確保 UI 上能顯示人類可讀的文件類別名稱。"
  },
  {
    "matcher": "Function TCB_IMGPSScanX.DocNoNeedDiv(DocNo:String):Boolean; //是否是需分份數的文件代號",
    "tags": [
      "BusinessLogic",
      "BusinessLogic.entityMapping",
      "轉換區(名稱/格式轉換)"
    ],
    "deps": [],
    "lIndex": "12100",
    "rIndex": "12112",
    "description": "檢查指定的文件類型是否需要執行頁面拆分(分份數)。方法透過 FindSQLData 在 Doc_Inf_List 中查詢該編號的 'IS_DOC_DIV' 欄位,若旗標值為 'Y' 則返回 True,否則返回 False。此設定決定了掃瞄流程中是否需要根據條碼自動切分文件目錄。"
  },
  {
    "matcher": "Function TCB_IMGPSScanX.OMRCheckCase(CaseID:String):Boolean; //OMR檢核",
    "tags": [
      "BusinessLogic",
      "BusinessLogic.ormRuleEngine",
      "OMR 檢核"
    ],
    "deps": [
      "ImageReSize_FormID",
      "GetSiteOMR",
      "FindPoint",
      "LoadFromFile",
      "FileExists",
      "SaveToFile"
    ],
    "lIndex": "12255",
    "rIndex": "12950",
    "description": "執行案件的自動化 OMR 規則檢核,這是確保掃瞄案件合規性的核心邏輯。程序流程:1. 初始化檢核日誌。2. 識別主文件並驗證必要文件是否缺漏、相依與互斥文件是否衝突、以及表單是否已停用。3. 檢查各文件類型是否超過預設的最大頁數。4. 針對案件內每張影像,執行十字定位點縮放 (ImageReSize_FormID) 後,載入對應表單的 XML 規則檔。5. 執行欄位級檢核,包含必填項 (settype1)、跨文件欄位關聯 (settype3/settype8)、相依文件需求 (settype4) 及備註填寫要求 (settype6) 等。6. 將所有檢核失敗原因紀錄至 Checkerr.ini。最終返回案件是否通過所有檢核規則。"
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.OMRErr2ini(CaseID,Reason,FileName,Site,RelaFileName,RelaSite,Anchor,Anchor1:String;Del,Ingnore,Display:Boolean); //OMR檢核失敗寫入ini",
    "tags": [
      "BusinessLogic",
      "BusinessLogic.ormRuleEngine",
      "OMR 檢核"
    ],
    "deps": [
      "FileExists",
      "LoadFromFile",
      "SaveToFile"
    ],
    "lIndex": "12951",
    "rIndex": "12990",
    "description": "紀錄 OMR 檢核失敗的詳細資訊。方法根據 Display 旗標決定紀錄方式:若為 True,則在案件目錄下的 Checkerr.ini 中建立新的錯誤序號區段,詳細紀錄失敗原因、檔案路徑、OMR 座標點、關聯檔案及定位點類型,用於後續 UI 呈現;若為 False,則僅將錯誤原因字串附加於 CheckMemo.dat 純文字日誌中,作為背景紀錄之用。"
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.OMRErrini2List(CaseID:String;ErrlistForm:TErrlistForm); //OMR檢核失敗從ini寫入ListView",
    "tags": [
      "BusinessLogic",
      "BusinessLogic.ormRuleEngine",
      "UIView",
      "UIView.listView",
      "OMR 檢核"
    ],
    "deps": [],
    "lIndex": "12991",
    "rIndex": "13020",
    "description": "將檢核失敗紀錄從 INI 設定檔載入至 UI 介面。方法會讀取 Checkerr.ini,遍歷所有錯誤紀錄,並過濾掉已標記為刪除 (Del) 的項目。將符合條件的錯誤原因填入 ErrlistForm 中的 ListView 元件,供使用者查看與修正。若清單中仍存在錯誤,會同步停用介面上的上傳按鈕以防止不合規案件送出。"
  },
  {
    "matcher": "function TCB_IMGPSScanX.OMRErrini2ListForLog(CaseID: String): String;",
    "tags": [
      "BusinessLogic",
      "BusinessLogic.ormRuleEngine",
      "OMR 檢核"
    ],
    "deps": [
      "LoadFromFile"
    ],
    "lIndex": "13021",
    "rIndex": "13058",
    "description": "彙整系統中所有活動案件的 OMR 檢核錯誤訊息。方法讀取全域的 CaseList.dat,依次遍歷每個案件子目錄下的 Checkerr.ini,收集所有未被移除的錯誤原因,並將其合併為一個完整的文字區塊返回。此功能主要用於產生系統運行日誌,方便追蹤與審查多案件的檢核狀態。"
  },
  {
    "matcher": "Function TCB_IMGPSScanX.CreateDocNo_Info(CaseID:String):String; //產生 DocNo[tab]份數[tab]總頁數[tab]是否異動[換行]DocNo[tab]份數[tab]總頁數[tab]是否異動",
    "tags": [
      "BusinessLogic",
      "BusinessLogic.entityMapping",
      "上傳前置資料產生"
    ],
    "deps": [
      "FileExists",
      "LoadFromFile"
    ],
    "lIndex": "13985",
    "rIndex": "14068",
    "description": "產生案件內標準文件(非自訂)的彙總資訊字串。方法讀取 CaseDocNo.dat,針對每個非 'ZZZZZ' 開頭的文件編號,計算其在案件中的總份數、累計總頁數,並檢查編輯狀態(異動旗標)。結果以「編號[Tab]份數[Tab]頁數[Tab]狀態」的格式逐行組成,作為案件上傳時與伺服器比對資料完整性的核心依據。"
  },
  {
    "matcher": "Function TCB_IMGPSScanX.CreateCustDocNo_Info(CaseID:String):String; //產生自訂文件 DocName[tab]份數[tab]總頁數[tab]是否異動[#13#10]DocName[tab]份數[tab]總頁數[tab]是否異動",
    "tags": [
      "BusinessLogic",
      "BusinessLogic.entityMapping",
      "上傳前置資料產生"
    ],
    "deps": [
      "FileExists",
      "LoadFromFile"
    ],
    "lIndex": "14069",
    "rIndex": "14121",
    "description": "產生案件內自訂文件的彙總資訊字串。方法專門處理代碼開頭為 'ZZZZZ' 的文件目錄,透過 GetCustomDocName 取得使用者定義的文件名稱,並彙整其總份數、總頁數與編輯異動狀態。最終格式與標準文件一致,但首位欄位改為顯示自訂名稱,確保自訂類別的文件也能正確被伺服器識別與儲存。"
  }
]
doc/curtis/prompt/scanimpl_analysis/scanimpl_annalysis.ImageProcessor.json
比對新檔案
@@ -0,0 +1,71 @@
[
  {
    "matcher": "function TCB_IMGPSScanX.GetSiteOMR(FileName,Site:String;bt: Integer): Integer;",
    "tags": [
      "ImageProcessor",
      "ImageProcessor.anchorAnalyzer",
      "OMR 檢核"
    ],
    "deps": [
      "GetSiteOMR",
      "FindPoint",
      "Get_OMR",
      "LoadFromFile"
    ],
    "lIndex": "5173",
    "rIndex": "5227",
    "description": "在指定影像文件的特定座標執行 OMR (光學標記辨識)。核心邏輯包含:1. 檢查並載入影像檔(若尚未載入),並呼叫 ClearLine 初始化黑白緩衝區。2. 讀取影像的 DPI 與寬高資訊。3. 使用 CM_Str2Rect 將 Site 字串轉為 TRect 矩陣,並參考定位點 (UpLPoint) 進行位移計算。4. 限制辨識區域座標不超出影像邊界。5. 呼叫 Get_OMR 對黑白圖形緩衝區執行辨識並返回結果值(通常為 1 或 0)。此方法是自動化資料檢核的重要工具。"
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.ImageReSize_FormID(CaseID,FileName:String);  //依十字定位點做縮放",
    "tags": [
      "ImageProcessor",
      "ImageProcessor.transformer",
      "影像處理"
    ],
    "deps": [
      "ImageReSize_FormID",
      "FindPoint",
      "CheckSize",
      "LoadFromFile",
      "SaveToFile",
      "FileExists",
      "LoadFileGetMD5"
    ],
    "lIndex": "6343",
    "rIndex": "6420",
    "description": "根據表單的十字定位點或邊框 (ANCHOR/FRAME) 對掃瞄影像進行縮放調整。流程如下:1. 從 FORM_INF_List 取得表單預設高寬與定位類型。2. 載入對應案件下的影像檔,若為補件模式則跳過原有圖檔。3. 呼叫 FindPoint 尋找影像中的十字線或邊框。4. 呼叫 CheckSize 計算偏移與縮放比例。5. 呼叫 ImageResize 執行實際調整。6. 成功縮放後,記錄檔案 MD5 並儲存更新後的影像,同時將操作記錄寫入 ReSize.dat;若定位點遺失或辨識錯誤,則記錄於 AnchorError.dat。"
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.ImageReSize_tmp(FormID,FileName:String);  //依十字定位點做縮放(暫存檔)",
    "tags": [
      "ImageProcessor",
      "ImageProcessor.transformer",
      "影像處理"
    ],
    "deps": [
      "ImageReSize_tmp",
      "CheckSize",
      "LoadFromFile",
      "SaveToFile"
    ],
    "lIndex": "6421",
    "rIndex": "6446",
    "description": "針對暫存影像檔案執行十字定位點縮放處理。此方法是 ImageReSize_FormID 的簡化版本,主要針對暫存檔 (FileName) 與指定的 FormID。邏輯包含從資料庫清單查詢表單尺寸與定位模式,若符合 ANCHOR 或 FRAME 類型,則載入影像並呼叫 CheckSize 檢查是否需要調整。若偵測到影像存在偏移或比例差異(SizeStr 非空),則將調整後的影像直接覆蓋儲存回原始路徑。"
  },
  {
    "matcher": "Function TCB_IMGPSScanX.CheckNeedCrop(Graphic:TDibGraphic):Boolean; //是否是A3要切影像",
    "tags": [
      "ImageProcessor",
      "ImageProcessor.transformer",
      "影像處理"
    ],
    "deps": [
      "TDibGraphic",
      "CheckNeedCrop"
    ],
    "lIndex": "9996",
    "rIndex": "10021",
    "description": "判斷掃瞄影像是否為 A3 尺寸並需要進行切割(Crop)。判定邏輯有二:首先,檢查影像寬度是否大於 4 倍的 DPI 閥值,藉此初步判斷為大尺寸掃瞄件;其次,遍歷目前的條碼清單 (MpsBarcodeinf),統計有效的表單代碼 (FormID) 數量。如果影像寬度達標且有效表單數量正好為 2,則返回 True。這代表此張大圖實際上是由兩份 A4 表單併排掃瞄而成,後續需依此旗標進行影像分割處理。"
  }
]
doc/curtis/prompt/scanimpl_analysis/scanimpl_annalysis.ScannerController.json
比對新檔案
@@ -0,0 +1,118 @@
[
  {
    "matcher": "procedure TCB_IMGPSScanX.StatrTwainScan;",
    "tags": [
      "ScannerController",
      "ScannerController.twainWrapper",
      "掃描相關"
    ],
    "deps": [
      "TTiffGraphic",
      "StatrTwainScan",
      "Scanner",
      "Scanner.OpenSource",
      "Scanner.CloseSource",
      "OnAcquire",
      "Scanner.AcquireWithSourceOpen"
    ],
    "lIndex": "4390",
    "rIndex": "4443",
    "description": "啟動 TWAIN 掃瞄流程。此方法首先檢查掃瞄器驅動是否已安裝,接著初始化 ScanInfo 結構並設定掃瞄參數(如 DPI、影像格式、是否顯示 UI、雙面掃瞄模式、亮度與對比)。流程中會開啟掃瞄來源,呼叫 AcquireWithSourceOpen 執行實際掃瞄作業,並利用 try...finally 確保不論掃瞄成功與否,最終都會關閉掃瞄來源並釋放資源。"
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.OnAcquire( const DibHandle    : THandle;",
    "tags": [
      "ScannerController",
      "ScannerController.twainWrapper",
      "掃描相關"
    ],
    "deps": [
      "TTiffGraphic",
      "TJpegGraphic",
      "OnAcquire"
    ],
    "lIndex": "4444",
    "rIndex": "4683",
    "description": "掃瞄影像獲取後的回呼處理函數。核心邏輯包含:1. 將獲取的 DIB 句柄轉為影像對象並設定 DPI。2. 依影像格式執行對應處理:黑白影像會進行條碼辨識、依條碼角度旋轉、影像反向、傾斜矯正及清黑邊;全彩或灰階影像則設定 JPEG 壓縮品質。3. 檢查是否需要進行 A3 切割為 A4 的處理。4. 透過 Deletepage 檢查並過濾空白頁(依據檔案大小)。5. 對於有效影像,更新 UI 顯示並呼叫 PageEnd 決定儲存路徑與檔名,最後依副檔名儲存為 TIFF 或 JPEG 並呼叫 PageDone 完成頁面流程。"
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.PageDone;",
    "tags": [
      "ScannerController",
      "ScannerController.twainWrapper",
      "掃描相關"
    ],
    "deps": [
      "LoadFromFile",
      "PageDone"
    ],
    "lIndex": "4684",
    "rIndex": "4733",
    "description": "完成單頁影像處理後的 UI 更新邏輯。此方法會遞增掃瞄影像總計數,並根據目前的掃瞄模式(新建、取代、插入或取樣)將儲存好的影像檔載入到對應的 ImageScrollBox 元件中。在新建模式下,還會根據 ScanImgShowMode 設定決定影像顯示的品質(反鋸齒開啟與否)與縮放模式(zmFittopage),確保使用者能即時預覽掃瞄結果。"
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.PageEnd;",
    "tags": [
      "ScannerController",
      "ScannerController.twainWrapper",
      "掃描相關"
    ],
    "deps": [
      "GetNoNameCase",
      "DirectoryExists",
      "_DelTree",
      "Str2Dir",
      "SaveToFile",
      "PageEnd"
    ],
    "lIndex": "4734",
    "rIndex": "4950",
    "description": "管理掃瞄影像的儲存路徑與檔案命名規則。主要邏輯如下:1. 辨識條碼以取得 FormID,並判斷是否為導引頁或分案頁。2. 若偵測到分案頁,會重置計數並嘗試取得新的案件編號(CaseID)。3. 確定儲存目錄,包含處理「分份數」邏輯(依 DocNoNeedDiv 決定是否建立新子目錄)。4. 根據目前頁數與 FormID 產生標準化的檔名(如補零序號_FormID.tif)。5. 更新 ContextList(影像索引資訊)並在掃瞄新案件時更新 TreeView UI 結構。此方法確保每張影像都能正確歸類到對應的案件與文件目錄下。"
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.R_W_Scanini(Mode:Char); //'R'讀取;'W'寫入",
    "tags": [
      "ScannerController",
      "ScannerController.twainWrapper",
      "掃描相關"
    ],
    "deps": [
      "Scanner"
    ],
    "lIndex": "5254",
    "rIndex": "5295",
    "description": "讀取或寫入掃瞄設定檔(FBScan.ini)。此方法使用 Tinifile 物件處理掃瞄相關參數的 I/O 作業。當 Mode 為 'R' 時,從設定檔讀取包含空白頁刪除設定、影像反向、清黑邊、旋轉角度、傾斜矯正、亮度對比以及 UI 顯示模式等參數;當 Mode 為 'W' 時,則將目前的系統變數值回寫至設定檔中,以利下次啟動時恢復使用者的個性化設定。"
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.GetDefScanIni; //取得掃瞄的預設值",
    "tags": [
      "ScannerController",
      "ScannerController.twainWrapper",
      "掃描相關"
    ],
    "deps": [
      "Rotate",
      "FJpgCompression",
      "Scanner"
    ],
    "lIndex": "5296",
    "rIndex": "5472",
    "description": "從資料庫參數清單(WORK_INF_List)初始化並設定掃瞄的系統預設值。流程首先設定一組程式內建的預設數值,隨後遍歷 WORK_INF_List 並比對 PARA_NO 關鍵字,動態更新包含:空白頁判斷大小、影像是否反相、清黑邊、掃瞄 DPI、雙面掃瞄開啟、影像旋轉角度、傾斜矯正、亮度對比、影像儲存路徑、導引頁與分案頁代碼列表、以及 JPEG 壓縮品質等關鍵參數。這使得掃瞄行為可以透過後台設定進行彈性調整。"
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.initkscan;",
    "tags": [
      "ScannerController",
      "ScannerController.twainWrapper"
    ],
    "deps": [
      "initkscan",
      "Scanner",
      "Scanner.OpenSource",
      "Scanner.CloseSource"
    ],
    "lIndex": "9242",
    "rIndex": "9262",
    "description": "初始化並偵測掃瞄器硬體能力。此方法會先將雙面掃瞄勾選框(ScanDuplexCB)設為停用,接著嘗試開啟掃瞄來源(OpenSource),檢查掃瞄器是否支援雙面掃瞄功能(DuplexCap > 0)。如果硬體支援,則啟用 UI 上的勾選框供使用者選擇。最後確保關閉掃瞄來源,若過程中發生異常,會呼叫 DataLoading(False,True) 停止載入狀態提示。"
  }
]
doc/curtis/prompt/scanimpl_analysis/scanimpl_annalysis.TransportManager.json
比對新檔案
@@ -0,0 +1,98 @@
[
  {
    "matcher": "procedure TCB_IMGPSScanX.HTTPSClientCertificateValidate(Sender: TObject;",
    "tags": [
      "TransportManager",
      "TransportManager.utilities"
    ],
    "deps": [
      "HTTPSClientCertificateValidate"
    ],
    "lIndex": "5473",
    "rIndex": "5478",
    "description": "HTTPS 用戶端憑證驗證回呼函數,預設直接將 Validate 設為 True,以接受所有伺服器憑證。"
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.ZipMainFile(SoPath,DePath,ZipName:String);",
    "tags": [
      "TransportManager",
      "TransportManager.payloadArchiver"
    ],
    "deps": [
      "FileExists",
      "LoadFromFile"
    ],
    "lIndex": "8388",
    "rIndex": "8460",
    "description": "將案件的主要圖檔與所有中繼資料檔案打包壓縮為 ZIP。流程如下:1. 遍歷影像清單 (ContextList) 與附件清單 (AttContextList) 加入實體圖檔。2. 自動偵測並加入多種系統紀錄檔,包含索引檔 (Context.dat)、掃瞄清單 (scanlist.dat)、縮放紀錄 (ReSize.dat)、案件分類資訊 (CaseDocNo_Copies.dat) 及跨案引用設定 (UseCase.ini) 等。3. 檢查是否存在特殊壓縮檔 (FirstImg.zip) 並併入。4. 呼叫 ExeCuteZip 執行壓縮作業,確保上傳時案件資料的完整性。"
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.ZipMaskFile(SoPath,MarkPath,DePath,ZipName:String); //壓縮遮罩影像檔",
    "tags": [
      "TransportManager",
      "TransportManager.payloadArchiver"
    ],
    "deps": [
      "FileExists"
    ],
    "lIndex": "8461",
    "rIndex": "8494",
    "description": "壓縮遮罩影像檔及其相關設定檔。此方法會從指定遮罩路徑 (MarkPath) 收集與影像索引 (ContextList) 對應的遮罩圖檔,同時併入基本的案件資訊檔(如 Context.dat, scanlist.dat, DocNo_Name.dat)以及系統預設的錯誤與授權圖檔(Err.jpg, auth.jpg)。最後將這些檔案統一壓縮至目標路徑,供後續遮罩影像的上傳作業使用。"
  },
  {
    "matcher": "function TCB_IMGPSScanX.LoadFileGetMD5(const filename: string): string;",
    "tags": [
      "TransportManager",
      "TransportManager.utilities"
    ],
    "deps": [
      "LoadFileGetMD5",
      "TIdHashMessageDigest5"
    ],
    "lIndex": "9551",
    "rIndex": "9574",
    "description": "計算指定檔案的 MD5 雜湊值。方法會以唯讀模式開啟檔案串流 (TFileStream),利用 TIdHashMessageDigest5 元件處理串流內容,並返回以十六進位字串表示的 MD5 值。此功能主要用於確認影像檔案在傳輸或處理前後的完整性與一致性,防止資料受損或被重複處理。"
  },
  {
    "matcher": "Function TCB_IMGPSScanX.GetFtpinfo(CaseID,Action:String):Boolean;",
    "tags": [
      "TransportManager",
      "TransportManager.fileTransfer",
      "FTP 相關"
    ],
    "deps": [],
    "lIndex": "10964",
    "rIndex": "11041",
    "description": "向伺服器請求案件上傳所需的 FTP 連線資訊。核心邏輯:1. 發送包含案件編號與動作代碼的 HTTP POST 請求至後台 Servlet。2. 解析伺服器回傳結果,若回傳 'nodata' 則維持 tsNone 模式;若回傳成功,則根據標籤判斷是否啟用 FTP 模式 (tsFtp)。3. 若為 FTP 模式,會進一步解析並呼叫 DecodeFtpInfo 對包含連線協定、IP、Port、帳號及密碼的加密字串進行解密,並存入系統全域變數中。"
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.SetFtpInfo;     //餵入FTP資訊",
    "tags": [
      "TransportManager",
      "TransportManager.fileTransfer",
      "FTP 相關"
    ],
    "deps": [
      "SetFtpInfo",
      "IIS_Ftp"
    ],
    "lIndex": "11042",
    "rIndex": "11071",
    "description": "將 FTP 連線參數與事件回呼設定至 FTP 傳輸元件 (IIS_Ftp)。此方法會將先前取得並解碼的連線資訊(如 FTP IP、帳號、密碼、路徑、連接埠)指派給 IIS_Ftp 物件,並根據協定類型設定是否開啟 SSL/TLS 以及被動模式 (Passive)。此外,也會關聯各項事件處理器(如 SSLError, CertificateValidate, TextDataLine 等),以監控傳輸過程中的通訊狀態。"
  },
  {
    "matcher": "Function TCB_IMGPSScanX.FtpCaseComplete(SendData:String):Boolean;",
    "tags": [
      "TransportManager",
      "TransportManager.fileTransfer",
      "FTP 相關"
    ],
    "deps": [
      "FtpCaseComplete",
      "ProcessServlet_FormData"
    ],
    "lIndex": "11072",
    "rIndex": "11094",
    "description": "通知後台伺服器 FTP 案件上傳已完成。方法會將包含案件狀態的上傳數據發送至特定的 Servlet 介面。邏輯包含檢查 HTTP 通訊是否成功、解析伺服器回傳的結果代碼,並處理可能的登入過期(Session Timeout)情況。若執行失敗,會將錯誤原因記錄至 HttpErrStr,供後續 UI 顯示錯誤訊息。"
  }
]
doc/curtis/prompt/scanimpl_analysis/scanimpl_annalysis.UIView.json
比對新檔案
檔案太大
doc/curtis/prompt/scanimpl_analysis/scanimpl_annalysis.remainings.txt
File was renamed from separate/scanImp/CB_IMGPSScanImp_Main.pas
@@ -1,4 +1,5 @@
unit CB_IMGPSScanImp;
[Lines 1 - 1051]
unit CB_IMGPSScanImp;
//TEST
{$WARN SYMBOL_PLATFORM OFF}
@@ -1049,41 +1050,33 @@
{ TCB_IMGPSScanX }
{$I CB_IMGPSScanImp_UI.pas}{$I CB_IMGPSScanImp_Scan.pas}{$I CB_IMGPSScanImp_Data.pas}{$I CB_IMGPSScanImp_Utils.pas}initialization
  TActiveFormFactory.Create(
    ComServer,
    TActiveFormControl,
    TCB_IMGPSScanX,
    Class_CB_IMGPSScanX,
    1,
    '',
    OLEMISC_SIMPLEFRAME or OLEMISC_ACTSLIKELABEL,
    tmApartment);
----------------------------------------
  {SetLicenseKey('5B4451E676A1D2976FBB0F3BB18341336AF114C80B5ABAE7F6926B1CAF671F44' +
  'BD2F098CCEDA922F6389BFAE398DA6AEE67F97EEA0C17234C20D75C12173DBDA' +
  '594924D56DD8E342F454389C836AD880BB4352CA3BE62C4933B1BA3828E7462C' +
  '60514F2ECDAD322E6128D841F12D24DA00B623106D3F08EBCAA917D8A97CAA34' +
  '3D65F2DA567316457395BF9123EE53DF235D181F191A5712DBB27735284AA92D' +
  '5DFA0C8308308505F384707E900C6063F53F1BFF4C6972607955D1AE517B19D0' +
  '82CDD16301885403AD229D57BAEF98C056F31430861E5F68F339D658D72E1F92' +
  '63899412EC2D07891FE3AFD35F3E4A4390B2F0A8A1BF1B7D6160E5F1CC009B17'); }
  SetLicenseKey('4B2CF65E8C2A86CE8A0DD0F6A7DB03BC0B0126168B48AE4C27EBD78CAE75CF0F' +
   'A612190861E0D99F6FAE3ED97AC1941B5E97843CFFCF705A3787989072D4EB2C' +
   'AE6CAB3F5B69B86616ACC8A37AD6A2AB21C7BDD5C9AE1EDF9E4193D353805C9A' +
   '403631CE8A3D0803FEBB1BE4C209CE7A63B1298EF080EB34B8628CED567D2B68' +
   'E777FAC58E2E32B7411FC217A04336231D1E861A93474759DAA6EDF53F6EB632' +
   'A3055229A52F3053FB844754741409022DDE3DFB19473510F2BE63328E74BE20' +
   'A6A29AA24878F91ADA9DF8CE1F320AF4DAF58EBF95D9BE761D70EEA274E19475' +
   '1C15948B184264C5C49E60493F3BCD2FFAE2CA8B021D00B96F45550C5F050D8A');
[Lines 9996 - 10021]
Function TCB_IMGPSScanX.CheckNeedCrop(Graphic:TDibGraphic):Boolean; //是否是A3要切影像
Var
  i,FormIDCount : Integer;
begin
  Result := False;
  FormIDCount := 0;
  if (Graphic.Width > (4 * Graphic.XDotsPerInch)) {or (Graphic.Height > (15 * Graphic.YDotsPerInch))} then
  //if (Graphic.Width > (6 * Graphic.XDotsPerInch)) then
  begin
    for I := 1 to MpsBarcodeinf.Count do
    begin
      if (Length(MpsBarcodeinf.Text[i])=FormIDLength) and FormIDExists(MpsBarcodeinf.Text[i],False,0) then
      begin
        inc(FormIDCount);
      end;
    end;
  end;
  SetLicenseKey('A6A94A8D91B08A9D58F300C0573EA9EF1B9DB0BF69B90E13B958DB4CB6B44F5A' +
  '4EE9CB22C9A68C2D07ED52ED4D13C755D890E4074996755361E6CDE2A6F1B563' +
  '5DDC8999AC4D71FB092EA9F1F87BFA25694FBF0D6D250087D2B39629713FCCB0' +
  'D0A83135BC14FC63A4E8331CFF9E24C45C2D9CFD837EB70BAFDB79A75B7B97D5' +
  'E9EB271685118C29D90A7C85E7793908989E295DA50021C795A448366026E975' +
  'F49EA75B721B80427B99E5CF24A225FB498C07946ED7B806B483654C00D85C66' +
  'E34215CA3EDEF1D4C3F5896090E97E1E2C9752BA2D5B49EE58CF19A0D374077F' +
  '6D13B90B6FED22D9EBC3AD6CDC76E595E08725BF2E12B8EF30A524A2E00504DF');
end.
//ShowMessage('FormIDCount='+IntToStr(FormIDCount)+#10#13+'MpsBarcodeinf.count='+IntToStr(MpsBarcodeinf.count));
  if FormIDCount = 2 then
  begin
    Result := True;
  end;
end;
----------------------------------------
doc/curtis/prompt/scanimpl_analysis/scanimpl_annalysis.ts
比對新檔案
@@ -0,0 +1,27 @@
/** lIndex matcher, 於 {import('src/CB_IMGPSScanImp.pas.bk)} 找出方法分類中的 lIndex */
type MethodLinenoMather = string
/** 方法分類, 可以有多個分類, 用於找出不同分類的集合, 分類方式見需求 B1.1.5 @see {@link scanimpl_annalysis.md}*/
type Tags = string[]
/** 方實作中引用的其他依賴 */
type Deps = string[]
type MethodName = string
/** 定義 Pascal 方法區段 */
type PascalMethodDef = {
  matcher: MethodLinenoMather,
  name: MethodName,
  /** 方法分類 */
  tags: Tags
  /** 引用相依 */
  deps: Deps
  /** 定義 Pascal 方法區段 l, 代表該方法所在行號 lbound, 該值不可能為-1 */
  lIndex: number
  /** 定義 Pascal 方法區段 r, 代表該方法所在行號 rbound, 該值不可能為-1  */
  rIndex: number
  /** 生成方法描述, 可有可無 */
  description: string
}
doc/curtis/prompt/scanimpl_analysis/step1_raw_methods.json
比對新檔案
@@ -0,0 +1,2417 @@
[
  {
    "matcher": "function TCB_IMGPSScanX.GetCurrentVersionNo: String; //獲取自身版本號所需要",
    "lIndex": 1052,
    "rIndex": 1085
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.WMMOUSEWHEEL(var message: TWMMouseWheel);",
    "lIndex": 1086,
    "rIndex": 1171
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.WNoteBtnClick(Sender: TObject);",
    "lIndex": 1172,
    "rIndex": 1246
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.DefinePropertyPages(DefinePropertyPage: TDefinePropertyPage);",
    "lIndex": 1247,
    "rIndex": 1253
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.EventSinkChanged(const EventSink: IUnknown);",
    "lIndex": 1254,
    "rIndex": 1259
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.FC0Click(Sender: TObject);",
    "lIndex": 1260,
    "rIndex": 1270
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.FC1Click(Sender: TObject);",
    "lIndex": 1271,
    "rIndex": 1281
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.FC2Click(Sender: TObject);",
    "lIndex": 1282,
    "rIndex": 1292
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.FC3Click(Sender: TObject);",
    "lIndex": 1293,
    "rIndex": 1303
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.FC4Click(Sender: TObject);",
    "lIndex": 1304,
    "rIndex": 1314
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.FC5Click(Sender: TObject);",
    "lIndex": 1315,
    "rIndex": 1325
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.FC6Click(Sender: TObject);",
    "lIndex": 1326,
    "rIndex": 1337
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.InitExistImgList(casepath: String);",
    "lIndex": 1338,
    "rIndex": 1362
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.Initialize;",
    "lIndex": 1363,
    "rIndex": 1386
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.ISB1Click(Sender: TObject);",
    "lIndex": 1387,
    "rIndex": 1406
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.ISB1EndScroll(Sender: TObject);",
    "lIndex": 1407,
    "rIndex": 1421
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.ISB1Enter(Sender: TObject);",
    "lIndex": 1422,
    "rIndex": 1426
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.ISB1ImageMouseDown(Sender: TObject; Button: TMouseButton;",
    "lIndex": 1427,
    "rIndex": 1463
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.ISB1ImageMouseMove(Sender: TObject; Shift: TShiftState;",
    "lIndex": 1464,
    "rIndex": 1489
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.ISB1ImageMouseUp(Sender: TObject; Button: TMouseButton;",
    "lIndex": 1490,
    "rIndex": 1524
  },
  {
    "matcher": "function TCB_IMGPSScanX.Get_Active: WordBool;",
    "lIndex": 1525,
    "rIndex": 1529
  },
  {
    "matcher": "function TCB_IMGPSScanX.Get_AlignDisabled: WordBool;",
    "lIndex": 1530,
    "rIndex": 1534
  },
  {
    "matcher": "function TCB_IMGPSScanX.Get_AlignWithMargins: WordBool;",
    "lIndex": 1535,
    "rIndex": 1539
  },
  {
    "matcher": "function TCB_IMGPSScanX.Get_AutoScroll: WordBool;",
    "lIndex": 1540,
    "rIndex": 1544
  },
  {
    "matcher": "function TCB_IMGPSScanX.Get_AutoSize: WordBool;",
    "lIndex": 1545,
    "rIndex": 1549
  },
  {
    "matcher": "function TCB_IMGPSScanX.Get_AxBorderStyle: TxActiveFormBorderStyle;",
    "lIndex": 1550,
    "rIndex": 1554
  },
  {
    "matcher": "function TCB_IMGPSScanX.Get_Caption: WideString;",
    "lIndex": 1555,
    "rIndex": 1559
  },
  {
    "matcher": "function TCB_IMGPSScanX.Get_Color: OLE_COLOR;",
    "lIndex": 1560,
    "rIndex": 1564
  },
  {
    "matcher": "function TCB_IMGPSScanX.Get_DockSite: WordBool;",
    "lIndex": 1565,
    "rIndex": 1569
  },
  {
    "matcher": "function TCB_IMGPSScanX.Get_DoubleBuffered: WordBool;",
    "lIndex": 1570,
    "rIndex": 1574
  },
  {
    "matcher": "function TCB_IMGPSScanX.Get_DropTarget: WordBool;",
    "lIndex": 1575,
    "rIndex": 1579
  },
  {
    "matcher": "function TCB_IMGPSScanX.Get_Enabled: WordBool;",
    "lIndex": 1580,
    "rIndex": 1584
  },
  {
    "matcher": "function TCB_IMGPSScanX.Get_ExplicitHeight: Integer;",
    "lIndex": 1585,
    "rIndex": 1589
  },
  {
    "matcher": "function TCB_IMGPSScanX.Get_ExplicitLeft: Integer;",
    "lIndex": 1590,
    "rIndex": 1594
  },
  {
    "matcher": "function TCB_IMGPSScanX.Get_ExplicitTop: Integer;",
    "lIndex": 1595,
    "rIndex": 1599
  },
  {
    "matcher": "function TCB_IMGPSScanX.Get_ExplicitWidth: Integer;",
    "lIndex": 1600,
    "rIndex": 1604
  },
  {
    "matcher": "function TCB_IMGPSScanX.Get_Font: IFontDisp;",
    "lIndex": 1605,
    "rIndex": 1609
  },
  {
    "matcher": "function TCB_IMGPSScanX.Get_HelpFile: WideString;",
    "lIndex": 1610,
    "rIndex": 1614
  },
  {
    "matcher": "function TCB_IMGPSScanX.Get_KeyPreview: WordBool;",
    "lIndex": 1615,
    "rIndex": 1619
  },
  {
    "matcher": "function TCB_IMGPSScanX.Get_MouseInClient: WordBool;",
    "lIndex": 1620,
    "rIndex": 1624
  },
  {
    "matcher": "function TCB_IMGPSScanX.Get_ParentCustomHint: WordBool;",
    "lIndex": 1625,
    "rIndex": 1629
  },
  {
    "matcher": "function TCB_IMGPSScanX.Get_ParentDoubleBuffered: WordBool;",
    "lIndex": 1630,
    "rIndex": 1634
  },
  {
    "matcher": "function TCB_IMGPSScanX.Get_PixelsPerInch: Integer;",
    "lIndex": 1635,
    "rIndex": 1639
  },
  {
    "matcher": "function TCB_IMGPSScanX.Get_PopupMode: TxPopupMode;",
    "lIndex": 1640,
    "rIndex": 1644
  },
  {
    "matcher": "function TCB_IMGPSScanX.Get_PrintScale: TxPrintScale;",
    "lIndex": 1645,
    "rIndex": 1649
  },
  {
    "matcher": "function TCB_IMGPSScanX.Get_Scaled: WordBool;",
    "lIndex": 1650,
    "rIndex": 1654
  },
  {
    "matcher": "function TCB_IMGPSScanX.Get_ScreenSnap: WordBool;",
    "lIndex": 1655,
    "rIndex": 1659
  },
  {
    "matcher": "function TCB_IMGPSScanX.Get_SnapBuffer: Integer;",
    "lIndex": 1660,
    "rIndex": 1664
  },
  {
    "matcher": "function TCB_IMGPSScanX.Get_UseDockManager: WordBool;",
    "lIndex": 1665,
    "rIndex": 1669
  },
  {
    "matcher": "function TCB_IMGPSScanX.Get_Visible: WordBool;",
    "lIndex": 1670,
    "rIndex": 1674
  },
  {
    "matcher": "function TCB_IMGPSScanX.Get_VisibleDockClientCount: Integer;",
    "lIndex": 1675,
    "rIndex": 1679
  },
  {
    "matcher": "procedure TCB_IMGPSScanX._Set_Font(var Value: IFontDisp);",
    "lIndex": 1680,
    "rIndex": 1684
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.ActivateEvent(Sender: TObject);",
    "lIndex": 1685,
    "rIndex": 1689
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.ClickEvent(Sender: TObject);",
    "lIndex": 1690,
    "rIndex": 1694
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.CreateEvent(Sender: TObject);",
    "lIndex": 1695,
    "rIndex": 1699
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.DblClickEvent(Sender: TObject);",
    "lIndex": 1700,
    "rIndex": 1704
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.DeactivateEvent(Sender: TObject);",
    "lIndex": 1705,
    "rIndex": 1709
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.DestroyEvent(Sender: TObject);",
    "lIndex": 1710,
    "rIndex": 1755
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.KeyPressEvent(Sender: TObject; var Key: Char);",
    "lIndex": 1756,
    "rIndex": 1764
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.mode1Click(Sender: TObject);",
    "lIndex": 1765,
    "rIndex": 1772
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.mode2Click(Sender: TObject);",
    "lIndex": 1773,
    "rIndex": 1780
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.mode3Click(Sender: TObject);",
    "lIndex": 1781,
    "rIndex": 1787
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.mode4Click(Sender: TObject);",
    "lIndex": 1788,
    "rIndex": 1794
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.MouseEnterEvent(Sender: TObject);",
    "lIndex": 1795,
    "rIndex": 1799
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.MouseLeaveEvent(Sender: TObject);",
    "lIndex": 1800,
    "rIndex": 1804
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.PaintEvent(Sender: TObject);",
    "lIndex": 1805,
    "rIndex": 1809
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.Set_AlignWithMargins(Value: WordBool);",
    "lIndex": 1810,
    "rIndex": 1814
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.Set_AutoScroll(Value: WordBool);",
    "lIndex": 1815,
    "rIndex": 1819
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.Set_AutoSize(Value: WordBool);",
    "lIndex": 1820,
    "rIndex": 1824
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.Set_AxBorderStyle(Value: TxActiveFormBorderStyle);",
    "lIndex": 1825,
    "rIndex": 1829
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.Set_Caption(const Value: WideString);",
    "lIndex": 1830,
    "rIndex": 1834
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.Set_Color(Value: OLE_COLOR);",
    "lIndex": 1835,
    "rIndex": 1839
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.Set_DockSite(Value: WordBool);",
    "lIndex": 1840,
    "rIndex": 1844
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.Set_DoubleBuffered(Value: WordBool);",
    "lIndex": 1845,
    "rIndex": 1849
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.Set_DropTarget(Value: WordBool);",
    "lIndex": 1850,
    "rIndex": 1854
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.Set_Enabled(Value: WordBool);",
    "lIndex": 1855,
    "rIndex": 1859
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.Set_Font(const Value: IFontDisp);",
    "lIndex": 1860,
    "rIndex": 1864
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.Set_HelpFile(const Value: WideString);",
    "lIndex": 1865,
    "rIndex": 1869
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.Set_KeyPreview(Value: WordBool);",
    "lIndex": 1870,
    "rIndex": 1874
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.Set_ParentCustomHint(Value: WordBool);",
    "lIndex": 1875,
    "rIndex": 1879
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.Set_ParentDoubleBuffered(Value: WordBool);",
    "lIndex": 1880,
    "rIndex": 1884
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.Set_PixelsPerInch(Value: Integer);",
    "lIndex": 1885,
    "rIndex": 1889
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.Set_PopupMode(Value: TxPopupMode);",
    "lIndex": 1890,
    "rIndex": 1894
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.Set_PrintScale(Value: TxPrintScale);",
    "lIndex": 1895,
    "rIndex": 1899
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.Set_Scaled(Value: WordBool);",
    "lIndex": 1900,
    "rIndex": 1904
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.Set_ScreenSnap(Value: WordBool);",
    "lIndex": 1905,
    "rIndex": 1909
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.Set_SnapBuffer(Value: Integer);",
    "lIndex": 1910,
    "rIndex": 1914
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.Set_UseDockManager(Value: WordBool);",
    "lIndex": 1915,
    "rIndex": 1919
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.Set_Visible(Value: WordBool);",
    "lIndex": 1920,
    "rIndex": 1924
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.PM401Click(Sender: TObject);",
    "lIndex": 1925,
    "rIndex": 1978
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.PM402Click(Sender: TObject);",
    "lIndex": 1979,
    "rIndex": 1988
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.PM403Click(Sender: TObject);",
    "lIndex": 1989,
    "rIndex": 1998
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.PM404Click(Sender: TObject);",
    "lIndex": 1999,
    "rIndex": 2067
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.PM601Click(Sender: TObject);",
    "lIndex": 2068,
    "rIndex": 2221
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.PM602Click(Sender: TObject);",
    "lIndex": 2222,
    "rIndex": 2300
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.PM604Click(Sender: TObject);",
    "lIndex": 2301,
    "rIndex": 2323
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.PM605Click(Sender: TObject);",
    "lIndex": 2324,
    "rIndex": 2361
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.N1Click(Sender: TObject);",
    "lIndex": 2362,
    "rIndex": 2372
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.N51Click(Sender: TObject);",
    "lIndex": 2373,
    "rIndex": 2379
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.NewScanBtnClick(Sender: TObject);",
    "lIndex": 2380,
    "rIndex": 2427
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.NextPageBtnClick(Sender: TObject);",
    "lIndex": 2428,
    "rIndex": 2450
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.OptionBtnClick(Sender: TObject);",
    "lIndex": 2451,
    "rIndex": 2527
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.PageLVClick(Sender: TObject);",
    "lIndex": 2528,
    "rIndex": 2535
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.PageLVKeyUp(Sender: TObject; var Key: Word;",
    "lIndex": 2536,
    "rIndex": 2542
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.PageLVMouseDown(Sender: TObject; Button: TMouseButton;",
    "lIndex": 2543,
    "rIndex": 2554
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.Panel11DblClick(Sender: TObject);",
    "lIndex": 2555,
    "rIndex": 2561
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.Panel1DblClick(Sender: TObject);",
    "lIndex": 2562,
    "rIndex": 2567
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.Panel9Resize(Sender: TObject);",
    "lIndex": 2568,
    "rIndex": 2572
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.PM101Click(Sender: TObject);",
    "lIndex": 2573,
    "rIndex": 2677
  },
  {
    "matcher": "function TCB_IMGPSScanX.DocNoIsExistImg(DocNopath:String):boolean;",
    "lIndex": 2678,
    "rIndex": 2701
  },
  {
    "matcher": "procedure TCB_IMGPSScanX._DelTreeForExistImg(ASourceDir:String);",
    "lIndex": 2702,
    "rIndex": 2709
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.PM102Click(Sender: TObject);",
    "lIndex": 2710,
    "rIndex": 2750
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.PM103Click(Sender: TObject);",
    "lIndex": 2751,
    "rIndex": 2788
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.PM104Click(Sender: TObject);",
    "lIndex": 2789,
    "rIndex": 3186
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.PM106Click(Sender: TObject);",
    "lIndex": 3187,
    "rIndex": 3280
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.PM107Click(Sender: TObject);",
    "lIndex": 3281,
    "rIndex": 3285
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.PM108Click(Sender: TObject);",
    "lIndex": 3286,
    "rIndex": 3381
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.PM109Click(Sender: TObject);",
    "lIndex": 3382,
    "rIndex": 3411
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.PM110Click(Sender: TObject);",
    "lIndex": 3412,
    "rIndex": 3441
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.PM111Click(Sender: TObject);",
    "lIndex": 3442,
    "rIndex": 3472
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.PM301Click(Sender: TObject);",
    "lIndex": 3473,
    "rIndex": 3480
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.PM302Click(Sender: TObject);",
    "lIndex": 3481,
    "rIndex": 3489
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.PM303Click(Sender: TObject);",
    "lIndex": 3490,
    "rIndex": 3498
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.PM501Click(Sender: TObject);",
    "lIndex": 3499,
    "rIndex": 3505
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.PM502Click(Sender: TObject);",
    "lIndex": 3506,
    "rIndex": 3512
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.PM503Click(Sender: TObject);",
    "lIndex": 3513,
    "rIndex": 3519
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.PM504Click(Sender: TObject);",
    "lIndex": 3520,
    "rIndex": 3526
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.PM505Click(Sender: TObject);",
    "lIndex": 3527,
    "rIndex": 3547
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.PM507Click(Sender: TObject);",
    "lIndex": 3548,
    "rIndex": 3615
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.PM508Click(Sender: TObject);",
    "lIndex": 3616,
    "rIndex": 3656
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.PM509Click(Sender: TObject);",
    "lIndex": 3657,
    "rIndex": 3661
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.PM510Click(Sender: TObject);",
    "lIndex": 3662,
    "rIndex": 3668
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.PopupMenu1Popup(Sender: TObject);",
    "lIndex": 3669,
    "rIndex": 3826
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.PopupMenu4Popup(Sender: TObject);",
    "lIndex": 3827,
    "rIndex": 3844
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.PopupMenu5Popup(Sender: TObject);",
    "lIndex": 3845,
    "rIndex": 3874
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.PopupMenu6Popup(Sender: TObject);",
    "lIndex": 3875,
    "rIndex": 3924
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.PrePageBtnClick(Sender: TObject);",
    "lIndex": 3925,
    "rIndex": 3952
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.SampleScanBtnClick(Sender: TObject);",
    "lIndex": 3953,
    "rIndex": 4068
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.ScrollBar1Change(Sender: TObject);",
    "lIndex": 4069,
    "rIndex": 4086
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.ScrollBox1MouseEnter(Sender: TObject);",
    "lIndex": 4087,
    "rIndex": 4091
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.SelectScanBtnClick(Sender: TObject);",
    "lIndex": 4092,
    "rIndex": 4100
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.StatusBar1DblClick(Sender: TObject);",
    "lIndex": 4101,
    "rIndex": 4116
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.ActiveFormCreate(Sender: TObject);",
    "lIndex": 4117,
    "rIndex": 4138
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.ActiveFormKeyUp(Sender: TObject; var Key: Word;",
    "lIndex": 4139,
    "rIndex": 4164
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.AddAttFileLBClick(Sender: TObject);",
    "lIndex": 4165,
    "rIndex": 4194
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.AddCredit1RGClick(Sender: TObject);",
    "lIndex": 4195,
    "rIndex": 4207
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.AddScanBtnClick(Sender: TObject);",
    "lIndex": 4208,
    "rIndex": 4249
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.AttListBoxClick(Sender: TObject);",
    "lIndex": 4250,
    "rIndex": 4256
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.AttListBoxDblClick(Sender: TObject);",
    "lIndex": 4257,
    "rIndex": 4269
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.BtnMouseEnter(Sender: TObject);",
    "lIndex": 4270,
    "rIndex": 4274
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.Button3Click(Sender: TObject);",
    "lIndex": 4275,
    "rIndex": 4334
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.Button4Click(Sender: TObject);",
    "lIndex": 4335,
    "rIndex": 4369
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.Button5Click(Sender: TObject);",
    "lIndex": 4370,
    "rIndex": 4378
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.Button6Click(Sender: TObject);",
    "lIndex": 4379,
    "rIndex": 4389
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.StatrTwainScan;",
    "lIndex": 4390,
    "rIndex": 4443
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.OnAcquire( const DibHandle    : THandle;",
    "lIndex": 4444,
    "rIndex": 4683
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.PageDone;",
    "lIndex": 4684,
    "rIndex": 4733
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.PageEnd;",
    "lIndex": 4734,
    "rIndex": 4950
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.ExportBtClick(Sender: TObject);",
    "lIndex": 4951,
    "rIndex": 5013
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.ImportBtClick(Sender: TObject);",
    "lIndex": 5014,
    "rIndex": 5089
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.HotKeyDown (var Msg : TMessage);",
    "lIndex": 5090,
    "rIndex": 5094
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.InitialLanguage(Sender: TObject);",
    "lIndex": 5095,
    "rIndex": 5172
  },
  {
    "matcher": "function TCB_IMGPSScanX.GetSiteOMR(FileName,Site:String;bt: Integer): Integer;",
    "lIndex": 5173,
    "rIndex": 5227
  },
  {
    "matcher": "Function TCB_IMGPSScanX.FindISB2View(Vmode:Integer):TImageScrollBox; //找空的ISB來顯示",
    "lIndex": 5228,
    "rIndex": 5253
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.R_W_Scanini(Mode:Char); //'R'讀取;'W'寫入",
    "lIndex": 5254,
    "rIndex": 5295
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.GetDefScanIni; //取得掃瞄的預設值",
    "lIndex": 5296,
    "rIndex": 5472
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.HTTPSClientCertificateValidate(Sender: TObject;",
    "lIndex": 5473,
    "rIndex": 5478
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.HTTPSClientRedirection(Sender: TObject;",
    "lIndex": 5479,
    "rIndex": 5484
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.EnableImage(v:integer;Sender : TObject);",
    "lIndex": 5485,
    "rIndex": 5498
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.DesableImage;",
    "lIndex": 5499,
    "rIndex": 5518
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.ViewMouseMode(v:Integer);",
    "lIndex": 5519,
    "rIndex": 5543
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.GoViewMode;",
    "lIndex": 5544,
    "rIndex": 5555
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.DisplayMode(index,H_Count,W_Count:Integer;BasePanel:TPanel);",
    "lIndex": 5556,
    "rIndex": 5599
  },
  {
    "matcher": "Function TCB_IMGPSScanX.GetServerDate : Boolean;",
    "lIndex": 5600,
    "rIndex": 5631
  },
  {
    "matcher": "Function TCB_IMGPSScanX.GetSampleInf : Boolean;",
    "lIndex": 5632,
    "rIndex": 5664
  },
  {
    "matcher": "Function TCB_IMGPSScanX.GetSetInf1 : Boolean; //取系統設定資訊Mode1 DOC_INF",
    "lIndex": 5665,
    "rIndex": 5707
  },
  {
    "matcher": "Function TCB_IMGPSScanX.GetSetInf2 : Boolean; //取系統設定資訊Mode2  DM_FORM_INF",
    "lIndex": 5708,
    "rIndex": 5746
  },
  {
    "matcher": "Function TCB_IMGPSScanX.GetSetInf3 : Boolean; //取系統設定資訊mode3  FORM_INF",
    "lIndex": 5747,
    "rIndex": 5786
  },
  {
    "matcher": "Function TCB_IMGPSScanX.GetSetInf4 : Boolean; //取系統設定資訊mode4  CHECK_RULE_INF",
    "lIndex": 5787,
    "rIndex": 5827
  },
  {
    "matcher": "Function TCB_IMGPSScanX.GetSetInf5 : Boolean; //取系統設定資訊mode5  MEMO_INF",
    "lIndex": 5828,
    "rIndex": 5866
  },
  {
    "matcher": "Function TCB_IMGPSScanX.GetSetInf6 : Boolean; //取系統設定資訊mode5  WORK_INF",
    "lIndex": 5867,
    "rIndex": 5906
  },
  {
    "matcher": "Function TCB_IMGPSScanX.GetSetInf7 : Boolean; //取系統設定資訊mode5  LASTEST_FORM_INF",
    "lIndex": 5907,
    "rIndex": 5946
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.SetFormID_DocNo; //將FormID及Docno抽出來另存入list裡    20130403增加",
    "lIndex": 5947,
    "rIndex": 5958
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.SetIn_WH_DocNo; //將要入庫的DocNo抽出來另存入list裡",
    "lIndex": 5959,
    "rIndex": 5972
  },
  {
    "matcher": "function TCB_IMGPSScanX.CheckRequiredColumnValues(workno, caseno:String): Boolean;",
    "lIndex": 5973,
    "rIndex": 5982
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.CheckRule2OMRErrInfo;   //檢核規則填入OMRErrINFo Record",
    "lIndex": 5983,
    "rIndex": 6010
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.ReNameContext(Path,OldName,NewName:String);",
    "lIndex": 6011,
    "rIndex": 6027
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.DeleteImageFile(Path,FileName,CaseID:String); // 刪除檔案  (無法得到DocDir用)",
    "lIndex": 6028,
    "rIndex": 6059
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.DeleteFormCodeFile(CaseID,DocDir,FormID:String);  //刪除指定FormID文件",
    "lIndex": 6060,
    "rIndex": 6114
  },
  {
    "matcher": "Function TCB_IMGPSScanX.DeleteDocNoFile(Path,DocNo:String):Boolean;  //刪除指定DocNo文件",
    "lIndex": 6115,
    "rIndex": 6140
  },
  {
    "matcher": "Function TCB_IMGPSScanX.DeleteDocNoFileForESCAN(Path,DocNo:String):Boolean;  //刪除指定DocNo文件",
    "lIndex": 6141,
    "rIndex": 6174
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.DeleteShowFile(Path:String); //刪除顯示中的影像",
    "lIndex": 6175,
    "rIndex": 6188
  },
  {
    "matcher": "Function TCB_IMGPSScanX.GetDataDocNoPage(MainDocNo,MainVersion:String):Integer;  //取記錄的文件_版本頁數",
    "lIndex": 6189,
    "rIndex": 6203
  },
  {
    "matcher": "Function TCB_IMGPSScanX.CheckCaseDocNoPage(CaseID,DocNo,Version:String;Pages:Integer):Integer; //取案件裡的文件_版本頁數",
    "lIndex": 6204,
    "rIndex": 6277
  },
  {
    "matcher": "Function TCB_IMGPSScanX.FindFormCodePages(CaseID,FormCode:String):Integer;  //計算案件裡FormID的頁數",
    "lIndex": 6278,
    "rIndex": 6308
  },
  {
    "matcher": "Function TCB_IMGPSScanX.GetDataFormCodePages(FormCode:String):Integer;   //取記錄的FormcID的頁數",
    "lIndex": 6309,
    "rIndex": 6319
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.CaseReSize(CaseID:String); //案件的影像縮放",
    "lIndex": 6320,
    "rIndex": 6342
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.ImageReSize_FormID(CaseID,FileName:String);  //依十字定位點做縮放",
    "lIndex": 6343,
    "rIndex": 6420
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.ImageReSize_tmp(FormID,FileName:String);  //依十字定位點做縮放(暫存檔)",
    "lIndex": 6421,
    "rIndex": 6446
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.ImageScrollBox1NewGraphic(const Graphic: TDibGraphic);",
    "lIndex": 6447,
    "rIndex": 6456
  },
  {
    "matcher": "Function TCB_IMGPSScanX.TransCaseID(Path,CaseID:String;MainCase:Boolean):Boolean; //傳送案件",
    "lIndex": 6457,
    "rIndex": 6734
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.NewTreeNodeRefresh;",
    "lIndex": 6735,
    "rIndex": 6745
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.MyTreeNode1Refresh;",
    "lIndex": 6746,
    "rIndex": 6753
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.MyTreeNode2ReFresh(CaseID:String);",
    "lIndex": 6754,
    "rIndex": 6763
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.MyTreeNode3ReFresh(CaseID:String);",
    "lIndex": 6764,
    "rIndex": 6771
  },
  {
    "matcher": "Function TCB_IMGPSScanX.Node2DocNo(Node2:TTreeNode):String;  //MyTreeNode2取DocNo出來",
    "lIndex": 6772,
    "rIndex": 6785
  },
  {
    "matcher": "Function TCB_IMGPSScanX.Node3DocNo(Node3:TTreeNode):String;  //MyTreeNode3取DocNo出來",
    "lIndex": 6786,
    "rIndex": 6799
  },
  {
    "matcher": "Function TCB_IMGPSScanX.Node3FormID(Node3:TTreeNode):String;  //MyTreeNode3取FormCode出來",
    "lIndex": 6800,
    "rIndex": 6814
  },
  {
    "matcher": "Function TCB_IMGPSScanX.GetNode2Name(Node2:TTreeNode):String;  //取MyTreeNode2的識別字出來(記之前點選用)",
    "lIndex": 6815,
    "rIndex": 6933
  },
  {
    "matcher": "Function TCB_IMGPSScanX.DownLoadImage(Path,CaseID:String):Boolean;",
    "lIndex": 6934,
    "rIndex": 6979
  },
  {
    "matcher": "Function TCB_IMGPSScanX.Down_Img(Path,CaseID:String):Boolean;",
    "lIndex": 6980,
    "rIndex": 7032
  },
  {
    "matcher": "Function TCB_IMGPSScanX.GetNoNameCase(Path:String):String; //取未配號XXXX",
    "lIndex": 7033,
    "rIndex": 7046
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.CaseResort(Path:String); //案件的檔案重新排序(次文件依Docno排)",
    "lIndex": 7047,
    "rIndex": 7184
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.CaseResort2Scanlist(Path:String); //案件的檔案重新排序給scanlist(次文件依FormID排)",
    "lIndex": 7185,
    "rIndex": 7306
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.DistinctDocinCase(Path:String); //列出案件裡的Docno_版本",
    "lIndex": 7307,
    "rIndex": 7351
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.DistinctDocNoinCase(Path:String); //列出案件裡的Docno",
    "lIndex": 7352,
    "rIndex": 7387
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.ClearErrini(CaseID:String;CaseNode:TTreeNode); //清掉檢核檔案",
    "lIndex": 7388,
    "rIndex": 7406
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.SetCaseList(Mode:Char;Index:Integer;text:String);  //'A:加入,I:插入,D:刪除,E:修改'",
    "lIndex": 7407,
    "rIndex": 7445
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.SetDocNoList(Mode:Char;Index:Integer;CaseNo,DocDir,Copies:String);  //'A:加入,I:插入,D:刪除,E:修改'",
    "lIndex": 7446,
    "rIndex": 7516
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.SetContextList(Mode:Char;Index:Integer;CaseNo,DocDir,FileName:String);  //'A:加入,I:插入,D:刪除,E:修改'",
    "lIndex": 7517,
    "rIndex": 7565
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.SetAttContextList(Mode:Char;Index:Integer;CaseNo,FileName:String);  //'A:加入,I:插入,D:刪除,E:修改'",
    "lIndex": 7566,
    "rIndex": 7608
  },
  {
    "matcher": "Function TCB_IMGPSScanX.checkCaseOMRDone:Boolean;  //檢查案件是否完成OMR檢核",
    "lIndex": 7609,
    "rIndex": 7623
  },
  {
    "matcher": "function TCB_IMGPSScanX.checkFormCodeIsCustom(path, formcode: string): boolean;",
    "lIndex": 7624,
    "rIndex": 7644
  },
  {
    "matcher": "Function TCB_IMGPSScanX.CheckCaseID_OK:Boolean;  //檢查是否有未配號的案件",
    "lIndex": 7645,
    "rIndex": 7659
  },
  {
    "matcher": "Function TCB_IMGPSScanX.CheckCaseAttach_OK:Boolean;  //檢查是否有未歸類的案件",
    "lIndex": 7660,
    "rIndex": 7677
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.CreateEmptyCase(Path,CaseID:String);  //產生空白案號(重掃件用)",
    "lIndex": 7678,
    "rIndex": 7691
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.InitScrollRec;",
    "lIndex": 7692,
    "rIndex": 7701
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.GetScrollData(ISB:TImageScrollBox;Var HS,VS:Integer;Var iRate:Single);",
    "lIndex": 7702,
    "rIndex": 7711
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.SetScrollData(ISB:TImageScrollBox;HS,VS:Integer;iRate:Single);",
    "lIndex": 7712,
    "rIndex": 7721
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.FormIDReplace(CaseID,DocDir,OldFormID,NewFormID:String); //指定FormID更換成新的FormID",
    "lIndex": 7722,
    "rIndex": 7840
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.ShowFileReplace(Path,NewFormID:String);//顯示的影像換成新的FormID",
    "lIndex": 7841,
    "rIndex": 7856
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.PageReplaceFormID(Path,NowFormID,NewFormID:String); //選取頁更換FormID",
    "lIndex": 7857,
    "rIndex": 7906
  },
  {
    "matcher": "Function TCB_IMGPSScanX.ModeNeedCheck(OMRMode,ScanMode:String):Boolean; //掃瞄模式是否要做檢核",
    "lIndex": 7907,
    "rIndex": 7913
  },
  {
    "matcher": "Function TCB_IMGPSScanX.GetCasePage(Path,CaseID:String):Integer;",
    "lIndex": 7914,
    "rIndex": 7984
  },
  {
    "matcher": "Function TCB_IMGPSScanX.GetFormIDPage(FileList:TStringlist;FormID:String):Integer;",
    "lIndex": 7985,
    "rIndex": 7999
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.SetFile2Case(CaseID,FileName:String);",
    "lIndex": 8000,
    "rIndex": 8013
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.WriteResize(ImgName,TxtName:String); //產生Resize.dat",
    "lIndex": 8014,
    "rIndex": 8056
  },
  {
    "matcher": "Function TCB_IMGPSScanX.GetCase_PageCount(var CaseCount,PageCount:Integer):Boolean; //取出案件的數量及頁數",
    "lIndex": 8057,
    "rIndex": 8134
  },
  {
    "matcher": "Function TCB_IMGPSScanX.FindNoSaveBarCode : Boolean; //找是否有不要儲存影像的條碼",
    "lIndex": 8135,
    "rIndex": 8154
  },
  {
    "matcher": "Function TCB_IMGPSScanX.BarCode2CaseID : String; //Barcode依規則轉成CaseID",
    "lIndex": 8155,
    "rIndex": 8172
  },
  {
    "matcher": "Function TCB_IMGPSScanX.BarCode2FormID : String; //Barcode依規則轉成FormID",
    "lIndex": 8173,
    "rIndex": 8195
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.WriteCaseIndex(Path:String);",
    "lIndex": 8196,
    "rIndex": 8213
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.ReadCaseIndex(Path:String);",
    "lIndex": 8214,
    "rIndex": 8242
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.ReduceLogFile; //20171011 必免log檔掌太大",
    "lIndex": 8243,
    "rIndex": 8263
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.ClearCaseIndex;",
    "lIndex": 8264,
    "rIndex": 8269
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.GetSelectImageFile;",
    "lIndex": 8270,
    "rIndex": 8290
  },
  {
    "matcher": "Function TCB_IMGPSScanX.GetDocNoDir(Path,DocNo:String):String; //取出目前DocNo的份數",
    "lIndex": 8291,
    "rIndex": 8312
  },
  {
    "matcher": "Function TCB_IMGPSScanX.CheckFormIDExists(DocNoNode:TTreeNode;FormID:String):Boolean; //檢查FormID是否存在文件裡",
    "lIndex": 8313,
    "rIndex": 8327
  },
  {
    "matcher": "Function TCB_IMGPSScanX.DocNo2DocNoDir(Path,DocNo:String):String;    //DocNo轉成DocNo(份數)目錄",
    "lIndex": 8328,
    "rIndex": 8349
  },
  {
    "matcher": "Function TCB_IMGPSScanX.DocNoDir2DocNo(DocNoDir:String):String; //DocNo(份數)目錄轉成DocNo",
    "lIndex": 8350,
    "rIndex": 8365
  },
  {
    "matcher": "Function TCB_IMGPSScanX.DocNoDir2Index(Path,DocNoDir:String):Integer; //DocNo(份數)目錄轉成index",
    "lIndex": 8366,
    "rIndex": 8387
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.ZipMainFile(SoPath,DePath,ZipName:String);",
    "lIndex": 8388,
    "rIndex": 8460
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.ZipMaskFile(SoPath,MarkPath,DePath,ZipName:String); //壓縮遮罩影像檔",
    "lIndex": 8461,
    "rIndex": 8494
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.ParserPoint(S:String); //解析十字點的字串",
    "lIndex": 8495,
    "rIndex": 8525
  },
  {
    "matcher": "Function TCB_IMGPSScanX.CheckScanDenialTime:Boolean;",
    "lIndex": 8526,
    "rIndex": 8539
  },
  {
    "matcher": "Function TCB_IMGPSScanX.FormID2Anchor(FormID:String):String;  //用FormID取出十字模式",
    "lIndex": 8540,
    "rIndex": 8551
  },
  {
    "matcher": "Function TCB_IMGPSScanX.Index2Anchor(Anchor:String):String;   //十字模式 0->NONE;1->ANCHOR;2->FRAME",
    "lIndex": 8552,
    "rIndex": 8561
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.ScanDuplexCBClick(Sender: TObject);",
    "lIndex": 8562,
    "rIndex": 8567
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.ScanGrayCBClick(Sender: TObject);",
    "lIndex": 8568,
    "rIndex": 8596
  },
  {
    "matcher": "Function TCB_IMGPSScanX.GetFormatID(CaseID: string):String;",
    "lIndex": 8597,
    "rIndex": 8620
  },
  {
    "matcher": "Function TCB_IMGPSScanX.MemoInfoTransfer(Mode,Str:String;ID_S,Name_S:TStringlist):String;  //註記代碼註記類別轉換  Mode 'ID':代碼轉名稱;'NAME':名稱轉代碼",
    "lIndex": 8621,
    "rIndex": 8650
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.SetSQLData(ColumeStr:String;FromList,ToList:TStringlist); //把SQL值塞入",
    "lIndex": 8651,
    "rIndex": 8662
  },
  {
    "matcher": "Function TCB_IMGPSScanX.GetSQLData(TableList:TStringlist;Colname:String;colNo:Integer):String; //依欄位及索引取值",
    "lIndex": 8663,
    "rIndex": 8723
  },
  {
    "matcher": "Function TCB_IMGPSScanX.FindSQLData(TableList:TStringlist;ColumeStr,KeyColumeStr,KeyStr:String;ColNo:Integer;Var ResultList:TStringlist):Boolean; //找指定的資料",
    "lIndex": 8724,
    "rIndex": 8802
  },
  {
    "matcher": "Function TCB_IMGPSScanX.GetFindResult(Col:String):String;",
    "lIndex": 8803,
    "rIndex": 8820
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.DataLoading(Loading:Boolean;UseTimer:Boolean);  //資料載入中要停止點選的動作",
    "lIndex": 8821,
    "rIndex": 8855
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.CaseHelpBtnClick(Sender: TObject);",
    "lIndex": 8856,
    "rIndex": 8926
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.CheckCaseBtnClick(Sender: TObject);",
    "lIndex": 8927,
    "rIndex": 8965
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.ClearView(stkv:Integer);",
    "lIndex": 8966,
    "rIndex": 8981
  },
  {
    "matcher": "Function TCB_IMGPSScanX.DrawDocItem2(CaseNode : TTreenode;Caseno:String):Boolean;  //畫出文件名稱的Tree",
    "lIndex": 8982,
    "rIndex": 9241
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.initkscan;",
    "lIndex": 9242,
    "rIndex": 9262
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.initParameter;",
    "lIndex": 9263,
    "rIndex": 9304
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.PrtLbClick(Sender: TObject);",
    "lIndex": 9305,
    "rIndex": 9375
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.UseOldCaseLbClick(Sender: TObject);",
    "lIndex": 9376,
    "rIndex": 9529
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.LastInitFormidListCreate(path: string);",
    "lIndex": 9530,
    "rIndex": 9550
  },
  {
    "matcher": "function TCB_IMGPSScanX.LoadFileGetMD5(const filename: string): string;",
    "lIndex": 9551,
    "rIndex": 9574
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.LoadImgFile;  //載入新件及替換件",
    "lIndex": 9575,
    "rIndex": 9660
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.LoadImgFile1;  //載入新件及替換件",
    "lIndex": 9661,
    "rIndex": 9770
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.LoadAttFile(CaseID:String); //載入附加檔案",
    "lIndex": 9771,
    "rIndex": 9791
  },
  {
    "matcher": "function TCB_IMGPSScanX.logTimeString: String;",
    "lIndex": 9792,
    "rIndex": 9796
  },
  {
    "matcher": "Function TCB_IMGPSScanX.FindDivFormCode(FormCode:String):Boolean; //找有沒有分案的條碼",
    "lIndex": 9797,
    "rIndex": 9824
  },
  {
    "matcher": "Function TCB_IMGPSScanX.CheckAvailable:Boolean; //檢查是否可使用元件",
    "lIndex": 9825,
    "rIndex": 9922
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.SmoothCBClick(Sender: TObject);",
    "lIndex": 9923,
    "rIndex": 9931
  },
  {
    "matcher": "Function TCB_IMGPSScanX.Case2Mask(SoPath,DePath:String):Boolean;//產生遮罩影像  20170639 發現沒用到",
    "lIndex": 9932,
    "rIndex": 9995
  },
  {
    "matcher": "Function TCB_IMGPSScanX.CheckNeedCrop(Graphic:TDibGraphic):Boolean; //是否是A3要切影像",
    "lIndex": 9996,
    "rIndex": 10021
  },
  {
    "matcher": "Function TCB_IMGPSScanX.GetNewCustomDocNo(Path,DocName:String):String; //取出未使用的自訂文件代號",
    "lIndex": 10022,
    "rIndex": 10086
  },
  {
    "matcher": "Function TCB_IMGPSScanX.GetCustomDocName(Path,DocNo:String):String; //取出自定文件名稱",
    "lIndex": 10087,
    "rIndex": 10098
  },
  {
    "matcher": "Function TCB_IMGPSScanX.GetCustomFormID(Path,DocNo:String):String; //取出自定文件FormID",
    "lIndex": 10099,
    "rIndex": 10110
  },
  {
    "matcher": "Function TCB_IMGPSScanX.GetCustomDocDir(Path,DocName:String):String; //取出自定文件DocDir",
    "lIndex": 10111,
    "rIndex": 10137
  },
  {
    "matcher": "Function TCB_IMGPSScanX.FindCustomDocName(Path,DocName:String):Boolean; //尋找自定文件名稱是否存在",
    "lIndex": 10138,
    "rIndex": 10161
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.DelAttFileLBClick(Sender: TObject);",
    "lIndex": 10162,
    "rIndex": 10196
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.DeleteCustomDocDir(Path,DocNo:String); //刪除自定文件DocNo",
    "lIndex": 10197,
    "rIndex": 10208
  },
  {
    "matcher": "Function TCB_IMGPSScanX.CheckFormID_Prt(FormID:String):Boolean; //傳入的FormID是否預設列印",
    "lIndex": 10209,
    "rIndex": 10218
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.PrintImg(FileName, LoginID, Datetime,",
    "lIndex": 10219,
    "rIndex": 10297
  },
  {
    "matcher": "Function TCB_IMGPSScanX.FindLastestDocDir(CaseID,DocNo:String):String; //找出最新的DocDir",
    "lIndex": 10298,
    "rIndex": 10322
  },
  {
    "matcher": "Function TCB_IMGPSScanX.FindLastestDocDirForPage(CaseID,DocNo,formid:String):String; //找出最新的DocDir  20180207  排除隱藏的資料夾",
    "lIndex": 10323,
    "rIndex": 10364
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.Create_Cust_DocDir(CaseID:String); //產生外面傳入的文件代號及自定文件",
    "lIndex": 10365,
    "rIndex": 10455
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.OldCasetoNewCase(CaseID:String); //將舊案份數轉成新規則",
    "lIndex": 10456,
    "rIndex": 10524
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.ErrFormtoCurrentForm(CaseID,EFormID,CFormID:String);//將舊案的錯誤FormID改正確的FormID",
    "lIndex": 10525,
    "rIndex": 10574
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.SetRecordEditedDocDir(Mode:Char;CaseID,DocDir:String);  //記錄被異動的文件目錄  'A:加入D:刪掉'",
    "lIndex": 10575,
    "rIndex": 10622
  },
  {
    "matcher": "Function TCB_IMGPSScanX.GetDocDir_Page(CaseID,DocDir:String):Integer;",
    "lIndex": 10623,
    "rIndex": 10639
  },
  {
    "matcher": "Function TCB_IMGPSScanX.Path2DocDir(Path,CaseID:String):String;",
    "lIndex": 10640,
    "rIndex": 10664
  },
  {
    "matcher": "Function TCB_IMGPSScanX.GetDocNo_IS_WH(DocNo:String):Boolean; //DocNo是否為入庫文件",
    "lIndex": 10665,
    "rIndex": 10679
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.SortDocDir_FormID(CaseID,DocDir:String); //將DocDir裡的文件編號排序",
    "lIndex": 10680,
    "rIndex": 10752
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.GotoAttach(OldLevel:Integer);",
    "lIndex": 10753,
    "rIndex": 10774
  },
  {
    "matcher": "Function TCB_IMGPSScanX.DocNoIs_In_WH(DocNo:String):Boolean; //DocNo是否為入庫文件",
    "lIndex": 10775,
    "rIndex": 10794
  },
  {
    "matcher": "Procedure  TCB_IMGPSScanX.CreateCaseNeedData(Path:String);",
    "lIndex": 10795,
    "rIndex": 10840
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.SetDocDirtoSelected(CaseNode:TTreeNode;DocDir:String);",
    "lIndex": 10841,
    "rIndex": 10853
  },
  {
    "matcher": "Function TCB_IMGPSScanX.CheckSelectImg_UseCase(Path,CaseID:String):Boolean; //檢查選擇的影像是否有包含被引用的影像",
    "lIndex": 10854,
    "rIndex": 10876
  },
  {
    "matcher": "Function TCB_IMGPSScanX.TransOldCaseFile(Path:String):Boolean;",
    "lIndex": 10877,
    "rIndex": 10937
  },
  {
    "matcher": "Function TCB_IMGPSScanX.Writelog(CaseID : String):Boolean;",
    "lIndex": 10938,
    "rIndex": 10963
  },
  {
    "matcher": "Function TCB_IMGPSScanX.GetFtpinfo(CaseID,Action:String):Boolean;",
    "lIndex": 10964,
    "rIndex": 11041
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.SetFtpInfo;     //餵入FTP資訊",
    "lIndex": 11042,
    "rIndex": 11071
  },
  {
    "matcher": "Function TCB_IMGPSScanX.FtpCaseComplete(SendData:String):Boolean;",
    "lIndex": 11072,
    "rIndex": 11094
  },
  {
    "matcher": "Function TCB_IMGPSScanX.FormIDAppear(FormID:String):Boolean; //FormID是否可出現",
    "lIndex": 11095,
    "rIndex": 11120
  },
  {
    "matcher": "Function TCB_IMGPSScanX.DocNoAppear(DocNo:String):Boolean;   //DocNo是否可出現",
    "lIndex": 11121,
    "rIndex": 11137
  },
  {
    "matcher": "Function TCB_IMGPSScanX.GetDocNoCount(CaseID,DocNo:String):Integer; //取DocNo數量",
    "lIndex": 11138,
    "rIndex": 11167
  },
  {
    "matcher": "Function TCB_IMGPSScanX.GetDocDirCopies(CaseID,DocDir:String):Integer; //取DocDir數量",
    "lIndex": 11168,
    "rIndex": 11197
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.SetDocDirCopies(CaseID,DocDir:String;NewCopies:Integer); //修改DocDir份數",
    "lIndex": 11198,
    "rIndex": 11225
  },
  {
    "matcher": "Function TCB_IMGPSScanX.GetDocDirCopies_Rec(Path,CaseID,DocDir:String):Integer; //取記錄裡的DocDir份數",
    "lIndex": 11226,
    "rIndex": 11277
  },
  {
    "matcher": "Function TCB_IMGPSScanX.GetCustomNameCount(CustomName:String):Integer;   //取外傳的名稱數量",
    "lIndex": 11278,
    "rIndex": 11301
  },
  {
    "matcher": "Function TCB_IMGPSScanX.GetCustomDocNoCount(Docno:String):Integer;   //取外傳的DocNo數量",
    "lIndex": 11302,
    "rIndex": 11325
  },
  {
    "matcher": "Function TCB_IMGPSScanX.ISGuideFormID(FormID:String):Boolean;",
    "lIndex": 11326,
    "rIndex": 11340
  },
  {
    "matcher": "Function TCB_IMGPSScanX.ISDivPageFormID(FormID:String):Boolean;",
    "lIndex": 11341,
    "rIndex": 11356
  },
  {
    "matcher": "function TCB_IMGPSScanX.ISExistImg(const filename: string): boolean;",
    "lIndex": 11357,
    "rIndex": 11368
  },
  {
    "matcher": "Function TCB_IMGPSScanX.CaseDelete_Enable(CaseID:String):Boolean;  //案件可否被刪除",
    "lIndex": 11369,
    "rIndex": 11389
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.MoveImage(Path:String;mp:Integer); //移動頁數",
    "lIndex": 11390,
    "rIndex": 11447
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.MoveImage_Drag(Path:String;fp,tp:Integer); //拖拉移動頁數",
    "lIndex": 11448,
    "rIndex": 11505
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.SetUseCase(Mode:Char;Path,DocDir,FormCaseID,ToCaseID:String);   //記錄引用其他案件 A:加入 D:刪掉",
    "lIndex": 11506,
    "rIndex": 11526
  },
  {
    "matcher": "Function TCB_IMGPSScanX.GetUseCase(Mode:Char;Path,DocDir:String):String;  //F:取被引用 To:引用",
    "lIndex": 11527,
    "rIndex": 11546
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.Case2upload(CaseID:String);",
    "lIndex": 11547,
    "rIndex": 11672
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.Download2Case(SoDir,DeDir:String);",
    "lIndex": 11673,
    "rIndex": 11844
  },
  {
    "matcher": "Function TCB_IMGPSScanX.FormCode2FormName(CaseID,FormCode:String):String; //用FormCode轉成文件名稱",
    "lIndex": 11845,
    "rIndex": 11895
  },
  {
    "matcher": "Function TCB_IMGPSScanX.FormCode2FileName(FormCode:String;List:TStrings):String; //用FormCode找出檔名(第一頁)",
    "lIndex": 11896,
    "rIndex": 11918
  },
  {
    "matcher": "Function TCB_IMGPSScanX.FileName2FormCode(FileName:String):String; //從檔名取出FormCode",
    "lIndex": 11919,
    "rIndex": 11935
  },
  {
    "matcher": "Function TCB_IMGPSScanX.FileName2FormName(CaseID,FileName:String):String; //從檔名取出文件名稱",
    "lIndex": 11936,
    "rIndex": 11940
  },
  {
    "matcher": "Function TCB_IMGPSScanX.FileName2ScanPage(FileName:String):Integer; //從檔名轉出掃瞄頁數",
    "lIndex": 11941,
    "rIndex": 11952
  },
  {
    "matcher": "Function TCB_IMGPSScanX.FileName2NoQuene_Filename(FileName:String):String; //取出沒有序號的檔名",
    "lIndex": 11953,
    "rIndex": 11965
  },
  {
    "matcher": "Function TCB_IMGPSScanX.FileName2Index(FileName:String):Integer; //從檔名取出在ContextList的序號",
    "lIndex": 11966,
    "rIndex": 11979
  },
  {
    "matcher": "Function TCB_IMGPSScanX.FileName2NowDcoNo(FileName:String;CtList,DNList:TStrings):String; //從檔名取出歸屬的文件代號",
    "lIndex": 11980,
    "rIndex": 11993
  },
  {
    "matcher": "Function TCB_IMGPSScanX.FormCode2DocNo(FormCode:String):String;   //FormCode轉Docno",
    "lIndex": 11994,
    "rIndex": 12018
  },
  {
    "matcher": "Function TCB_IMGPSScanX.FormCode2Version(FormCode:String):String; //FormCode轉版本",
    "lIndex": 12019,
    "rIndex": 12023
  },
  {
    "matcher": "Function TCB_IMGPSScanX.FormCode2Page(FormCode:String):String; //FormCode轉頁數",
    "lIndex": 12024,
    "rIndex": 12028
  },
  {
    "matcher": "Function TCB_IMGPSScanX.DocNo2DocName(CaseID,DocNo:String):String; //Docno轉Doc名稱",
    "lIndex": 12029,
    "rIndex": 12066
  },
  {
    "matcher": "Function TCB_IMGPSScanX.DocNo2FileName(DocNo:String;List:TStrings):String; //用DocNo找出檔名(第一頁)",
    "lIndex": 12067,
    "rIndex": 12081
  },
  {
    "matcher": "Function TCB_IMGPSScanX.FormCode2WorkNo(FormCode:String):String; //用FormCode取出作業別",
    "lIndex": 12082,
    "rIndex": 12090
  },
  {
    "matcher": "Function TCB_IMGPSScanX.DocNo2WorkNo(DocNo:String):String; //用DocNo取出作業別",
    "lIndex": 12091,
    "rIndex": 12099
  },
  {
    "matcher": "Function TCB_IMGPSScanX.DocNoNeedDiv(DocNo:String):Boolean; //是否是需分份數的文件代號",
    "lIndex": 12100,
    "rIndex": 12112
  },
  {
    "matcher": "Function TCB_IMGPSScanX.CaseNode2Info(Node:TTreeNode;Mode:Char):String;   //案件Node取案件編號  Mode: I:Caseno;P:Page",
    "lIndex": 12113,
    "rIndex": 12126
  },
  {
    "matcher": "Function TCB_IMGPSScanX.DocNode2Info(Node:TTreeNode;Mode:Char):String;   //文件Node取文件代號 Mode: I:Docno;N:Docname;P:Page;G:Group",
    "lIndex": 12127,
    "rIndex": 12144
  },
  {
    "matcher": "Function TCB_IMGPSScanX.FormNode2Info(Node:TTreeNode;Mode:Char):String;   //表單Node取表單代號  Mode: I:FormID;N:FormName;P:Page",
    "lIndex": 12145,
    "rIndex": 12160
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.PriorPage(Page:Integer); //上一頁",
    "lIndex": 12161,
    "rIndex": 12171
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.NextPage(Page:Integer); //下一頁",
    "lIndex": 12172,
    "rIndex": 12182
  },
  {
    "matcher": "Function TCB_IMGPSScanX.DocNoExistsinTree(CaseNode:TTreeNode;DocNo:String):Boolean; //是否己存在樹裡",
    "lIndex": 12183,
    "rIndex": 12198
  },
  {
    "matcher": "Function TCB_IMGPSScanX.DocnoNeedGroup(DocNo:String):Boolean; //傳入的DocNo是否需分組",
    "lIndex": 12199,
    "rIndex": 12208
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.DistinctFormCode(CaseID:String); //從案件裡的FormCode取出第一頁",
    "lIndex": 12209,
    "rIndex": 12254
  },
  {
    "matcher": "Function TCB_IMGPSScanX.OMRCheckCase(CaseID:String):Boolean; //OMR檢核",
    "lIndex": 12255,
    "rIndex": 12950
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.OMRErr2ini(CaseID,Reason,FileName,Site,RelaFileName,RelaSite,Anchor,Anchor1:String;Del,Ingnore,Display:Boolean); //OMR檢核失敗寫入ini",
    "lIndex": 12951,
    "rIndex": 12990
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.OMRErrini2List(CaseID:String;ErrlistForm:TErrlistForm); //OMR檢核失敗從ini寫入ListView",
    "lIndex": 12991,
    "rIndex": 13020
  },
  {
    "matcher": "function TCB_IMGPSScanX.OMRErrini2ListForLog(CaseID: String): String;",
    "lIndex": 13021,
    "rIndex": 13058
  },
  {
    "matcher": "Function TCB_IMGPSScanX.DownLanguage:Boolean;  //下載多國語言檔",
    "lIndex": 13059,
    "rIndex": 13083
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.view_image_FormCode(Path,FormCode:String;stpage,stview:integer); //用FormCode來找影像",
    "lIndex": 13084,
    "rIndex": 13199
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.view_image_DocNo(Path,DocNo,FormID:String;Pages:integer); //用DocNo來找影像",
    "lIndex": 13200,
    "rIndex": 13394
  },
  {
    "matcher": "Function TCB_IMGPSScanX.ShapeName2PreViewISBName(SP:TShape):String; //轉出指定PreViewISBName",
    "lIndex": 13395,
    "rIndex": 13399
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.SpeedButton14Click(Sender: TObject);",
    "lIndex": 13400,
    "rIndex": 13422
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.SpeedButton15Click(Sender: TObject);",
    "lIndex": 13423,
    "rIndex": 13443
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.SpeedButton16Click(Sender: TObject);",
    "lIndex": 13444,
    "rIndex": 13464
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.SpeedButton17Click(Sender: TObject);",
    "lIndex": 13465,
    "rIndex": 13469
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.SpeedButton18Click(Sender: TObject);",
    "lIndex": 13470,
    "rIndex": 13474
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.SpeedButton19Click(Sender: TObject);",
    "lIndex": 13475,
    "rIndex": 13479
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.SpeedButton20Click(Sender: TObject);",
    "lIndex": 13480,
    "rIndex": 13484
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.SpeedButton21Click(Sender: TObject);",
    "lIndex": 13485,
    "rIndex": 13490
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.SpeedButton22Click(Sender: TObject);",
    "lIndex": 13491,
    "rIndex": 13496
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.SpeedButton3Click(Sender: TObject);",
    "lIndex": 13497,
    "rIndex": 13501
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.CreatePreViewISB(Count:Integer);",
    "lIndex": 13502,
    "rIndex": 13550
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.FreePreViewISB;",
    "lIndex": 13551,
    "rIndex": 13580
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.FitPreViewISB;",
    "lIndex": 13581,
    "rIndex": 13617
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.PaintShape(FromImg,ToImg:TImageScrollBox); //畫有被選取的影像",
    "lIndex": 13618,
    "rIndex": 13673
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.FreeShapeobj(SelectISB : TImageScrollBox);",
    "lIndex": 13674,
    "rIndex": 13694
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.ISBClick(Sender : TObject);",
    "lIndex": 13695,
    "rIndex": 13733
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.ISBMouseMove(Sender: TObject; Shift: TShiftState;",
    "lIndex": 13734,
    "rIndex": 13747
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.ISBImageMouseDown(Sender: TObject; Button: TMouseButton;",
    "lIndex": 13748,
    "rIndex": 13821
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.ISBImageMouseUp(Sender: TObject; Button: TMouseButton;",
    "lIndex": 13822,
    "rIndex": 13827
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.ISBEndDrag(Sender, Target: TObject; X, Y: Integer);",
    "lIndex": 13828,
    "rIndex": 13832
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.ISBDragDrop(Sender, Source: TObject; X, Y: Integer);",
    "lIndex": 13833,
    "rIndex": 13842
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.ISBDragOver(Sender, Source: TObject; X, Y: Integer;",
    "lIndex": 13843,
    "rIndex": 13863
  },
  {
    "matcher": "Function TCB_IMGPSScanX.FindMpsView(Vmode: Integer):TImageScrollBox;",
    "lIndex": 13864,
    "rIndex": 13889
  },
  {
    "matcher": "Function TCB_IMGPSScanX.GetCaseFormID(Path:String):String;  //取案件的主FormID",
    "lIndex": 13890,
    "rIndex": 13911
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.CreateFormID_FormName(Path,CaseID:String);  //產生FormID_FormName.dat",
    "lIndex": 13912,
    "rIndex": 13931
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.CreateDocNo_DocName(Path,CaseID:String);  //產生DocNo_DocName.dat",
    "lIndex": 13932,
    "rIndex": 13953
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.CreateIn_WH(CaseID:String);  //產生In_WH.dat",
    "lIndex": 13954,
    "rIndex": 13984
  },
  {
    "matcher": "Function TCB_IMGPSScanX.CreateDocNo_Info(CaseID:String):String; //產生 DocNo[tab]份數[tab]總頁數[tab]是否異動[換行]DocNo[tab]份數[tab]總頁數[tab]是否異動",
    "lIndex": 13985,
    "rIndex": 14068
  },
  {
    "matcher": "Function TCB_IMGPSScanX.CreateCustDocNo_Info(CaseID:String):String; //產生自訂文件 DocName[tab]份數[tab]總頁數[tab]是否異動[#13#10]DocName[tab]份數[tab]總頁數[tab]是否異動",
    "lIndex": 14069,
    "rIndex": 14121
  },
  {
    "matcher": "Function TCB_IMGPSScanX.CreateDocnoFrom_Info(CaseID:String):String; //產生被引進的保管袋文件資訊  Docno[tab]份數[tab]案件編號#13#10Docno[tab]份數[tab]案件編號",
    "lIndex": 14122,
    "rIndex": 14186
  },
  {
    "matcher": "Function TCB_IMGPSScanX.CreateCustDocNoFrom_Info(CaseID:String):String; //產生被引進的自定文件資訊  Docno[tab]份數[tab]案件編號#13#10Docno[tab]份數[tab]案件編號",
    "lIndex": 14187,
    "rIndex": 14244
  },
  {
    "matcher": "Function TCB_IMGPSScanX.CreateAttach_Info(CaseID:String):String; //產生是否有Attach Y:有 N:沒有",
    "lIndex": 14245,
    "rIndex": 14251
  },
  {
    "matcher": "Function TCB_IMGPSScanX.GetDocNoEdit(CaseID,DocNo,DocName:String):String; //取出DocNo是否被異動 (Y/N)",
    "lIndex": 14252,
    "rIndex": 14291
  },
  {
    "matcher": "Function TCB_IMGPSScanX.GetDocNo_Count(Path,DocNo:String):Integer;  //取出文件份數",
    "lIndex": 14292,
    "rIndex": 14331
  },
  {
    "matcher": "Function TCB_IMGPSScanX.GetDocNo_Page(Path,DocNo:String):Integer;  //取出文件總頁數",
    "lIndex": 14332,
    "rIndex": 14358
  },
  {
    "matcher": "Function TCB_IMGPSScanX.FormIDExists(FormCode:String;CheckDate:Boolean;index:Integer):Boolean;  //檢查FormID是否存在",
    "lIndex": 14359,
    "rIndex": 14396
  },
  {
    "matcher": "Function TCB_IMGPSScanX.Case_DocNoExists(CaseID,Docno:String):Boolean; //Docno是否存在案件裡",
    "lIndex": 14397,
    "rIndex": 14421
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.CB1Click(Sender: TObject);",
    "lIndex": 14422,
    "rIndex": 14426
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.ReSortFileName(Path:String); //檔名重新排序",
    "lIndex": 14427,
    "rIndex": 14454
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.ReSortFileName_New(Path:String); //檔名重新排序",
    "lIndex": 14455,
    "rIndex": 14481
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.ReSortFileName2Scanlist(Path:String); //檔名重新排序給Scanlist.dat",
    "lIndex": 14482,
    "rIndex": 14506
  },
  {
    "matcher": "Function TCB_IMGPSScanX.GetOMRCheckSet : Boolean; //下載OMR檢核XML檔",
    "lIndex": 14507,
    "rIndex": 14565
  },
  {
    "matcher": "Function TCB_IMGPSScanX.GetKeyinSet : Boolean; //取登打設定",
    "lIndex": 14566,
    "rIndex": 14624
  },
  {
    "matcher": "Function TCB_IMGPSScanX.CaseAsk(CaseID: string):Integer;",
    "lIndex": 14625,
    "rIndex": 14674
  },
  {
    "matcher": "Function TCB_IMGPSScanX.CaseComplete(Path,CaseID:String;MainCase:Boolean):Boolean;  //通知傳送完成",
    "lIndex": 14675,
    "rIndex": 14903
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.Timer1Timer(Sender: TObject);",
    "lIndex": 14904,
    "rIndex": 15337
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.Timer2Timer(Sender: TObject);",
    "lIndex": 15338,
    "rIndex": 15346
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.TransBtnClick(Sender: TObject);",
    "lIndex": 15347,
    "rIndex": 15538
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.TreeView1Click(Sender: TObject);",
    "lIndex": 15539,
    "rIndex": 15766
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.TreeView1DragDrop(Sender, Source: TObject; X, Y: Integer);",
    "lIndex": 15767,
    "rIndex": 15943
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.TreeView1DragOver(Sender, Source: TObject; X, Y: Integer;",
    "lIndex": 15944,
    "rIndex": 15978
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.TreeView1KeyUp(Sender: TObject; var Key: Word;",
    "lIndex": 15979,
    "rIndex": 15992
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.TreeView1MouseDown(Sender: TObject;",
    "lIndex": 15993,
    "rIndex": 16003
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.TreeView1MouseEnter(Sender: TObject);",
    "lIndex": 16004,
    "rIndex": 16008
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.TreeView1MouseMove(Sender: TObject; Shift: TShiftState;",
    "lIndex": 16009,
    "rIndex": 16016
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.TreeView1MouseUp(Sender: TObject; Button: TMouseButton;",
    "lIndex": 16017,
    "rIndex": 16032
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.ViewModeBtnMouseEnter(Sender: TObject);",
    "lIndex": 16033,
    "rIndex": 16037
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.Set_caseid(const Value: WideString);",
    "lIndex": 16038,
    "rIndex": 16042
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.Set_data(const Value: WideString);",
    "lIndex": 16043,
    "rIndex": 16047
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.Set_mode(const Value: WideString);",
    "lIndex": 16048,
    "rIndex": 16052
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.Set_rewrite(const Value: WideString);",
    "lIndex": 16053,
    "rIndex": 16057
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.Set_url(const Value: WideString);",
    "lIndex": 16058,
    "rIndex": 16062
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.Set_userid(const Value: WideString);",
    "lIndex": 16063,
    "rIndex": 16067
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.Set_username(const Value: WideString);",
    "lIndex": 16068,
    "rIndex": 16072
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.Set_verify(const Value: WideString);",
    "lIndex": 16073,
    "rIndex": 16077
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.Set_language(const Value: WideString);",
    "lIndex": 16078,
    "rIndex": 16090
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.Set_modename(const Value: WideString);",
    "lIndex": 16091,
    "rIndex": 16095
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.Set_userunit(const Value: WideString);",
    "lIndex": 16096,
    "rIndex": 16100
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.Set_work_no(const Value: WideString);",
    "lIndex": 16101,
    "rIndex": 16105
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.Set_loandoc_enable(const Value: WideString);",
    "lIndex": 16106,
    "rIndex": 16117
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.Set_loandoc_value(const Value: WideString);",
    "lIndex": 16118,
    "rIndex": 16122
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.Set_useproxy(const Value: WideString);",
    "lIndex": 16123,
    "rIndex": 16130
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.Set_c_docnamelist(const Value: WideString);",
    "lIndex": 16131,
    "rIndex": 16135
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.Set_c_docnolist(const Value: WideString);",
    "lIndex": 16136,
    "rIndex": 16140
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.Set_fixfilelist(const Value: WideString);",
    "lIndex": 16141,
    "rIndex": 16145
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.Set_is_in_wh(const Value: WideString);",
    "lIndex": 16146,
    "rIndex": 16150
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.Set_oldcaseinfo(const Value: WideString);",
    "lIndex": 16151,
    "rIndex": 16155
  },
  {
    "matcher": "function TCB_IMGPSScanX.Get_c_docnamelist: WideString;",
    "lIndex": 16156,
    "rIndex": 16160
  },
  {
    "matcher": "function TCB_IMGPSScanX.Get_c_docnolist: WideString;",
    "lIndex": 16161,
    "rIndex": 16165
  },
  {
    "matcher": "function TCB_IMGPSScanX.Get_caseid: WideString;",
    "lIndex": 16166,
    "rIndex": 16170
  },
  {
    "matcher": "function TCB_IMGPSScanX.Get_data: WideString;",
    "lIndex": 16171,
    "rIndex": 16175
  },
  {
    "matcher": "function TCB_IMGPSScanX.Get_fixfilelist: WideString;",
    "lIndex": 16176,
    "rIndex": 16180
  },
  {
    "matcher": "function TCB_IMGPSScanX.Get_is_in_wh: WideString;",
    "lIndex": 16181,
    "rIndex": 16185
  },
  {
    "matcher": "function TCB_IMGPSScanX.Get_language: WideString;",
    "lIndex": 16186,
    "rIndex": 16190
  },
  {
    "matcher": "function TCB_IMGPSScanX.Get_loandoc_enable: WideString;",
    "lIndex": 16191,
    "rIndex": 16195
  },
  {
    "matcher": "function TCB_IMGPSScanX.Get_loandoc_value: WideString;",
    "lIndex": 16196,
    "rIndex": 16200
  },
  {
    "matcher": "function TCB_IMGPSScanX.Get_mode: WideString;",
    "lIndex": 16201,
    "rIndex": 16205
  },
  {
    "matcher": "function TCB_IMGPSScanX.Get_modename: WideString;",
    "lIndex": 16206,
    "rIndex": 16210
  },
  {
    "matcher": "function TCB_IMGPSScanX.Get_oldcaseinfo: WideString;",
    "lIndex": 16211,
    "rIndex": 16215
  },
  {
    "matcher": "function TCB_IMGPSScanX.Get_rewrite: WideString;",
    "lIndex": 16216,
    "rIndex": 16220
  },
  {
    "matcher": "function TCB_IMGPSScanX.Get_url: WideString;",
    "lIndex": 16221,
    "rIndex": 16225
  },
  {
    "matcher": "function TCB_IMGPSScanX.Get_useproxy: WideString;",
    "lIndex": 16226,
    "rIndex": 16230
  },
  {
    "matcher": "function TCB_IMGPSScanX.Get_userid: WideString;",
    "lIndex": 16231,
    "rIndex": 16235
  },
  {
    "matcher": "function TCB_IMGPSScanX.Get_username: WideString;",
    "lIndex": 16236,
    "rIndex": 16240
  },
  {
    "matcher": "function TCB_IMGPSScanX.Get_userunit: WideString;",
    "lIndex": 16241,
    "rIndex": 16245
  },
  {
    "matcher": "function TCB_IMGPSScanX.Get_verify: WideString;",
    "lIndex": 16246,
    "rIndex": 16250
  },
  {
    "matcher": "function TCB_IMGPSScanX.Get_work_no: WideString;",
    "lIndex": 16251,
    "rIndex": 16255
  },
  {
    "matcher": "function TCB_IMGPSScanX.Get_printyn: WideString;",
    "lIndex": 16256,
    "rIndex": 16260
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.Set_printyn(const Value: WideString);",
    "lIndex": 16261,
    "rIndex": 16265
  },
  {
    "matcher": "function TCB_IMGPSScanX.Get_is_oldcase: WideString;",
    "lIndex": 16266,
    "rIndex": 16270
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.Set_is_oldcase(const Value: WideString);",
    "lIndex": 16271,
    "rIndex": 16275
  },
  {
    "matcher": "function TCB_IMGPSScanX.Get_custdocyn: WideString;",
    "lIndex": 16276,
    "rIndex": 16280
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.Set_custdocyn(const Value: WideString);",
    "lIndex": 16281,
    "rIndex": 16285
  },
  {
    "matcher": "function TCB_IMGPSScanX.Get_casenolength: WideString;",
    "lIndex": 16286,
    "rIndex": 16290
  },
  {
    "matcher": "function TCB_IMGPSScanX.Get_filesizelimit: WideString;",
    "lIndex": 16291,
    "rIndex": 16295
  },
  {
    "matcher": "function TCB_IMGPSScanX.Get_imgdpi: WideString;",
    "lIndex": 16296,
    "rIndex": 16300
  },
  {
    "matcher": "function TCB_IMGPSScanX.Get_scancolor: WideString;",
    "lIndex": 16301,
    "rIndex": 16305
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.Set_casenolength(const Value: WideString);",
    "lIndex": 16306,
    "rIndex": 16320
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.Set_filesizelimit(const Value: WideString);",
    "lIndex": 16321,
    "rIndex": 16335
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.Set_imgdpi(const Value: WideString);",
    "lIndex": 16336,
    "rIndex": 16351
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.Set_scancolor(const Value: WideString);",
    "lIndex": 16352,
    "rIndex": 16376
  },
  {
    "matcher": "function TCB_IMGPSScanX.Get_imgdelete: WideString;",
    "lIndex": 16377,
    "rIndex": 16381
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.Set_imgdelete(const Value: WideString);",
    "lIndex": 16382,
    "rIndex": 16386
  },
  {
    "matcher": "function TCB_IMGPSScanX.Get_check_main_form: WideString;",
    "lIndex": 16387,
    "rIndex": 16391
  },
  {
    "matcher": "function TCB_IMGPSScanX.Get_isExternal: WideString;",
    "lIndex": 16392,
    "rIndex": 16396
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.Set_check_main_form(const Value: WideString);",
    "lIndex": 16397,
    "rIndex": 16401
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.Set_isExternal(const Value: WideString);",
    "lIndex": 16402,
    "rIndex": 16406
  },
  {
    "matcher": "function TCB_IMGPSScanX.Get_WH_CATEGORY: WideString;",
    "lIndex": 16407,
    "rIndex": 16411
  },
  {
    "matcher": "procedure TCB_IMGPSScanX.Set_WH_CATEGORY(const Value: WideString);",
    "lIndex": 16412,
    "rIndex": 16455
  }
]
doc/curtis/prompt/scanimpl_analysis/step2_classified_methods.json
比對新檔案
檔案太大
doc/curtis/screenShot/CB_DocList.png
doc/curtis/screenShot/CB_DocPrt.png
doc/curtis/screenShot/CB_ErrList.png
doc/curtis/screenShot/CB_IMGPSScanImp.png
doc/curtis/screenShot/CB_OldCaseInfo.png
doc/curtis/screenShot/CB_PatchFom.png
doc/curtis/todos.md
比對新檔案
@@ -0,0 +1,8 @@
- [ ] Scan/ImageProcess IO access 部份,
  - 哪些由 browser 代替,
  - 哪些是傳給 FTP
  - 哪些是Scanner
-
doc/curtis/分析_尚進行中.md
檔案已刪除