Exemple #1
0
        private DicProp DicPropFromBox(ListBox box)
        {
            DicProp dic = _DicPropCfg;

            if (box == _DicPropModele.ListBox)
            {
                dic = _DicPropModele;
            }

            return(dic);
        }
Exemple #2
0
            public Prop(DicProp Dic, String Nom, String Val, ModelDoc2 Modele, String Config = "")
            {
                _Dic = Dic;

                this.Nom = Nom;
                mdl      = Modele;
                config   = Config;

                Valeur = Val;

                AjouterDic();
            }
Exemple #3
0
        public OngletParametres(SldWorks sw)
        {
            _Sw = sw;

            InitializeComponent();

            _DicParam      = new DicParam(ListBoxParams);
            _DicPropModele = new DicProp(ListBoxPropMdl);
            _DicPropCfg    = new DicProp(ListBoxPropCfg);

            ToolStripMenuItem ParamMenuItem = new ToolStripMenuItem {
                Text = "Supprimer"
            };

            ParamMenuItem.Click += SupprimerParam;

            ParamContextMenuListBox = new ContextMenuStrip();
            ParamContextMenuListBox.Items.AddRange(new ToolStripItem[] { ParamMenuItem });
            ListBoxParams.MouseDown       += ListBoxParams_MouseDown;
            ListBoxParams.ContextMenuStrip = ParamContextMenuListBox;

            ToolStripMenuItem PropMenuItem = new ToolStripMenuItem {
                Text = "Supprimer"
            };

            PropMenuItem.Click += SupprimerProp;

            PropContextMenuListBox = new ContextMenuStrip();
            PropContextMenuListBox.Items.AddRange(new ToolStripItem[] { PropMenuItem });
            ListBoxPropMdl.MouseDown       += ListBoxProp_MouseDown;
            ListBoxPropMdl.ContextMenuStrip = PropContextMenuListBox;
            ListBoxPropCfg.MouseDown       += ListBoxProp_MouseDown;
            ListBoxPropCfg.ContextMenuStrip = PropContextMenuListBox;

            String       NomModule   = GetType().GetModuleNom();
            String       TitreModule = GetType().GetModuleTitre();
            ConfigModule _Config     = new ConfigModule(NomModule, TitreModule);

            Parametre pListePropExclu = _Config.AjouterParam("ListePropExclu", "Adresse,Client,Description,Designation,Dessinateur,Empreinte,ExcluNomenclature,LierConfigs,MasseModele,Matériau,NoClient,NoCommande,PrefixeEmpreinte,Quantite,TarauderEmpreinte", "Liste des proprietes à exclure");

            HashPropExclu = new HashSet <string>(pListePropExclu.GetValeur <String>().Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries));

            ResizeControl();
        }