Changeset 3 for trunk/UOptions.pas
- Timestamp:
- Feb 2, 2011, 2:14:37 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:ignore
-
old new 1 1 lib 2 2 FreePascalManager.exe 3 SourceList.xml 4 Config.xml
-
- Property svn:ignore
-
trunk/UOptions.pas
r2 r3 7 7 uses 8 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, 9 ComCtrls ;9 ComCtrls, DOM, XMLWrite, XMLRead, HTTPSend; 10 10 11 11 type … … 14 14 15 15 TOptionsForm = class(TForm) 16 ButtonUpdateSource: TButton; 16 17 ButtonCancel: TButton; 17 18 ButtonOk: TButton; … … 20 21 ListView1: TListView; 21 22 ListView2: TListView; 23 procedure ButtonUpdateSourceClick(Sender: TObject); 22 24 private 23 { private declarations }25 procedure ReloadList; 24 26 public 25 27 { public declarations } … … 33 35 {$R *.lfm} 34 36 37 uses 38 UMainForm; 39 40 { TOptionsForm } 41 42 procedure TOptionsForm.ButtonUpdateSourceClick(Sender: TObject); 43 var 44 fs: TFileStream; 45 begin 46 fs := TFileStream.Create(ExtractFileName(SourceURL), fmOpenWrite or fmCreate); 47 try 48 HttpGetBinary(SourceURL, fs); 49 finally 50 fs.Free; 51 end; 52 MainForm.Sources.UpdateFormFile(ExtractFileName(SourceURL)); 53 ReloadList; 54 end; 55 56 procedure TOptionsForm.ReloadList; 57 begin 58 ListView1.Items.Count := MainForm.Sources.Count; 59 ListView1.Refresh; 60 end; 61 35 62 end. 36 63
Note:
See TracChangeset
for help on using the changeset viewer.