Produced by Araxis Merge on 9/25/2018 2:12:58 PM Central Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
# | Location | File | Last Modified |
---|---|---|---|
1 | build 3.zip\build 3\MHLTH_YS_137_Source\Delphi\MHA | fMHA_Update.pas | Thu Sep 6 11:30:22 2018 UTC |
2 | build 3.zip\build 3\MHLTH_YS_137_Source\Delphi\MHA | fMHA_Update.pas | Wed Sep 12 16:02:03 2018 UTC |
Description | Between Files 1 and 2 |
|
---|---|---|
Text Blocks | Lines | |
Unchanged | 2 | 310 |
Changed | 1 | 2 |
Inserted | 0 | 0 |
Removed | 0 | 0 |
Whitespace | |
---|---|
Character case | Differences in character case are significant |
Line endings | Differences in line endings (CR and LF characters) are ignored |
CR/LF characters | Not shown in the comparison detail |
No regular expressions were active.
1 | unit fMHA_ Update; | |
2 | ||
3 | interface | |
4 | ||
5 | uses | |
6 | Windows, | |
7 | Messages , | |
8 | SysUtils , | |
9 | DateUtil s, | |
10 | Variants , | |
11 | Classes, | |
12 | Graphics , | |
13 | Controls , | |
14 | Forms, | |
15 | Dialogs, | |
16 | IpUtils, | |
17 | IpSock, | |
18 | IpFtp, | |
19 | StdCtrls ; | |
20 | ||
21 | type | |
22 | TfrmMHA_ Update = c lass(TForm ) | |
23 | IpFtpC lient1: TI pFtpClient ; | |
24 | ReplyM emo: TMemo ; | |
25 | Button 1: TButton ; | |
26 | Button 2: TButton ; | |
27 | Button 3: TButton ; | |
28 | proced ure IpFtpC lient1FtpS tatus(Send er: TObjec t; | |
29 | Stat usCode: TI pFtpStatus Code; cons t Info: st ring); | |
30 | proced ure IpFtpC lient1FtpR eply(Sende r: TObject ; ReplyCod e: Integer ; | |
31 | cons t Reply: s tring); | |
32 | proced ure IpFtpC lient1FtpE rror(Sende r: TObject ; ErrorCod e: Integer ; | |
33 | cons t Error: s tring); | |
34 | proced ure FormCl ose(Sender : TObject; var Actio n: TCloseA ction); | |
35 | proced ure Button 3Click(Sen der: TObje ct); | |
36 | proced ure Button 2Click(Sen der: TObje ct); | |
37 | proced ure Button 1Click(Sen der: TObje ct); | |
38 | proced ure FormCr eate(Sende r: TObject ); | |
39 | private | |
40 | { Priv ate declar ations } | |
41 | public | |
42 | { Publ ic declara tions } | |
43 | proced ure CheckF orUpdates; | |
44 | end; | |
45 | ||
46 | var | |
47 | frmMHA_U pdate : TfrmMHA_ Update; | |
48 | ||
49 | implementa tion | |
50 | ||
51 | {$R *.dfm} | |
52 | ||
53 | uses | |
54 | uMHA_Con st; | |
55 | ||
56 | var | |
57 | lvTempDa te : TDate Time; | |
58 | ||
59 | ||
60 | procedure TfrmMHA_Up date.FormC reate(Send er: TObjec t); | |
61 | begin | |
62 | CheckFor Updates; | |
63 | showmoda l; | |
64 | end; | |
65 | ||
66 | procedure TfrmMHA_Up date.Check ForUpdates ; | |
67 | // Check f or updates every wee k | |
68 | ||
69 | begin | |
70 | lvTempDa te := gvUp date; | |
71 | // ShowMe ssage('cur rent serie s ' + gvUp dateSeries + #13 + | |
72 | // date tostr(gvUp date) + #1 3+ | |
73 | // 'Day s between ' + inttos tr(DaysBet ween(strto date('04/0 1/2009'), gvUpdate)) ); | |
74 | ||
75 | if DaysB etween(str todate('04 /01/2009') , gvUpdate ) > 6 then | |
76 | begin | |
77 | IpFt pClient1.P assiveMode := True; | |
78 | IpFtpClien t1.Login(' ftp. DNS . URL ', | |
79 | 'a nonymous', '', ''); | |
80 | IpFt pClient1.F ileType := ftAscii; | |
81 | IpFt pClient1.T ransferTim eout := 10 92; | |
82 | ||
83 | //Sl eep(10000) ; {- 10 se conds -} | |
84 | ||
85 | end; | |
86 | ||
87 | end; | |
88 | ||
89 | procedure TfrmMHA_Up date.IpFtp Client1Ftp Status(Sen der: TObje ct; | |
90 | StatusCo de: TIpFtp StatusCode ; const In fo: string ); | |
91 | begin | |
92 | case Sta tusCode of | |
93 | fscLog in: Button 3Click(Sen der); | |
94 | ||
95 | fscCur rentDir: B utton1Clic k(Sender); | |
96 | fscTra nsferOK: B utton2Clic k(Sender); | |
97 | ||
98 | // fscC lose : Caption := 'Close' ; | |
99 | // fscO pen : Caption := ' conne cted to ' + IpFtpCli ent1.Serve rAddress; | |
100 | // fscC omplete : if (Mult iFileOp = mfoDelete) then | |
101 | // Delete Next; | |
102 | // fscC urrentDir : Caption := Info; | |
103 | // fscL ogin : Caption := IpFtpCl ient1.User Name + ' l ogged on t o ' + IpFt pClient1.S erverAddre ss; | |
104 | // fscL ogout : Caption := IpFtpCl ient1.User Name + ' l ogged out' ; | |
105 | // fscD irList : ReplyMem o.Lines.Ad d(Info); | |
106 | // fscP rogress : Caption := IntToSt r(IpFtpCli ent1.Bytes Transferre d) + ' byt es Transfe rred'; | |
107 | // fscT ransferOK : begin | |
108 | // Captio n := IntTo Str(IpFtpC lient1.Byt esTransfer red) + ' - transfer complete'; | |
109 | //if (Mu ltiFileOp = mfoRetri eve) then | |
110 | // Retr ieveNext; | |
111 | / / end; | |
112 | fscTim eout: Show Message('T ransfer ti med out'); | |
113 | end; | |
114 | end; | |
115 | ||
116 | procedure TfrmMHA_Up date.IpFtp Client1Ftp Reply(Send er: TObjec t; ReplyCo de: Intege r; | |
117 | const Re ply: strin g); | |
118 | begin | |
119 | ReplyMem o.Lines.Ad d(Reply); | |
120 | end; | |
121 | ||
122 | ||
123 | procedure TfrmMHA_Up date.IpFtp Client1Ftp Error(Send er: TObjec t; ErrorCo de: Intege r; | |
124 | const Er ror: strin g); | |
125 | begin | |
126 | MessageD lg(Error, mtError, [ mbOK], 0); | |
127 | Screen.C ursor := c rDefault; | |
128 | end; | |
129 | ||
130 | procedure TfrmMHA_Up date.FormC lose(Sende r: TObject ; var Acti on: TClose Action); | |
131 | begin | |
132 | IpFtpCli ent1.Logou t; | |
133 | end; | |
134 | ||
135 | procedure TfrmMHA_Up date.Butto n3Click(Se nder: TObj ect); | |
136 | begin | |
137 | IpFtpCli ent1.Chang eDir('ANON YMOUS'); | |
138 | end; | |
139 | ||
140 | procedure TfrmMHA_Up date.Butto n2Click(Se nder: TObj ect); | |
141 | begin | |
142 | gvUpdate := IncDay (lvTempDat e, 7); | |
143 | Close; | |
144 | end; | |
145 | ||
146 | procedure TfrmMHA_Up date.Butto n1Click(Se nder: TObj ect); | |
147 | begin | |
148 | IpFtpCli ent1.Retri eve('\YS_M HA.TXT;1', | |
149 | 'C:\Pr ojects\Pat ch 101 MHA 3 D7\' + ' YS_MHA.TXT ', | |
150 | TIpFtp RetrieveMo de(1), 0); | |
151 | end; | |
152 | ||
153 | ||
154 | ||
155 | end. | |
156 |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.