Book a Demo

Author Topic: EANavigator  NavigatorControl where ?  (Read 4222 times)

MathiasK

  • EA User
  • **
  • Posts: 25
  • Karma: +0/-0
    • View Profile
EANavigator  NavigatorControl where ?
« on: April 28, 2014, 11:25:06 pm »
Hi,

i can't find the part where the "navigatorControl" with its view buttons and fields is implemented into the "Add-In" window of EA.

I also not sure about the nature of the Add-In window - can i apply a "System.Windows.Forms" to it ?

Best wishes

Mathias


Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13495
  • Karma: +572/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: EANavigator  NavigatorControl where ?
« Reply #1 on: April 29, 2014, 03:48:40 pm »
Hi Mathias,

If you wish to understand how to integrate your own control as an add-in window it might be easier to use the  MyAddin as an example.
The EA Navigator works in exactly the same way.

What you need to do is make a user control that inherits from System.Windows.Forms.UserControl
Then you need to make sure it is know in COM.
And then you need to tell EA to load the control as a docked add-in.
Code: [Select]
/// <summary>
/// called when the selected item changes
/// This operation will show the guid of the selected element in the eaControl
/// </summary>
/// <param name="Repository">the EA.Repository</param>
/// <param name="GUID">the guid of the selected item</param>
/// <param name="ot">the object type of the selected item</param>
public override void EA_OnContextItemChanged(EA.Repository Repository, string GUID, EA.ObjectType ot)
{
      if (this.eaControl == null)
                  this.eaControl = Repository.AddWindow("My Control","MyAddin.MyEAControl") as MyEAControl;
      if (this.eaControl != null)
            this.eaControl.setNameLabel(GUID);
}

Geert

MathiasK

  • EA User
  • **
  • Posts: 25
  • Karma: +0/-0
    • View Profile
Re: EANavigator  NavigatorControl where ?
« Reply #2 on: April 29, 2014, 05:15:59 pm »
Thx ^^ that really helped :-)