home *** CD-ROM | disk | FTP | other *** search
- unit RefsDlg;
-
- interface
-
- uses
- Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
- ComCtrls, StdCtrls, ExtCtrls;
-
- type
- TdlgRefs = class(TForm)
- Panel2: TPanel;
- Panel8: TPanel;
- bOK: TButton;
- Panel1: TPanel;
- PageControl1: TPageControl;
- tsRefs: TTabSheet;
- Panel3: TPanel;
- lv: TListView;
- RefsPanel: TPanel;
- private
- FImageName: string;
- FRefList: string;
- public
- property Imagename: string read FImageName write FImageName;
- property RefList: string read FRefList write FRefList;
- procedure Refresh;
- end;
-
- procedure ShowRefsDlg(AImagename,ARefList: string);
-
- var
- dlgRefs: TdlgRefs;
-
- implementation
-
- {$R *.DFM}
-
- procedure ShowRefsDlg(AImagename,ARefList: string);
- begin
- with TdlgRefs.Create(Application.MainForm) do begin
- ImageName:=AImageName;
- RefList:=ARefList;
- Refresh;
- ShowModal;
- Free;
- end;
- end;
-
- { TdlgRefs }
-
- procedure TdlgRefs.Refresh;
- var
- p: integer;
- s: string;
- begin
- Caption:=ImageName;
- with lv, Items do begin
- Clear;
- BeginUpdate;
- p:=Pos(',',RefList);
- while p>0 do begin
- s:=Copy(RefList,1,p-1);
- with Add do begin
- Caption:=ExtractFilename(s);
- SubItems.Add(ExtractFilePath(s));
- end;
- Reflist:=Copy(Reflist,p+1,1023);
- p:=Pos(',',RefList);
- end;
- EndUpdate;
- end;
- Refspanel.Caption:=Format('%d processes',[lv.Items.Count]);
- end;
-
- end.
-