Hong
2020-05-25 a83839e2935c06f2a70ee1f2be40caca54f42aaf
Ver 2,0,1,72

1.HTTP支援TLS1.2

版本 2,0,0,68
1.可新增外部PDF檔

版本 2,0,1,69
1.修正上傳時PDF檔沒有寫入ZIP的問題
2.未點在編號上也可加PDF檔的錯誤
3.上傳完成PDF框裡的內容未清空
4.修正PDF框按滑鼠右鍵跑出選單的問題

版本 2,0,1,70
修改內容
1.掃描上傳時,如有加上文件時,upload目錄裡無PDF檔案的修正
2.掃描上傳後PDF的加入項目未反灰的修正
3.PDF中文檔名用Urlencode進行調整
4.列印時,如is_in_wh 參數給空值時,未歸類的影像未出現的修正

版本 2,0,1,71
修改內容
1.補件掃描時,如原有案件有空的文件目錄時,在縮圖上歸類會出現List out bound錯誤訊息的修正
2.補件掃描時,如原有案件有空的文件目錄時,在文件樹上歸類非第一頁時會出現List out bound錯誤訊息的修正
3.補件掃描時,如原有案件有不分份數文件影像時,在文件樹上歸類不分份數文件會變成分份數的文件產生目錄的修正
修改12個檔案
751 ■■■■ 已變更過的檔案
CB_IMGPSScan.dproj 4 ●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
CB_IMGPSScan.ocx 修補檔 | 檢視 | 原始 | 究查 | 歷程
CB_IMGPSScan.res 修補檔 | 檢視 | 原始 | 究查 | 歷程
CB_IMGPSScanImp.dcu 修補檔 | 檢視 | 原始 | 究查 | 歷程
CB_IMGPSScanImp.dfm 294 ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
CB_IMGPSScanImp.pas 357 ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
CB_IMGPSScan_TLB.dcu 修補檔 | 檢視 | 原始 | 究查 | 歷程
CB_IMGPSScan_TLB.pas 4 ●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
ErrList.dcu 修補檔 | 檢視 | 原始 | 究查 | 歷程
OldCaseInfo.dcu 修補檔 | 檢視 | 原始 | 究查 | 歷程
OldCaseInfo.dfm 78 ●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
OldCaseInfo.pas 14 ●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
CB_IMGPSScan.dproj
@@ -95,7 +95,7 @@
                        <VersionInfo Name="MajorVer">2</VersionInfo>
                        <VersionInfo Name="MinorVer">0</VersionInfo>
                        <VersionInfo Name="Release">1</VersionInfo>
                        <VersionInfo Name="Build">67</VersionInfo>
                        <VersionInfo Name="Build">72</VersionInfo>
                        <VersionInfo Name="Debug">False</VersionInfo>
                        <VersionInfo Name="PreRelease">False</VersionInfo>
                        <VersionInfo Name="Special">False</VersionInfo>
@@ -107,7 +107,7 @@
                    <VersionInfoKeys>
                        <VersionInfoKeys Name="CompanyName"/>
                        <VersionInfoKeys Name="FileDescription"/>
                        <VersionInfoKeys Name="FileVersion">2.0.1.67</VersionInfoKeys>
                        <VersionInfoKeys Name="FileVersion">2.0.1.72</VersionInfoKeys>
                        <VersionInfoKeys Name="InternalName"/>
                        <VersionInfoKeys Name="LegalCopyright"/>
                        <VersionInfoKeys Name="LegalTrademarks"/>
CB_IMGPSScan.ocx
Binary files differ
CB_IMGPSScan.res
Binary files differ
CB_IMGPSScanImp.dcu
Binary files differ
CB_IMGPSScanImp.dfm
@@ -1000,37 +1000,15 @@
          Height = 13
          Caption = 'Label7'
        end
        object TreeView1: TTreeView
        object Splitter2: TSplitter
          Left = 1
          Top = 83
          Top = 370
          Width = 289
          Height = 418
          Align = alClient
          AutoExpand = True
          Font.Charset = CHINESEBIG5_CHARSET
          Font.Color = clWindowText
          Font.Height = -16
          Font.Name = #26032#32048#26126#39636
          Font.Style = []
          HideSelection = False
          HotTrack = True
          Images = ImageList1
          Indent = 19
          ParentFont = False
          ParentShowHint = False
          PopupMenu = PopupMenu1
          ReadOnly = True
          ShowButtons = False
          ShowHint = False
          ShowRoot = False
          TabOrder = 1
          OnClick = TreeView1Click
          OnDragDrop = TreeView1DragDrop
          OnDragOver = TreeView1DragOver
          OnKeyUp = TreeView1KeyUp
          OnMouseEnter = TreeView1MouseEnter
          OnMouseMove = TreeView1MouseMove
          OnMouseUp = TreeView1MouseUp
          Height = 7
          Cursor = crVSplit
          Align = alBottom
          Visible = False
          ExplicitTop = 419
        end
        object Panel6: TPanel
          Left = 1
@@ -1177,7 +1155,7 @@
          Font.Name = #26032#32048#26126#39636
          Font.Style = [fsUnderline]
          ParentFont = False
          TabOrder = 2
          TabOrder = 1
          Visible = False
          object UseOldCaseLb: TLabel
            Left = 9
