Ejemplo n.º 1
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();
                    }
                };
            }
Ejemplo n.º 2
0
        protected void Calque()
        {
            try
            {
                Groupe G;

                G = _Calque.AjouterGroupe("Selectionnez le fichier : ");

                _Texte_SelectionnerFichierInfos = G.AjouterTexteBox();
                _Texte_SelectionnerFichierInfos.LectureSeule = true;

                _Bouton_Parcourir = G.AjouterBouton("Parcourir");
                _Bouton_Parcourir.OnButtonPress += delegate(Object Bouton)
                {
                    OpenFileDialog pDialogue = new OpenFileDialog
                    {
                        Filter           = "Fichier texte (*.txt)|*.txt|Tout les fichiers (*.*)|*.*",
                        Multiselect      = false,
                        InitialDirectory = Path.GetDirectoryName(MdlBase.GetPathName()),
                        RestoreDirectory = true
                    };

                    String pChemin = "";

                    if (pDialogue.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                    {
                        pChemin = pDialogue.FileName;
                    }

                    PublierInfos(pChemin);
                };

                _TextListBox_AfficherInfos = G.AjouterTextListBox("Contenu du fichier :");
                _TextListBox_AfficherInfos.TouteHauteur      = true;
                _TextListBox_AfficherInfos.Height            = 90;
                _TextListBox_AfficherInfos.SelectionMultiple = true;

                G = _Calque.AjouterGroupe("Options");

                _CheckBox_ComposantsExterne = G.AjouterCheckBox(_pComposantsExterne);
                _CheckBox_ToutReconstruire  = G.AjouterCheckBox(_pToutReconstruire);
            }
            catch (Exception e)
            { this.LogMethode(new Object[] { e }); }
        }
Ejemplo n.º 3
0
        protected void Calque()
        {
            try
            {
                Groupe G;

                G = _Calque.AjouterGroupe("Options");

                _CheckBox_IsolerComposants            = G.AjouterCheckBox("Isoler les composants selectionnés");
                _CheckBox_IsolerComposants.OnIsCheck += delegate(Object sender, Boolean value) { SelectionChanged(null, _TextListBox_Configs.SelectedIndex); };

                G = _Calque.AjouterGroupe("Composant");

                _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) { AfficherConfigs(); };
                _Select_CompBase.Hauteur             = 2;
                _Select_CompBase.Focus = true;

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

                _TextListBox_Configs = G.AjouterTextListBox("Liste des configurations dans le modèle");
                _TextListBox_Configs.TouteHauteur        = true;
                _TextListBox_Configs.Height              = 80;
                _TextListBox_Configs.SelectionMultiple   = false;
                _TextListBox_Configs.OnSelectionChanged += SelectionChanged;

                G = _Calque.AjouterGroupe("Configurations du composant");

                _Select_Configs = G.AjouterSelectionBox("");
                _Select_Configs.SelectionMultipleMemeEntite = true;
                _Select_Configs.SelectionDansMultipleBox    = true;
                _Select_Configs.UneSeuleEntite = false;
                _Select_Configs.FiltreSelection(swSelectType_e.swSelCOMPONENTS, swSelectType_e.swSelFACES);
                _Select_Configs.Hauteur = 15;
            }
            catch (Exception e)
            { this.LogMethode(new Object[] { e }); }
        }
