Changeset 10 for trunk/Forms


Ignore:
Timestamp:
May 19, 2015, 10:32:51 PM (9 years ago)
Author:
chronos
Message:
  • Added: CVS backend skeleton.
Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore
      •  

        old new  
        22VCSCommander
        33VCSCommander.lps
         4Config.xml
         5heaptrclog.trc
  • trunk/Forms/UFormBrowse.lfm

    r8 r10  
    9191    object AAdd: TAction
    9292      Caption = 'Add'
     93      OnExecute = AAddExecute
    9394    end
    9495    object ADelete: TAction
     
    9899    object ARename: TAction
    99100      Caption = 'Rename'
     101      OnExecute = ARenameExecute
    100102    end
    101103    object AUpdate: TAction
  • trunk/Forms/UFormBrowse.pas

    r8 r10  
    3131    Splitter1: TSplitter;
    3232    TreeView1: TTreeView;
     33    procedure AAddExecute(Sender: TObject);
    3334    procedure ADeleteExecute(Sender: TObject);
    3435    procedure AOpenExecute(Sender: TObject);
     36    procedure ARenameExecute(Sender: TObject);
    3537    procedure FormCreate(Sender: TObject);
    3638    procedure FormDestroy(Sender: TObject);
     
    4244    Directory: string;
    4345    procedure ReloadList;
     46    procedure UpdateInterface;
    4447  end;
    4548
     
    4851
    4952implementation
     53
     54uses
     55  UCore;
    5056
    5157{$R *.lfm}
     
    7076end;
    7177
     78procedure TFormBrowse.AAddExecute(Sender: TObject);
     79begin
     80  Core.Project.WorkingCopy.Add(Directory + DirectorySeparator + ListView1.Selected.Caption);
     81end;
     82
    7283procedure TFormBrowse.AOpenExecute(Sender: TObject);
    7384begin
     
    8394    end;
    8495  end;
     96end;
     97
     98procedure TFormBrowse.ARenameExecute(Sender: TObject);
     99var
     100  NewName: string;
     101begin
     102  if InputQuery('Rename', 'Enter new name', NewName) then
     103    Core.Project.WorkingCopy.Move(Directory + DirectorySeparator + ListView1.Selected.Caption, NewName);
    85104end;
    86105
     
    120139end;
    121140
     141procedure TFormBrowse.UpdateInterface;
     142begin
     143  AAdd.Enabled := Assigned(ListView1.Selected);
     144  ADelete.Enabled := Assigned(ListView1.Selected);
     145  ARename.Enabled := Assigned(ListView1.Selected);
     146  AProperties.Enabled := Assigned(ListView1.Selected);
     147end;
     148
    122149end.
    123150
Note: See TracChangeset for help on using the changeset viewer.