Exemplo n.º 1
0
 private void OnDesignerActionUIStateChange(DesignerActionUIStateChangeEventArgs e)
 {
     if (this.designerActionUIStateChangedEventHandler != null)
     {
         this.designerActionUIStateChangedEventHandler(this, e);
     }
 }
 private void OnDesignerActionUIStateChange(object sender, DesignerActionUIStateChangeEventArgs e)
 {
     IComponent relatedObject = e.RelatedObject as IComponent;
     if (relatedObject != null)
     {
         DesignerActionGlyph designerActionGlyph = this.GetDesignerActionGlyph(relatedObject);
         if (designerActionGlyph != null)
         {
             if (e.ChangeType != DesignerActionUIStateChangeType.Show)
             {
                 if (e.ChangeType != DesignerActionUIStateChangeType.Hide)
                 {
                     if (e.ChangeType == DesignerActionUIStateChangeType.Refresh)
                     {
                         designerActionGlyph.Invalidate();
                         this.RecreatePanel((IComponent) e.RelatedObject);
                     }
                 }
                 else
                 {
                     DesignerActionBehavior behavior2 = designerActionGlyph.Behavior as DesignerActionBehavior;
                     if (behavior2 != null)
                     {
                         behavior2.HideUI();
                     }
                 }
             }
             else
             {
                 DesignerActionBehavior behavior = designerActionGlyph.Behavior as DesignerActionBehavior;
                 if (behavior != null)
                 {
                     behavior.ShowUI(designerActionGlyph);
                 }
             }
         }
     }
     else if (e.ChangeType == DesignerActionUIStateChangeType.Hide)
     {
         this.HideDesignerActionPanel();
     }
 }