Ejemplo n.º 4
0
        protected void Calque()
        {
            try
            {
                Groupe G;

                if (MdlBase.TypeDoc() == eTypeDoc.Assemblage)
                {
                    G = _Calque.AjouterGroupe("Options");

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

                G = _Calque.AjouterGroupe("Repères :");

                _TextListBox_Reperes = G.AjouterTextListBox();
                _TextListBox_Reperes.TouteHauteur        = true;
                _TextListBox_Reperes.Height              = 170;
                _TextListBox_Reperes.SelectionMultiple   = false;
                _TextListBox_Reperes.OnSelectionChanged += SelectionChanged;

                _CheckBox_ComposantsCache            = G.AjouterCheckBox("Prendre en compte les composants cachés");
                _CheckBox_ComposantsCache.OnIsCheck += delegate(Object sender, Boolean value) { AfficherReperes(); };

                G = _Calque.AjouterGroupe("Selection");

                _TextBox_Nb = G.AjouterTexteBox("Nb de corps :");
                _TextBox_Nb.LectureSeule = true;

                _Select_Selection = G.AjouterSelectionBox("");
                _Select_Selection.SelectionMultipleMemeEntite = true;
                _Select_Selection.SelectionDansMultipleBox    = true;
                _Select_Selection.UneSeuleEntite = false;
                _Select_Selection.FiltreSelection(swSelectType_e.swSelSOLIDBODIES, swSelectType_e.swSelCOMPONENTS);
                _Select_Selection.Hauteur             = 15;
                _Select_Selection.OnSelectionChanged += delegate(Object sender, int nb) { _TextBox_Nb.Text = nb.ToString(); };
            }
            catch (Exception e)
            { this.LogMethode(new Object[] { e }); }
        }
Ejemplo n.º 5
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 }); }
            }
Ejemplo n.º 6
0
        protected void Calque()
        {
            try
            {
                Groupe G;

                if (MdlBase.TypeDoc() == eTypeDoc.Assemblage)
                {
                    G = _Calque.AjouterGroupe("Options");

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

                G = _Calque.AjouterGroupe("Percages :");

                _TextListBox_Percage = G.AjouterTextListBox();
                _TextListBox_Percage.TouteHauteur        = true;
                _TextListBox_Percage.Height              = 170;
                _TextListBox_Percage.SelectionMultiple   = false;
                _TextListBox_Percage.OnSelectionChanged += SelectionChanged;

                G = _Calque.AjouterGroupe("Selection");

                _Select_Selection = G.AjouterSelectionBox("");
                _Select_Selection.SelectionMultipleMemeEntite = true;
                _Select_Selection.SelectionDansMultipleBox    = true;
                _Select_Selection.UneSeuleEntite = false;
                _Select_Selection.FiltreSelection(new List <swSelectType_e>()
                {
                    swSelectType_e.swSelFACES
                });
                _Select_Selection.Hauteur = 15;
            }
            catch (Exception e)
            { this.LogMethode(new Object[] { e }); }
        }
Ejemplo n.º 7
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 }); }
        }
Ejemplo n.º 8
0
            protected void Calque()
            {
                try
                {
                    Groupe G;

                    G = _Calque.AjouterGroupe("Fichier");

                    _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é");

                    String Ref = MdlBase.eRefFichier();
                    _Texte_RefFichier.Text         = Ref;
                    _Texte_RefFichier.LectureSeule = false;

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

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

                    _CheckBox_ComposantsExterne = G.AjouterCheckBox(ComposantsExterne);

                    G = _Calque.AjouterGroupe("Materiaux :");

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

                    _CheckBox_ForcerMateriau                         = G.AjouterCheckBox("Forcer le materiau");
                    _TextComboBox_ForcerMateriau                     = G.AjouterTextComboBox();
                    _TextComboBox_ForcerMateriau.Editable            = true;
                    _TextComboBox_ForcerMateriau.LectureSeule        = false;
                    _TextComboBox_ForcerMateriau.NotifieSurSelection = false;
                    _TextComboBox_ForcerMateriau.IsEnabled           = false;
                    _CheckBox_ForcerMateriau.OnIsCheck              += _TextComboBox_ForcerMateriau.IsEnable;

                    G = _Calque.AjouterGroupe("Options");

                    _CheckBox_PrendreEnCompteTole            = G.AjouterCheckBox(PrendreEnCompteTole);
                    _CheckBox_PrendreEnCompteTole.OnIsCheck += delegate(Object sender, Boolean value) { Rechercher_Materiaux(); };

                    _CheckBox_ExporterBarres             = G.AjouterCheckBox(ExporterBarres);
                    _EnumComboBox_TypeExport             = G.AjouterEnumComboBox <eTypeFichierExport, Intitule>(TypeExport);
                    _EnumComboBox_TypeExport.FiltrerEnum = eTypeFichierExport.Parasolid |
                                                           eTypeFichierExport.ParasolidBinary |
                                                           eTypeFichierExport.STEP;

                    _CheckBox_CreerPdf3D = G.AjouterCheckBox(CreerPdf3D);
                    _CheckBox_ExporterBarres.OnIsCheck += _CheckBox_CreerPdf3D.IsEnable;
                    _CheckBox_ExporterBarres.OnIsCheck += _EnumComboBox_TypeExport.IsEnable;
                    _CheckBox_ExporterBarres.ApplyParam();

                    _CheckBox_ListerUsinages = G.AjouterCheckBox(ListerUsinages);
                }
                catch (Exception e)
                { this.LogMethode(new Object[] { e }); }
            }
