Procedure

TfrmTemplateAutoGen.rgSourceClick

Module

fTemplateAutoGen

Last Modified

7/15/2014 3:26:44 PM

Visibility

Public/Published

Owner

TfrmTemplateAutoGen

Declaration

procedure rgSourceClick(Sender: TObject);

Calls Hierarchy


TfrmTemplateAutoGen.rgSourceClick
 └UserTemplateAccessLevel
   ├GetTemplateRoots
   └GetTemplateAccess

Calls

Name Declaration Comments
UserTemplateAccessLevel function UserTemplateAccessLevel: TTemplateAccess; -


Source

86    procedure TfrmTemplateAutoGen.rgSourceClick(Sender: TObject);
87    var
88      idx,i: integer;
89      DoIt: boolean;
90    
91    begin
92      idx := rgSource.ItemIndex;
93      rgSource.TabStop := (idx < 0);
94      if(idx < 0) then exit;
95      if(idx = idxTitle) then
96      begin
97        cbxTitles.Visible := TRUE;
98        cbxObjects.Visible := FALSE;
99        if(not FTitlesDone) then
100       begin
101         cbxTitles.InitLongList('');
102         FTitlesDone := TRUE
103       end;
104       cbxTitles.SetFocus;
105     end
106     else
107     if(idx = idxObject) then
108     begin
109       cbxObjects.Visible := TRUE;
110       cbxTitles.Visible := FALSE;
111       if(not FObjectsDone) then
112       begin
113         DoIt := TRUE;                                        //10/31/01 S Monson-- Added
114         if (UserTemplateAccessLevel <> taEditor) then        //UserTemplateAccessLevel check and
115           if PersObjects.Count > 0 then                      //PersObjects modification of the list
116             begin                                            //in response to NOIS HUN-0701-22052
117             DoIt := FALSE;
118             for i := 0 to dmodShared.TIUObjects.Count-1 do
119               if PersObjects.IndexOf(Piece(dmodShared.TIUObjects[i],U,2)) >= 0 then
120                 cbxObjects.Items.Add(dmodShared.TIUObjects[i]);
121             end;
122         if DoIt then
123           FastAssign(dmodShared.TIUObjects, cbxObjects.Items);
124         FObjectsDone := TRUE;
125       end;
126       cbxObjects.SetFocus;
127     end;
128   end;