Procedure

TfrmTemplateEditor.cbExcludeClick

Module

fTemplateEditor

Last Modified

7/15/2014 3:26:44 PM

Visibility

Public/Published

Owner

TfrmTemplateEditor

Declaration

procedure cbExcludeClick(Sender: TObject);

Calls Hierarchy


TfrmTemplateEditor.cbExcludeClick
 ├TfrmTemplateEditor.CanClone
 │ ├GetFirstPersonalNode
 │ │ └..(rec)..
 │ └TTemplate.CanModify
 │   ├TTemplate.ValidID
 │   └LockTemplate
 ├TfrmTemplateEditor.Clone
 │ ├TfrmTemplateEditor.CanClone...
 │ ├..(rec)..
 │ ├TTemplate.CanModify...
 │ ├TTemplate.Clone
 │ │ ├TTemplate.TrueClone
 │ │ │ ├TTemplate.GetChildren
 │ │ │ ├TTemplate.Create
 │ │ │ │ └TTemplate.ReminderDialogIEN
 │ │ │ ├TTemplate.SetBoilerplate
 │ │ │ │ ├TTemplate.CanModify...
 │ │ │ │ └TTemplate.ValidID
 │ │ │ ├TTemplate.GetBoilerplate
 │ │ │ │ └GetTemplateBoilerplate
 │ │ │ ├TTemplate.SetDescription
 │ │ │ │ ├TTemplate.CanModify...
 │ │ │ │ └TTemplate.ValidID
 │ │ │ └TTemplate.GetDescription
 │ │ │   └LoadTemplateDescription
 │ │ ├TTemplate.GetItems
 │ │ │ └ExpandTemplate
 │ │ │   ├TTemplate.GetChildren
 │ │ │   ├GetTemplateChildren
 │ │ │   ├AddTemplate
 │ │ │   │ ├TTemplate.Create...
 │ │ │   │ └TTemplate.AddChild
 │ │ │   │   └TTemplate.GetItems...
 │ │ │   └TTemplate.ItemIENs
 │ │ │     └TTemplate.GetItems...
 │ │ └TTemplate.BackupItems
 │ │   └TTemplate.ItemIENs...
 │ ├TTemplate.RemoveNode
 │ ├MarkDeleted
 │ │ ├TTemplate.ValidID
 │ │ ├TTemplate.SetFileLink
 │ │ │ └TTemplate.AssignFileLink
 │ │ │   ├TTemplate.CanModify...
 │ │ │   ├TTemplate.ValidID
 │ │ │   ├TTemplate.LinkType
 │ │ │   ├TTemplate.SetReminderDialog
 │ │ │   │ ├TTemplate.CanModify...
 │ │ │   │ ├TTemplate.ValidID
 │ │ │   │ ├TTemplate.ReminderDialogIEN
 │ │ │   │ ├TTemplate.LinkType
 │ │ │   │ └TTemplate.SetFileLink...
 │ │ │   ├TTemplate.GetItems...
 │ │ │   └..(rec)..
 │ │ ├TTemplate.GetItems...
 │ │ └..(rec)..
 │ ├TTemplate.AddNode
 │ ├TTemplate.GetItems...
 │ └TfrmTemplateEditor.ShowTemplateType
 ├TTemplate.CanModify...
 ├TTemplate.SetExclude
 │ ├TTemplate.CanModify...
 │ └TTemplate.ValidID
 ├TfrmTemplateEditor.UpdateApply
 │ └TTemplate.Changed
 │   ├TTemplate.ValidID
 │   └TTemplate.ItemIENs...
 └TdmodShared.ImgIdx
   ├COMObjectOK
   └TTemplate.GetTemplateType

Calls

Name Declaration Comments
TfrmTemplateEditor.CanClone function CanClone(const Node: TTreeNode): boolean; -
TTemplate.CanModify function CanModify: boolean; -
TfrmTemplateEditor.Clone function Clone(Node: TTreeNode): boolean; -
TdmodShared.ImgIdx function ImgIdx(Node: TTreeNode): integer; -
TTemplate.SetExclude procedure SetExclude(const Value: boolean); -
TfrmTemplateEditor.UpdateApply procedure UpdateApply(Template: TTemplate); -


Source

1327  procedure TfrmTemplateEditor.cbExcludeClick(Sender: TObject);
1328  var
1329    i: integer;
1330    Template: TTemplate;
1331    Node: TTreeNode;
1332  
1333  begin
1334    if ((not FUpdating) and (assigned(FCurTree)) and (assigned(FCurTree.Selected))) then
1335    begin
1336      if CanClone(FCurTree.Selected) then
1337      begin
1338        Clone(FCurTree.Selected);
1339        Template := TTemplate(FCurTree.Selected.Data);
1340        if assigned(Template) and Template.CanModify then
1341        begin
1342          Template.Exclude := cbExclude.Checked;
1343          UpdateApply(Template);
1344          for i := 0 to Template.Nodes.Count - 1 do
1345          begin
1346            Node := TTreeNode(Template.Nodes.Objects[i]);
1347            Node.ImageIndex := dmodShared.ImgIdx(Node);
1348            Node.SelectedIndex := dmodShared.ImgIdx(Node);
1349          end;
1350          tvShared.Invalidate;
1351          tvPersonal.Invalidate;
1352        end;
1353      end;
1354    end;
1355  end;