public Cmde(String titre, String callbackFunction, String enableMethod, int id, String icon, eTypeDoc type, swCommandTabButtonTextDisplay_e positionTexte, int indexImage) { Titre = titre; Icon = icon; Position = -1; InfoBulle = titre; IndexImage = indexImage; CallbackFunction = callbackFunction; EnableMethod = enableMethod; AddinId = id; Options = (int)(swCommandItemType_e.swMenuItem | swCommandItemType_e.swToolbarItem); Type = type; PositionTexte = positionTexte; CommandId = -1; }
public int EnableMethod(String nomModule) { int arg = 1; try { ModelDoc2 Mdl = App.Sw.ActiveDoc; if (Mdl == null) { return(arg); } Type Module = GetTypeModule(nomModule); eTypeDoc TypeDoc = Mdl.TypeDoc(); arg = Module.GetModuleTypeDocContexte().HasFlag(TypeDoc).ToInt(); } catch (Exception e) { this.LogMethode(new Object[] { e }); } return(arg); }
public ModuleTypeDocContexte(eTypeDoc val) { _Val = val; }