示例#1
0
 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;
 }
示例#2
0
        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);
        }
示例#3
0
 public ModuleTypeDocContexte(eTypeDoc val)
 {
     _Val = val;
 }