Ejemplo n.º 1
0
 protected override void OnElementClick(ElementEventArgs e)
 {
     base.OnElementClick(e);
     if (this._enableSearches)
     {
         Type type = e.Element.UserData as Type;
         if (type != null)
         {
             IClassViewService service = (IClassViewService) this._serviceProvider.GetService(typeof(IClassViewService));
             if (service != null)
             {
                 service.ShowType(type);
             }
             return;
         }
         TypeSearchTask searchTask = e.Element.UserData as TypeSearchTask;
         if (searchTask != null)
         {
             if (ClassViewToolWindow.Instance != null)
             {
                 ClassViewToolWindow.Instance.PerformSearch(searchTask);
             }
             return;
         }
     }
     string userData = e.Element.UserData as string;
     if (userData != null)
     {
         IWebBrowsingService service2 = (IWebBrowsingService) this._serviceProvider.GetService(typeof(IWebBrowsingService));
         if (service2 != null)
         {
             service2.BrowseUrl(userData);
         }
     }
 }
Ejemplo n.º 2
0
 protected override bool OnElementClick(ElementEventArgs e)
 {
     ToggleImageElement element = e.Element as ToggleImageElement;
     if (element == null)
     {
         return base.OnElementClick(e);
     }
     string userData = (string) element.UserData;
     Element element2 = base.Elements[userData];
     if (element2 != null)
     {
         base.BeginBatchUpdate();
         try
         {
             element2.Visible = !element2.Visible;
             element.Condition = element2.Visible;
             if (userData.Equals("Documentation"))
             {
                 Element documentationContainer = element2;
                 if (documentationContainer.Elements.Count == 0)
                 {
                     this.GenerateDocumentation(documentationContainer);
                 }
             }
         }
         finally
         {
             base.EndBatchUpdate();
         }
     }
     return false;
 }
Ejemplo n.º 3
0
 protected override bool OnElementClick(ElementEventArgs e)
 {
     HyperLinkElement element = e.Element as HyperLinkElement;
     if (element != null)
     {
         this._owner.OnLinkClicked(element.UserData);
     }
     return false;
 }
Ejemplo n.º 4
0
 protected virtual bool OnElementClick(ElementEventArgs e)
 {
     return true;
 }
Ejemplo n.º 5
0
 internal bool RaiseElementClickEvent(ElementEventArgs e)
 {
     return this.OnElementClick(e);
 }
Ejemplo n.º 6
0
 private void RaiseElementClickEvent(Element element)
 {
     ElementEventArgs e = new ElementEventArgs(element);
     if (this._page.RaiseElementClickEvent(e))
     {
         this.OnElementClick(e);
     }
 }
Ejemplo n.º 7
0
 protected virtual void OnElementClick(ElementEventArgs e)
 {
     ElementEventHandler handler = (ElementEventHandler) base.Events[ElementClickEvent];
     if (handler != null)
     {
         handler(this, e);
     }
 }