Changeset 11 for trunk/Forms
- Timestamp:
- May 19, 2015, 11:33:02 PM (10 years ago)
- Location:
- trunk/Forms
- Files:
-
- 2 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormBrowse.lfm
r10 r11 9 9 OnCreate = FormCreate 10 10 OnDestroy = FormDestroy 11 OnShow = FormShow 11 12 LCLVersion = '1.5' 12 13 object TreeView1: TTreeView … … 61 62 OnData = ListView1Data 62 63 OnDblClick = AOpenExecute 64 OnSelectItem = ListView1SelectItem 63 65 end 64 66 object PopupMenu1: TPopupMenu … … 83 85 object MenuItem6: TMenuItem 84 86 Action = AOpen 87 end 88 object MenuItem7: TMenuItem 89 Action = ALogShow 85 90 end 86 91 end … … 111 116 OnExecute = AOpenExecute 112 117 end 118 object ALogShow: TAction 119 Caption = 'Show log' 120 OnExecute = ALogShowExecute 121 end 113 122 end 114 123 end -
trunk/Forms/UFormBrowse.pas
r10 r11 7 7 uses 8 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls, 9 ExtCtrls, Menus, ActnList, UFindFile ;9 ExtCtrls, Menus, ActnList, UFindFile, UVCS; 10 10 11 11 type … … 15 15 TFormBrowse = class(TForm) 16 16 AAdd: TAction; 17 ALogShow: TAction; 17 18 AOpen: TAction; 18 19 AProperties: TAction; … … 28 29 MenuItem5: TMenuItem; 29 30 MenuItem6: TMenuItem; 31 MenuItem7: TMenuItem; 30 32 PopupMenu1: TPopupMenu; 31 33 Splitter1: TSplitter; … … 33 35 procedure AAddExecute(Sender: TObject); 34 36 procedure ADeleteExecute(Sender: TObject); 37 procedure ALogShowExecute(Sender: TObject); 35 38 procedure AOpenExecute(Sender: TObject); 36 39 procedure ARenameExecute(Sender: TObject); 37 40 procedure FormCreate(Sender: TObject); 38 41 procedure FormDestroy(Sender: TObject); 42 procedure FormShow(Sender: TObject); 39 43 procedure ListView1Data(Sender: TObject; Item: TListItem); 40 44 procedure ListView1DblClick(Sender: TObject); 45 procedure ListView1SelectItem(Sender: TObject; Item: TListItem; 46 Selected: Boolean); 41 47 private 42 48 FileList: TStringList; … … 53 59 54 60 uses 55 UCore ;61 UCore, UFormLog; 56 62 57 63 {$R *.lfm} … … 71 77 end; 72 78 79 procedure TFormBrowse.ListView1SelectItem(Sender: TObject; Item: TListItem; 80 Selected: Boolean); 81 begin 82 UpdateInterface; 83 end; 84 73 85 procedure TFormBrowse.ADeleteExecute(Sender: TObject); 74 86 begin 75 87 88 end; 89 90 procedure TFormBrowse.ALogShowExecute(Sender: TObject); 91 begin 92 FormLog.FileName := Directory + DirectorySeparator + ListView1.Selected.Caption; 93 FormLog.ShowModal; 76 94 end; 77 95 … … 114 132 end; 115 133 134 procedure TFormBrowse.FormShow(Sender: TObject); 135 begin 136 UpdateInterface; 137 end; 138 116 139 procedure TFormBrowse.ReloadList; 117 140 var … … 145 168 ARename.Enabled := Assigned(ListView1.Selected); 146 169 AProperties.Enabled := Assigned(ListView1.Selected); 170 AOpen.Enabled := Assigned(ListView1.Selected); 171 ALogShow.Enabled := Assigned(ListView1.Selected); 147 172 end; 148 173
Note:
See TracChangeset
for help on using the changeset viewer.