protected void Calque() { try { Groupe G; 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; } catch (Exception e) { this.LogMethode(new Object[] { e }); } }
protected void Calque() { try { Groupe G; G = _Calque.AjouterGroupe("Appliquer"); _CheckBox_SupprimerLesAnciennesConfigs = G.AjouterCheckBox(SupprimerLesAnciennesConfigs); _CheckBox_ReconstuireLesConfigs = G.AjouterCheckBox(ReconstuireLesConfigs); _CheckBox_SupprimerLesAnciennesConfigs.OnCheck += _CheckBox_ReconstuireLesConfigs.UnCheck; _CheckBox_SupprimerLesAnciennesConfigs.OnIsCheck += _CheckBox_ReconstuireLesConfigs.IsDisable; // Pour eviter d'ecraser le parametre de "Reconstruire les configs", le met à jour seulement si if (_CheckBox_SupprimerLesAnciennesConfigs.IsChecked) { _CheckBox_ReconstuireLesConfigs.IsChecked = !_CheckBox_SupprimerLesAnciennesConfigs.IsChecked; _CheckBox_ReconstuireLesConfigs.IsEnabled = !_CheckBox_SupprimerLesAnciennesConfigs.IsChecked; } _CheckBox_ToutesLesConfigurations = G.AjouterCheckBox(ToutesLesConfigurations); G = _Calque.AjouterGroupe("Options"); _CheckBox_MasquerEsquisses = G.AjouterCheckBox(MasquerEsquisses); _GroupeAvecCheckBox = _Calque.AjouterGroupeAvecCheckBox(SupprimerFonctions); _TextBox_NomFonctionSupprimer = _GroupeAvecCheckBox.AjouterTexteBox(NomFonctionSupprimer); _TextBox_NomFonctionSupprimer.IsEnabled = _GroupeAvecCheckBox.IsChecked; _GroupeAvecCheckBox.OnIsCheck += _TextBox_NomFonctionSupprimer.IsEnable; } catch (Exception e) { this.LogMethode(new Object[] { e }); } }
void IPropertyManagerPage2Handler9.OnTextboxChanged(int Id, string Text) { if (!CanRaiseEvent()) { return; } CtrlTextBox TxtBox = _Calque.DicControl[Id] as CtrlTextBox; if (TxtBox.IsRef()) { TxtBox.TextBoxChanged(Text); } }
protected void Calque() { try { Groupe G; G = _Calque.AjouterGroupe("Options"); _Texte_ValAmbiante = G.AjouterTexteBox(ValAmbiante); _Texte_ValAmbiante.ValiderTexte += ValiderTextIsDouble; _CheckBox_ToutesLesConfigs = G.AjouterCheckBox(ToutesLesConfigs); _CheckBox_DesactiverDirectionnelles = G.AjouterCheckBox(DesactiverDirectionnelles); } catch (Exception e) { this.LogMethode(new Object[] { e }); } }
protected void Calque() { try { Groupe G; G = _Calque.AjouterGroupe("Appliquer"); _CheckBox_EnregistrerSelection = G.AjouterCheckBox("Enregistrer les selections"); _Button_Preselection = G.AjouterBouton("Preselectionner"); _Button_Preselection.OnButtonPress += delegate(object sender) { PreSelection(); }; G = _Calque.AjouterGroupe("Piece sur laquelle inserer les perçages"); _Select_Base = G.AjouterSelectionBox("Selectionnez le composant"); _Select_Base.SelectionMultipleMemeEntite = false; _Select_Base.SelectionDansMultipleBox = false; _Select_Base.UneSeuleEntite = true; _Select_Base.FiltreSelection(swSelectType_e.swSelCOMPONENTS, swSelectType_e.swSelFACES); _Select_Base.OnSubmitSelection += SelectionnerPiece; _Select_Base.OnApplyOnSelection += delegate(Object Box) { SvgNomComposant(Box, _pPieceBase); }; G = _Calque.AjouterGroupe("Composant de perçage"); _Select_Percage = G.AjouterSelectionBox("Selectionnez le composant"); _Select_Percage.SelectionMultipleMemeEntite = false; _Select_Percage.SelectionDansMultipleBox = false; _Select_Percage.UneSeuleEntite = true; _Select_Percage.FiltreSelection(swSelectType_e.swSelCOMPONENTS, swSelectType_e.swSelFACES); _Select_Percage.OnSubmitSelection += SelectionnerComposant1erNvx; _Select_Percage.OnApplyOnSelection += delegate(Object Box) { SvgNomComposant(Box, _pPercage); }; _Select_Base.OnApplyOnSelection += _Select_Percage.GainedFocus; G = _Calque.AjouterGroupe("Diametres des trous à contraindre en mm" + "\r\n 0 ou vide pour tout les perçages" + "\r\n Valeurs séparés par une virgule"); _Text_Diametre = G.AjouterTexteBox(_pDiametre, false); // OnCheck, on enregistre les parametres _CheckBox_EnregistrerSelection.OnCheck += _Select_Base.ApplyOnSelection; _CheckBox_EnregistrerSelection.OnCheck += _Select_Percage.ApplyOnSelection; } catch (Exception e) { this.LogMethode(new Object[] { e }); } }
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(); } }; }
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 }); } }
private void SelectionChanged(Object sender, int Item) { try { ConfigModule M = _ListeConfigModule[((CtrlTextComboBox)sender).Text]; _GroupeModule.Titre = M.Intitule; var ListeParams = M.ListeParametre; for (int i = 0; i < _MaxCtrl; i++) { if (i < ListeParams.Count) { var P = ListeParams[i]; CtrlCheckBox c = _ListeCheckBox[i]; CtrlTextBox t = _ListeTextBox[i]; if (P.Type == typeof(Boolean)) { c.Visible = true; t.Visible = false; c.Param = P; c.Caption = P.Intitule; c.ApplyParam(); } else if (P.Type == typeof(String)) { c.Visible = false; t.Visible = true; t.Param = P; t.LabelText = P.Intitule; t.ApplyParam(); } } else { _ListeCheckBox[i].Visible = false; _ListeTextBox[i].Visible = false; } } } catch (Exception e) { this.LogMethode(new Object[] { e }); } }
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 }); } }
protected void Calque() { try { G = _Calque.AjouterGroupe("Options"); _EnumComboBox_FormatExport = G.AjouterEnumComboBox <eTypeFichierExport, Intitule>(FormatExport); _EnumComboBox_FormatExport.FiltrerEnum = eTypeFichierExport.DXF | eTypeFichierExport.DWG; _EnumComboBox_VersionExport = G.AjouterEnumComboBox <eDxfFormat, Intitule>(VersionExport); _CheckBox_UtiliserPoliceACAD = G.AjouterCheckBox(UtiliserPolicesACAD); _CheckBox_UtiliserStylesACAD = G.AjouterCheckBox(UtiliserStylesACAD); _CheckBox_FusionnerExtremites = G.AjouterCheckBox(FusionnerExtremites); _TextBox_ToleranceFusion = G.AjouterTexteBox(ToleranceFusion); _TextBox_ToleranceFusion.StdIndent(); _CheckBox_FusionnerExtremites.OnIsCheck += _TextBox_ToleranceFusion.IsEnable; _CheckBox_ExporterHauteQualite = G.AjouterCheckBox(ExporterHauteQualite); _CheckBox_ExporterHauteQualite.StdIndent(); _CheckBox_FusionnerExtremites.OnIsCheck += _CheckBox_ExporterHauteQualite.IsEnable; _CheckBox_FusionnerExtremites.ApplyParam(); _CheckBox_ConvertirSplineToPolyligne = G.AjouterCheckBox(ConvertirSplineToPolyligne); _CheckBox_ExporterFeuilleEspacePapier = G.AjouterCheckBox(ExporterFeuilleEspacePapier); AvecIndiceFichier = false; AvecIndiceDossier = false; AjouterCalqueDossier(); _EnumComboBox_FormatExport.OnSelectionChanged += delegate(Object sender, int Item) { _SelectionnerDossier.TypeFichier = _EnumComboBox_FormatExport.Val; _SelectionnerDossier.Maj(); _DernierDossier.TypeFichier = _EnumComboBox_FormatExport.Val; _DernierDossier.Maj(); }; } catch (Exception e) { this.LogMethode(new Object[] { e }); } }
protected void Calque() { try { Groupe G; G = _Calque.AjouterGroupe("Plan d'esquisse"); _Select_F_Dessus = G.AjouterSelectionBox("Selectionnez le plan"); _Select_F_Dessus.SelectionMultipleMemeEntite = false; _Select_F_Dessus.SelectionDansMultipleBox = false; _Select_F_Dessus.UneSeuleEntite = true; _Select_F_Dessus.FiltreSelection(swSelectType_e.swSelFACES, swSelectType_e.swSelDATUMPLANES); G = _Calque.AjouterGroupe("Nom de l'esquisse"); _Text_NomEsquisse = G.AjouterTexteBox(_pNomEsquisse); } catch (Exception e) { this.LogMethode(new Object[] { e }); } }
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 }); } }
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 }); } }
protected void Calque() { try { Groupe G; G = _Calque.AjouterGroupe("Ajouter des configs : "); _Texte_ListeConfigs = G.AjouterTexteBox(_pListeConfigs); if (MdlBase.TypeDoc() != eTypeDoc.Piece) { G = _Calque.AjouterGroupe("Selectionner les composants à lier"); _Select_Composants = G.AjouterSelectionBox("Selectionnez les composants"); _Select_Composants.SelectionMultipleMemeEntite = false; _Select_Composants.SelectionDansMultipleBox = false; _Select_Composants.UneSeuleEntite = false; _Select_Composants.FiltreSelection(swSelectType_e.swSelCOMPONENTS, swSelectType_e.swSelFACES); // Filtre sur les composants autre que root //_Select_Composants.OnSubmitSelection += SelectionnerComposantsParent; _Select_Composants.Hauteur = 8; } G = _Calque.AjouterGroupe("Options"); if (MdlBase.TypeDoc() != eTypeDoc.Piece) { _CheckBox_CreerLesConfigsManquantes = G.AjouterCheckBox(_pCreerConfig); } _CheckBox_SupprimerNvlFonction = G.AjouterCheckBox(_pSupprimerNvlFonction); _CheckBox_SupprimerNvComposant = G.AjouterCheckBox(_pSupprimerNvComposant); } catch (Exception e) { this.LogMethode(new Object[] { e }); } }
protected void Calque() { try { Groupe G; G = _Calque.AjouterGroupe("Options"); _CheckBox_LigneAttache = G.AjouterCheckBox(LigneAttache); _CheckBox_ModifierHtTexte = G.AjouterCheckBox(ModifierHtTexte); _Texte_HtTexte = G.AjouterTexteBox(HtTexte, false); _Texte_HtTexte.ValiderTexte += ValiderTextIsInteger; _Texte_HtTexte.StdIndent(); _CheckBox_ModifierHtTexte.OnIsCheck += _Texte_HtTexte.IsEnable; _Texte_HtTexte.IsEnabled = _CheckBox_ModifierHtTexte.IsChecked; _GroupeReperage = _Calque.AjouterGroupeAvecCheckBox(Reperage); _CheckBox_AfficherQuantite = _GroupeReperage.AjouterCheckBox(AfficherQuantite); _GroupeDescription = _Calque.AjouterGroupeAvecCheckBox(Description); _CheckBox_PrefixeTole = _GroupeDescription.AjouterCheckBox(PrefixeTole); _CheckBox_ProfilCourt = _GroupeDescription.AjouterCheckBox(ProfilCourt); _CheckBox_AjouterMateriau = _GroupeDescription.AjouterCheckBox(AjouterMateriau); _CheckBox_SautDeLigneMateriau = _GroupeDescription.AjouterCheckBox(SautDeLigneMateriau); _CheckBox_SautDeLigneMateriau.StdIndent(); _CheckBox_AjouterMateriau.OnUnCheck += _CheckBox_SautDeLigneMateriau.UnCheck; _CheckBox_AjouterMateriau.OnIsCheck += _CheckBox_SautDeLigneMateriau.IsEnable; _CheckBox_AjouterMateriau.ApplyParam(); } catch (Exception e) { this.LogMethode(new Object[] { e }); } }
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 }); } }
protected void Calque() { try { Groupe G; G = _Calque.AjouterGroupe("Reperage"); _Texte_IndiceCampagne = G.AjouterTexteBox("Indice de la campagne de repérage :"); _Texte_IndiceCampagne.LectureSeule = true; _CheckBox_CampagneDepartDecompte = G.AjouterCheckBox("Indice actuel comme depart pour le decompte"); _Texte_IndiceCampagneDepartDecompte = G.AjouterTexteBox("Indice précédent pour le décompte :"); _Texte_IndiceCampagneDepartDecompte.LectureSeule = true; //_Texte_IndiceCampagneDepartDecompte.StdIndent(); _CheckBox_ReinitCampagneActuelle = G.AjouterCheckBox("Reinitialiser la campagne actuelle"); _CheckBox_MajCampagnePrecedente = G.AjouterCheckBox("Mettre à jour la campagne précédente (en cas d'oubli)"); _CheckBox_ReinitCampagneActuelle.OnCheck += delegate { _CheckBox_MajCampagnePrecedente.IsEnabled = false; _CheckBox_MajCampagnePrecedente.IsChecked = false; }; _CheckBox_ReinitCampagneActuelle.OnUnCheck += delegate { if (IndiceCampagne > 1) { _CheckBox_MajCampagnePrecedente.IsEnabled = true; } }; _CheckBox_MajCampagnePrecedente.OnCheck += delegate { _CheckBox_ReinitCampagneActuelle.IsEnabled = false; _CheckBox_ReinitCampagneActuelle.IsChecked = false; }; _CheckBox_MajCampagnePrecedente.OnUnCheck += delegate { _CheckBox_ReinitCampagneActuelle.IsEnabled = true; }; _CheckBox_MajCampagnePrecedente.OnCheck += delegate { if (_CheckBox_MajCampagnePrecedente.IsEnabled && (IndiceCampagne > 1)) { IndiceCampagne -= 1; } if (ReinitCampagneActuelle) { _CheckBox_ReinitCampagneActuelle.IsEnabled = false; } _CheckBox_CampagneDepartDecompte.IsEnabled = false; _Texte_IndiceCampagneDepartDecompte.IsEnabled = false; }; _CheckBox_MajCampagnePrecedente.OnUnCheck += delegate { if (_CheckBox_MajCampagnePrecedente.IsEnabled) { IndiceCampagne += 1; } if (ReinitCampagneActuelle) { _CheckBox_ReinitCampagneActuelle.IsEnabled = true; _CheckBox_ReinitCampagneActuelle.Visible = true; } _CheckBox_CampagneDepartDecompte.IsEnabled = true; _Texte_IndiceCampagneDepartDecompte.IsEnabled = true; }; G = _Calque.AjouterGroupe("Options"); _CheckBox_CombinerCorpsIdentiques = G.AjouterCheckBox(CombinerCorpsIdentiques); _CheckBox_CombinerAvecCampagnePrecedente = G.AjouterCheckBox(CombinerAvecCampagnePrecedente); _CheckBox_CombinerAvecCampagnePrecedente.StdIndent(); _CheckBox_CreerDvp = G.AjouterCheckBox(CreerDvp); _CheckBox_CombinerCorpsIdentiques.OnUnCheck += _CheckBox_CombinerAvecCampagnePrecedente.UnCheck; _CheckBox_CombinerCorpsIdentiques.OnIsCheck += _CheckBox_CombinerAvecCampagnePrecedente.IsEnable; _EnumComboBox_TypeCorps = G.AjouterEnumComboBox <eTypeCorps, Intitule>(TypeCorps); _EnumComboBox_TypeCorps.FiltrerEnum = eTypeCorps.Tole | eTypeCorps.Barre | eTypeCorps.Piece; } catch (Exception e) { this.LogMethode(new Object[] { e }); } }
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 }); } }
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 }); } }
protected void Calque() { try { Groupe G; G = _Calque.AjouterGroupe("Appliquer"); _CheckBox_ToutesLesConfig = G.AjouterCheckBox(pToutesLesConfig); _CheckBox_EnregistrerSelection = G.AjouterCheckBox("Enregistrer les selections"); _Button_Preselection = G.AjouterBouton("Preselectionner"); _Button_Preselection.OnButtonPress += delegate(object sender) { PreSelection(); }; G = _Calque.AjouterGroupe("Face du dessus" + " ( " + pFaceDessus.GetValeur <String>() + "@" + pMarche.GetValeur <String>() + " )"); _Select_F_Dessus = G.AjouterSelectionBox("", "Selectionnez la face du dessus"); _Select_F_Dessus.SelectionMultipleMemeEntite = false; _Select_F_Dessus.SelectionDansMultipleBox = false; _Select_F_Dessus.UneSeuleEntite = true; _Select_F_Dessus.FiltreSelection(swSelectType_e.swSelFACES); _Select_F_Dessus.OnSubmitSelection += delegate(Object SelBox, Object selection, int selType, String itemText) { return(FiltreFace((CtrlSelectionBox)SelBox, selection, selType, pFaceDessus)); }; _Select_F_Dessus.OnApplyOnSelection += delegate(Object Box) { SvgNomComposant(Box, pMarche); }; G = _Calque.AjouterGroupe("Platine gauche"); _Select_PlatineG = G.AjouterSelectionBox("Plan" + " ( " + pPlanContrainte.GetValeur <String>() + "@" + pPlatineG.GetValeur <String>() + " )", "Selectionnez le plan"); _Select_PlatineG.SelectionMultipleMemeEntite = false; _Select_PlatineG.SelectionDansMultipleBox = false; _Select_PlatineG.UneSeuleEntite = true; _Select_PlatineG.FiltreSelection(swSelectType_e.swSelDATUMPLANES, swSelectType_e.swSelCOMPONENTS, swSelectType_e.swSelFACES); _Select_PlatineG.OnSubmitSelection += delegate(Object SelBox, Object selection, int selType, String itemText) { return(FiltrePlan((CtrlSelectionBox)SelBox, selection, selType, pPlanContrainte)); }; // Svg des parametres _Select_PlatineG.OnApplyOnSelection += delegate(Object Box) { SvgNomComposant(Box, pPlatineG); }; _Select_PlatineG.OnApplyOnSelection += delegate(Object Box) { SvgNomFonction(Box, pPlanContrainte); }; _Select_F_Dessus.OnApplyOnSelection += _Select_PlatineG.GainedFocus; _Select_PlatineG_Esquisse = G.AjouterSelectionBox("Esquisse" + " ( " + pNomEsquisse.GetValeur <String>() + "@" + pEsquisseG.GetValeur <String>() + " )", "Selectionnez l'esquisse"); _Select_PlatineG_Esquisse.SelectionMultipleMemeEntite = false; _Select_PlatineG_Esquisse.SelectionDansMultipleBox = false; _Select_PlatineG_Esquisse.UneSeuleEntite = true; _Select_PlatineG_Esquisse.FiltreSelection(swSelectType_e.swSelSKETCHES, swSelectType_e.swSelCOMPONENTS, swSelectType_e.swSelFACES); _Select_PlatineG_Esquisse.OnSubmitSelection += delegate(Object SelBox, Object selection, int selType, String itemText) { return(FiltreEsquisse((CtrlSelectionBox)SelBox, selection, selType, pNomEsquisse)); }; _Select_PlatineG_Esquisse.OnApplyOnSelection += delegate(Object Box) { SvgNomComposant(Box, pEsquisseG); }; _Select_PlatineG_Esquisse.OnApplyOnSelection += delegate(Object Box) { SvgNomFonction(Box, pNomEsquisse); }; _Select_PlatineG.OnApplyOnSelection += _Select_PlatineG_Esquisse.GainedFocus; G = _Calque.AjouterGroupe("Platine droite"); _Select_PlatineD = G.AjouterSelectionBox("Plan" + " ( " + pPlanContrainte.GetValeur <String>() + "@" + pPlatineD.GetValeur <String>() + " )", "Selectionnez le plan"); _Select_PlatineD.SelectionMultipleMemeEntite = false; _Select_PlatineD.SelectionDansMultipleBox = false; _Select_PlatineD.UneSeuleEntite = true; _Select_PlatineD.FiltreSelection(swSelectType_e.swSelDATUMPLANES, swSelectType_e.swSelCOMPONENTS, swSelectType_e.swSelFACES); _Select_PlatineD.OnSubmitSelection += delegate(Object SelBox, Object selection, int selType, String itemText) { return(FiltrePlan((CtrlSelectionBox)SelBox, selection, selType, pPlanContrainte)); }; _Select_PlatineD.OnApplyOnSelection += delegate(Object Box) { SvgNomComposant(Box, pPlatineD); }; _Select_PlatineD.OnApplyOnSelection += delegate(Object Box) { SvgNomFonction(Box, pPlanContrainte); }; _Select_PlatineG_Esquisse.OnApplyOnSelection += _Select_PlatineD.GainedFocus; _Select_PlatineD_Esquisse = G.AjouterSelectionBox("Esquisse" + " ( " + pNomEsquisse.GetValeur <String>() + "@" + pEsquisseD.GetValeur <String>() + " )", "Selectionnez l'esquisse"); _Select_PlatineD_Esquisse.SelectionMultipleMemeEntite = false; _Select_PlatineD_Esquisse.SelectionDansMultipleBox = false; _Select_PlatineD_Esquisse.UneSeuleEntite = true; _Select_PlatineD_Esquisse.FiltreSelection(swSelectType_e.swSelSKETCHES, swSelectType_e.swSelCOMPONENTS, swSelectType_e.swSelFACES); _Select_PlatineD_Esquisse.OnSubmitSelection += delegate(Object SelBox, Object selection, int selType, String itemText) { return(FiltreEsquisse((CtrlSelectionBox)SelBox, selection, selType, pNomEsquisse)); }; _Select_PlatineD_Esquisse.OnApplyOnSelection += delegate(Object Box) { SvgNomComposant(Box, pEsquisseD); }; _Select_PlatineD_Esquisse.OnApplyOnSelection += delegate(Object Box) { SvgNomFonction(Box, pNomEsquisse); }; _Select_PlatineD.OnApplyOnSelection += _Select_PlatineD_Esquisse.GainedFocus; G = _Calque.AjouterGroupe("Options"); _Text_LgMini = G.AjouterTexteBox(pLgMin, true); // OnCheck, on enregistre les parametres _CheckBox_EnregistrerSelection.OnCheck += _Select_F_Dessus.ApplyOnSelection; _CheckBox_EnregistrerSelection.OnCheck += _Select_PlatineG.ApplyOnSelection; _CheckBox_EnregistrerSelection.OnCheck += _Select_PlatineG_Esquisse.ApplyOnSelection; _CheckBox_EnregistrerSelection.OnCheck += _Select_PlatineD.ApplyOnSelection; _CheckBox_EnregistrerSelection.OnCheck += _Select_PlatineD_Esquisse.ApplyOnSelection; } catch (Exception e) { this.LogMethode(new Object[] { e }); } }
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 }); } }
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; }; }
//OneValの生成 //デフォルト値(nullを設定した場合、適切な値を自動でセットする) public static OneVal CreateOneVal(CtrlType ctrlType, Object val) { //Kernel kernel = new Kernel(); const string help = "help"; OneCtrl oneCtrl; switch (ctrlType) { case CtrlType.CheckBox: if (val == null) { val = true; } oneCtrl = new CtrlCheckBox(help); break; case CtrlType.Int: if (val == null) { val = 1; } oneCtrl = new CtrlInt(help, 3); // 3桁で決め打ち break; case CtrlType.File: if (val == null) { val = "1.txt"; } oneCtrl = new CtrlFile(help, 200, new Kernel()); break; case CtrlType.Folder: if (val == null) { val = "c:\temp"; } oneCtrl = new CtrlFolder(help, 200, new Kernel()); break; case CtrlType.TextBox: if (val == null) { val = "abc"; } oneCtrl = new CtrlTextBox(help, 20); break; case CtrlType.Radio: if (val == null) { val = 0; } oneCtrl = new CtrlRadio(help, new[] { "1", "2", "3" }, 30, 3); break; case CtrlType.Font: if (val == null) { val = new Font("MS ゴシック", 10f); } oneCtrl = new CtrlFont(help, LangKind.Jp); break; case CtrlType.Memo: if (val == null) { val = "1"; } oneCtrl = new CtrlMemo(help, 10, 10); break; case CtrlType.Hidden: if (val == null) { val = ""; } oneCtrl = new CtrlHidden(help, 30); break; case CtrlType.AddressV4: if (val == null) { val = ""; } oneCtrl = new CtrlAddress(help); break; case CtrlType.BindAddr: if (val == null) { val = "V4ONLY,INADDR_ANY,IN6ADDR_ANY_INIT"; } var list = new List <Ip>(); try { list.Add(new Ip(IpKind.InAddrAny)); list.Add(new Ip("192.168.0.1")); } catch (ValidObjException ex) { Assert.Fail(ex.Message); } oneCtrl = new CtrlBindAddr(help, list.ToArray(), list.ToArray()); break; case CtrlType.ComboBox: //listを{"1","2"}で決め打ち if (val == null) { val = 0; } oneCtrl = new CtrlComboBox(help, new[] { "1", "2" }, 10); break; case CtrlType.Dat: //カラムはTEXTBOX×2で決め打ち var listVal = new ListVal { new OneVal("name1", true, Crlf.Nextline, new CtrlCheckBox("help")), new OneVal("name2", true, Crlf.Nextline, new CtrlCheckBox("help")) }; if (val == null) { val = new Dat(new[] { CtrlType.CheckBox, CtrlType.CheckBox }); } oneCtrl = new CtrlDat(help, listVal, 300, LangKind.Jp); break; default: throw new Exception(ctrlType.ToString()); } return(new OneVal("name", val, Crlf.Nextline, oneCtrl)); }
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 }); } }