Changeset 11 for trunk/Forms


Ignore:
Timestamp:
May 19, 2015, 11:33:02 PM (10 years ago)
Author:
chronos
Message:
  • Added: Log form to show history of object. Implemented for Subversion partialy.
Location:
trunk/Forms
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormBrowse.lfm

    r10 r11  
    99  OnCreate = FormCreate
    1010  OnDestroy = FormDestroy
     11  OnShow = FormShow
    1112  LCLVersion = '1.5'
    1213  object TreeView1: TTreeView
     
    6162    OnData = ListView1Data
    6263    OnDblClick = AOpenExecute
     64    OnSelectItem = ListView1SelectItem
    6365  end
    6466  object PopupMenu1: TPopupMenu
     
    8385    object MenuItem6: TMenuItem
    8486      Action = AOpen
     87    end
     88    object MenuItem7: TMenuItem
     89      Action = ALogShow
    8590    end
    8691  end
     
    111116      OnExecute = AOpenExecute
    112117    end
     118    object ALogShow: TAction
     119      Caption = 'Show log'
     120      OnExecute = ALogShowExecute
     121    end
    113122  end
    114123end
  • 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.