//------------------------------------------------------------------------------ private void m_listBox_SelectedValueChanged(object sender, EventArgs e) { m_reference = m_listBox.SelectedItem as IReferenceFormEdition; if (m_service != null) { m_service.CloseDropDown(); } }
public IReferenceFormEdition GetReferenceFormEdition(Type typeElements, IServiceProvider provider, object value) { m_typeElement = typeElements; // Uses the IWindowsFormsEditorService to display a // drop-down UI in the Properties window. IWindowsFormsEditorService edSvc = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService)); if (edSvc != null) { m_service = edSvc; // Initialise le dernier filtre sélectionné ReferenceFormEdition = value as IReferenceFormEdition; // Affiche le controle dans une fenêtre déroulante edSvc.DropDownControl(this); return(ReferenceFormEdition); } return(null); }
/// /////////////////////////////////////// protected override CResultAErreur MySerialize(C2iSerializer serializer) { int nVersion = GetNumVersion(); CResultAErreur result = serializer.TraiteVersion(ref nVersion); if (!result) { return(result); } // Sérialise le formule source result = serializer.TraiteObject <C2iExpression>(ref m_formuleSource); if (!result) { return(result); } // Sérialise les colonnes result = serializer.TraiteListe <CColonneListeSpeedStd>(Columns); if (!result) { return(result); } // Sérialise les affectations des nouveaux objets //result = serializer.TraiteObject<CAffectationsProprietes>(ref m_affectationsInitiales); //if (!result) // return result; if (nVersion < 5 && serializer.Mode == ModeSerialisation.Lecture) { CAffectationsProprietes affectation = null; result = serializer.TraiteObject <CAffectationsProprietes>(ref affectation); if (!result) { return(result); } m_listeAffectationsInitiales.Clear(); m_listeAffectationsInitiales.Add(affectation); } else { result = serializer.TraiteListe <CAffectationsProprietes>(m_listeAffectationsInitiales); if (!result) { return(result); } } result = serializer.TraiteObject <CPointeurFiltreDynamiqueInDb>(ref m_filter); if (!result) { return(result); } bool bHasType = m_typeSource != null; serializer.TraiteBool(ref bHasType); if (bHasType) { serializer.TraiteType(ref m_typeSource); } serializer.TraiteString(ref m_strMessageConfirmationSuppression); serializer.TraiteBool(ref m_bHasAddButton); serializer.TraiteBool(ref m_bHasDeleteButton); if (nVersion >= 1) { result = serializer.TraiteObject <IReferenceFormEdition>(ref m_referenceFormEdition); } else { m_referenceFormEdition = null; } if (!result) { return(result); } if (nVersion >= 2) { serializer.TraiteBool(ref m_bUserCustomizable); } if (nVersion >= 3) { serializer.TraiteBool(ref m_bHasDetailButton); serializer.TraiteObject <C2iExpression>(ref m_formuleElementToEdit); } if (nVersion >= 4) { serializer.TraiteBool(ref m_bUseCheckBoxes); } if (nVersion >= 6) { serializer.TraiteBool(ref m_bHasFitlerButton); } return(result); }