Ejemplo n.º 9
0
        protected void Calque()
        {
            try
            {
                Groupe G;

                G = _Calque.AjouterGroupe("Fichier");

                _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;

                _CheckBox_MettreAjourCampagne = G.AjouterCheckBox("Mettre à jour la campagne");

                G = _Calque.AjouterGroupe("Quantité :");

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

                G = _Calque.AjouterGroupe("Materiaux :");

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

                G = _Calque.AjouterGroupe("Ep :");

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

                G = _Calque.AjouterGroupe("Options");

                _CheckBox_AfficherLignePliage = G.AjouterCheckBox(AfficherLignePliage);
                _CheckBox_AfficherNotePliage  = G.AjouterCheckBox(AfficherNotePliage);
                _CheckBox_AfficherNotePliage.StdIndent();

                _CheckBox_AfficherLignePliage.OnUnCheck += _CheckBox_AfficherNotePliage.UnCheck;
                _CheckBox_AfficherLignePliage.OnIsCheck += _CheckBox_AfficherNotePliage.IsEnable;

                // Pour eviter d'ecraser le parametre de "AfficherNotePliage", le met à jour seulement si
                if (!_CheckBox_AfficherLignePliage.IsChecked)
                {
                    _CheckBox_AfficherNotePliage.IsChecked = _CheckBox_AfficherLignePliage.IsChecked;
                    _CheckBox_AfficherNotePliage.IsEnabled = _CheckBox_AfficherLignePliage.IsChecked;
                }

                _CheckBox_InscrireNomTole              = G.AjouterCheckBox(InscrireNomTole);
                _Texte_TailleInscription               = G.AjouterTexteBox(TailleInscription, false);
                _Texte_TailleInscription.ValiderTexte += ValiderTextIsInteger;
                _Texte_TailleInscription.StdIndent();

                _CheckBox_InscrireNomTole.OnIsCheck += _Texte_TailleInscription.IsEnable;
                _Texte_TailleInscription.IsEnabled   = _CheckBox_InscrireNomTole.IsChecked;

                _CheckBox_OrienterDvp        = G.AjouterCheckBox(OrienterDvp);
                _EnumComboBox_OrientationDvp = G.AjouterEnumComboBox <eOrientation, Intitule>(OrientationDvp);
                _EnumComboBox_OrientationDvp.StdIndent();

                _CheckBox_OrienterDvp.OnIsCheck       += _EnumComboBox_OrientationDvp.IsEnable;
                _EnumComboBox_OrientationDvp.IsEnabled = _CheckBox_OrienterDvp.IsChecked;
            }
            catch (Exception e)
            { this.LogMethode(new Object[] { e }); }
        }