@@ -1195,52 +1173,162 @@
            OnClick = UseOldCaseLbClick
          end
        end
        object Panel13: TPanel
        object AttFileGB: TGroupBox
          Left = 1
          Top = 501
          Top = 377
          Width = 289
          Height = 36
          Height = 160
          Align = alBottom
          Caption = 'PDF'#27284
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clWindowText
          Font.Height = -13
          Font.Name = 'Tahoma'
          Font.Style = []
          ParentFont = False
          TabOrder = 2
          Visible = False
          object AttListBox: TListBox
            Left = 2
            Top = 38
            Width = 285
            Height = 120
            Align = alClient
            ItemHeight = 16
            MultiSelect = True
            TabOrder = 0
            OnClick = AttListBoxClick
            OnDblClick = AttListBoxDblClick
          end
          object Panel20: TPanel
            Left = 2
            Top = 18
            Width = 285
            Height = 20
            Align = alTop
            TabOrder = 1
            object AddAttFileLB: TLabel
              Left = 160
              Top = 1
              Width = 30
              Height = 16
              Cursor = crHandPoint
              Caption = #21152#20837
              Enabled = False
              Font.Charset = DEFAULT_CHARSET
              Font.Color = clBlue
              Font.Height = -13
              Font.Name = 'Tahoma'
              Font.Style = [fsUnderline]
              ParentFont = False
              OnClick = AddAttFileLBClick
            end
            object DelAttFileLB: TLabel
              Left = 214
              Top = 1
              Width = 30
              Height = 16
              Cursor = crHandPoint
              Caption = #31227#38500
              Enabled = False
              Font.Charset = DEFAULT_CHARSET
              Font.Color = clBlue
              Font.Height = -13
              Font.Name = 'Tahoma'
              Font.Style = [fsUnderline]
              ParentFont = False
              OnClick = DelAttFileLBClick
            end
          end
        end
        object Panel17: TPanel
          Left = 1
          Top = 83
          Width = 289
          Height = 287
          Align = alClient
          Caption = 'Panel17'
          TabOrder = 3
          object PrtLb: TLabel
            Left = 9
            Top = 8
            Width = 32
            Height = 16
            Cursor = crHandPoint
            Caption = #21015#21360
            Font.Charset = ANSI_CHARSET
            Font.Color = clBlue
          object TreeView1: TTreeView
            Left = 1
            Top = 1
            Width = 287
            Height = 245
            Align = alClient
            AutoExpand = True
            Font.Charset = CHINESEBIG5_CHARSET
            Font.Color = clWindowText
            Font.Height = -16
            Font.Name = #26032#32048#26126#39636
            Font.Style = [fsUnderline]
            Font.Style = []
            HideSelection = False
            HotTrack = True
            Images = ImageList1
            Indent = 19
            ParentFont = False
            Visible = False
            OnClick = PrtLbClick
          end
          object CaseHelpBtn: TBitBtn
            Left = 94
            Top = 5
            Width = 75
            Height = 25
            Glyph.Data = {
              76010000424D7601000000000000760000002800000020000000100000000100
              04000000000000010000120B0000120B00001000000000000000000000000000
              800000800000008080008000000080008000808000007F7F7F00BFBFBF000000
              FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00333333333333
              3333333333FFFFF3333333333F797F3333333333F737373FF333333BFB999BFB
              33333337737773773F3333BFBF797FBFB33333733337333373F33BFBFBFBFBFB
              FB3337F33333F33337F33FBFBFB9BFBFBF3337333337F333373FFBFBFBF97BFB
              FBF37F333337FF33337FBFBFBFB99FBFBFB37F3333377FF3337FFBFBFBFB99FB
              FBF37F33333377FF337FBFBF77BF799FBFB37F333FF3377F337FFBFB99FB799B
              FBF373F377F3377F33733FBF997F799FBF3337F377FFF77337F33BFBF99999FB
              FB33373F37777733373333BFBF999FBFB3333373FF77733F7333333BFBFBFBFB
              3333333773FFFF77333333333FBFBF3333333333377777333333}
            NumGlyphs = 2
            ParentShowHint = False
            PopupMenu = PopupMenu1
            ReadOnly = True
            ShowButtons = False
            ShowHint = False
            ShowRoot = False
            TabOrder = 0
            TabStop = False
            Visible = False
            OnClick = CaseHelpBtnClick
            OnClick = TreeView1Click
            OnDragDrop = TreeView1DragDrop
            OnDragOver = TreeView1DragOver
            OnKeyUp = TreeView1KeyUp
            OnMouseDown = TreeView1MouseDown
            OnMouseEnter = TreeView1MouseEnter
            OnMouseMove = TreeView1MouseMove
            OnMouseUp = TreeView1MouseUp
          end
          object Panel13: TPanel
            Left = 1
            Top = 246
            Width = 287
            Height = 40
            Align = alBottom
            TabOrder = 1
            object PrtLb: TLabel
              Left = 9
              Top = 15
              Width = 32
              Height = 16
              Cursor = crHandPoint
              Caption = #21015#21360
              Font.Charset = ANSI_CHARSET
              Font.Color = clBlue
              Font.Height = -16
              Font.Name = #26032#32048#26126#39636
              Font.Style = [fsUnderline]
              ParentFont = False
              Visible = False
              OnClick = PrtLbClick
            end
            object CaseHelpBtn: TBitBtn
              Left = 98
              Top = 6
              Width = 80
              Height = 27
              Glyph.Data = {
                76010000424D7601000000000000760000002800000020000000100000000100
                04000000000000010000120B0000120B00001000000000000000000000000000
                800000800000008080008000000080008000808000007F7F7F00BFBFBF000000
                FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00333333333333
                3333333333FFFFF3333333333F797F3333333333F737373FF333333BFB999BFB
                33333337737773773F3333BFBF797FBFB33333733337333373F33BFBFBFBFBFB
                FB3337F33333F33337F33FBFBFB9BFBFBF3337333337F333373FFBFBFBF97BFB
                FBF37F333337FF33337FBFBFBFB99FBFBFB37F3333377FF3337FFBFBFBFB99FB
                FBF37F33333377FF337FBFBF77BF799FBFB37F333FF3377F337FFBFB99FB799B
                FBF373F377F3377F33733FBF997F799FBF3337F377FFF77337F33BFBF99999FB
                FB33373F37777733373333BFBF999FBFB3333373FF77733F7333333BFBFBFBFB
                3333333773FFFF77333333333FBFBF3333333333377777333333}
              NumGlyphs = 2
              TabOrder = 0
              TabStop = False
              Visible = False
              OnClick = CaseHelpBtnClick
            end
          end
        end
      end
@@ -5671,36 +5759,6 @@
    Left = 672
    Top = 408
  end
  object HTTPSClient: TElHTTPSClient
    Versions = [sbSSL2, sbSSL3, sbTLS1]
    LocalPort = 0
    IncomingSpeedLimit = 0
    OutgoingSpeedLimit = 0
    UseSSLSessionResumption = False
    SocksAuthentication = saNoAuthentication
    WebTunnelPort = 3128
    SocketBinding.Port = 0
    SocketBinding.PortRangeFrom = 0
    SocketBinding.PortRangeTo = 0
    RenegotiationAttackPreventionMode = rapmCompatible
    SSLEnabled = False
    RequestParameters.ContentLength = -1
    RequestParameters.ContentRangeStart = -1
    RequestParameters.ContentRangeEnd = -1
    RequestParameters.UserAgent = 'SecureBlackbox'
    PreferKeepAlive = False
    ForceKeepAliveIfConnectionHeaderIsAbsent = False
    HTTPVersion = hvHTTP10
    UseNTLMAuth = False
    UseDigestAuth = False
    ForceNTLMAuth = False
    SendBufferSize = 1024576
    HTTPProxyPort = 3128
    UseHTTPProxy = False
    OnCertificateValidate = HTTPSClientCertificateValidate
    Left = 512
    Top = 408
  end
  object ImageList1: TImageList
    Left = 32
    Top = 360
@@ -9589,4 +9647,44 @@
    Left = 464
    Top = 296
  end
  object HTTPSClient: TElHTTPSClient
    SocketTimeout = 60000
    Versions = [sbTLS1, sbTLS11, sbTLS12]
    SSLOptions = [ssloAutoAddServerNameExtension]
    LocalPort = 0
    IncomingSpeedLimit = 0
    OutgoingSpeedLimit = 0
    UseSSLSessionResumption = False
    ForceResumeIfDestinationChanges = False
    SocksAuthentication = saNoAuthentication
    WebTunnelPort = 3128
    SocketBinding.Port = 0
    SocketBinding.ReuseAddress = False
    SocketBinding.PortRangeFrom = 0
    SocketBinding.PortRangeTo = 0
    RenegotiationAttackPreventionMode = rapmAuto
    SSLEnabled = False
    RequestParameters.ContentLength = -1
    RequestParameters.ContentRangeStart = -1
    RequestParameters.ContentRangeEnd = -1
    RequestParameters.ContentRangeFullSize = -1
    RequestParameters.UserAgent = 'SecureBlackbox'
    RequestCompressionLevel = 0
    RequestCompressionGZip = False
    KeepAlivePolicy = kapStandardDefined
    HTTPVersion = hvHTTP10
    UseNTLMAuth = False
    UseDigestAuth = False
    PersistentAuthHeader = True
    ForceNTLMAuth = False
    Use100Continue = False
    HTTPProxyPort = 3128
    HTTPProxyAuthentication = wtaNoAuthentication
    UseHTTPProxy = False
    IgnoreUnknownTransferEncodings = False
    OnRedirection = HTTPSClientRedirection
    OnCertificateValidate = HTTPSClientCertificateValidate
    Left = 464
    Top = 368
  end
