enum_research_projects method

Applies to
TForm2

Declaration
procedure enum_research_projects;

Implementation

procedure TForm2.enum_research_projects();
var str1:TStringList; ini1:TiniFile; si:Integer; item__,dp1,dp2:TMenuItem;
begin
while AddArticletotheResearcher1.Count>0 do begin
 AddArticletotheResearcher1.Delete(0);
 AddThisArticletotheResearchProject1.Delete(0);
 AddAllImagestotheResearchProject1.Delete(0);
end;
ini1:=TInifile.Create(get_res_profile);
str1:=TStringList.Create;
ini1.ReadSections(str1);
if str1.Count=0 then begin
   AddArticletotheResearcher1.Visible :=false;
   AddThisArticletotheResearchProject1.Visible :=false;
   AddAllImagestotheResearchProject1.Visible :=false;
   N41.Visible :=false;
   exit;
end;
AddArticletotheResearcher1.Visible :=true;
AddThisArticletotheResearchProject1.Visible :=true;
AddAllImagestotheResearchProject1.Visible :=true;
N41.Visible :=true;
for si:=0 to str1.Count-1 do begin
   item__:=TMenuItem.Create(AddArticletotheResearcher1);
   dp1:=TMenuItem.Create(AddArticletotheResearcher1);
   dp2:=TMenuItem.Create(AddArticletotheResearcher1);
   item__.Caption := str1.Strings[si];
   item__.OnClick := accResearchArticle_to_prjClick;
   item__.Hint := IncludeTrailingBackslash(ini1.ReadString(str1.Strings[si],'path',''));
   dp1.Caption := str1.Strings[si];
   dp1.OnClick := accResearchArticle_to_prjClick;
   dp1.Hint := IncludeTrailingBackslash(ini1.ReadString(str1.Strings[si],'path',''));
   dp2.Caption := str1.Strings[si];
   dp2.Hint:=ini1.ReadString(str1.Strings[si],'path','');
   dp2.OnClick :=save_imgs_to_research_dir;
   AddThisArticletotheResearchProject1.add(dp1);
   AddAllImagestotheResearchProject1.add(dp2);
   AddArticletotheResearcher1.Add(item__);
   skindata1.UpdateMenu(self);
end;
freeandnil(str1);
freeandnil(ini1);
End;


HTML generated by Time2HELP
http://www.time2help.com