Procedure

TfrmTemplateEditor.edtNameOldChange

Module

fTemplateEditor

Last Modified

7/15/2014 3:26:44 PM

Visibility

Public/Published

Owner

TfrmTemplateEditor

Declaration

procedure edtNameOldChange(Sender: TObject);

Calls Hierarchy


TfrmTemplateEditor.edtNameOldChange
 ├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.SetPrintName
 │ ├TTemplate.CanModify...
 │ └TTemplate.ValidID
 └TfrmTemplateEditor.UpdateApply
   └TTemplate.Changed
     ├TTemplate.ValidID
     └TTemplate.ItemIENs...

Called-By Hierarchy


  TfrmTemplateEditor.edtNameOldChange
TfrmTemplateEditor.tvTreeNodeEdited┤ 
 TfrmTemplateEditor.mnuAutoGenClick┘ 

Calls

Name Declaration Comments
TfrmTemplateEditor.CanClone function CanClone(const Node: TTreeNode): boolean; -
TTemplate.CanModify function CanModify: boolean; -
TfrmTemplateEditor.Clone function Clone(Node: TTreeNode): boolean; -
TTemplate.SetPrintName procedure SetPrintName(const Value: string); -
TfrmTemplateEditor.UpdateApply procedure UpdateApply(Template: TTemplate); -

Called-By

Name Declaration Comments
TfrmTemplateEditor.mnuAutoGenClick procedure mnuAutoGenClick(Sender: TObject); -
TfrmTemplateEditor.tvTreeNodeEdited procedure tvTreeNodeEdited(Sender: TObject; Node: TTreeNode; var S: string); -


Source

1257  procedure TfrmTemplateEditor.edtNameOldChange(Sender: TObject);
1258  var
1259    i: integer;
1260    Template: TTemplate;
1261    DoRefresh: boolean;
1262  
1263  begin
1264    if ((not FUpdating) and (assigned(FCurTree)) and (assigned(FCurTree.Selected))) then
1265    begin
1266      if CanClone(FCurTree.Selected) then
1267      begin
1268        DoRefresh := Clone(FCurTree.Selected);
1269        Template := TTemplate(FCurTree.Selected.Data);
1270        if assigned(Template) and Template.CanModify then
1271        begin
1272          Template.PrintName := edtName.Text;
1273          UpdateApply(Template);
1274          for i := 0 to Template.Nodes.Count - 1 do
1275            TTreeNode(Template.Nodes.Objects[i]).Text := Template.PrintName;
1276          if (DoRefresh) then
1277          begin
1278            tvShared.Invalidate;
1279            tvPersonal.Invalidate;
1280          end;
1281        end;
1282      end;
1283    end;
1284  end;