Procedure

TfrmTemplateEditor.FormCreate

Module

fTemplateEditor

Last Modified

7/15/2014 3:26:44 PM

Visibility

Public/Published

Owner

TfrmTemplateEditor

Declaration

procedure FormCreate(Sender: TObject);

Calls Hierarchy


TfrmTemplateEditor.FormCreate
 ├SetFormPosition
 │ └TSizeHolder.GetSize
 ├InteractiveRemindersActive
 │ └GetRemindersActive
 ├GetTemplateAllowedReminderDialogs
 ├GetAllActiveCOMObjects
 ├TfrmTemplateEditor.TemplateLocked
 │ └TfrmTemplateEditor.Resync
 │   ├TdmodShared.Resync
 │   │ ├InSyncNode
 │   │ ├GetID
 │   │ │ └..(rec)..
 │   │ ├TTemplate.RemoveNode
 │   │ ├BuildNodes
 │   │ │ ├TTemplate.AddNode
 │   │ │ ├TTemplate.GetItems
 │   │ │ │ └ExpandTemplate
 │   │ │ │   ├TTemplate.GetChildren
 │   │ │ │   ├GetTemplateChildren
 │   │ │ │   ├AddTemplate
 │   │ │ │   │ ├TTemplate.Create
 │   │ │ │   │ │ └TTemplate.ReminderDialogIEN
 │   │ │ │   │ └TTemplate.AddChild
 │   │ │ │   │   └TTemplate.GetItems...
 │   │ │ │   └TTemplate.ItemIENs
 │   │ │ │     └TTemplate.GetItems...
 │   │ │ ├..(rec)..
 │   │ │ └TTemplate.GetChildren
 │   │ └GetNode
 │   │   └GetID...
 │   ├TfrmTemplateEditor.EnableNavControls
 │   │ └TfrmTemplateEditor.AllowMove
 │   │   ├TfrmTemplateEditor.IsTemplateLocked
 │   │   │ ├TTemplate.AutoLock
 │   │   │ │ └TTemplate.LinkType
 │   │   │ ├TTemplate.IsLocked
 │   │   │ │ └TTemplate.AutoLock...
 │   │   │ └..(rec)..
 │   │   └TTemplate.GetItems...
 │   └TfrmTemplateEditor.tvTreeChange
 │     ├TfrmTemplateEditor.ChangeTree
 │     ├TfrmTemplateEditor.IsTemplateLocked...
 │     ├TfrmTemplateEditor.EnableControls
 │     │ ├TfrmTemplateEditor.UpdateInsertsDialogs
 │     │ │ ├TfrmTemplateObjects.UpdateStatus
 │     │ │ └TfrmTemplateFields.UpdateStatus
 │     │ │   └TfrmTemplateFields.ValidInsert
 │     │ └TfrmTemplateEditor.EnableNavControls...
 │     └TfrmTemplateEditor.ShowInfo
 │       ├TfrmTemplateEditor.ShowTemplateType
 │       ├TfrmTemplateEditor.GetLinkType
 │       ├LoadServiceListWithSynonyms
 │       ├TTemplate.LinkName
 │       │ ├GetLinkName
 │       │ │ └ExternalName
 │       │ ├TTemplate.LinkIEN
 │       │ └TTemplate.LinkType
 │       ├TTemplate.LinkIEN
 │       ├TTemplate.GetDescription
 │       │ └LoadTemplateDescription
 │       ├TTemplate.IsLocked...
 │       ├TTemplate.AutoLock...
 │       ├TfrmTemplateEditor.IsTemplateLocked...
 │       ├TTemplate.GetChildren
 │       ├TTemplate.ReminderDialogIEN
 │       ├TdmodShared.InDialog
 │       │ └TTemplate.IsDialog
 │       ├TTemplate.GetBoilerplate
 │       │ └GetTemplateBoilerplate
 │       ├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.InitTrees
 │ ├LoadTemplateData
 │ │ ├GetTemplateRoots
 │ │ └AddTemplate...
 │ ├SaveTemplate
 │ │ ├TTemplate.Changed
 │ │ │ ├TTemplate.ValidID
 │ │ │ └TTemplate.ItemIENs...
 │ │ ├TTemplate.Unlock
 │ │ │ ├TTemplate.ValidID
 │ │ │ └UnlockTemplate
 │ │ ├TTemplate.GetBoilerplate...
 │ │ ├TTemplate.ReminderDialogIEN
 │ │ ├TTemplate.GetDescription...
 │ │ ├UpdateTemplate
 │ │ │ └UpdateTIURec
 │ │ ├DisplayErrors
 │ │ └TTemplate.ClearBackup
 │ │   └TTemplate.ItemIENs...
 │ ├AddTemplate...
 │ ├TdmodShared.AddTemplateNode
 │ │ ├AddChildObject
 │ │ │ └TTemplate.AddNode
 │ │ └TTemplate.GetChildren
 │ ├UserTemplateAccessLevel
 │ │ ├GetTemplateRoots
 │ │ └GetTemplateAccess
 │ └CanEditLinkType
 │   └CanEditType
 │     └IsUserTemplateEditor
 ├ClearBackup
 │ └TTemplate.ClearBackup...
 ├TfrmTemplateEditor.NewPersonalUser
 │ └TfrmTemplateEditor.HideControls
 │   └TfrmTemplateEditor.MoveCopyButtons
 ├UserTemplateAccessLevel...
 ├TfrmTemplateEditor.SharedEditing
 │ ├TfrmTemplateEditor.MoveCopyButtons
 │ ├TfrmTemplateEditor.tvTreeChange...
 │ └TfrmTemplateEditor.AdjustControls4FontChange
 │   └Adjust
 ├TfrmTemplateEditor.HideControls...
 ├TfrmTemplateEditor.MoveCopyButtons
 └BackupDiffers
   └TTemplate.Changed...

