private void SLUMarque_AddNewValue(object sender, XtraEditors.Controls.AddNewValueEventArgs e) { Cursor.Current = Cursors.WaitCursor; var form = new frmEditMarque(null, true, Annonceurs); // form.Load += OnEditMailFormLoad; // form.FormClosed += OnEditMailFormClosed; form.Location = new Point(Left + (Width - form.Width) / 2, Top + (Height - form.Height) / 2); form.ShowDialog(); form.Activate(); Cursor.Current = Cursors.Default; }
private void BBIAdmarqued_ItemClick(object sender, ItemClickEventArgs e) { Cursor.Current = Cursors.WaitCursor; var form = new frmEditMarque(null,true); //form.Load += OnEditMailFormLoad; //form.FormClosed += OnEditMailFormClosed; form.Location = new Point(Left + (Width - form.Width) / 2, Top + (Height - form.Height) / 2); form.ShowDialog(); form.Activate(); var resultMarque = form.marque; if(resultMarque!=null) annonceur.Marques.Add(resultMarque); GCMarque.DataSource = annonceur.Marques; GVMarque.PopulateColumns(); GVMarque.Columns[2].Visible = false; Cursor.Current = Cursors.Default; }