Author Topic: C# AddIn: Accessing EAs Options/Settings-Menu  (Read 2876 times)

AndreasBaur

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
C# AddIn: Accessing EAs Options/Settings-Menu
« on: May 25, 2012, 04:59:24 pm »
Hi everyone,

is there a way to create entries in the options/settings menu of EA for your AddIn.
E.g.: I want to turn off/on my AddIn and therefor it would be great to have such an option in the options/settings menu of EA.

If this is not possible, is there a nice way to create an own settings-dialog with checkboxes etc. instead of disabling and enabling the functions with a separate menu entry for each.

Thanks in advance
Andy

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13404
  • Karma: +567/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: C# AddIn: Accessing EAs Options/Settings-Menu
« Reply #1 on: May 25, 2012, 05:28:01 pm »
Andy,

I would just add an entry "Options" to your add-in menu.
Then let the user choose the options in your own dialog.

Depending on your needs you could save the settings somewhere in the registry or in a config file.
I'm currently working on something like that for the EA Navigator.

Geert

AndreasBaur

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: C# AddIn: Accessing EAs Options/Settings-Menu
« Reply #2 on: May 25, 2012, 07:04:06 pm »
Thanks Geert,

that helps me.

Since i'm not a professional in c# - addin writing for the EA, could you give me tips on how to design such an dialog? Just the basics for creating the dialog itself and how i add elements to it.
And could you tell me how to save the settings in the registry or the config file, allthough i think i know how to handle the saving in the file i'm not sure about that.

Greetings Andy

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13404
  • Karma: +567/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: C# AddIn: Accessing EAs Options/Settings-Menu
« Reply #3 on: May 25, 2012, 07:23:30 pm »
How to design a C# dialog?
I think in most IDE's its just a matter of drag-and-drop. A toddler could do that. :D

Regarding the config file, look here:http:// http://msdn.microsoft.com/en-us/library/1xtk877y.aspx or google ".net config file"


Geert