end
CB_IMGPSScanImp.pas
@@ -14,7 +14,8 @@
  ExtCtrls, ComCtrls, Menus, StdCtrls, Gauges, EnImgScr, PJMenuSpeedButtons,
  Buttons, ImgList, SBSimpleSSL, SBHTTPSClient, SBWinCertStorage, SBX509,
  SBCustomCertStorage, SBUtils,mpsBarco,BarcodesFinder,HTTPApp,ErrList,
  Xmltool,inifiles,printers,IdHashMessageDigest, idHash, LogFile;
  Xmltool,inifiles,printers,IdHashMessageDigest, idHash, LogFile,ShellApi,
  SBSocket;
var
  Ch_WriteNote : Boolean;
@@ -111,7 +112,6 @@
    Splitter1: TSplitter;
    Panel3: TPanel;
    Label7: TLabel;
    TreeView1: TTreeView;
    Panel6: TPanel;
    CB1: TCheckBox;
    ScanDuplexCB: TCheckBox;
@@ -180,7 +180,6 @@
    PM402: TMenuItem;
    PM403: TMenuItem;
    PM404: TMenuItem;
    HTTPSClient: TElHTTPSClient;
    ElWinCertStorage: TElWinCertStorage;
    ElMemoryCertStorage: TElMemoryCertStorage;
    Panel5: TPanel;
@@ -188,8 +187,6 @@
    Panel11: TPanel;
    SampleScanBtn: TBitBtn;
    WNoteBtn: TBitBtn;
    Panel13: TPanel;
    CaseHelpBtn: TBitBtn;
    PopupMenu1: TPopupMenu;
    PM101: TMenuItem;
    N12: TMenuItem;
@@ -247,7 +244,6 @@
    Edit1: TEdit;
    PM110: TMenuItem;
    Image1: TImage;
    PrtLb: TLabel;
    UseOldCaseLb: TLabel;
    PM111: TMenuItem;
    SmoothCB: TCheckBox;
@@ -258,6 +254,18 @@
    Label3: TLabel;
    LogFile1: TLogFile;
    ScanGrayCB: TCheckBox;
    AttFileGB: TGroupBox;
    AttListBox: TListBox;
    Panel20: TPanel;
    AddAttFileLB: TLabel;
    DelAttFileLB: TLabel;
    Splitter2: TSplitter;
    Panel17: TPanel;
    TreeView1: TTreeView;
    Panel13: TPanel;
    PrtLb: TLabel;
    CaseHelpBtn: TBitBtn;
    HTTPSClient: TElHTTPSClient;
    procedure ActiveFormCreate(Sender: TObject);
    procedure Panel9Resize(Sender: TObject);
    procedure ISB1Click(Sender: TObject);
@@ -376,6 +384,14 @@
    procedure TreeView1MouseEnter(Sender: TObject);
    procedure ScrollBox1MouseEnter(Sender: TObject);
    procedure ScanGrayCBClick(Sender: TObject);
    procedure AddAttFileLBClick(Sender: TObject);
    procedure DelAttFileLBClick(Sender: TObject);
    procedure AttListBoxDblClick(Sender: TObject);
    procedure AttListBoxClick(Sender: TObject);
    procedure TreeView1MouseDown(Sender: TObject; Button: TMouseButton;
      Shift: TShiftState; X, Y: Integer);
    procedure HTTPSClientRedirection(Sender: TObject; const OldURL: string;
      var NewURL: string; var AllowRedirection: Boolean);
  private
    { Private declarations }
    HotKeyId1,HotKeyId2,HotKeyId3,HotKeyId4 :Integer;
@@ -473,6 +489,7 @@
    CaseDocNoList : TStringlist;  //案件裡的DocNo清單(不重複)
    CaseDocNo_CopiesList : TStringlist; //案件裡的DocNo份數清單
    ContextList : TStringlist; //案件裡的檔案清單
    AttContextList : TStringlist; //案件裡的附加檔案清單
    OMRFileList : TStringList; //要OMR檢核的文件(只檢查每種Form的第一頁)
    Cust_DocNoList : TStringlist; //自行定義文件名稱
    IN_WH_DocNoList : TStringlist; //入庫的文件清單
@@ -572,7 +589,7 @@
    FJpgCompression:integer;// 20171211 jpg to tif 的壓縮率
    Draging : Boolean;
    MDown : Boolean;  //20181210 用來判斷滑鼠右鍵要Popupmenu是否有MouseDonw發生
    FEvents: ICB_IMGPSScanXEvents;
@@ -650,6 +667,7 @@
    Procedure initkscan; //檢查掃描器的功能
    procedure LoadImgFile; //載入案件
    procedure LoadImgFile1; //載入案件
    procedure LoadAttFile(CaseID:String); //載入附加檔案
    Procedure DistinctFormCode(CaseID:String); //案件裡的FormCode取出第一頁
    Function OMRCheckCase(CaseID:String):Boolean; //OMR檢核
    Procedure OMRErr2ini(CaseID,Reason,FileName,Site,RelaFileName,RelaSite,Anchor,Anchor1:String;Del,Ingnore,Display:Boolean); //OMR檢核失敗寫入ini
@@ -712,6 +730,9 @@
    Procedure SetCaseList(Mode:Char;Index:Integer;text:String);  //'A:加入,I:插入,D:刪除,E:修改'
    Procedure SetDocNoList(Mode:Char;Index:Integer;CaseNo,DocDir,Copies:String);  //'A:加入,I:插入,D:刪除,E:修改'
    Procedure SetContextList(Mode:Char;Index:Integer;CaseNo,DocDir,FileName:String);  //'A:加入,I:插入,D:刪除,E:修改'
    Procedure SetAttContextList(Mode:Char;Index:Integer;CaseNo,FileName:String);  //'A:加入,I:插入,D:刪除,E:修改'
    Function checkCaseOMRDone:Boolean;  //檢查案件是否完成OMR檢核
    Function CheckCaseID_OK:Boolean;  //檢查是否有未配號的案件
    Procedure CreateEmptyCase(Path,CaseID:String);  //產生空白案號(重掃件用)
@@ -1679,6 +1700,7 @@
  DocNo_List.Free; //DocNo清單
  Context_DocnoList.Free; //案件裡的檔案Docno清單
  ContextList.Free; //案件裡的檔案清單
  AttContextList.Free; //案件裡的附加檔案清單
  NowShowFileList.Free;  //目前顯示的影像清單
  NowSelectFileList.Free; //目前被點選的影像清單
  Cust_DocNoList.Free; //自行定義文件名稱
