Procedure

TfrmTemplateEditor.cbActiveClick

Module

fTemplateEditor

Last Modified

7/15/2014 3:26:44 PM

Visibility

Public/Published

Owner

TfrmTemplateEditor

Declaration

procedure cbActiveClick(Sender: TObject);

Calls Hierarchy


TfrmTemplateEditor.cbActiveClick
 ├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.SetActive
 │ ├TTemplate.CanModify...
 │ └TTemplate.ValidID
 ├TfrmTemplateEditor.UpdateApply
 │ └TTemplate.Changed
 │   ├TTemplate.ValidID
 │   └TTemplate.ItemIENs...
 ├TfrmTemplateEditor.cbPerHideClick
 │ ├TdmodShared.Resync
 │ │ ├InSyncNode
 │ │ ├GetID
 │ │ │ └..(rec)..
 │ │ ├TTemplate.RemoveNode
 │ │ ├BuildNodes
 │ │ │ ├TTemplate.AddNode
 │ │ │ ├TTemplate.GetItems...
 │ │ │ ├..(rec)..
 │ │ │ └TTemplate.GetChildren
 │ │ └GetNode
 │ │   └GetID...
 │ ├TfrmTemplateEditor.tvTreeChange
 │ │ ├TfrmTemplateEditor.ChangeTree
 │ │ ├TfrmTemplateEditor.IsTemplateLocked
 │ │ │ ├TTemplate.AutoLock
 │ │ │ │ └TTemplate.LinkType
 │ │ │ ├TTemplate.IsLocked
 │ │ │ │ └TTemplate.AutoLock...
 │ │ │ └..(rec)..
 │ │ ├TfrmTemplateEditor.EnableControls
 │ │ │ ├TfrmTemplateEditor.UpdateInsertsDialogs
 │ │ │ │ ├TfrmTemplateObjects.UpdateStatus
 │ │ │ │ └TfrmTemplateFields.UpdateStatus
 │ │ │ │   └TfrmTemplateFields.ValidInsert
 │ │ │ └TfrmTemplateEditor.EnableNavControls
 │ │ │   └TfrmTemplateEditor.AllowMove
 │ │ │     ├TfrmTemplateEditor.IsTemplateLocked...
 │ │ │     └TTemplate.GetItems...
 │ │ └TfrmTemplateEditor.ShowInfo
 │ │   ├TfrmTemplateEditor.ShowTemplateType
 │ │   ├TfrmTemplateEditor.GetLinkType
 │ │   ├LoadServiceListWithSynonyms
 │ │   ├TTemplate.LinkName
 │ │   │ ├GetLinkName
 │ │   │ │ └ExternalName
 │ │   │ ├TTemplate.LinkIEN
 │ │   │ └TTemplate.LinkType
 │ │   ├TTemplate.LinkIEN
 │ │   ├TTemplate.GetDescription...
 │ │   ├TTemplate.IsLocked...
 │ │   ├TTemplate.AutoLock...
 │ │   ├TfrmTemplateEditor.IsTemplateLocked...
 │ │   ├TTemplate.GetChildren
 │ │   ├TTemplate.ReminderDialogIEN
 │ │   ├TdmodShared.InDialog
 │ │   │ └TTemplate.IsDialog
 │ │   ├TTemplate.GetBoilerplate...
 │ │   ├TfrmTemplateEditor.DisplayBoilerplate
 │ │   │ ├TfrmTemplateEditor.pnlBoilerplateResize
 │ │   │ ├TTemplate.GetBoilerplate...
 │ │   │ ├TTemplate.FullBoilerplate
 │ │   │ │ ├TTemplate.GetBoilerplate...
 │ │   │ │ ├TTemplate.ItemBoilerplate
 │ │   │ │ │ ├TTemplate.GetItems...
 │ │   │ │ │ ├TTemplate.GetTemplateType
 │ │   │ │ │ ├DlgText
 │ │   │ │ │ └TTemplate.DialogProperties
 │ │   │ │ │   ├TTemplate.GetBoilerplate...
 │ │   │ │ │   └TTemplate.DlgID
 │ │   │ │ ├DlgText
 │ │   │ │ └TTemplate.DialogProperties...
 │ │   │ ├TfrmTemplateEditor.UpdateInsertsDialogs...
 │ │   │ ├TfrmTemplateEditor.ShowBoilerPlate
 │ │   │ └TfrmTemplateEditor.ShowGroupBoilerplate
 │ │   ├TfrmTemplateEditor.ShowGroupBoilerplate
 │ │   └TfrmTemplateEditor.pnlBoilerplateResize
 │ └TfrmTemplateEditor.EnableNavControls...
 ├TfrmTemplateEditor.cbShHideClick
 │ ├TdmodShared.Resync...
 │ ├TfrmTemplateEditor.tvTreeChange...
 │ └TfrmTemplateEditor.EnableNavControls...
 ├TfrmTemplateEditor.tvTreeChange...
 └TfrmTemplateEditor.EnableNavControls...

Calls

Name Declaration Comments
TfrmTemplateEditor.CanClone function CanClone(const Node: TTreeNode): boolean; -
TTemplate.CanModify function CanModify: boolean; -
TfrmTemplateEditor.cbPerHideClick procedure cbPerHideClick(Sender: TObject); -
TfrmTemplateEditor.cbShHideClick procedure cbShHideClick(Sender: TObject); -
TfrmTemplateEditor.Clone function Clone(Node: TTreeNode): boolean; -
TfrmTemplateEditor.EnableNavControls procedure EnableNavControls; -
TTemplate.SetActive procedure SetActive(const Value: boolean); -
TfrmTemplateEditor.tvTreeChange procedure tvTreeChange(Sender: TObject; Node: TTreeNode); -
TfrmTemplateEditor.UpdateApply procedure UpdateApply(Template: TTemplate); -


Source

1286  procedure TfrmTemplateEditor.cbActiveClick(Sender: TObject);
1287  var
1288    i: integer;
1289    Template: TTemplate;
1290    Node: TTreeNode;
1291  
1292  begin
1293    if ((not FUpdating) and (assigned(FCurTree)) and (assigned(FCurTree.Selected))) then
1294    begin
1295      if CanClone(FCurTree.Selected) then
1296      begin
1297        Clone(FCurTree.Selected);
1298        Template := TTemplate(FCurTree.Selected.Data);
1299        if assigned(Template) and Template.CanModify then
1300        begin
1301          Template.Active := cbActive.Checked;
1302          UpdateApply(Template);
1303          for i := 0 to Template.Nodes.Count - 1 do
1304          begin
1305            Node := TTreeNode(Template.Nodes.Objects[i]);
1306            Node.Cut := not Template.Active;
1307          end;
1308          if (FCurTree = tvShared) then
1309          begin
1310            cbPerHideClick(Sender);
1311            cbShHideClick(Sender);
1312          end
1313          else
1314          begin
1315            cbShHideClick(Sender);
1316            cbPerHideClick(Sender);
1317          end;
1318          tvTreeChange(FCurTree, FCurTree.Selected);
1319          EnableNavControls;
1320          if cbActive.CanFocus then
1321            cbActive.SetFocus;
1322        end;
1323      end;
1324    end;
1325  end;