Реферат: Разработка файловой оболочки
begin
GetFormToCenter(RunForm);
RunForm.ShowModal;
end;
procedure TMainForm.DrBoxChange(Sender: TObject);
//Смена текущего диска и обносление СФ и СД
Var F:TSearchRec;
s:string;
begin
MainForm.Directory.Drive:=MainForm.DrBox.Drive;
MainForm.FileList.Directory:=MainForm.DrBox.Drive+':\';
S:=MainForm.FileList.Mask;
MainForm.FileList.Mask:='>.>';
FindFirst(MainForm.DrBox.Drive+':\*.*',faDirectory,F);
Repeat
Until ((FindNext(F)<>0) or ((F.Attr=faDirectory) and ((F.Name<>'.') or (F.Name<>'..'))));
if F.Attr<>faDirectory then
MainForm.Directory.SetDirectory(MainForm.DrBox.Drive+':\')
else
MainForm.Directory.SetDirectory(MainForm.DrBox.Drive+':\'+F.Name);
MainForm.Directory.BuildTree;
MainForm.Directory.SetDirectory(MainForm.DrBox.Drive+':\');
MainForm.FileList.Enabled:=True;
MainForm.FileList.Mask:=s;
MainForm.StatusBar.Panels[0].Text:=IntToStr(MainForm.FileList.Items.Count)+
' files ';
end;
procedure TMainForm.UpClick(Sender: TObject);
//Перход на один уровень вверх в списке директорий