Exemplo n.º 1
0
        protected void RunOkCommand()
        {
            CmdLierLesConfigurations Cmd = new CmdLierLesConfigurations();

            Cmd.MdlBase = MdlBase;

            if (MdlBase.TypeDoc() != eTypeDoc.Piece)
            {
                Cmd.ListeComposants = MdlBase.eSelect_RecupererListeComposants(_Select_Composants.Marque);
            }


            Cmd.CreerConfigsManquantes = true;

            if (MdlBase.TypeDoc() != eTypeDoc.Piece)
            {
                Cmd.CreerConfigsManquantes = _CheckBox_CreerLesConfigsManquantes.IsChecked;
            }

            Cmd.SupprimerNvlFonction = _CheckBox_SupprimerNvlFonction.IsChecked;
            Cmd.SupprimerNvComposant = _CheckBox_SupprimerNvComposant.IsChecked;

            Cmd.ListeConfig = new List <string>(_Texte_ListeConfigs.Text.Trim().Split(' '));

            MdlBase.ClearSelection2(true);

            Cmd.Executer();
        }
Exemplo n.º 2
0
        protected void PreSelection()
        {
            try
            {
                MdlBase.ClearSelection2(true);

                SelectionMgr SelMgr = MdlBase.SelectionManager;
                Component2   Piece  = MdlBase.eRecChercherComposant(c => { return(Regex.IsMatch(c.Name2, _pPieceBase.GetValeur <String>()) &&
                                                                                  !c.IsSuppressed()); });
                Component2 Percage  = MdlBase.eRecChercherComposant(c => { return(Regex.IsMatch(c.Name2, _pPercage.GetValeur <String>()) &&
                                                                                  !c.IsSuppressed()); });

                if (Piece.IsRef())
                {
                    MdlBase.eSelectMulti(Piece, _Select_Percage.Marque, false);
                }

                if (Percage.IsRef())
                {
                    MdlBase.eSelectMulti(Percage, _Select_Percage.Marque, false);
                }

                _Select_Base.Focus = true;
            }
            catch (Exception e)
            { this.LogMethode(new Object[] { e }); }
        }
            protected void PreSelection()
            {
                try
                {
                    MdlBase.ClearSelection2(true);

                    Component2 Marche = MdlBase.eRecChercherComposant(c =>
                    {
                        return(Regex.IsMatch(c.Name2, pMarche.GetValeur <String>()) &&
                               !c.IsSuppressed());
                    });

                    if (Marche.IsRef())
                    {
                        SelectFace(_Select_F_Dessus, Marche, pFaceDessus);
                        SelectFace(_Select_F_Devant, Marche, pFaceDevant);
                    }

                    Component2 ContreMarche = MdlBase.eRecChercherComposant(c =>
                    {
                        return(Regex.IsMatch(c.Name2, pEsquisse.GetValeur <String>()) &&
                               !c.IsSuppressed());
                    });

                    if (ContreMarche.IsRef())
                    {
                        SelectEsquisse(_Select_ContreMarche_Esquisse, ContreMarche, pNomEsquisse);
                    }
                }
                catch (Exception e)
                { this.LogMethode(new Object[] { e }); }
            }
Exemplo n.º 4
0
            protected void RunOkCommand()
            {
                CmdInsererEsquisseConfig Cmd = new CmdInsererEsquisseConfig();

                Cmd.MdlBase     = MdlBase;
                Cmd.Plan        = MdlBase.eSelect_RecupererObjet <Feature>(1, _Select_F_Dessus.Marque);
                Cmd.NomEsquisse = _Text_NomEsquisse.Text.Trim();

                MdlBase.ClearSelection2(true);

                Cmd.Executer();
            }
        protected void RunOkCommand()
        {
            CmdContraindreComposant Cmd = new CmdContraindreComposant();

            Cmd.MdlBase         = MdlBase;
            Cmd.CompBase        = MdlBase.eSelect_RecupererComposant(1, _Select_CompBase.Marque);
            Cmd.ListeComposants = MdlBase.eSelect_RecupererListeComposants(_Select_Composants.Marque);
            Cmd.FixerComposant  = _CheckBox_FixerComposant.IsChecked;

            MdlBase.ClearSelection2(true);

            Cmd.Executer();
        }
Exemplo n.º 6
0
        protected void RunOkCommand()
        {
            CmdInsererPercageTole Cmd = new CmdInsererPercageTole
            {
                MdlBase       = MdlBase,
                CompBase      = MdlBase.eSelect_RecupererComposant(1, _Select_Base.Marque),
                CompPercage   = MdlBase.eSelect_RecupererComposant(1, _Select_Percage.Marque),
                ListeDiametre = new List <double>(_Text_Diametre.Text.Split(',').Select(x => { return(x.Trim().eToDouble()); })),
            };

            MdlBase.ClearSelection2(true);

            Cmd.Executer();
        }
