// <ReferenceInclude>"browsedna.dll"</ReferenceInclude>
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using MercatorApi;
using MercatorUi;
using System.Reflection;

namespace Main
{
    public class Customizer : MercatorUi.ICustomizers.IExec
    {
        public void Main(MercatorUi.ICustomizers.ExecAction Action)
        {
            if (Action == MercatorUi.ICustomizers.ExecAction.MenuCreated)
            {

                // rechercher le menu Outils
                MercatorUi._BaseClasses.MenuElement meTools = MercatorUi._Divers.MenuElementByText(MercatorUi._Divers.Iif_langue(MercatorUi.Globals.Langue, "Extras", "Tools", "Tools", "Outils"));
                if (meTools == null)
                    return;

                // dans le menu Outils, rechercher le menu Paramètres
                MercatorUi._BaseClasses.MenuElement meParam = MercatorUi._Divers.MenuElementByText(meTools, MercatorUi._Divers.Iif_langue(MercatorUi.Globals.Langue, "Setup", "Setup", "Paramètres"));
                if (meParam == null)
                    return;

                MercatorUi._BaseClasses.MenuElement meDna = new MercatorUi._BaseClasses.MenuElement("DNA", "", null, meDna_Click);

                meParam.SubItems.Add(meDna);
            }
        }
        void meDna_Click(object sender, EventArgs e)
        {
            BrowseDna.BrowseDna.ShowStatic();
        }
    }
}