예제 #1
0
        void IPropertyManagerPage2Handler9.OnOptionCheck(int Id)
        {
            if (!CanRaiseEvent())
            {
                return;
            }

            CtrlOption Option = _Calque.DicControl[Id] as CtrlOption;

            if (Option.IsRef())
            {
                Option.IsChecked = true;
            }
        }
예제 #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();
                    }
                };
            }
예제 #3
0
        protected void Calque()
        {
            try
            {
                Groupe G;

                ListeGroupe1.Add(_Calque.AjouterGroupe("Fichier"));
                G = ListeGroupe1.Last();

                _Texte_RefFichier = G.AjouterTexteBox("Référence du fichier :", "la référence est ajoutée au début du nom de chaque fichier généré");

                _Texte_RefFichier.Text         = MdlBase.eRefFichierComplet();
                _Texte_RefFichier.LectureSeule = false;

                // S'il n'y a pas de reference, on met le texte en rouge
                if (String.IsNullOrWhiteSpace(_Texte_RefFichier.Text))
                {
                    _Texte_RefFichier.BackgroundColor(Color.Red, true);
                }

                _TextBox_Campagne = G.AjouterTexteBox("Campagne :", "");
                _TextBox_Campagne.LectureSeule = true;

                ListeGroupe1.Add(_Calque.AjouterGroupe("Quantité"));
                G = ListeGroupe1.Last();

                _Texte_Quantite               = G.AjouterTexteBox("Quantité :", "Multiplier les quantités par");
                _Texte_Quantite.Text          = MdlBase.pQuantite();
                _Texte_Quantite.ValiderTexte += ValiderTextIsInteger;

                ListeGroupe1.Add(_Calque.AjouterGroupe("Materiaux :"));
                G = ListeGroupe1.Last();

                _TextListBox_Materiaux = G.AjouterTextListBox();
                _TextListBox_Materiaux.TouteHauteur      = true;
                _TextListBox_Materiaux.Height            = 60;
                _TextListBox_Materiaux.SelectionMultiple = true;

                ListeGroupe1.Add(_Calque.AjouterGroupe("Profil :"));
                G = ListeGroupe1.Last();

                _TextListBox_Profils = G.AjouterTextListBox();
                _TextListBox_Profils.TouteHauteur      = true;
                _TextListBox_Profils.Height            = 50;
                _TextListBox_Profils.SelectionMultiple = true;

                ListeGroupe1.Add(_Calque.AjouterGroupe("Options"));
                G = ListeGroupe1.Last();

                _Option_ListeDebit           = G.AjouterOption("Liste de débit");
                _Option_ListeBarres          = G.AjouterOption("Liste des barres");
                _Option_ListeDebit.OnCheck  += delegate(Object sender) { TypeSortie = eTypeSortie.ListeDebit; };
                _Option_ListeBarres.OnCheck += delegate(Object sender) { TypeSortie = eTypeSortie.ListeBarre; };
                _Option_ListeDebit.IsChecked = true;

                _Texte_LgBarre = G.AjouterTexteBox(LgBarre, true);

                _CheckBox_AfficherListe = G.AjouterCheckBox(AfficherListe);

                ListeGroupe2.Add(_Calque.AjouterGroupe("Lg des barres"));
                G         = ListeGroupe2.Last();
                G.Visible = false;

                for (int i = 0; i < NbProfilMax; i++)
                {
                    ListeCheckBoxLg.Add(G.AjouterCheckBox("Profil " + (i + 1)));
                    CtrlCheckBox c = ListeCheckBoxLg.Last();
                    c.Visible = false;

                    ListeTextBoxLg.Add(G.AjouterTexteBox());
                    CtrlTextBox t = ListeTextBoxLg.Last();
                    t.Text    = _Texte_LgBarre.Text.eToInteger().ToString();
                    t.Visible = false;
                }
            }
            catch (Exception e)
            { this.LogMethode(new Object[] { e }); }
        }