示例#1
0
 /// <summary>
 /// Called on both document load and reload.
 /// </summary>
 protected virtual void OnDocumentLoaded()
 {
     // Enable CompartmentItems events.
     global::pelsoft.FWK_Dsl.ModelRoot modelRoot = this.RootElement as global::pelsoft.FWK_Dsl.ModelRoot;
     if (modelRoot != null)
     {
         global::System.Collections.Generic.IList <DslDiagrams::PresentationElement> diagrams = DslDiagrams::PresentationViewsSubject.GetPresentation(modelRoot);
         if (diagrams.Count > 0)
         {
             global::pelsoft.FWK_Dsl.ClassDiagram diagram = diagrams[0] as global::pelsoft.FWK_Dsl.ClassDiagram;
             if (diagram != null)
             {
                 diagram.SubscribeCompartmentItemsEvents();
             }
         }
     }
 }