Exemplo n.º 7
0
            protected void RunOkCommand()
            {
                CmdPositionnerPlatine Cmd = new CmdPositionnerPlatine();

                Cmd.MdlBase            = MdlBase;
                Cmd.F_Dessus           = MdlBase.eSelect_RecupererObjet <Face2>(1, _Select_F_Dessus.Marque);
                Cmd.F_Devant           = MdlBase.eSelect_RecupererObjet <Face2>(1, _Select_F_Devant.Marque);
                Cmd.PltG               = MdlBase.eSelect_RecupererComposant(1, _Select_PlatineG.Marque);
                Cmd.PltD               = MdlBase.eSelect_RecupererComposant(1, _Select_PlatineD.Marque);
                Cmd.PltG_Plan          = MdlBase.eSelect_RecupererObjet <Feature>(1, _Select_PlatineG.Marque);
                Cmd.PltD_Plan          = MdlBase.eSelect_RecupererObjet <Feature>(1, _Select_PlatineD.Marque);
                Cmd.SurTouteLesConfigs = _CheckBox_ToutesLesConfig.IsChecked;

                MdlBase.ClearSelection2(true);

                Cmd.Executer();
            }
Exemplo n.º 8
0
            protected void PreSelection()
            {
                try
                {
                    MdlBase.ClearSelection2(true);

                    String cPlanEsquisse = _pPlanDessus.GetValeur <String>();

                    Feature P = MdlBase.eChercherFonction(f => { return(Regex.IsMatch(f.Name, cPlanEsquisse)); }, false);
                    if (P.IsRef())
                    {
                        MdlBase.eSelectMulti(P, _Select_F_Dessus.Marque, true);
                    }
                }
                catch (Exception e)
                { this.LogMethode(new Object[] { e }); }
            }
Exemplo n.º 9
0
        protected void RunOkCommand()
        {
            CmdInsererPercage Cmd = new CmdInsererPercage
            {
                MdlBase            = MdlBase,
                CompBase           = MdlBase.eSelect_RecupererComposant(1, _Select_Base.Marque),
                CompPercage        = MdlBase.eSelect_RecupererComposant(1, _Select_Percage.Marque),
                Face               = MdlBase.eSelect_RecupererObjet <Face2>(1, _Select_Entite_Contrainte.Marque),
                Plan               = MdlBase.eSelect_RecupererObjet <Feature>(1, _Select_Entite_Contrainte.Marque),
                ListeDiametre      = new List <double>(_Text_Diametre.Text.Split(',').Select(x => { return(x.Trim().eToDouble()); })),
                PercageOuvert      = _Check_PercageOuvert.IsChecked,
                SurTouteLesConfigs = _CheckBox_ToutesLesConfig.IsChecked
            };

            MdlBase.ClearSelection2(true);

            Cmd.Executer();
        }
            protected void RunOkCommand()
            {
                CmdConfigurerContreMarche Cmd = new CmdConfigurerContreMarche();

                Cmd.MdlBase  = MdlBase;
                Cmd.F_Dessus = MdlBase.eSelect_RecupererObjet <Face2>(1, _Select_F_Dessus.Marque);
                Cmd.F_Devant = MdlBase.eSelect_RecupererObjet <Face2>(1, _Select_F_Devant.Marque);

                Cmd.ContreMarche_Esquisse_Comp     = MdlBase.eSelect_RecupererComposant(1, _Select_ContreMarche_Esquisse.Marque);
                Cmd.ContreMarche_Esquisse_Fonction = MdlBase.eSelect_RecupererObjet <Feature>(1, _Select_ContreMarche_Esquisse.Marque);

                //Cmd.NomEsquisse = _Text_NomEsquisse.Text;
                Cmd.SurTouteLesConfigs = _CheckBox_ToutesLesConfig.IsChecked;

                MdlBase.ClearSelection2(true);

                Cmd.Executer();
            }
Exemplo n.º 11
0
            protected void PreSelection()
            {
                try
                {
                    MdlBase.ClearSelection2(true);

                    Component2 Marche = MdlBase.eRecChercherComposant(c =>
                    {
                        return(Regex.IsMatch(c.Name2, pMarche.GetValeur <String>()) &&
                               !c.IsSuppressed());
                    });

                    if (Marche.IsRef())
                    {
                        SelectFace(_Select_F_Dessus, Marche, pFaceDessus);
                        SelectFace(_Select_F_Devant, Marche, pFaceDevant);
                    }

                    Component2 PlatineG = MdlBase.eRecChercherComposant(c =>
                    {
                        return(Regex.IsMatch(c.Name2, pPlatineG.GetValeur <String>()) &&
                               !c.IsSuppressed());
                    });

                    if (PlatineG.IsRef())
                    {
                        SelectPlan(_Select_PlatineG, PlatineG, pPlanContrainte);
                    }


                    Component2 PlatineD = MdlBase.eRecChercherComposant(c =>
                    {
                        return(Regex.IsMatch(c.Name2, pPlatineD.GetValeur <String>()) &&
                               !c.IsSuppressed());
                    });

                    if (PlatineD.IsRef())
                    {
                        SelectPlan(_Select_PlatineD, PlatineD, pPlanContrainte);
                    }
                }
                catch (Exception e)
                { this.LogMethode(new Object[] { e }); }
            }
