Exemple #1
0
        protected void Calque()
        {
            try
            {
                Groupe G;

                _Groupe1 = _Calque.AjouterGroupe("Selectionner les composants de base");

                _Select_CompBase = _Groupe1.AjouterSelectionBox("", "Selectionnez les composants");
                _Select_CompBase.SelectionMultipleMemeEntite = false;
                _Select_CompBase.SelectionDansMultipleBox    = false;
                _Select_CompBase.UneSeuleEntite = false;
                _Select_CompBase.FiltreSelection(swSelectType_e.swSelCOMPONENTS, swSelectType_e.swSelFACES);
                _Select_CompBase.OnSubmitSelection += SelectionnerPiece;
                _Select_CompBase.Hauteur            = 8;
                _Select_CompBase.Focus              = true;

                Isoler.ListSelectionBox.Add(_Select_CompBase);

                _FiltreCompBase = new FiltreComp(MdlBase, _Groupe1, _Select_CompBase, PrefixeBase);

                _Groupe2 = _Calque.AjouterGroupe("Selectionner les composants empreinte");

                _Select_CompEmpreinte = _Groupe2.AjouterSelectionBox("", "Selectionnez les composants");
                _Select_CompEmpreinte.SelectionMultipleMemeEntite = false;
                _Select_CompEmpreinte.SelectionDansMultipleBox    = false;
                _Select_CompEmpreinte.UneSeuleEntite = false;
                _Select_CompEmpreinte.FiltreSelection(swSelectType_e.swSelCOMPONENTS, swSelectType_e.swSelFACES);
                _Select_CompEmpreinte.OnSubmitSelection += SelectionnerPiece;
                _Select_CompEmpreinte.Hauteur            = 8;

                Isoler.ListSelectionBox.Add(_Select_CompEmpreinte);

                _FiltreCompEmpreinte = new FiltreComp(MdlBase, _Groupe2, _Select_CompEmpreinte, PrefixeEmpreinte);

                _Groupe1.OnExpand   += _Groupe2.UnExpand;
                _Groupe1.OnUnExpand += _Groupe2.Expand;
                _Groupe2.OnExpand   += _Groupe1.UnExpand;
                _Groupe2.OnUnExpand += _Groupe1.Expand;
                _Groupe2.UnExpand();

                G = _Calque.AjouterGroupe("Options");

                _Button_IsolerComposants = G.AjouterBouton("Isoler les composants");
                _Button_IsolerComposants.OnButtonPress += delegate(Object sender) { Isoler.Run(MdlBase); };

                Isoler.Bouton = _Button_IsolerComposants;

                _CheckBox_MasquerLesEmpreintes = G.AjouterCheckBox("Masquer toutes les empreintes");
            }
            catch (Exception e)
            { this.LogMethode(new Object[] { e }); }
        }
Exemple #2
0
            public FiltreComp(ModelDoc2 mdl, Groupe g, CtrlSelectionBox SelectionBox, Parametre Prefixe)
            {
                _Mdl          = mdl;
                _SelectionBox = SelectionBox;

                G = g;

                _Select_CompBase = G.AjouterSelectionBox("", "Selectionnez le composant");
                _Select_CompBase.SelectionMultipleMemeEntite = true;
                _Select_CompBase.SelectionDansMultipleBox    = true;
                _Select_CompBase.UneSeuleEntite = true;
                _Select_CompBase.FiltreSelection(swSelectType_e.swSelCOMPONENTS, swSelectType_e.swSelFACES);
                _Select_CompBase.OnSelectionChanged += delegate(Object sender, int nb) { AfficherInfos(); };
                _Select_CompBase.OnSubmitSelection  += SelectionnerPiece;
                _Select_CompBase.Hauteur             = 2;

                _TextBox_NomComp = G.AjouterTexteBox("");
                _TextBox_NomComp.LectureSeule    = true;
                _TextBox_NomComp.NotifieSurFocus = true;

                o1 = G.AjouterOption("Filtrer propriete");
                o2 = G.AjouterOption("Filtrer config");

                o1.OnCheck += delegate(Object sender) { _TextBox_Prefixe.Visible = true; _TextListBox_Configs.Visible = false; };
                o2.OnCheck += delegate(Object sender) { _TextBox_Prefixe.Visible = false; _TextListBox_Configs.Visible = true; };

                _TextBox_Prefixe = G.AjouterTexteBox(Prefixe, true);

                _TextListBox_Configs = G.AjouterTextListBox("Liste des configurations");
                _TextListBox_Configs.TouteHauteur      = true;
                _TextListBox_Configs.Height            = 50;
                _TextListBox_Configs.SelectionMultiple = true;

                _Button = G.AjouterBouton("Filtrer");
                _Button.OnButtonPress += delegate(Object sender)
                {
                    if (o1.IsChecked)
                    {
                        RechercherComp(_SelectionBox, _TextBox_Prefixe.Text);
                    }
                    else
                    {
                        SelectionnerComposants();
                    }
                };
            }
Exemple #3
0
            protected void Calque()
            {
                try
                {
                    MdlBase.eEffacerSelection();

                    GroupeMarche = _Calque.AjouterGroupe("Marches");

                    _Select_Marche = GroupeMarche.AjouterSelectionBox("", "Selectionnez les marches", false);
                    _Select_Marche.SelectionMultipleMemeEntite = false;
                    _Select_Marche.SelectionDansMultipleBox    = true;
                    _Select_Marche.UneSeuleEntite = false;
                    _Select_Marche.FiltreSelection(swSelectType_e.swSelCOMPONENTS, swSelectType_e.swSelFACES);
                    _Select_Marche.Hauteur = 7;

                    _Select_Marche.OnSubmitSelection += SelectionnerComposant1erNvx;

                    _Button_Selection = GroupeMarche.AjouterBouton("Modifier la selection");
                    _Button_Selection.OnButtonPress += MajAngle;

                    GroupeParametres = _Calque.AjouterGroupe("Parametrage");

                    _TextListBox_Marche = GroupeParametres.AjouterTextListBox("Liste des marches", "Selectionnez la marche à modifier");
                    _TextListBox_Marche.SelectionMultiple   = false;
                    _TextListBox_Marche.TouteHauteur        = true;
                    _TextListBox_Marche.Height              = 70;
                    _TextListBox_Marche.OnSelectionChanged += SelectionChanged;

                    _TextBox_Angle                 = GroupeParametres.AjouterTexteBox("Angle de la marche", "");
                    _TextBox_Angle.Multiligne      = false;
                    _TextBox_Angle.NotifieSurFocus = true;

                    GroupeParametres.Expanded = false;

                    GroupeMarche.OnExpand     += GroupeParametres.UnExpand;
                    GroupeParametres.OnExpand += GroupeMarche.UnExpand;
                    GroupeMarche.OnExpand     += Vider;
                }
                catch (Exception e)
                { this.LogMethode(new Object[] { e }); }
            }