Changeset 7 for trunk/Forms
- Timestamp:
- May 17, 2015, 10:51:50 PM (10 years ago)
- Location:
- trunk/Forms
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormBrowse.lfm
r6 r7 14 14 Width = 241 15 15 Align = alLeft 16 DefaultItemHeight = 2 416 DefaultItemHeight = 28 17 17 TabOrder = 0 18 18 end … … 51 51 end> 52 52 OwnerData = True 53 PopupMenu = PopupMenu1 53 54 ReadOnly = True 54 55 RowSelect = True 56 SmallImages = Core.ImageList1 55 57 TabOrder = 2 56 58 ViewStyle = vsReport 57 59 OnData = ListView1Data 60 OnDblClick = AOpenExecute 61 end 62 object PopupMenu1: TPopupMenu 63 Images = Core.ImageList1 64 left = 353 65 top = 131 66 object MenuItem1: TMenuItem 67 Action = AAdd 68 end 69 object MenuItem2: TMenuItem 70 Action = ADelete 71 end 72 object MenuItem3: TMenuItem 73 Action = ARename 74 end 75 object MenuItem4: TMenuItem 76 Action = AUpdate 77 end 78 object MenuItem5: TMenuItem 79 Action = AProperties 80 end 81 object MenuItem6: TMenuItem 82 Action = AOpen 83 end 84 end 85 object ActionList1: TActionList 86 Images = Core.ImageList1 87 left = 352 88 top = 208 89 object AAdd: TAction 90 Caption = 'Add' 91 end 92 object ADelete: TAction 93 Caption = 'Delete' 94 OnExecute = ADeleteExecute 95 end 96 object ARename: TAction 97 Caption = 'Rename' 98 end 99 object AUpdate: TAction 100 Caption = 'Update' 101 end 102 object AProperties: TAction 103 Caption = 'Properties' 104 end 105 object AOpen: TAction 106 Caption = 'Open' 107 OnExecute = AOpenExecute 108 end 58 109 end 59 110 end -
trunk/Forms/UFormBrowse.pas
r6 r7 7 7 uses 8 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls, 9 ExtCtrls, UFindFile;9 ExtCtrls, Menus, ActnList, UFindFile; 10 10 11 11 type … … 14 14 15 15 TFormBrowse = class(TForm) 16 AAdd: TAction; 17 AOpen: TAction; 18 AProperties: TAction; 19 AUpdate: TAction; 20 ARename: TAction; 21 ADelete: TAction; 22 ActionList1: TActionList; 16 23 ListView1: TListView; 24 MenuItem1: TMenuItem; 25 MenuItem2: TMenuItem; 26 MenuItem3: TMenuItem; 27 MenuItem4: TMenuItem; 28 MenuItem5: TMenuItem; 29 MenuItem6: TMenuItem; 30 PopupMenu1: TPopupMenu; 17 31 Splitter1: TSplitter; 18 32 TreeView1: TTreeView; 33 procedure ADeleteExecute(Sender: TObject); 34 procedure AOpenExecute(Sender: TObject); 19 35 procedure ListView1Data(Sender: TObject; Item: TListItem); 36 procedure ListView1DblClick(Sender: TObject); 20 37 private 21 38 FileList: TStringList; … … 41 58 end; 42 59 60 procedure TFormBrowse.ListView1DblClick(Sender: TObject); 61 begin 62 63 end; 64 65 procedure TFormBrowse.ADeleteExecute(Sender: TObject); 66 begin 67 68 end; 69 70 procedure TFormBrowse.AOpenExecute(Sender: TObject); 71 begin 72 if Assigned(ListView1.Selected) then 73 with ListView1.Selected do begin 74 if Caption = '..' then begin 75 Directory := ExtractFileDir(Directory); 76 ReloadList; 77 end else 78 if DirectoryExistsUTF8(Directory + DirectorySeparator + Caption) then begin 79 Directory := Directory + DirectorySeparator + ListView1.Selected.Caption; 80 ReloadList; 81 end; 82 end; 83 end; 84 43 85 procedure TFormBrowse.ReloadList; 44 86 var … … 48 90 FindFile := TFindFile.Create(nil); 49 91 FindFile.Path := Directory; 50 FindFile.FileMask := '*.*';92 FindFile.FileMask := AllFilesMask; 51 93 FindFile.InSubFolders := False; 52 94 FileList := FindFile.SearchForFiles; 53 95 for I := FileList.Count - 1 downto 0 do 54 96 if ExtractFileName(FileList[I]) = '.' then FileList.Delete(I); 97 FileList.Sort; 55 98 ListView1.Items.Count := FileList.Count; 56 99 ListView1.Refresh; -
trunk/Forms/UFormSettings.lfm
r3 r7 7 7 ClientHeight = 497 8 8 ClientWidth = 686 9 LCLVersion = '1. 1'10 object Button 1: TButton9 LCLVersion = '1.5' 10 object ButtonCancel: TButton 11 11 Left = 592 12 12 Height = 25 13 13 Top = 464 14 14 Width = 75 15 Caption = 'Button1' 15 Caption = 'Cancel' 16 ModalResult = 2 16 17 TabOrder = 0 17 18 end 18 object Button 2: TButton19 object ButtonOk: TButton 19 20 Left = 496 20 21 Height = 25 21 22 Top = 464 22 23 Width = 75 23 Caption = 'Button2' 24 Caption = 'Ok' 25 ModalResult = 1 24 26 TabOrder = 1 25 27 end -
trunk/Forms/UFormSettings.pas
r3 r7 13 13 14 14 TFormSettings = class(TForm) 15 Button 1: TButton;16 Button 2: TButton;15 ButtonCancel: TButton; 16 ButtonOk: TButton; 17 17 private 18 18 { private declarations }
Note:
See TracChangeset
for help on using the changeset viewer.