//----------------------------------------------------------------- private void itemEditMenu_Click(object sender, EventArgs args) { CModeleTexte modele = ModeleTexte; if (modele != null) { modele.BeginEdit(); if (CFormPopupEditeModeleTexte.EditeModele(modele)) { modele.CommitEdit(); CTimosAppRegistre.SetModeleTexteForType(ModeleTexte, Contexte, TypeObjet); } else { modele.CancelEdit(); } } }
//----------------------------------------------------------------- void menuModele_MouseUp(object sender, MouseEventArgs e) { if ((e.Button & MouseButtons.Right) == MouseButtons.Right) { CModeleTexte modele = ModeleTexte; if (modele != null) { modele.BeginEdit(); if (CFormPopupEditeModeleTexte.EditeModele(modele)) { modele.CommitEdit(); CTimosAppRegistre.SetModeleTexteForType(ModeleTexte, Contexte, TypeObjet); } else { modele.CancelEdit(); } } } else { CTimosAppRegistre.SetModeleTexteForType(ModeleTexte, Contexte, TypeObjet); } }