| | |
| | | procedure ImageScrollBox1NewGraphic(const Graphic: TDibGraphic); |
| | | procedure SmoothCBClick(Sender: TObject); |
| | | procedure N1Click(Sender: TObject); |
| | | procedure TreeView1MouseEnter(Sender: TObject); |
| | | procedure ScrollBox1MouseEnter(Sender: TObject); |
| | | private |
| | | { Private declarations } |
| | | HotKeyId1,HotKeyId2,HotKeyId3,HotKeyId4 :Integer; |
| | |
| | | end; |
| | | |
| | | procedure TCB_IMGPSScanX.WMMOUSEWHEEL(var message: TWMMouseWheel); |
| | | var |
| | | I: Integer; |
| | | iISB : TImageScrollBox; |
| | | begin |
| | | inherited; |
| | | //lb1.Caption:=IntToStr(message.Keys); |
| | | if (message.WheelDelta = WHEEL_DELTA) Then |
| | | begin |
| | | |
| | | if (message.WheelDelta = WHEEL_DELTA) Then begin |
| | | if Edit1.Focused then |
| | | begin |
| | | ScrollBox1.VertScrollBar.Increment := 50; |
| | | ScrollBox1.Perform(WM_VSCROLL, SB_LINEUP, 0); |
| | | end |
| | | else if DisplayISB.Focused then |
| | | begin |
| | | DisplayISB.VertScrollBar.Increment := 50; |
| | | DisplayISB.Perform(WM_VSCROLL, SB_LINEUP, 0); |
| | | end; |
| | | end else if (message.WheelDelta = -WHEEL_DELTA) then begin |
| | | if Edit1.Focused then |
| | | begin |
| | | ScrollBox1.VertScrollBar.Increment := 50; |
| | | ScrollBox1.Perform(WM_VSCROLL, SB_LINEDOWN, 0); |
| | | end |
| | | else if DisplayISB.Focused then |
| | | begin |
| | | DisplayISB.VertScrollBar.Increment := 50; |
| | | DisplayISB.Perform(WM_VSCROLL, SB_LINEDOWN, 0); |
| | | end; |
| | | if ScrollBox1.Focused then |
| | | begin |
| | | ScrollBox1.VertScrollBar.Increment := 50; |
| | | ScrollBox1.Perform(WM_VSCROLL,SB_Lineup,0); |
| | | end; |
| | | if DisplayISB <> nil then |
| | | begin |
| | | if (DisplayISB.Focused) and (message.Keys=0) then |
| | | begin |
| | | DisplayISB.VertScrollBar.Increment := 50; |
| | | DisplayISB.Perform(WM_VSCROLL,SB_Lineup,0); |
| | | end; |
| | | |
| | | if (DisplayISB.Focused) and (message.Keys=50) then |
| | | begin |
| | | DisplayISB.ZoomMode := zmPercent; |
| | | if DisplayISB.ZoomPercent < 90 then |
| | | DisplayISB.ZoomPercent := DisplayISB.ZoomPercent+10; |
| | | end; |
| | | |
| | | end; |
| | | i:=0; |
| | | while FindComponent(ISBName+inttostr(i)) <> nil do |
| | | begin |
| | | iISB := TImageScrollBox(FindComponent(ISBName+inttostr(i))); |
| | | if iISB.Focused then |
| | | begin |
| | | ScrollBox1.VertScrollBar.Increment := 50; |
| | | ScrollBox1.Perform(WM_VSCROLL,SB_Lineup,0); |
| | | end; |
| | | inc(i); |
| | | end; |
| | | |
| | | end |
| | | else if (message.WheelDelta = -WHEEL_DELTA) then |
| | | begin |
| | | |
| | | if ScrollBox1.Focused then |
| | | begin |
| | | ScrollBox1.VertScrollBar.Increment := 50; |
| | | ScrollBox1.Perform(WM_VSCROLL, SB_LINEDOWN, 0); |
| | | end; |
| | | if DisplayISB <> nil then |
| | | begin |
| | | if (DisplayISB.Focused) and (message.Keys=0) then |
| | | begin |
| | | DisplayISB.VertScrollBar.Increment := 50; |
| | | DisplayISB.Perform(WM_VSCROLL,SB_LINEDOWN,0); |
| | | end; |
| | | if (DisplayISB.Focused) and (message.Keys=50) then |
| | | begin |
| | | DisplayISB.ZoomMode := zmPercent; |
| | | if DisplayISB.ZoomPercent > 10 then |
| | | DisplayISB.ZoomPercent := DisplayISB.ZoomPercent-10; |
| | | end; |
| | | |
| | | |
| | | end; |
| | | |
| | | i:=0; |
| | | while FindComponent(ISBName+inttostr(i)) <> nil do |
| | | begin |
| | | iISB := TImageScrollBox(FindComponent(ISBName+inttostr(i))); |
| | | if iISB.Focused then |
| | | begin |
| | | ScrollBox1.VertScrollBar.Increment := 50; |
| | | ScrollBox1.Perform(WM_VSCROLL,SB_Lineup,0); |
| | | end; |
| | | inc(i); |
| | | end; |
| | | |
| | | end; |
| | | |
| | | |
| | | end; |
| | | |
| | | procedure TCB_IMGPSScanX.WNoteBtnClick(Sender: TObject); |
| | |
| | | |
| | | procedure TCB_IMGPSScanX.ISB1Enter(Sender: TObject); |
| | | begin |
| | | //ISB1.SetFocus; |
| | | ISB1.SetFocus; |
| | | end; |
| | | |
| | | procedure TCB_IMGPSScanX.ISB1ImageMouseDown(Sender: TObject; Button: TMouseButton; |
| | |
| | | p : Integer; |
| | | begin |
| | | DisplayISB := TImageScrollBox(Sender); |
| | | DisplayISB.SetFocus; |
| | | if NowClick<>0 then |
| | | DisplayISB.SetFocus; |
| | | Shape1.Left := TPanel(TImageScrollBox(Sender).Parent).Left - Seg; |
| | | Shape1.Top := TPanel(TImageScrollBox(Sender).Parent).Top - Seg; |
| | | P := strtoint(copy(DisplayISB.Name,4,1)) + ScrollBar1.Position-2; |
| | |
| | | begin |
| | | //Edit1.SetFocus; |
| | | //TImageScrollBox(Sender).SetFocus; |
| | | |
| | | if TImageScrollBox(Sender).FileName = '' then |
| | | begin |
| | | //ShowMessage('AAA'); |
| | | Label3.Caption:='FileName='+TImageScrollBox(Sender).FileName+' time='+FormatDateTime('yyyy/mm/dd HH:MM:SS', now); |
| | | TImageScrollBox(Sender).MouseMode := mmUser |
| | | end |
| | | Else |
| | | begin |
| | | Label3.Caption:='FileName='+TImageScrollBox(Sender).FileName; |
| | | ViewMouseMode(NowClick); |
| | | end; |
| | | |
| | | ISB1.AlwaysShowAnnotations := False; |
| | | |
| | | // if TImageScrollBox(Sender).FileName = '' then |
| | | // begin |
| | | ////ShowMessage('AAA'); |
| | | //Label3.Caption:='FileName='+TImageScrollBox(Sender).FileName+' time='+FormatDateTime('yyyy/mm/dd HH:MM:SS', now); |
| | | // TImageScrollBox(Sender).MouseMode := mmUser |
| | | // end |
| | | // Else |
| | | // begin |
| | | //Label3.Caption:='FileName='+TImageScrollBox(Sender).FileName; |
| | | // ViewMouseMode(NowClick); |
| | | // end; |
| | | end; |
| | | |
| | | procedure TCB_IMGPSScanX.ISB1ImageMouseUp(Sender: TObject; Button: TMouseButton; |
| | |
| | | end; |
| | | ShowText := _Msg('歸類中,請稍侯'); |
| | | DataLoading(True,True); |
| | | |
| | | //ShowMessage('NowDocDir='+NowDocDir); |
| | | FormIDReplace(NowCaseNo,NowDocDir,NowFormCode,NewFormID); |
| | | |
| | | end; |
| | |
| | | view_image_FormCode(DisplayPath,NowFormCode,ScrollBar1.Position,1); |
| | | end; |
| | | |
| | | end; |
| | | |
| | | procedure TCB_IMGPSScanX.ScrollBox1MouseEnter(Sender: TObject); |
| | | begin |
| | | ScrollBox1.SetFocus; |
| | | end; |
| | | |
| | | procedure TCB_IMGPSScanX.SelectScanBtnClick(Sender: TObject); |
| | |
| | | Function TCB_IMGPSScanX.CheckCaseDocNoPage(CaseID,DocNo,Version:String;Pages:Integer):Integer; //取案件裡的文件_版本頁數 |
| | | var |
| | | i,n,Count : integer; |
| | | S : TStringlist; |
| | | S, S2 : TStringlist; |
| | | FormCode,iPage : String; |
| | | docInt,tempInt:integer; |
| | | v,v2:integer; |
| | | begin |
| | | Count := 0; |
| | | docInt:=0; |
| | | tempInt:=0; |
| | | S := TStringlist.Create; |
| | | S2 := TStringlist.Create; |
| | | try |
| | | S.LoadFromFile(ImageSavePath+CaseID+'\upload\Context.dat'); |
| | | S2.LoadFromFile(ImageSavePath+CaseID+'\upload\DocDir.dat'); //2017 1220 改成只承認第一份的 |
| | | for I := 1 to pages do //從0到pages-1 改成 1到pages 20170316 這樣可以修改檢核的頁數問題 |
| | | begin |
| | | iPage := Add_Zoo(i,2); |
| | |
| | | Continue; |
| | | end; |
| | | end; |
| | | if Length(S2.Strings[n])>8 then //2017 1220 改成只承認第一份的 |
| | | begin |
| | | v:=Pos('(',S2.Strings[n]); |
| | | v2:=Pos(')',S2.Strings[n]); |
| | | tempInt:=StrToInt(Copy(S2.Strings[n],v+1,v2-v-1)); |
| | | |
| | | if docInt=0 then |
| | | begin |
| | | docInt:=tempInt; |
| | | end; |
| | | |
| | | if docInt<>tempInt then |
| | | begin |
| | | Break |
| | | end; |
| | | end; |
| | | |
| | | FormCode := FileName2FormCode(S.Strings[n]); |
| | | //Showmessage('1:'+version+','+FormCode2Version(FormCode)+','+DocNo+','+FormCode2DocNo(FormCode)+','+iPage+','+FormCode2Page(FormCode)); |
| | | LogFile1.LogToFile(logTimeString+'CheckCaseDocNoPage caseno='+CaseID+','+version+','+FormCode2Version(FormCode)+','+DocNo+','+FormCode2DocNo(FormCode)+','+iPage+','+FormCode2Page(FormCode)); |
| | |
| | | end; |
| | | finally |
| | | S.Free; |
| | | S2.free; |
| | | end; |
| | | Result := Count; |
| | | end; |
| | |
| | | NewDocNo := FormCode2DocNo(NewFormID); |
| | | NewDocDir := FindLastestDocDir(CaseID,NewDocNo); |
| | | if NewDocDir = '' then |
| | | NewDocDir := NewDocNo; |
| | | begin |
| | | if DocNoNeedDiv(NewDocNo) then |
| | | begin |
| | | NewDocDir:=DocNo2DocNoDir(ImageSavePath + NowCaseno+'\',NewDocNo); |
| | | end |
| | | else |
| | | begin |
| | | NewDocDir := NewDocNo; |
| | | end; |
| | | end; |
| | | //ShowMessage('NewDocDir='+NewDocDir); |
| | | if DocNoNeedDiv(NewDocNo) and (FormCode2Page(NewFormID)='01') then |
| | | begin |
| | |
| | | MainFormPage := GetDataDocNoPage(MainDocNo,MainVersion); //資料庫記錄主文件頁數 |
| | | CaseFormPage := CheckCaseDocNoPage(CaseID,MainDocNo,MainVersion,MainFormPage); //案件主文件的頁數 |
| | | LogFile1.LogToFile(logTimeString+CaseID+',MainDocNo='+MainDocNo+',MainVersion='+MainVersion+',MainFormPage='+IntToStr(MainFormPage)+',CaseFormPage='+IntToStr(CaseFormPage)); |
| | | //CheckFirstDocNoPage |
| | | IF (MainFormPage > 0) and (MainFormPage <> CaseFormPage) then |
| | | begin |
| | | ErrStr:=MainDocNo+Format(OMRErrInfo[1].Info,[Inttostr(MainFormPage),Inttostr(CaseFormPage)]); //主要文件需有XX頁僅附XX頁 |
| | |
| | | Procedure TCB_IMGPSScanX.ISBMouseMove(Sender: TObject; Shift: TShiftState; |
| | | X, Y: Integer); |
| | | begin |
| | | Edit1.SetFocus; |
| | | //Edit1.SetFocus; |
| | | if Draging then |
| | | begin |
| | | if not (TShape(FindComponent('SP'+Copy(TImageScrollBox(Sender).Name,length(ISBName)+1,length(TImageScrollBox(Sender).Name)-length(ISBName)))) = nil) then |
| | |
| | | |
| | | end; |
| | | |
| | | procedure TCB_IMGPSScanX.TreeView1MouseEnter(Sender: TObject); |
| | | begin |
| | | TreeView1.SetFocus; |
| | | end; |
| | | |
| | | procedure TCB_IMGPSScanX.TreeView1MouseMove(Sender: TObject; Shift: TShiftState; |
| | | X, Y: Integer); |
| | | begin |
| | | TreeView1.SetFocus; |
| | | //TreeView1.SetFocus; |
| | | {UnRegisterHotKey(Handle, HotKeyId1); |
| | | UnRegisterHotKey(Handle, HotKeyId2); } |
| | | end; |