Procedure

TfrmTemplateEditor.RefreshData

Module

fTemplateEditor

Last Modified

7/15/2014 3:26:44 PM

Visibility

Protected

Owner

TfrmTemplateEditor

Declaration

procedure RefreshData;

Calls Hierarchy


TfrmTemplateEditor.RefreshData
 ├ReleaseTemplates
 │ └ClearBackup
 │   └TTemplate.ClearBackup
 │     └TTemplate.ItemIENs
 │       └TTemplate.GetItems
 │         └ExpandTemplate
 │           ├TTemplate.GetChildren
 │           ├GetTemplateChildren
 │           ├AddTemplate
 │           │ ├TTemplate.Create
 │           │ │ └TTemplate.ReminderDialogIEN
 │           │ └TTemplate.AddChild
 │           │   └TTemplate.GetItems...
 │           └TTemplate.ItemIENs...
 └TfrmTemplateEditor.InitTrees
   ├LoadTemplateData
   │ ├GetTemplateRoots
   │ └AddTemplate...
   ├SaveTemplate
   │ ├TTemplate.Changed
   │ │ ├TTemplate.ValidID
   │ │ └TTemplate.ItemIENs...
   │ ├TTemplate.Unlock
   │ │ ├TTemplate.ValidID
   │ │ └UnlockTemplate
   │ ├TTemplate.GetBoilerplate
   │ │ └GetTemplateBoilerplate
   │ ├TTemplate.ReminderDialogIEN
   │ ├TTemplate.GetDescription
   │ │ └LoadTemplateDescription
   │ ├UpdateTemplate
   │ │ └UpdateTIURec
   │ ├DisplayErrors
   │ └TTemplate.ClearBackup...
   ├AddTemplate...
   ├TdmodShared.AddTemplateNode
   │ ├AddChildObject
   │ │ └TTemplate.AddNode
   │ └TTemplate.GetChildren
   ├UserTemplateAccessLevel
   │ ├GetTemplateRoots
   │ └GetTemplateAccess
   └CanEditLinkType
     └CanEditType
       └IsUserTemplateEditor

Called-By Hierarchy


      TfrmTemplateEditor.RefreshData
TfrmTemplateEditor.mnuRefreshClick┘ 

Calls

Name Declaration Comments
TfrmTemplateEditor.InitTrees procedure InitTrees; -
ReleaseTemplates procedure ReleaseTemplates; -

Called-By

Name Declaration Comments
TfrmTemplateEditor.mnuRefreshClick procedure mnuRefreshClick(Sender: TObject); -


Source

4002  procedure TfrmTemplateEditor.RefreshData;
4003  var
4004    exp1, exp2, s1, s2, t1, t2: string;
4005    focus: TWinControl;
4006  
4007  begin
4008    focus := FCurTree;
4009    exp1 := tvShared.GetExpandedIDStr(1, ';');
4010    exp2 := tvPersonal.GetExpandedIDStr(1, ';');
4011    s1 := tvShared.GetNodeID(TORTreeNode(tvShared.Selected), 1, ';');
4012    s2 := tvPersonal.GetNodeID(TORTreeNode(tvPersonal.Selected), 1, ';');
4013    t1 := tvShared.GetNodeID(TORTreeNode(tvShared.TopItem), 1, ';');
4014    t2 := tvPersonal.GetNodeID(TORTreeNode(tvPersonal.TopItem), 1, ';');
4015    tvPersonal.Items.BeginUpdate;
4016    try
4017      tvShared.Items.BeginUpdate;
4018      try
4019        ReleaseTemplates;
4020        tvPersonal.Items.Clear;
4021        tvShared.Items.Clear;
4022        InitTrees;
4023        tvShared.SetExpandedIDStr(1, ';', exp1);
4024        tvShared.TopItem := tvShared.FindPieceNode(t1, 1, ';');
4025        tvShared.Selected := tvShared.FindPieceNode(s1, 1, ';');
4026        tvPersonal.SetExpandedIDStr(1, ';', exp2);
4027        tvPersonal.TopItem := tvPersonal.FindPieceNode(t2, 1, ';');
4028        tvPersonal.Selected := tvPersonal.FindPieceNode(s2, 1, ';');
4029      finally
4030        tvShared.Items.EndUpdate;
4031      end;
4032    finally
4033      tvPersonal.Items.EndUpdate;
4034    end;
4035    ActiveControl := focus;
4036  end;