Ignore:
Timestamp:
May 19, 2015, 11:33:02 PM (9 years ago)
Author:
chronos
Message:
  • Added: Log form to show history of object. Implemented for Subversion partialy.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormBrowse.pas

    r10 r11  
    77uses
    88  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls,
    9   ExtCtrls, Menus, ActnList, UFindFile;
     9  ExtCtrls, Menus, ActnList, UFindFile, UVCS;
    1010
    1111type
     
    1515  TFormBrowse = class(TForm)
    1616    AAdd: TAction;
     17    ALogShow: TAction;
    1718    AOpen: TAction;
    1819    AProperties: TAction;
     
    2829    MenuItem5: TMenuItem;
    2930    MenuItem6: TMenuItem;
     31    MenuItem7: TMenuItem;
    3032    PopupMenu1: TPopupMenu;
    3133    Splitter1: TSplitter;
     
    3335    procedure AAddExecute(Sender: TObject);
    3436    procedure ADeleteExecute(Sender: TObject);
     37    procedure ALogShowExecute(Sender: TObject);
    3538    procedure AOpenExecute(Sender: TObject);
    3639    procedure ARenameExecute(Sender: TObject);
    3740    procedure FormCreate(Sender: TObject);
    3841    procedure FormDestroy(Sender: TObject);
     42    procedure FormShow(Sender: TObject);
    3943    procedure ListView1Data(Sender: TObject; Item: TListItem);
    4044    procedure ListView1DblClick(Sender: TObject);
     45    procedure ListView1SelectItem(Sender: TObject; Item: TListItem;
     46      Selected: Boolean);
    4147  private
    4248    FileList: TStringList;
     
    5359
    5460uses
    55   UCore;
     61  UCore, UFormLog;
    5662
    5763{$R *.lfm}
     
    7177end;
    7278
     79procedure TFormBrowse.ListView1SelectItem(Sender: TObject; Item: TListItem;
     80  Selected: Boolean);
     81begin
     82  UpdateInterface;
     83end;
     84
    7385procedure TFormBrowse.ADeleteExecute(Sender: TObject);
    7486begin
    7587
     88end;
     89
     90procedure TFormBrowse.ALogShowExecute(Sender: TObject);
     91begin
     92  FormLog.FileName := Directory + DirectorySeparator + ListView1.Selected.Caption;
     93  FormLog.ShowModal;
    7694end;
    7795
     
    114132end;
    115133
     134procedure TFormBrowse.FormShow(Sender: TObject);
     135begin
     136  UpdateInterface;
     137end;
     138
    116139procedure TFormBrowse.ReloadList;
    117140var
     
    145168  ARename.Enabled := Assigned(ListView1.Selected);
    146169  AProperties.Enabled := Assigned(ListView1.Selected);
     170  AOpen.Enabled := Assigned(ListView1.Selected);
     171  ALogShow.Enabled := Assigned(ListView1.Selected);
    147172end;
    148173
Note: See TracChangeset for help on using the changeset viewer.