private void InitComboBoxType(Type tp) { if (m_bComboInitialized) { return; } ArrayList lstTypes = new ArrayList(); if (tp != null) { CInfoClasseDynamique info = new CInfoClasseDynamique(tp, DynamicClassAttribute.GetNomConvivial(tp)); lstTypes.Add(info); } else { //CInfoClasseDynamique[] classes = DynamicClassAttribute.GetAllDynamicClass(); ArrayList infosClasses = new ArrayList(DynamicClassAttribute.GetAllDynamicClass()); infosClasses.Insert(0, new CInfoClasseDynamique(typeof(DBNull), I.T("None|19"))); infosClasses.Add(new CInfoClasseDynamique(typeof(string), I.T("String"))); infosClasses.Add(new CInfoClasseDynamique(typeof(double), I.T("Double"))); infosClasses.Add(new CInfoClasseDynamique(typeof(int), I.T("Int"))); infosClasses.Add(new CInfoClasseDynamique(typeof(DateTime), I.T("DateTime"))); infosClasses.Add(new CInfoClasseDynamique(typeof(bool), I.T("Boolean"))); infosClasses.Add(new CInfoClasseDynamique(typeof(object), I.T("Object"))); lstTypes.AddRange(infosClasses); } m_cmbTypeElements.DataSource = null; m_cmbTypeElements.DataSource = lstTypes; m_cmbTypeElements.ValueMember = "Classe"; m_cmbTypeElements.DisplayMember = "Nom"; m_bComboInitialized = true; }
protected override void InitChamps() { m_bInitialisationEnCours = true; base.InitChamps(); m_wndAideFormule.FournisseurProprietes = ObjetEdite.Process; m_wndAideFormule.ObjetInterroge = typeof(CProcess); //Remplit la liste des types CInfoClasseDynamique[] classes = DynamicClassAttribute.GetAllDynamicClass(); ArrayList classesAIdAuto = new ArrayList(); foreach (CInfoClasseDynamique classe in classes) { if (typeof(CObjetDonneeAIdNumeriqueAuto).IsAssignableFrom(classe.Classe)) { classesAIdAuto.Add(classe); } } classesAIdAuto.Insert(0, new CInfoClasseDynamique(typeof(DBNull), I.T("None|19"))); m_cmbTypeEntite.DataSource = null; m_cmbTypeEntite.DataSource = classesAIdAuto; m_cmbTypeEntite.DisplayMember = "Nom"; m_cmbTypeEntite.ValueMember = "Classe"; if (ActionCreerEntite.TypeEntiteACreer != null) { m_cmbTypeEntite.SelectedValue = ActionCreerEntite.TypeEntiteACreer; } FillListeChamps(); m_bInitialisationEnCours = false; }
//--------------------------------------------------- public void Init(C2iStructureImport structure) { m_structureImport = CCloner2iSerializable.Clone(structure) as C2iStructureImport; //Remplit la liste des types CInfoClasseDynamique[] classes = DynamicClassAttribute.GetAllDynamicClass(); ArrayList classesAIdAuto = new ArrayList(); foreach (CInfoClasseDynamique classe in classes) { if (typeof(CObjetDonneeAIdNumeriqueAuto).IsAssignableFrom(classe.Classe)) { classesAIdAuto.Add(classe); } } classesAIdAuto.Insert(0, new CInfoClasseDynamique(typeof(DBNull), I.T("None|19"))); m_cmbTypeEntite.DataSource = null; m_cmbTypeEntite.DataSource = classesAIdAuto; m_cmbTypeEntite.DisplayMember = "Nom"; m_cmbTypeEntite.ValueMember = "Classe"; m_cmbTypeEntite.SelectedValue = m_structureImport.TypeCible; m_chkOptionCreate.Checked = ((m_structureImport.OptionImport & EOptionImport.Create) == EOptionImport.Create); m_chkOptionUpdate.Checked = ((m_structureImport.OptionImport & EOptionImport.Update) == EOptionImport.Update); m_chkPrechargerLaCible.Checked = m_structureImport.ChargerTouteLaCible; FillControleMappage(); }
//----------------------------------------------------------------------------- private List <C2iExpressionTypesDynamics> GetListe() { string strCaracteresAutorises = "abcdefghijklkmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_"; lock (typeof(CFournisseurConstantesObjetDonneeAIdAuto)) { if (m_listeExpression == null) { m_listeExpression = new List <C2iExpressionTypesDynamics>(); foreach (CInfoClasseDynamique dc in DynamicClassAttribute.GetAllDynamicClass()) { StringBuilder blName = new StringBuilder(); foreach (char c in dc.Nom) { if (strCaracteresAutorises.Contains(c)) { blName.Append(c); } else { blName.Append("_"); } } if (blName.Length > 0) { blName.Insert(0, "Type_"); m_listeExpression.Add(new C2iExpressionTypesDynamics(blName.ToString(), dc.Classe)); } } } return(m_listeExpression); } }
protected void InitComboTypes(bool bForcerRemplissage) { if (!m_bComboRemplissageInitialized || bForcerRemplissage) { ArrayList classes = new ArrayList(DynamicClassAttribute.GetAllDynamicClass(typeof(sc2i.data.TableAttribute))); classes.Insert(0, new CInfoClasseDynamique(typeof(DBNull), I.T("(None)|30291"))); m_cmbTypeElements.DataSource = null; m_cmbTypeElements.DataSource = classes; m_cmbTypeElements.ValueMember = "Classe"; m_cmbTypeElements.DisplayMember = "Nom"; classes = new ArrayList(DynamicClassAttribute.GetAllDynamicClass(typeof(sc2i.data.TableAttribute))); classes.Insert(0, new CInfoClasseDynamique(typeof(DBNull), I.T("(None)|30291"))); m_cmbTypeSourceRecherche.DataSource = null; m_cmbTypeSourceRecherche.DataSource = classes; m_cmbTypeSourceRecherche.ValueMember = "Classe"; m_cmbTypeSourceRecherche.DisplayMember = "Nom"; m_bComboRemplissageInitialized = true; } if (ListeEntites.TypeElements != null) { m_cmbTypeElements.SelectedValue = ListeEntites.TypeElements; } if (ListeEntites.TypeElementsSourceRecherche != null) { m_cmbTypeSourceRecherche.SelectedValue = ListeEntites.TypeElementsSourceRecherche; } }
//------------------------------------------------------------------------- protected void InitComboTypes(bool bForcerRemplissage) { if (!m_bComboRemplissageInitialized || bForcerRemplissage) { List <CInfoClasseDynamique> lstInfo = new List <CInfoClasseDynamique>(); if (m_cmbTypeElement.Items.Count == 0) { foreach (CInfoClasseDynamique info in DynamicClassAttribute.GetAllDynamicClass()) { if (typeof(IElementDeSchemaReseau).IsAssignableFrom(info.Classe)) { lstInfo.Add(info); } } m_cmbTypeElement.Init(lstInfo.ToArray()); } m_bComboRemplissageInitialized = true; } if (ModeleEtiquetteSchema.TypeCible != null) { m_cmbTypeElement.TypeSelectionne = ModeleEtiquetteSchema.TypeCible; } m_wndAide.ObjetInterroge = ModeleEtiquetteSchema.TypeCible; m_txtFormule.Init(m_wndAide.FournisseurProprietes, m_wndAide.ObjetInterroge); }
//----------------------------------------------------- public void FillStructureQuerySource(CEasyQuerySource source) { foreach (CInfoClasseDynamique info in DynamicClassAttribute.GetAllDynamicClass(typeof(TableAttribute))) { CTableDefinitionFramework table = new CTableDefinitionFramework(info.Classe); source.AddTableUniquementPourObjetConnexion(table); } }
public void Init(CListeRestrictionsUtilisateurSurType liste) { m_listeRestrictions = liste; CInfoClasseDynamique[] classes = DynamicClassAttribute.GetAllDynamicClass(typeof(TableAttribute)); m_cmbType.Init(classes); FillListeTypes(); m_restrictionAffichee = null; m_panelDetailType.Visible = false; }
//------------------------------------------------------------------------- private CResultAErreur InitComboType() { CResultAErreur result = CResultAErreur.True; ArrayList classes = new ArrayList(DynamicClassAttribute.GetAllDynamicClass()); classes.Insert(0, new CInfoClasseDynamique(typeof(DBNull), I.T("(None)|20111"))); m_cmbTypeElements.DataSource = null; m_cmbTypeElements.DataSource = classes; m_cmbTypeElements.ValueMember = "Classe"; m_cmbTypeElements.DisplayMember = "Nom"; return(result); }
protected void InitComboTypes(bool bForcerRemplissage) { if (!m_bComboRemplissageInitialized || bForcerRemplissage) { ArrayList classes = new ArrayList(DynamicClassAttribute.GetAllDynamicClass()); classes.Insert(0, new CInfoClasseDynamique(typeof(DBNull), I.T("(None)|30291"))); m_cmbTypeElements.DataSource = null; m_cmbTypeElements.DataSource = classes; m_cmbTypeElements.ValueMember = "Classe"; m_cmbTypeElements.DisplayMember = "Nom"; m_bComboRemplissageInitialized = true; } }
//INITIALISATION public CResultAErreur InitChamps() { CTimosApp.Titre = I.T("Quick search filter|20108"); // Init de la liste des types m_wndListeTypes.Items.Clear(); foreach (CInfoClasseDynamique info in DynamicClassAttribute.GetAllDynamicClass(typeof(TableAttribute))) { ListViewItem item = new ListViewItem(info.Nom); item.Tag = info; m_wndListeTypes.Items.Add(item); } return(CResultAErreur.True); }
private void InitComboTypeCible() { List <CInfoClasseDynamique> lstTypes = new List <CInfoClasseDynamique>(); if (m_cmbxTypeCible.Items.Count == 0) { foreach (CInfoClasseDynamique info in DynamicClassAttribute.GetAllDynamicClass()) { if (typeof(IElementASymbolePourDessin).IsAssignableFrom(info.Classe)) { lstTypes.Add(info); } } lstTypes.Insert(0, new CInfoClasseDynamique(typeof(DBNull), I.T("No target type|30333"))); m_cmbxTypeCible.DataSource = lstTypes; m_cmbxTypeCible.ValueMember = "Classe"; m_cmbxTypeCible.DisplayMember = "Nom"; } }
private void CFormEditVariableFormule_Load(object sender, EventArgs e) { CWin32Traducteur.Translate(this); List <string> lstTypes = new List <string>(); foreach (CInfoClasseDynamique info in DynamicClassAttribute.GetAllDynamicClass()) { lstTypes.Add(info.Nom); } lstTypes.Add(typeof(Int32).Name); lstTypes.Add(typeof(string).Name); lstTypes.Add(typeof(DateTime).Name); lstTypes.Add(typeof(double).Name); lstTypes.Add(typeof(bool).Name); m_txtType.AutoCompleteSource = AutoCompleteSource.CustomSource; m_txtType.AutoCompleteMode = AutoCompleteMode.Suggest; m_txtType.AutoCompleteCustomSource.Clear(); m_txtType.AutoCompleteCustomSource.AddRange(lstTypes.ToArray()); }
/////////////////////////////////////////////////////////////////////////// private void FillListeTypes() { try { m_arbreTypes.Nodes.Clear(); foreach (CInfoClasseDynamique info in DynamicClassAttribute.GetAllDynamicClass()) { TreeNode node = new TreeNode(info.Nom, 4, 4); node.Tag = info.Classe; m_arbreTypes.Nodes.Add(node); TreeNode dummy = new TreeNode(); node.Nodes.Add(dummy); } m_arbreTypes.Sorted = true; } catch //On est obligé, sinon, le contrôle ne peut pas être mis dans une fenêtre //La propriété design mode ne marche pas, je ne sais pas pourquoi {} }
private CResultAErreur InitComboBoxType() { CResultAErreur result = CResultAErreur.True; if (m_bComboInitialized) { return(result); } //CInfoClasseDynamique[] infosClasses = DynamicClassAttribute.GetAllDynamicClass(); ArrayList infosClasses = new ArrayList(DynamicClassAttribute.GetAllDynamicClass()); infosClasses.Insert(0, new CInfoClasseDynamique(typeof(DBNull), I.T("None|30048"))); m_cmbType.DataSource = null; m_cmbType.DataSource = infosClasses; m_cmbType.ValueMember = "Classe"; m_cmbType.DisplayMember = "Nom"; m_bComboInitialized = true; return(result); }
public void InitSurAttributs(params Type[] attributsQueLaClasseDoitAvoir) { Init(DynamicClassAttribute.GetAllDynamicClass(attributsQueLaClasseDoitAvoir)); }
public void Init( ) { Init(DynamicClassAttribute.GetAllDynamicClass()); }