示例#1
0
 /// <summary>
 /// Called on both document load and reload.
 /// </summary>
 protected virtual void OnDocumentLoaded()
 {
     // Enable CompartmentItems events.
     global::Company.MobileDSL.MobileAppModel modelRoot = this.RootElement as global::Company.MobileDSL.MobileAppModel;
     if (modelRoot != null)
     {
         global::System.Collections.Generic.IList <DslDiagrams::PresentationElement> diagrams = DslDiagrams::PresentationViewsSubject.GetPresentation(modelRoot);
         if (diagrams.Count > 0)
         {
             global::Company.MobileDSL.MobileDSLDiagram diagram = diagrams[0] as global::Company.MobileDSL.MobileDSLDiagram;
             if (diagram != null)
             {
                 diagram.SubscribeCompartmentItemsEvents();
             }
         }
     }
 }
示例#2
0
        /// <summary>
        /// Called on both document load and reload.
        /// </summary>
        protected virtual void OnDocumentLoaded()
        {
            // Validate the document
            this.ValidationController.Validate(this.GetAllElementsForValidation(), DslValidation::ValidationCategories.Open);

            // Enable CompartmentItems events.
            global::Company.MobileDSL.ComponentModel modelRoot = this.RootElement as global::Company.MobileDSL.ComponentModel;
            if (modelRoot != null)
            {
                global::System.Collections.Generic.IList <DslDiagrams::PresentationElement> diagrams = DslDiagrams::PresentationViewsSubject.GetPresentation(modelRoot);
                if (diagrams.Count > 0)
                {
                    global::Company.MobileDSL.MobileDSLDiagram diagram = diagrams[0] as global::Company.MobileDSL.MobileDSLDiagram;
                    if (diagram != null)
                    {
                        diagram.SubscribeCompartmentItemsEvents();
                    }
                }
            }
        }