@@ -2106,7 +2128,7 @@
              if FileExists(ImageSavePath + NowCaseno+'\'+DocDir+'\Context.dat') then
              begin
                ST1.LoadFromFile(ImageSavePath + NowCaseno+'\'+DocDir+'\Context.dat');
                if ISExistImg(ImageSavePath + NowCaseno+'\'+DocDir+'\'+ST1.Strings[0]) then
                if (ST1.Count > 0) and ISExistImg(ImageSavePath + NowCaseno+'\'+DocDir+'\'+ST1.Strings[0]) then   //20181210 多增加判斷ST1>0 否則會有機會出現List out of bound  Hong
                begin
                  DocDir := DocNo2DocNoDir(ImageSavePath + NowCaseno+'\',DocNo);
                end;
@@ -2629,7 +2651,8 @@
begin
  Result:=False;
  ST:=TStringList.Create;
  ST.loadFromfile(DocNopath+'\Context.dat');
  if FileExists(DocNopath+'\Context.dat') then   /////20190319 Hong 當有空的Docno目錄時會掛掉,增加這行
    ST.loadFromfile(DocNopath+'\Context.dat');
  for I := 0 to ST.Count - 1 do
  begin
    if ISExistImg(DocNopath+ST.Strings[i]) then
@@ -2810,7 +2833,7 @@
      MpsGetBarcode(ISB_BW.Graphic, MpsBarcodeinf); //判斷A3 有用FormID 所以要先辨條碼
      For n := 1 To MpsBarcodeinf.Count Do
      Begin
        If MpsBarcodeinf.r180[n] <> 0 Then // 依條碼角度轉影像
        If (MpsBarcodeinf.r180[n] <> 0) and (Length(MpsBarcodeinf.Text[n])=FormIDLength) Then // 依條碼角度轉影像
        Begin
          Rotate(ISB.Graphic, MpsBarcodeinf.r180[n]);
          //MpsGetBarcode(iGraphic_First, MpsBarcodeinf);
@@ -2855,7 +2878,7 @@
//ShowMessage(IntToStr(MpsBarcodeinf.Count));
          For n := 1 To MpsBarcodeinf.Count Do
          Begin
            If MpsBarcodeinf.r180[n] <> 0 Then // 依條碼角度轉影像
            If (MpsBarcodeinf.r180[n] <> 0) and (Length(MpsBarcodeinf.Text[n])=FormIDLength) Then // 依條碼角度轉影像
            Begin
              Rotate(iGraphic, MpsBarcodeinf.r180[n]);
              MpsGetBarcode(ISB_BW.Graphic, MpsBarcodeinf);
@@ -2933,7 +2956,7 @@
          For n := 1 To MpsBarcodeinf.Count Do
          Begin
            If MpsBarcodeinf.r180[n] <> 0 Then // 依條碼角度轉影像
            If (MpsBarcodeinf.r180[n] <> 0) and (Length(MpsBarcodeinf.Text[n])=FormIDLength) Then // 依條碼角度轉影像
            Begin
              Rotate(iGraphic, MpsBarcodeinf.r180[n]);
              MpsGetBarcode(ISB_BW.Graphic, MpsBarcodeinf);
@@ -4082,6 +4105,36 @@
  end;
end;
procedure TCB_IMGPSScanX.AddAttFileLBClick(Sender: TObject);
var
  i : Integer;
  Addfile : String;
begin
  OpenDialog1.Filter := 'PDF files|*.pdf';
  OpenDialog1.Options := [ofAllowMultiSelect];
  if OpenDialog1.Execute then
  begin
    ShowText :=_Msg('檔案加入中,請稍候');
    DataLoading(True,True);
    for i := 0 to OpenDialog1.Files.Count - 1 do
    begin
      AddFile := HTTPEncode(UTF8Encode(ExtractFileName(OpenDialog1.Files.Strings[i])));
      if FileExists(ImageSavePath+NowCaseno+'\'+AddFile) then
      begin
        if Messagedlg(Format(_msg('%s己存在,是否覆蓋??'),[Addfile]),mtconfirmation,[mbyes,mbcancel],0) = mrcancel Then
          Continue;
        SetAttContextList('D',-1,NowCaseno,AddFile);
      end;
      // AttFileGB.Visible := True; //附加電子檔窗   //20120207楊玉說不在這加電子檔先拿掉
      //   Splitter2.Visible := True;
      CopyFile(Pchar(OpenDialog1.Files.Strings[i]),Pchar(ImageSavePath+NowCaseno+'\'+AddFile),False);
      SetAttContextList('A',-1,NowCaseno,AddFile);
      LoadAttFile(NowCaseno);
    end;
  end;
  DataLoading(False,False);
end;
procedure TCB_IMGPSScanX.AddCredit1RGClick(Sender: TObject);
begin
  if DisplayPath <> '' then
@@ -4135,6 +4188,26 @@
  ClearErrini(NowCaseno,MyTreeNode1);  //清掉檢核記錄
  SetDocDirtoSelected(MyTreeNode1,FirstDocDir);
  TreeView1Click(self);
end;
procedure TCB_IMGPSScanX.AttListBoxClick(Sender: TObject);
begin
  DelAttFileLB.Enabled := False;
  if AttListBox.ItemIndex >= 0 then
    DelAttFileLB.Enabled := True;
end;
procedure TCB_IMGPSScanX.AttListBoxDblClick(Sender: TObject);
var
  AttFile : String;
begin
  if AttListBox.ItemIndex < 0 then Exit;
  AttFile := HTTPEncode(UTF8Encode(AttListBox.Items.Strings[AttListBox.ItemIndex]));
  if FileExists(DisplayPath+AttFile) then
    ShellExecute(Application.Handle,'open',PChar(DisplayPath+AttFile),nil,nil,SW_SHOW)
  else
    Showmessage(Format(_Msg('找不到檔案:%s'),[AttFile]));
end;
procedure TCB_IMGPSScanX.BtnMouseEnter(Sender: TObject);
@@ -5326,6 +5399,12 @@
  Validate := True;
end;
procedure TCB_IMGPSScanX.HTTPSClientRedirection(Sender: TObject;
  const OldURL: string; var NewURL: string; var AllowRedirection: Boolean);
begin
  AllowRedirection := True;
end;
procedure TCB_IMGPSScanX.EnableImage(v:integer;Sender : TObject);
var bmp : Tbitmap;
begin
@@ -6330,6 +6409,7 @@
    ContextList.LoadFromFile(Path+'Context.dat');
    Context_DocnoList.LoadFromFile(Path+'Context_DocNo.dat');
  end;
  if FileExists(Path+'CustomDocNo.dat') then
    Cust_DocNoList.LoadFromFile(Path+'CustomDocNo.dat');
@@ -6438,7 +6518,6 @@
  if HaveMask then
    ZipMaskFile(Path,MaskPath,Path,'MaskImg.zip');  //有遮罩設定的才產生
  /////壓檔////
  ///檢查上傳的zip大小////
   FName :=Path+ 'Img.zip';
@@ -6475,6 +6554,8 @@
  +'&in_doc2='+HTTPEncode(UTF8Encode(In_Doc2));
//ShowMessage('SendData='+SendData);
//ShowMessage(FData+#10#13+Doc_Data);
  //Showmessage('Wait');
  if not upFile(HTTPSClient,FUrl,'service/imgpsc/IMGPSC02/caseupload',SendData,'file',Path+'Img.zip',FReWrite,Memo1,False) then
  begin
    Showmessage(Inttostr(HttpError.HttpErrorCode)+' '+HttpError.HttpReason+'.');
@@ -6494,7 +6575,6 @@
    Exit;
  end;
  ////上傳////
  if FMode = 'ESCAN' then    //上傳舊件引入檔案      //20140616 原本先搬舊件再搬新件,改為先搬新件再搬舊件
  begin
    if not TransOldCaseFile(ImageSavePath+CaseID+'\') then
@@ -6503,9 +6583,6 @@
      Exit;
    end;
  end;
  // 呼叫Server完成 /////
  {If not CaseComplete(Path,CaseID,MainCase) Then
  begin
@@ -7309,6 +7386,49 @@
  end;
end;
Procedure TCB_IMGPSScanX.SetAttContextList(Mode:Char;Index:Integer;CaseNo,FileName:String);  //'A:加入,I:插入,D:刪除,E:修改'
var
  i : Integer;
begin
  AttContextList.Clear;
  if FileExists(ImageSavePath+CaseNo+'\AttContext.dat') then
    AttContextList.LoadFromFile(ImageSavePath+CaseNo+'\AttContext.dat');
  case Mode of
    'A':begin
          AttContextList.Add(FileName);
        end;
    'I':begin
          AttContextList.Insert(Index,FileName);
        end;
    'E':begin
          AttContextList.Strings[Index] := FileName;
        end;
    'D':begin
          if Index <> -1 then
          begin
            AttContextList.Delete(Index);
          end
          Else if (text <> '') then
          begin
            for i := 0 to AttContextList.Count - 1 do
            begin
              if FileName = AttContextList.Strings[i] then
              begin
                AttContextList.Delete(i);
                Break;
              end;
            end;
          end;
          if AttContextList.Count = 0 then
            DeleteFile(ImageSavePath+CaseNo+'\AttContext.dat');
        end;
  end;
  if AttContextList.Count > 0 then
  begin
    AttContextList.SaveToFile(ImageSavePath+CaseNo+'\AttContext.dat');
  end;
end;
Function TCB_IMGPSScanX.checkCaseOMRDone:Boolean;  //檢查案件是否完成OMR檢核
var
  i : Integer;
@@ -7438,7 +7558,36 @@
  try
    NewDocNo := FormCode2DocNo(NewFormID);
    NewDocDir := FindLastestDocDir(CaseID,NewDocNo);
    if NewDocDir = '' then
    /////20190319 Hong 原本的程式判斷怪怪的先Mark在下方,改用這段
    if DocNoNeedDiv(NewDocNo) then   //要分份數
    begin
      if ((FormCode2Page(NewFormID) = '01') and (GetDocDir_Page(CaseID,NewDocDir)>0)) or (NewDocDir = '') then
      begin
        NewDocDir := DocNo2DocNoDir(ImageSavePath + CaseID+'\',NewDocNo);
      end
      else
      begin //20171016  真對補件影響 所加的判斷
        ST1.Clear;
        if FileExists(ImageSavePath + CaseID+'\'+NewDocDir+'\Context.dat') then
        begin
          ST1.LoadFromFile(ImageSavePath + CaseID+'\'+NewDocDir+'\Context.dat');
          if (ST1.Count > 0) and ISExistImg(ImageSavePath + CaseID+'\'+NewDocDir+'\'+ST1.Strings[0]) then   //20181210 多增加判斷ST1>0 否則會有機會出現List out of bound  Hong
          begin
            NewDocDir := DocNo2DocNoDir(ImageSavePath + CaseID+'\',NewDocNo);
          end;
        end;
      end;
    end
    Else        //不分份數
    begin
      if NewDocNo <> '' then
        NewDocDir := NewDocNo
      else      //Attach 附件
        NewDocDir := DocNo2DocNoDir(ImageSavePath + CaseID+'\',NewDocNo);
    end;
    {if NewDocDir = '' then
    begin
      if DocNoNeedDiv(NewDocNo) then
      begin
@@ -7465,7 +7614,7 @@
          NewDocDir := DocNo2DocNoDir(ImageSavePath + NowCaseno+'\',NewDocNo);
        end;
      end;
    end;
    end; }
    if Not DirectoryExists(ImageSavePath+CaseID+'\'+NewDocDir) then
    begin
      MkDir(ImageSavePath+CaseID+'\'+NewDocDir);
@@ -8100,6 +8249,18 @@
    end;
    if FileExists(SoPath+'Context.dat') then
      ZipFileList.Add(SoPath+'Context.dat');
    AttContextList.Clear;
    if FileExists(SoPath+'ATTContext.dat') then
      AttContextList.LoadFromFile(SoPath+'ATTContext.dat');
    for n := 0 to AttContextList.Count - 1 do
    begin
      ZipFileList.Add(SoPath+AttContextList.Strings[n]);
    end;
    if FileExists(SoPath+'ATTContext.dat') then
      ZipFileList.Add(SoPath+'ATTContext.dat');
    if FileExists(SoPath+'Context_DocNo.dat') then
      ZipFileList.Add(SoPath+'Context_DocNo.dat');
    if FileExists(SoPath+'scanlist.dat') then
@@ -9260,6 +9421,9 @@
begin
  ClearView(1);
  PageLV.Clear;
  AttListBox.Items.Clear;
  AddAttFileLB.Enabled := False;
  DelAttFileLB.Enabled := False;
  DisplayPath := '';
  ClearCaseIndex;
  CaseHelpBtn.Visible := False;
@@ -9439,6 +9603,27 @@
    GetCase_PageCount(CaseCount,PageCount);
    v := Pos('-',NewTreeNode.Text);
    NewTreeNode.Text := Format(_Msg('%s-共%d筆共%d頁'),[Copy(NewTreeNode.Text,1,v-1),CaseCount,PageCount]);
  end;
end;
procedure TCB_IMGPSScanX.LoadAttFile(CaseID:String); //載入附加檔案
var
  AttContextList : TStringlist;
  i : Integer;
begin
  AttListBox.Clear;
  AttContextList := TStringlist.Create;
  try
    if FileExists(ImageSavePath+CaseID+'\AttContext.dat') then
    begin
      AttContextList.LoadFromFile(ImageSavePath+CaseID+'\AttContext.dat');
    end;
    for i := 0 to AttContextList.Count - 1 do
    begin
      AttListBox.Items.Add(UTF8Decode(HTTPDEcode(AttContextList.Strings[i])));
    end;
  finally
  AttContextList.Free;
  end;
end;
@@ -9810,6 +9995,41 @@
  finally
  ini.Free;
  end;
end;
procedure TCB_IMGPSScanX.DelAttFileLBClick(Sender: TObject);
var
  AttFile : String;
  SelectCount : Integer;
  i : Integer;
begin
  SelectCount := 0;
  for i := 0 to AttListBox.Items.Count - 1 do
  begin
    if AttListBox.Selected[i] then
      inc(SelectCount);
  end;
  if SelectCount = 0 then
  begin
    Showmessage(_Msg('請選擇要刪除的電子檔'));
    Exit;
  end;
  if SelectCount > 0 then
  begin
    if Messagedlg(Format(_Msg('是否刪除這%d筆??'),[SelectCount]),MtConfirmation,[mbyes,mbcancel],0) = mrcancel then Exit;
    for i := 0 to AttListBox.Items.Count - 1 do
    begin
      if AttListBox.Selected[i] then
      begin
        AttFile :=  HTTPEncode(UTF8Encode(AttListBox.Items.Strings[i]));
        DeleteFile(ImageSavePath+NowCaseNo+'\'+AttFile);
        SetAttContextList('D',-1,NowCaseno,AttFile);
      end;
    end;
  end;
  LoadAttFile(NowCaseNo);
  Showmessage(_msg('刪除完成'));
end;
Procedure TCB_IMGPSScanX.DeleteCustomDocDir(Path,DocNo:String); //刪除自定文件DocNo
@@ -10608,10 +10828,17 @@
Function TCB_IMGPSScanX.DocNoAppear(DocNo:String):Boolean;   //DocNo是否可出現
begin
  Result := True;
  if (((FIs_In_Wh  = 'Y') and (not DocNoIs_In_WH(DocNo)) or (DocNo ='S_Attach')) or   //入庫掃描不看非入庫文件
  {if (((FIs_In_Wh  = 'Y') and (not DocNoIs_In_WH(DocNo)) or (DocNo ='S_Attach')) or   //入庫掃描不看非入庫文件
     ((FIs_In_Wh  = 'N') and (DocNoIs_In_WH(DocNo)) or (DocNo ='Attach') )) {and      //非入庫掃描不看入庫文件
     (Copy(DocNo,1,5)<>'ZZZZZ')} {then
       {Result := False;}
  //20181031 應該要換成下面的判斷比較對,FIs_In_Wh傳空的話才會出全部
  if (((FIs_In_Wh  = 'Y') and ((not DocNoIs_In_WH(DocNo)) or (DocNo ='S_Attach'))) or   //入庫掃描不看非入庫文件
     ((FIs_In_Wh  = 'N') and ((DocNoIs_In_WH(DocNo)) or (DocNo ='Attach') ))) {and      //非入庫掃描不看入庫文件
     (Copy(DocNo,1,5)<>'ZZZZZ')} then
       Result := False;
end;
@@ -11028,16 +11255,18 @@
var
  i,n:Integer;
  OldPath,NewPath,DocDir : String;
  OldFile,NewFile : String;
  OldFile,NewFile,AttFile : String;
  DocNoList,FileList:TStringlist;
  iFileList,iFile_DocNoList :TStringlist;
  iDocDirList : TStringlist;
  iAttFileList : TStringlist;
begin
  DocNoList := TStringlist.Create;
  FileList := TStringlist.Create;
  iFileList := TStringlist.Create;
  iFile_DocNoList := TStringlist.Create;
  iDocDirList := TStringlist.Create;
  iAttFileList := TStringlist.Create;
  try
    OldPath := ImageSavePath+CaseID+'\';
    NewPath := ImageSavePath+CaseID+'\Upload\';
@@ -11122,6 +11351,18 @@
        end;
      end;
    end;
    OldPath := ImageSavePath+CaseID+'\';
    if FileExists(OldPath+'AttContext.dat') then
    begin
      iAttFileList.LoadFromFile(OldPath+'AttContext.dat');
      for n := 0 to iAttFileList.Count - 1 do
      begin
        AttFile := iAttFileList.Strings[n];
        CopyFile(PWideChar(OldPath+AttFile),PWideChar(NewPath+AttFile),False);
      end;
      iAttFileList.SaveToFile(NewPath+'AttContext.dat');
    end;
    iFileList.SaveToFile(NewPath+'Context.dat');
    iFile_DocNoList.SaveToFile(NewPath+'Context_DocNo.dat');
@@ -11129,6 +11370,7 @@
  finally
  iFileList.Free;
  iAttFileList.Free;
  iFile_DocNoList.Free;
  DocNoList.Free;
  FileList.Free;
@@ -11139,9 +11381,10 @@
var
  i,n : Integer;
  DocDir:String;
  OldFile,NewFile:String;
  OldFile,NewFile,AttFile:String;
  DocNoList,FileList : TStringlist;
  iFileList,iFile_DocDirList :TStringlist;
  iAttFileList :TStringlist;
  AA,AA2,AA3,AA4:Boolean;
begin
@@ -11166,6 +11409,7 @@
  FileList := TStringlist.Create;
  iFileList := TStringlist.Create;
  iFile_DocDirList := TStringlist.Create;
  iAttFileList := TStringlist.Create;
  try
    //if Not FileExists(SoDir+'Context.dat') then  Exit;
    //iFileList.LoadFromFile(SoDir+'Context.dat');
@@ -11279,6 +11523,17 @@
        CaseDocNo_CopiesList.SaveToFile(DeDir+'CaseDocNo_Copies.dat');
      end;
    end;}
    if FileExists(SoDir+'AttContext.dat') then
    begin
      iAttFileList.LoadFromFile(SoDir+'AttContext.dat');
      for i := 0 to iAttFileList.Count - 1 do
      begin
        AttFile := iAttFileList.Strings[i];
        CopyFile(PWideChar(SoDir+AttFile),PWideChar(DeDir+AttFile),False);
      end;
      iAttFileList.SaveToFile(DeDir+'AttContext.dat');
    end;
    if FMode='ESCAN' then
    begin
@@ -12727,7 +12982,7 @@
           ISB.AntiAliased := False;
         ISB.LoadFromFile(Path+iDocNo+'\'+ContextList.Strings[n],1);
         DpiResize(ISB.Graphic,36);
         DpiResize(ISB.Graphic,36,False);
         ISB.Redraw(true);
       end;
@@ -12787,7 +13042,7 @@
       if ISB.ZoomPercent > 100  then
         ISB.AntiAliased := False;
       ISB.LoadFromFile(Path+iDocNo+'\'+ContextList.Strings[i],1);
       DpiResize(ISB.Graphic,36);
       DpiResize(ISB.Graphic,36,False);
       ISB.Redraw(true);
     end;
     FitPreViewISB;
@@ -12826,7 +13081,7 @@
           if ISB.ZoomPercent > 100  then
             ISB.AntiAliased := False;
           ISB.LoadFromFile(Path+iDocNo+'\'+ContextList.Strings[i],1);
           DpiResize(ISB.Graphic,36);
           DpiResize(ISB.Graphic,36,False);
           ISB.Redraw(true);
           //NowShowFileList.Add(ContextList.Strings[i]);
@@ -14091,7 +14346,7 @@
    end;
  end;
//ShowMessage(SendData);
//ShowMessage(Memo1.Lines.Text);
  IF memo1.Lines.Strings[0] <> '0' Then
  begin
    HttpErrStr := _Msg('')+memo1.Lines.Strings[1]+'。';
@@ -14397,6 +14652,9 @@
    Panel6.Visible := True;
    Panel21.Visible := True;
    Panel23.Visible := True;
    AttFileGB.Visible := True;
    Splitter2.Visible := True;
    ScanDuplexCB.Visible := True; //雙面掃描
  end
  Else if FMode = 'FSCAN' then
@@ -14411,6 +14669,8 @@
    Panel6.Visible := True;
    Panel21.Visible := True;
    Panel23.Visible := True;
    AttFileGB.Visible := True;
    Splitter2.Visible := True;
  end;
  DisplayMode(1,1,1,Panel9);
  Application.ProcessMessages;
@@ -14462,6 +14722,7 @@
  CaseList := TStringList.Create;    //記錄掃瞄案件的順序
  Context_DocnoList := TStringlist.Create; //案件裡的檔案Docno清單
  ContextList := TStringlist.Create; //案件裡的檔案清單
  AttContextList := TStringlist.Create; //案件裡的附加檔案清單
  NoSaveBarCodeList := TStringlist.Create; //不儲存的條碼清單
  FormID_List := TStringlist.Create;  //FormID清單
  DocNo_List := TStringlist.Create; //DocNo清單
@@ -14833,7 +15094,6 @@
    CreateIn_WH(CaseID);    //產生入庫文件文字檔 In_Wh.dat
    Case2upload(CaseID);   //產生原影像結構
    TransPath := ImageSavePath+CaseID+'\Upload\';
    {if FMode = 'ESCAN' then    //20140320 yuu說拿掉此檢查
    begin
      S := TStringlist.Create;
@@ -14981,6 +15241,9 @@
  ClearCaseIndex;
  PageLv.Items.Clear;  //頁數清單
  //Panel18.Enabled:= False;
  AttListBox.Items.Clear;
  AddAttFileLB.Enabled := False;
  DelAttFileLB.Enabled := False;
  UseOldCaseLb.Visible := False;
  PM107.Visible := False; //備註功能
  CaseHelpBtn.Visible := False; //檢核失敗原因鈕
@@ -15161,7 +15424,12 @@
      if FileExists(DisplayPath+'CustomDocNo.dat') then
        Cust_DocNoList.LoadFromFile(DisplayPath+'CustomDocNo.dat');
    end;
     MyTreeNode1.Expand(True);
    MyTreeNode1.Expand(True);
    AddAttFileLB.Enabled := True;
    if FileExists(DisplayPath+'ATTContext.dat') then
    begin
      LoadAttFile(NowCaseno);
    end;
  end
  Else     //點在NewTreenode or MyTreenode1 上
  begin
@@ -15405,6 +15673,17 @@
end;
procedure TCB_IMGPSScanX.TreeView1MouseDown(Sender: TObject;
  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
  IF Button = TMouseButton(MbRight) Then
  begin
    MDown := True;
    If TreeView1.GetNodeAt(X,Y) = nil then Exit;
    TreeView1.Selected := TreeView1.GetNodeAt(X,Y);
  end;
end;
procedure TCB_IMGPSScanX.TreeView1MouseEnter(Sender: TObject);
begin
TreeView1.SetFocus;
@@ -15424,9 +15703,13 @@
  IF Button = TMouseButton(MbRight) Then
  begin
    If TreeView1.GetNodeAt(X,Y) = nil then Exit;
    TreeView1.Selected := TreeView1.GetNodeAt(X,Y);
    TreeView1Click(self);
    TreeView1.PopupMenu.Popup(Mouse.CursorPos.X ,Mouse.CursorPos.Y);
    if MDown then
    begin
      TreeView1Click(self);
      TreeView1.PopupMenu.Popup(Mouse.CursorPos.X ,Mouse.CursorPos.Y);
    end;
    Application.ProcessMessages; //需加這行,不然有些全域變數會沒變到
    MDown:= False;
  end;
end;
@@ -15825,14 +16108,22 @@
    OLEMISC_SIMPLEFRAME or OLEMISC_ACTSLIKELABEL,
    tmApartment);
  SetLicenseKey('5B4451E676A1D2976FBB0F3BB18341336AF114C80B5ABAE7F6926B1CAF671F44' +
  {SetLicenseKey('5B4451E676A1D2976FBB0F3BB18341336AF114C80B5ABAE7F6926B1CAF671F44' +
  'BD2F098CCEDA922F6389BFAE398DA6AEE67F97EEA0C17234C20D75C12173DBDA' +
  '594924D56DD8E342F454389C836AD880BB4352CA3BE62C4933B1BA3828E7462C' +
  '60514F2ECDAD322E6128D841F12D24DA00B623106D3F08EBCAA917D8A97CAA34' +
  '3D65F2DA567316457395BF9123EE53DF235D181F191A5712DBB27735284AA92D' +
  '5DFA0C8308308505F384707E900C6063F53F1BFF4C6972607955D1AE517B19D0' +
  '82CDD16301885403AD229D57BAEF98C056F31430861E5F68F339D658D72E1F92' +
  '63899412EC2D07891FE3AFD35F3E4A4390B2F0A8A1BF1B7D6160E5F1CC009B17');
  '63899412EC2D07891FE3AFD35F3E4A4390B2F0A8A1BF1B7D6160E5F1CC009B17'); }
  SetLicenseKey('4B2CF65E8C2A86CE8A0DD0F6A7DB03BC0B0126168B48AE4C27EBD78CAE75CF0F' +
   'A612190861E0D99F6FAE3ED97AC1941B5E97843CFFCF705A3787989072D4EB2C' +
   'AE6CAB3F5B69B86616ACC8A37AD6A2AB21C7BDD5C9AE1EDF9E4193D353805C9A' +
   '403631CE8A3D0803FEBB1BE4C209CE7A63B1298EF080EB34B8628CED567D2B68' +
   'E777FAC58E2E32B7411FC217A04336231D1E861A93474759DAA6EDF53F6EB632' +
   'A3055229A52F3053FB844754741409022DDE3DFB19473510F2BE63328E74BE20' +
   'A6A29AA24878F91ADA9DF8CE1F320AF4DAF58EBF95D9BE761D70EEA274E19475' +
   '1C15948B184264C5C49E60493F3BCD2FFAE2CA8B021D00B96F45550C5F050D8A');
  SetLicenseKey('A6A94A8D91B08A9D58F300C0573EA9EF1B9DB0BF69B90E13B958DB4CB6B44F5A' +
CB_IMGPSScan_TLB.dcu
Binary files differ
CB_IMGPSScan_TLB.pas
@@ -12,10 +12,10 @@
// ************************************************************************ //
// $Rev: 17252 $
// File generated on 2018/9/20 ¤U¤È 02:08:58 from Type Library described below.
// File generated on 2018/10/18 ¤W¤È 11:05:02 from Type Library described below.
// ************************************************************************  //
// Type Lib: D:\¤u§@°Ï\±M®×\°ê®õ¥@µØ\©Ð¶U\CUB_IMGPSSCAN\CUB_IMGPSSCAN\CB_IMGPSScan (1)
// Type Lib: D:\¤u§@°Ï\±M®×\°ê®õ¥@µØ\©Ð¶U\CUB_IMGPSSCAN\CB_IMGPSScan (1)
// LIBID: {F7D1C429-BE85-4FAD-A058-36A41C2AAA89}
// LCID: 0
// Helpfile:
ErrList.dcu
Binary files differ
OldCaseInfo.dcu
Binary files differ
OldCaseInfo.dfm
@@ -86,8 +86,6 @@
            Width = 75
            Height = 25
            Caption = #36617#20837#24433#20687
            DoubleBuffered = True
            ParentDoubleBuffered = False
            TabOrder = 0
            OnClick = BitBtn3Click
          end
@@ -97,8 +95,6 @@
            Width = 75
            Height = 25
            Caption = #38626#38283
            DoubleBuffered = True
            ParentDoubleBuffered = False
            TabOrder = 1
            OnClick = BitBtn4Click
          end
@@ -148,8 +144,6 @@
          Width = 75
          Height = 25
          Caption = #24341#29992
          DoubleBuffered = True
          ParentDoubleBuffered = False
          TabOrder = 0
          OnClick = BitBtn1Click
        end
@@ -159,8 +153,6 @@
          Width = 75
          Height = 25
          Caption = #38626#38283
          DoubleBuffered = True
          ParentDoubleBuffered = False
          TabOrder = 1
          OnClick = BitBtn2Click
        end
@@ -266,36 +258,6 @@
    TabOrder = 1
    Visible = False
  end
  object HTTPSClient: TElHTTPSClient
    Versions = [sbSSL2, sbSSL3, sbTLS1]
    LocalPort = 0
    IncomingSpeedLimit = 0
    OutgoingSpeedLimit = 0
    UseSSLSessionResumption = False
    SocksAuthentication = saNoAuthentication
    WebTunnelPort = 3128
    SocketBinding.Port = 0
    SocketBinding.PortRangeFrom = 0
    SocketBinding.PortRangeTo = 0
    RenegotiationAttackPreventionMode = rapmCompatible
    SSLEnabled = False
    RequestParameters.ContentLength = -1
    RequestParameters.ContentRangeStart = -1
    RequestParameters.ContentRangeEnd = -1
    RequestParameters.UserAgent = 'SecureBlackbox'
    PreferKeepAlive = False
    ForceKeepAliveIfConnectionHeaderIsAbsent = False
    HTTPVersion = hvHTTP10
    UseNTLMAuth = False
    UseDigestAuth = False
    ForceNTLMAuth = False
    SendBufferSize = 1024576
    HTTPProxyPort = 3128
    UseHTTPProxy = False
    OnCertificateValidate = HTTPSClientCertificateValidate
    Left = 512
    Top = 408
  end
  object ElMemoryCertStorage: TElMemoryCertStorage
    Options = [csoStrictChainBuilding]
    Left = 592
@@ -315,4 +277,44 @@
    Left = 496
    Top = 136
  end
  object HTTPSClient: TElHTTPSClient
    SocketTimeout = 60000
    Versions = [sbTLS1, sbTLS11, sbTLS12]
    SSLOptions = [ssloAutoAddServerNameExtension]
    LocalPort = 0
    IncomingSpeedLimit = 0
    OutgoingSpeedLimit = 0
    UseSSLSessionResumption = False
    ForceResumeIfDestinationChanges = False
    SocksAuthentication = saNoAuthentication
    WebTunnelPort = 3128
    SocketBinding.Port = 0
    SocketBinding.ReuseAddress = False
    SocketBinding.PortRangeFrom = 0
    SocketBinding.PortRangeTo = 0
    RenegotiationAttackPreventionMode = rapmAuto
    SSLEnabled = False
    RequestParameters.ContentLength = -1
    RequestParameters.ContentRangeStart = -1
    RequestParameters.ContentRangeEnd = -1
    RequestParameters.ContentRangeFullSize = -1
    RequestParameters.UserAgent = 'SecureBlackbox'
    RequestCompressionLevel = 0
    RequestCompressionGZip = False
    KeepAlivePolicy = kapStandardDefined
    HTTPVersion = hvHTTP10
    UseNTLMAuth = False
    UseDigestAuth = False
    PersistentAuthHeader = True
    ForceNTLMAuth = False
    Use100Continue = False
    HTTPProxyPort = 3128
    HTTPProxyAuthentication = wtaNoAuthentication
    UseHTTPProxy = False
    IgnoreUnknownTransferEncodings = False
    OnRedirection = HTTPSClientRedirection
    OnCertificateValidate = HTTPSClientCertificateValidate
    Left = 440
    Top = 376
  end
end
OldCaseInfo.pas
@@ -6,7 +6,7 @@
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ExtCtrls, StdCtrls, CheckLst, Buttons, ComCtrls,IISUnit,IIS_File2Web,IIS_ImageProcess,
  HTTPApp, SBWinCertStorage, SBX509, SBCustomCertStorage, SBSimpleSSL,
  SBHTTPSClient, EnImgScr,inifiles;
  SBHTTPSClient, EnImgScr,inifiles, SBSocket;
Const
  ISBName = 'PreViewISB';
@@ -29,7 +29,6 @@
    Splitter1: TSplitter;
    BitBtn3: TBitBtn;
    BitBtn4: TBitBtn;
    HTTPSClient: TElHTTPSClient;
    ElMemoryCertStorage: TElMemoryCertStorage;
    ElWinCertStorage: TElWinCertStorage;
    Memo1: TMemo;
@@ -38,6 +37,7 @@
    ISB1: TImageScrollBox;
    ScrollBox1: TScrollBox;
    Edit1: TEdit;
    HTTPSClient: TElHTTPSClient;
    procedure BitBtn4Click(Sender: TObject);
    procedure BitBtn1Click(Sender: TObject);
    procedure BitBtn3Click(Sender: TObject);
@@ -49,6 +49,8 @@
    procedure CheckListBox1Click(Sender: TObject);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure FormCreate(Sender: TObject);
    procedure HTTPSClientRedirection(Sender: TObject; const OldURL: string;
      var NewURL: string; var AllowRedirection: Boolean);
  private
    { Private declarations }
    OldCaseID:String;
@@ -328,7 +330,7 @@
          ISB.AntiAliased := False;
        ISB.LoadFromFile(ImageSavePath+CaseID+'\'+UseCaseID+'\'+FileList.Strings[i],1);
        DpiResize(ISB.Graphic,36);
        DpiResize(ISB.Graphic,36,False);
      end;
    end;
@@ -711,6 +713,12 @@
  Validate := True;
end;
procedure TOldCaseInfoForm.HTTPSClientRedirection(Sender: TObject;
  const OldURL: string; var NewURL: string; var AllowRedirection: Boolean);
begin
  AllowRedirection := True;
end;
procedure TOldCaseInfoForm.Panel1DblClick(Sender: TObject);
begin
  Memo1.Visible := not Memo1.Visible;