Exemplo n.º 12
0
            protected void RunOkCommand()
            {
                CmdInsererMarches Cmd = new CmdInsererMarches();

                Cmd.MdlBase             = MdlBase;
                Cmd.Marche              = MdlBase.eSelect_RecupererComposant(1, _Select_Marche.Marque);
                Cmd.ComposantRepetition = MdlBase.eSelect_RecupererComposant(1, _Select_FonctionRepet.Marque);
                Cmd.FonctionRepetition  = MdlBase.eSelect_RecupererObjet <Feature>(1, _Select_FonctionRepet.Marque);
                Cmd.Point       = PointCorps;
                Cmd.Arrete      = ArreteCorps;
                Cmd.Plan        = PlanComp;
                Cmd.PointMarche = PointMarche;
                Cmd.AxeMarche   = AxeMarche;
                Cmd.PlanMarche  = PlanMarche;

                MdlBase.ClearSelection2(true);

                Cmd.Executer();
            }
Exemplo n.º 13
0
            protected void PreSelection()
            {
                try
                {
                    MdlBase.ClearSelection2(true);

                    Component2 Marche = MdlBase.eRecChercherComposant(c =>
                    {
                        return(Regex.IsMatch(c.Name2, _pMarche.GetValeur <String>()) &&
                               !c.IsSuppressed());
                    },
                                                                      c => { return(false); }
                                                                      );

                    if (Marche.IsRef())
                    {
                        MdlBase.eSelectMulti(Marche, _Select_Marche.Marque);
                    }

                    Component2 PieceRepet = MdlBase.eRecChercherComposant(c =>
                    {
                        return(Regex.IsMatch(c.Name2, _pPieceRepet.GetValeur <String>()) &&
                               !c.IsSuppressed());
                    });

                    if (PieceRepet.IsRef())
                    {
                        Feature F = PieceRepet.eChercherFonction(f => { return(Regex.IsMatch(f.Name, _pFonctionRepet.GetValeur <String>())); }, false);
                        if (F.IsRef())
                        {
                            SelectFonctionRepetition(_Select_FonctionRepet, F);
                        }
                    }
                }
                catch (Exception e)
                { this.LogMethode(new Object[] { e }); }
            }
Exemplo n.º 14
0
            protected void RunOkCommand()
            {
                CmdConfigurerPlatine Cmd = new CmdConfigurerPlatine();

                Cmd.MdlBase              = MdlBase;
                Cmd.F_Dessus             = MdlBase.eSelect_RecupererObjet <Face2>(1, _Select_F_Dessus.Marque);
                Cmd.Marche               = MdlBase.eSelect_RecupererComposant(1, _Select_F_Dessus.Marque);
                Cmd.PltG_Contrainte_Comp = MdlBase.eSelect_RecupererComposant(1, _Select_PlatineG.Marque);
                Cmd.PltD_Contrainte_Comp = MdlBase.eSelect_RecupererComposant(1, _Select_PlatineD.Marque);
                Cmd.PltG_Contrainte_Plan = MdlBase.eSelect_RecupererObjet <Feature>(1, _Select_PlatineG.Marque);
                Cmd.PltD_Contrainte_Plan = MdlBase.eSelect_RecupererObjet <Feature>(1, _Select_PlatineD.Marque);

                Cmd.PltG_Esquisse_Comp     = MdlBase.eSelect_RecupererComposant(1, _Select_PlatineG_Esquisse.Marque);
                Cmd.PltD_Esquisse_Comp     = MdlBase.eSelect_RecupererComposant(1, _Select_PlatineD_Esquisse.Marque);
                Cmd.PltG_Esquisse_Fonction = MdlBase.eSelect_RecupererObjet <Feature>(1, _Select_PlatineG_Esquisse.Marque);
                Cmd.PltD_Esquisse_Fonction = MdlBase.eSelect_RecupererObjet <Feature>(1, _Select_PlatineD_Esquisse.Marque);

                Cmd.LgMin = _Text_LgMini.GetTextAs <Double>() * 0.001; // On converti en metres
                Cmd.SurTouteLesConfigs = _CheckBox_ToutesLesConfig.IsChecked;

                MdlBase.ClearSelection2(true);

                Cmd.Executer();
            }