Calls

Name Declaration Comments
BackupDiffers function BackupDiffers: boolean; -
ClearBackup procedure ClearBackup; -
GetAllActiveCOMObjects function GetAllActiveCOMObjects: TStrings; -
GetTemplateAllowedReminderDialogs function GetTemplateAllowedReminderDialogs: TStrings; -
TfrmTemplateEditor.HideControls procedure HideControls; -
TfrmTemplateEditor.InitTrees procedure InitTrees; -
InteractiveRemindersActive function InteractiveRemindersActive: boolean; -
TfrmTemplateEditor.MoveCopyButtons procedure MoveCopyButtons; -
TfrmTemplateEditor.NewPersonalUser procedure NewPersonalUser(UsrIEN: Int64); -
SetFormPosition procedure SetFormPosition(AForm: TForm); -
TfrmTemplateEditor.SharedEditing procedure SharedEditing; -
TfrmTemplateEditor.TemplateLocked procedure TemplateLocked(Sender: TObject); -
UserTemplateAccessLevel function UserTemplateAccessLevel: TTemplateAccess; -


Source

675   procedure TfrmTemplateEditor.FormCreate(Sender: TObject);
676   begin
677     SetFormPosition(Self);
678     ResizeAnchoredFormToFont(self);
679     //Now fix everything the resize messed up
680     lblLines.Width := cbLock.Left - lblLines.Left - 15;
681     sbPerDelete.Left := pnlPersonalBottom.ClientWidth - sbPerDelete.Width - 1;
682     sbPerDown.Left := sbPerDelete.Left - sbPerDown.Width - 2;
683     sbPerUp.Left := sbPerDown.Left - sbPerUp.Width - 2;
684     cbPerHide.Width := sbPerUp.Left - 3;
685     btnPerFind.Left := pnlPerSearch.ClientWidth - btnPerFind.Width;
686   
687     FSavePause := Application.HintHidePause;
688     Application.HintHidePause := FSavePause * 2;
689     if InteractiveRemindersActive then
690     begin
691       QuickCopy(GetTemplateAllowedReminderDialogs, cbxRemDlgs.Items);
692       FCanDoReminders := (cbxRemDlgs.Items.Count > 0);
693     end
694     else
695       FCanDoReminders := FALSE;
696   
697     QuickCopy(GetAllActiveCOMObjects, cbxCOMObj.Items);
698     FCanDoCOMObjects := (cbxCOMObj.Items.Count > 0);
699   
700     FUpdating := TRUE;
701     FFirstShow := TRUE;
702   
703     FTreeControl[ttShared, tcDel] := sbShDelete;
704     FTreeControl[ttShared, tcUp] := sbShUp;
705     FTreeControl[ttShared, tcDown] := sbShDown;
706     FTreeControl[ttShared, tcLbl] := lblCopy;
707     FTreeControl[ttShared, tcCopy] := sbCopyRight;
708     FTreeControl[ttPersonal, tcDel] := sbPerDelete;
709     FTreeControl[ttPersonal, tcUp] := sbPerUp;
710     FTreeControl[ttPersonal, tcDown] := sbPerDown;
711     FTreeControl[ttPersonal, tcLbl] := lblCopy;
712     FTreeControl[ttPersonal, tcCopy] := sbCopyLeft;
713     dmodShared.InEditor := TRUE;
714     dmodShared.OnTemplateLock := TemplateLocked;
715   
716     gbProperties.Caption := PropText;
717     pnlShSearch.Visible := FALSE;
718     pnlPerSearch.Visible := FALSE;
719     FCanEditPersonal := TRUE;
720   
721   { Don't mess with the order of the following commands! }
722     InitTrees;
723   
724     tvPersonal.Selected := tvPersonal.Items.GetFirstNode;
725   
726     ClearBackup;
727   
728     cboOwner.SelText := MixedCase(User.Name);
729     NewPersonalUser(User.DUZ);
730   
731     cbEditShared.Visible := (UserTemplateAccessLevel = taEditor);
732     FCanEditShared := FALSE;
733     SharedEditing;
734   
735     HideControls;
736   
737     lblCopy.AutoSize := TRUE;
738     lblCopy.AutoSize := FALSE; // resets height based on font
739     lblCopy.Width := pnlCopyBtns.Width + splMiddle.Width;
740     MoveCopyButtons;
741   
742     cbShHide.Checked := TRUE;
743     cbPerHide.Checked := TRUE;
744   
745     BtnApply.Enabled := BackupDiffers;
746     //SetFormPosition(Self);
747   end;