Ejemplo n.º 10
0
        protected void Calque()
        {
            try
            {
                Groupe G;

                G = _Calque.AjouterGroupe("Fichier");

                _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;

                _CheckBox_MettreAjourCampagne = G.AjouterCheckBox("Mettre à jour la campagne");

                G = _Calque.AjouterGroupe("Quantité :");

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

                G = _Calque.AjouterGroupe("Materiaux :");

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

                G = _Calque.AjouterGroupe("Profil :");

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

                G = _Calque.AjouterGroupe("Options");

                _CheckBox_ExporterBarres             = G.AjouterCheckBox(ExporterBarres);
                _EnumComboBox_TypeExport             = G.AjouterEnumComboBox <eTypeFichierExport, Intitule>(TypeExport);
                _EnumComboBox_TypeExport.FiltrerEnum = eTypeFichierExport.Parasolid |
                                                       eTypeFichierExport.ParasolidBinary |
                                                       eTypeFichierExport.STEP;

                _CheckBox_CreerPdf3D = G.AjouterCheckBox(CreerPdf3D);
                _CheckBox_ExporterBarres.OnIsCheck += _CheckBox_CreerPdf3D.IsEnable;
                _CheckBox_ExporterBarres.OnIsCheck += _EnumComboBox_TypeExport.IsEnable;
                _CheckBox_ExporterBarres.ApplyParam();

                _CheckBox_ListerUsinages = G.AjouterCheckBox(ListerUsinages);
            }
            catch (Exception e)
            { this.LogMethode(new Object[] { e }); }
        }
