L
liu55721
Unregistered / Unconfirmed
GUEST, unregistred user!
该程序很大,只摘要了与问题相关的一段中的几句:
type
TMainForm = class(TForm)
ClientPageCtrl: TPageControl;
ShareTabSheet: TTabSheet;
LanTree: TListView;
FindListView: TListView;
.
.
type
PMyTreeItem = ^TMyTreeItem;
TMyTreeItem = record
DirName,Group: string;
TabIndex: integer;
MyClientListView:TListView;
MyRightListItem:TListItem;
end;
type
PListItem = ^TMyListItem;
TMyListItem = record
index,count: integer;
PrevDirItem, NextDirItem, UpDirItem: TListItem;
end;
.
.
var
MainForm : TMainForm;
CurDirName,CurGroupName:string;
CurListView: TListView;
CurDirItem: TListItem;
{$R *.DFM}
.
.
procedure TMainForm.MyListViewClick(Sender: TObject);
var
ListItemPtr : PListItem;
ListItem : Tlistitem;
begin
if pMyTreeItem(LanTree.Selected.Data)^.TabIndex <> 0 then
begin
ClientPageCtrl.ActivePageIndex := pMyTreeItem(LanTree.Selected.Data)^.tabindex;
CurListView:=pMyTreeItem(LanTree.Selected.data)^.MyClientListView;
AddCap(pMyTreeItem(LanTree.Selected.Data)^.Group,pMyTreeItem(LanTree.Selected.Data)^.DirName);
//addcap是一个返回字符串的自定义函数;
ListItem := pMyTreeItem(LanTree.Selected.Data)^.MyRightListItem;
if CurDirItem <> nil
then PListItem(CurDirItem.Data)^.NextDirItem := ListItem;
ListItemPtr := PListItem(ListItem.Data);
ListItemPtr^.PrevDirItem := CurDirItem;
CurDirItem := ListItem;
end
请问CurListView:=pMyTreeItem(LanTree.Selected.data)^.MyClientListView;和PListItem(CurDirItem.Data)^.NextDirItem := ListItem;是什么意思?
CurDirItem.Data、LanTree.Selected.Data在句子中是什么元素?它们扮演了什么角色?
type
TMainForm = class(TForm)
ClientPageCtrl: TPageControl;
ShareTabSheet: TTabSheet;
LanTree: TListView;
FindListView: TListView;
.
.
type
PMyTreeItem = ^TMyTreeItem;
TMyTreeItem = record
DirName,Group: string;
TabIndex: integer;
MyClientListView:TListView;
MyRightListItem:TListItem;
end;
type
PListItem = ^TMyListItem;
TMyListItem = record
index,count: integer;
PrevDirItem, NextDirItem, UpDirItem: TListItem;
end;
.
.
var
MainForm : TMainForm;
CurDirName,CurGroupName:string;
CurListView: TListView;
CurDirItem: TListItem;
{$R *.DFM}
.
.
procedure TMainForm.MyListViewClick(Sender: TObject);
var
ListItemPtr : PListItem;
ListItem : Tlistitem;
begin
if pMyTreeItem(LanTree.Selected.Data)^.TabIndex <> 0 then
begin
ClientPageCtrl.ActivePageIndex := pMyTreeItem(LanTree.Selected.Data)^.tabindex;
CurListView:=pMyTreeItem(LanTree.Selected.data)^.MyClientListView;
AddCap(pMyTreeItem(LanTree.Selected.Data)^.Group,pMyTreeItem(LanTree.Selected.Data)^.DirName);
//addcap是一个返回字符串的自定义函数;
ListItem := pMyTreeItem(LanTree.Selected.Data)^.MyRightListItem;
if CurDirItem <> nil
then PListItem(CurDirItem.Data)^.NextDirItem := ListItem;
ListItemPtr := PListItem(ListItem.Data);
ListItemPtr^.PrevDirItem := CurDirItem;
CurDirItem := ListItem;
end
请问CurListView:=pMyTreeItem(LanTree.Selected.data)^.MyClientListView;和PListItem(CurDirItem.Data)^.NextDirItem := ListItem;是什么意思?
CurDirItem.Data、LanTree.Selected.Data在句子中是什么元素?它们扮演了什么角色?