Ejemplo n.º 11
0
            public void AjouterAuCalque()
            {
                _Groupe = _Calque.AjouterGroupeAvecCheckBox(_ParamGroupe);

                _TextBox_CheminDossier = _Groupe.AjouterTexteBox();
                AfficherCheminDossier();
                _TextBox_CheminDossier.LectureSeule = true;

                if (_Selectionnable)
                {
                    _Button_Parcourir = _Groupe.AjouterBouton("Parcourir");
                    _Button_Parcourir.OnButtonPress += delegate(Object Bouton)
                    {
                        System.Windows.Forms.FolderBrowserDialog pDialogue = new System.Windows.Forms.FolderBrowserDialog();
                        pDialogue.SelectedPath = _Mdl.eDossier();

                        if (pDialogue.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                        {
                            _NomDossierRelatif = OutilsCommun.CheminRelatif(_Mdl.eDossier(), pDialogue.SelectedPath);
                            AfficherCheminDossier();
                        }

                        Maj();
                    };

                    _TextListBox_ListeDossiers = _Groupe.AjouterTextListBox("Liste des dossiers");
                    _TextListBox_ListeDossiers.TouteHauteur = true;
                    _TextListBox_ListeDossiers.Height       = 50;

                    _TextListBox_ListeDossiers.OnSelectionChanged += delegate(Object sender, int Item)
                    {
                        _NomDossierCourant = _TextListBox_ListeDossiers.SelectedText;
                        MajListeFichiers();
                    };

                    _CheckBox_CreerDossier            = _Groupe.AjouterCheckBox("Nouveau dossier");
                    _TextBox_NomNvxDossier            = _Groupe.AjouterTexteBox();
                    _Button_CreerDossier              = _Groupe.AjouterBouton("Creer");
                    _CheckBox_CreerDossier.OnIsCheck += _TextBox_NomNvxDossier.IsEnable;
                    _CheckBox_CreerDossier.OnIsCheck += _Button_CreerDossier.IsEnable;
                    _CheckBox_CreerDossier.OnIsCheck += _TextBox_NomNvxDossier.IsVisible;
                    _CheckBox_CreerDossier.OnIsCheck += _Button_CreerDossier.IsVisible;
                    _CheckBox_CreerDossier.IsChecked  = false;

                    _Button_CreerDossier.OnButtonPress += delegate(Object Bouton)
                    {
                        String n = _TextBox_NomNvxDossier.Text;
                        Directory.CreateDirectory(Path.Combine(CheminDossierRelatif(), n));

                        Maj();

                        _CheckBox_CreerDossier.IsChecked        = false;
                        _TextListBox_ListeDossiers.SelectedText = n;
                    };
                }

                _TextListBox_ListeFichiers = _Groupe.AjouterTextListBox("Contenu du dossier :");
                _TextListBox_ListeFichiers.TouteHauteur = true;
                _TextListBox_ListeFichiers.Height       = 50;

                _TextBox_NomNvxFichier = _Groupe.AjouterTexteBox();
                _TextBox_NomNvxFichier.OnTextBoxChanged += delegate(Object sender, String text)
                {
                    if (!EcraserInfos)
                    {
                        return;
                    }

                    _NomFichierComplet = text;
                };
            }
Ejemplo n.º 12
0
        protected void Calque()
        {
            try
            {
                Groupe G;

                G = _Calque.AjouterGroupe("Fichier");

                _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é");

                String Ref = MdlBase.eRefFichier();
                _Texte_RefFichier.Text         = Ref;
                _Texte_RefFichier.LectureSeule = false;

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

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

                _CheckBox_ComposantsExterne = G.AjouterCheckBox(ComposantsExterne);

                G = _Calque.AjouterGroupe("Materiaux :");

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

                _CheckBox_ForcerMateriau                         = G.AjouterCheckBox("Forcer le materiau");
                _TextComboBox_ForcerMateriau                     = G.AjouterTextComboBox();
                _TextComboBox_ForcerMateriau.Editable            = true;
                _TextComboBox_ForcerMateriau.LectureSeule        = false;
                _TextComboBox_ForcerMateriau.NotifieSurSelection = false;
                _TextComboBox_ForcerMateriau.IsEnabled           = false;
                _CheckBox_ForcerMateriau.OnIsCheck              += _TextComboBox_ForcerMateriau.IsEnable;

                G = _Calque.AjouterGroupe("Ep :");

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

                G = _Calque.AjouterGroupe("Options");

                _CheckBox_AfficherLignePliage = G.AjouterCheckBox(AfficherLignePliage);
                _CheckBox_AfficherNotePliage  = G.AjouterCheckBox(AfficherNotePliage);
                _CheckBox_AfficherNotePliage.StdIndent();

                _CheckBox_AfficherLignePliage.OnUnCheck += _CheckBox_AfficherNotePliage.UnCheck;
                _CheckBox_AfficherLignePliage.OnIsCheck += _CheckBox_AfficherNotePliage.IsEnable;

                // Pour eviter d'ecraser le parametre de "AfficherNotePliage", le met à jour seulement si
                if (!_CheckBox_AfficherLignePliage.IsChecked)
                {
                    _CheckBox_AfficherNotePliage.IsChecked = _CheckBox_AfficherLignePliage.IsChecked;
                    _CheckBox_AfficherNotePliage.IsEnabled = _CheckBox_AfficherLignePliage.IsChecked;
                }

                _CheckBox_InscrireNomTole              = G.AjouterCheckBox(InscrireNomTole);
                _Texte_TailleInscription               = G.AjouterTexteBox(TailleInscription, false);
                _Texte_TailleInscription.ValiderTexte += ValiderTextIsInteger;
                _Texte_TailleInscription.StdIndent();

                _CheckBox_InscrireNomTole.OnIsCheck += _Texte_TailleInscription.IsEnable;
                _Texte_TailleInscription.IsEnabled   = _CheckBox_InscrireNomTole.IsChecked;


                _CheckBox_OrienterDvp        = G.AjouterCheckBox(OrienterDvp);
                _EnumComboBox_OrientationDvp = G.AjouterEnumComboBox <eOrientation, Intitule>(OrientationDvp);
                _EnumComboBox_OrientationDvp.StdIndent();

                _CheckBox_OrienterDvp.OnIsCheck       += _EnumComboBox_OrientationDvp.IsEnable;
                _EnumComboBox_OrientationDvp.IsEnabled = _CheckBox_OrienterDvp.IsChecked;

                _CheckBox_FermerPlan         = G.AjouterCheckBox(FermerPlan);
                _CheckBox_MajPlans           = G.AjouterCheckBox("Mettre à jour les dvps existant");
                _CheckBox_MajPlans.IsChecked = false;

                G          = _Calque.AjouterGroupe("Fichiers volumineux");
                G.Expanded = true;

                _CheckBox_ConvertirEsquisse = G.AjouterCheckBox(ConvertirEsquisse);
            }
            catch (Exception e)
            { this.LogMethode(new Object[] { e }); }
        }