Esempio n. 1
0
 //-----------------------------------------------------------------
 public override void OnMouseUpNonStandard(object sender, MouseEventArgs e)
 {
     if (ModeSourisCustom == EModeSourisCustom.Join && e.Button == MouseButtons.Left)
     {
         Point     ptLogique = GetLogicalPointFromDisplay(new Point(e.X, e.Y));
         CODEQBase table     = ObjetEdite.SelectionnerElementDuDessus(ptLogique) as CODEQBase;
         if (table != null && table != m_table1Join)
         {
             IColumnDeEasyQuery colEndJoin = table.GetColonneAt(ptLogique);
             if (colEndJoin != null)
             {
                 CODEQJointure jointure = new CODEQJointure();
                 jointure.Parent         = ObjetEdite;
                 jointure.ElementsSource = new IObjetDeEasyQuery[] { m_table1Join, table };
                 jointure.NomFinal       = m_table1Join.NomFinal + "-" + table.NomFinal;
                 if (jointure.AddParametre(m_colStartJoin, colEndJoin))
                 {
                     Rectangle rct = Rectangle.Union(m_table1Join.RectangleAbsolu, table.RectangleAbsolu);
                     rct.Offset(rct.Width / 2 - jointure.Size.Width / 2, rct.Height / 2 - jointure.Size.Height / 2);
                     jointure.Position = new Point(rct.Left, rct.Top);
                     ObjetEdite.AddChild(jointure);
                     ModeSouris = EModeSouris.Selection;
                 }
             }
         }
         m_colStartJoin = null;
         m_table1Join   = null;
         Refresh();
     }
 }
Esempio n. 2
0
 //-----------------------------------------------------------------
 public override void OnMouseUpNonStandard(object sender, MouseEventArgs e)
 {
     if ((ModeSourisCustom == EModeSourisCustom.LienWorkflow) && e.Button == MouseButtons.Left)
     {
         Point ptLogique = GetLogicalPointFromDisplay(new Point(e.X, e.Y));
         m_objetEndJoin = ObjetEdite.SelectionnerElementDuDessus(ptLogique) as CWorkflowEtapeDessin;
         if (m_objetEndJoin != null && m_objetEndJoin != m_objetStartJoin)
         {
             if (m_objetEndJoin != null)
             {
                 if (ModeSourisCustom == EModeSourisCustom.LienWorkflow)
                 {
                     if (m_objetStartJoin != null && m_objetEndJoin != null)
                     {
                         m_etapeStartLienACreer = m_objetStartJoin;
                         m_etapeEndLienACreer   = m_objetEndJoin;
                         if (m_etapeStartLienACreer.TypeEtape != null && m_etapeStartLienACreer.TypeEtape.Bloc != null &&
                             m_etapeStartLienACreer.TypeEtape.Bloc.CodesRetourPossibles.Length > 0)
                         {
                             ShowMenuCreateLien();
                         }
                         else
                         {
                             CreateLien("");
                         }
                     }
                 }
             }
         }
         m_objetStartJoin = null;
     }
 }
Esempio n. 3
0
        //-----------------------------------------------------------------
        void menuAddSousElement_Click(object sender, EventArgs e)
        {
            CMenuAddSousElement menu = sender as CMenuAddSousElement;

            if (menu != null)
            {
                CODEQFromObjetsSource    objet      = menu.SousElement;
                List <IObjetDeEasyQuery> lstSources = new List <IObjetDeEasyQuery>();
                foreach (I2iObjetGraphique obj in Selection)
                {
                    if (obj is IObjetDeEasyQuery)
                    {
                        lstSources.Add(obj as IObjetDeEasyQuery);
                    }
                }
                if (lstSources.Count == Selection.Count)
                {
                    Point pt = lstSources[0].Position;
                    pt.Offset(new Point(lstSources[0].Size.Width * 2, lstSources[0].Size.Height / 3));
                    objet.Position       = pt;
                    objet.Parent         = ObjetEdite;
                    objet.ElementsSource = lstSources.ToArray();
                    if (EditeProprietes(objet))
                    {
                        ObjetEdite.AddChild(objet);
                        Refresh();
                    }
                }
            }
        }
Esempio n. 4
0
 public CResultAErreur VerifieDonnees()
 {
     if (ObjetEdite == null)
     {
         return(CResultAErreur.True);
     }
     return(ObjetEdite.VerifieDonnees(true));
 }
Esempio n. 5
0
        //-----------------------------------------------------------------
        public override void OnMouseMoveNonStandard(object sender, MouseEventArgs e)
        {
            if ((ModeSourisCustom == EModeSourisCustom.LienWorkflow) &&
                m_objetStartJoin != null && e.Button == MouseButtons.Left)
            {
                Graphics g = CreateGraphics();

                Point ptCentre = new Point(m_rectStartLien.Left + m_rectStartLien.Width / 2,
                                           m_rectStartLien.Top + m_rectStartLien.Height / 2);
                Rectangle rct = m_rectLien;

                Point          ptLogique = GetLogicalPointFromDisplay(new Point(e.X, e.Y));
                IWorflowDessin dest      = ObjetEdite.SelectionnerElementDuDessus(ptLogique) as IWorflowDessin;
                if (dest == m_objetStartJoin)
                {
                    dest = null;
                }
                Rectangle rctDest = new Rectangle(e.X, e.Y, 1, 1);
                if (dest != null)
                {
                    rctDest = dest.RectangleAbsolu;
                    rctDest = new Rectangle(GetDisplayPointFromLogical(rctDest.Location),
                                            GetDisplaySizeFromLogical(rctDest.Size));
                }

                rct.Inflate(2, 2);
                using (Bitmap bmp = DernierApercuToDispose)
                    g.DrawImage(bmp, rct, rct, GraphicsUnit.Pixel);


                if (Control.ModifierKeys == Keys.Control)
                {
                    Brush br = new SolidBrush(Color.FromArgb(128, 255, 0, 0));
                    g.FillRectangle(br, m_rectStartLien);
                    m_rectLien = m_rectStartLien;
                }
                else
                {
                    Pen pen = new Pen(Color.Blue);
                    pen.DashStyle = System.Drawing.Drawing2D.DashStyle.Dot;
                    Brush br = new SolidBrush(Color.FromArgb(128, 0, 0, 255));
                    g.FillRectangle(br, m_rectStartLien);
                    if (dest != null)
                    {
                        g.FillRectangle(br, rctDest);
                    }
                    br.Dispose();
                    g.DrawLine(pen, ptCentre, new Point(e.X, e.Y));
                    pen.Dispose();
                    g.Dispose();
                    m_rectLien = Rectangle.Union(m_rectStartLien, rctDest);
                }
            }
        }
Esempio n. 6
0
        //-----------------------------------------------------------------
        public override void OnMouseMoveNonStandard(object sender, MouseEventArgs e)
        {
            if (ModeSourisCustom == EModeSourisCustom.Join && m_colStartJoin != null && e.Button == MouseButtons.Left)
            {
                Graphics g = CreateGraphics();

                Point ptCentre = new Point(m_rectColStartJoin.Left + m_rectColStartJoin.Width / 2,
                                           m_rectColStartJoin.Top + m_rectColStartJoin.Height / 2);
                Rectangle rct = m_rectJoin;

                Point ptLogique            = GetLogicalPointFromDisplay(new Point(e.X, e.Y));
                IColumnDeEasyQuery colDest = null;
                CODEQBase          dest    = ObjetEdite.SelectionnerElementDuDessus(ptLogique) as CODEQBase;
                if (dest == m_table1Join)
                {
                    dest = null;
                }
                colDest = dest != null?dest.GetColonneAt(ptLogique) : null;

                Rectangle rctDest = new Rectangle(e.X, e.Y, 1, 1);
                if (colDest != null)
                {
                    rctDest = dest.GetRectAbsoluColonne(colDest);
                    rctDest = new Rectangle(GetDisplayPointFromLogical(rctDest.Location),
                                            GetDisplaySizeFromLogical(rctDest.Size));
                }

                rct.Inflate(2, 2);
                using (Bitmap bmp = DernierApercuToDispose)
                    g.DrawImage(bmp, rct, rct, GraphicsUnit.Pixel);
                Pen pen = new Pen(Color.Blue);
                pen.DashStyle = System.Drawing.Drawing2D.DashStyle.Dot;
                Brush br = new SolidBrush(Color.FromArgb(128, 0, 0, 255));
                g.FillRectangle(br, m_rectColStartJoin);
                if (colDest != null)
                {
                    g.FillRectangle(br, rctDest);
                }
                br.Dispose();
                g.DrawLine(pen, ptCentre, new Point(e.X, e.Y));
                pen.Dispose();
                g.Dispose();
                m_rectJoin = Rectangle.Union(m_rectColStartJoin, rctDest);
            }
        }
Esempio n. 7
0
 public override void OnMouseDownNonStandard(object sender, MouseEventArgs e)
 {
     m_objetStartJoin = null;
     if (
         (ModeSourisCustom == EModeSourisCustom.LienWorkflow) &&
         e.Button == MouseButtons.Left)
     {
         Point ptLogique = GetLogicalPointFromDisplay(new Point(e.X, e.Y));
         m_objetStartJoin = ObjetEdite.SelectionnerElementDuDessus(ptLogique) as CWorkflowEtapeDessin;
         if (m_objetStartJoin != null)
         {
             Rectangle rctStart = m_objetStartJoin.RectangleAbsolu;
             rctStart = new Rectangle(GetDisplayPointFromLogical(rctStart.Location),
                                      GetDisplaySizeFromLogical(rctStart.Size));
             m_rectStartLien = rctStart;
             m_rectLien      = m_rectStartLien;
         }
     }
 }
Esempio n. 8
0
 //------------------------------------------------------------------------------
 protected override void DragOverTraitement(DragEventArgs e)
 {
     if (e.Data.GetDataPresent(typeof(CReferenceObjetDonnee)))
     {
         CReferenceObjetDonnee reference = e.Data.GetData(typeof(CReferenceObjetDonnee)) as CReferenceObjetDonnee;
         if (reference.TypeObjet == typeof(CModeleAffectationUtilisateurs))
         {
             Point pt        = PointToClient(new Point(e.X, e.Y));
             Point ptLogique = GetLogicalPointFromDisplay(pt);
             CWorkflowEtapeDessin dessinEtape = ObjetEdite.SelectionnerElementDuDessus(ptLogique) as CWorkflowEtapeDessin;
             if (dessinEtape != null)
             {
                 e.Effect = DragDropEffects.Link;
                 return;
             }
         }
     }
     base.DragOverTraitement(e);
 }
Esempio n. 9
0
 public override void OnMouseDownNonStandard(object sender, MouseEventArgs e)
 {
     m_colStartJoin = null;
     if (ModeSourisCustom == EModeSourisCustom.Join && e.Button == MouseButtons.Left)
     {
         Point ptLogique = GetLogicalPointFromDisplay(new Point(e.X, e.Y));
         m_table1Join = ObjetEdite.SelectionnerElementDuDessus(ptLogique) as CODEQBase;
         if (m_table1Join != null)
         {
             m_colStartJoin = m_table1Join.GetColonneAt(ptLogique);
             if (m_colStartJoin != null)
             {
                 Rectangle rctCol = m_table1Join.GetRectAbsoluColonne(m_colStartJoin);
                 rctCol = new Rectangle(GetDisplayPointFromLogical(rctCol.Location),
                                        GetDisplaySizeFromLogical(rctCol.Size));
                 m_rectColStartJoin = rctCol;
                 m_rectJoin         = m_rectColStartJoin;
             }
         }
     }
 }
Esempio n. 10
0
        /// ////////////////////////////////////////
        protected virtual CResultAErreur VerifieDonneesAndMAJSiIlFaut()
        {
            MemoryStream stream    = new MemoryStream();
            BinaryWriter binWriter = new BinaryWriter(stream);

            sc2i.common.CSerializerSaveBinaire saver = new CSerializerSaveBinaire(binWriter);

            CResultAErreur result = ObjetEdite.Serialize(saver);
            //NE se sérialise pas, surement un nouvel objet
            bool bSansFilet = !result.Result;

            result = CResultAErreur.True;
            try
            {
                result = MAJ_Champs();
                if (result)
                {
                    result = ObjetEdite.VerifieDonnees();
                }
            }
            catch (Exception e)
            {
                result.EmpileErreur(new CErreurException(e));
            }
            if (!result)
            {
                if (!bSansFilet)
                {
                    stream.Seek(0, SeekOrigin.Begin);
                    BinaryReader           binReader = new BinaryReader(stream);
                    CSerializerReadBinaire reader    = new CSerializerReadBinaire(binReader);
                    ObjetEdite.Serialize(reader);
                    binReader.Close();
                }
            }
            binWriter.Close();
            stream.Close();
            return(result);
        }
Esempio n. 11
0
        /// //////////////////////////////////////////////////
        protected override void Editeur_DragDrop(object sender, System.Windows.Forms.DragEventArgs e)
        {
            if (ObjetEdite == null)
            {
                return;
            }
            if (LockEdition)
            {
                return;
            }

            if (e.Data.GetDataPresent(typeof(CReferenceObjetDonnee)))
            {
                CReferenceObjetDonnee reference = e.Data.GetData(typeof(CReferenceObjetDonnee)) as CReferenceObjetDonnee;
                if (reference.TypeObjet == typeof(CModeleAffectationUtilisateurs))
                {
                    Point pt        = PointToClient(new Point(e.X, e.Y));
                    Point ptLogique = GetLogicalPointFromDisplay(pt);
                    CWorkflowEtapeDessin dessinEtape = ObjetEdite.SelectionnerElementDuDessus(ptLogique) as CWorkflowEtapeDessin;
                    if (dessinEtape != null)
                    {
                        CModeleAffectationUtilisateurs modele = reference.GetObjet(CSc2iWin32DataClient.ContexteCourant) as CModeleAffectationUtilisateurs;
                        if (modele != null)
                        {
                            CParametresAffectationEtape parametres = modele.ParametresAffectation;
                            if (parametres != null)
                            {
                                CParametresInitialisationEtape parametre = dessinEtape.Initializations;
                                CParametresAffectationEtape    parAff    = parametre.Affectations;
                                if (parAff != null)
                                {
                                    if (MessageBox.Show(I.T("Replace current assignments(Yes) or add new assignemnts(No) ?|20135"), "",
                                                        MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                                    {
                                        parAff = new CParametresAffectationEtape();
                                    }
                                    parAff.AddFormules(parametres.Formules);
                                    parametre.Affectations      = parAff;
                                    dessinEtape.Initializations = parametre;
                                    e.Effect = DragDropEffects.Link;
                                    Refresh();
                                    return;
                                }
                            }
                        }
                    }
                }
            }

            List <CDonneeDragDropObjetGraphique> datas = GetDragDropData(e.Data);

            if (datas == null || datas.Count == 0)
            {
                return;
            }

            List <I2iObjetGraphique> candidats = new List <I2iObjetGraphique>();

            foreach (CRectangleDragForObjetGraphique rct in RectsDrags)
            {
                candidats.Add(rct.ObjetGraphique);
            }

            Point             ptLocal = GetLogicalPointFromDisplay(PointToClient(new Point(e.X, e.Y)));
            I2iObjetGraphique parent  = ObjetEdite.SelectionnerElementConteneurDuDessus(ptLocal, candidats);

            parent = DessinWorkflow;;
            if (parent == null)
            {
                e.Effect = DragDropEffects.None;
            }
            else
            {
                List <I2iObjetGraphique> nouveaux = new List <I2iObjetGraphique>();
                foreach (CRectangleDragForObjetGraphique rct in RectsDrags)
                {
                    rct.RectangleDrag = rct.Datas.GetDragDropPosition(ptLocal);
                    rct.RectangleDrag = GetRectangleSelonModesActives(rct.RectangleDrag, ptLocal);
                    // rct.RectangleDrag.Offset((int)(AutoScrollPosition.X / Echelle), (int)(AutoScrollPosition.Y / Echelle));

                    //Si dummy de création (type de bloc), création d'une nouvelle étape
                    I2iObjetGraphique objetGraphique = rct.Datas.ObjetDragDrop;
                    CDummyObjetWorkflowPourCreation dummyCreation = objetGraphique as CDummyObjetWorkflowPourCreation;
                    if (dummyCreation != null)
                    {
                        CTypeEtapeWorkflow typeEtape = dummyCreation.TypeEtape;
                        if (typeEtape == null)
                        {
                            typeEtape = new CTypeEtapeWorkflow(DessinWorkflow.TypeWorkflow.ContexteDonnee);
                            typeEtape.CreateNewInCurrentContexte();
                            typeEtape.Workflow = DessinWorkflow.TypeWorkflow;
                            typeEtape.Bloc     = Activator.CreateInstance(dummyCreation.TypeBloc, new object[] { typeEtape }) as CBlocWorkflow;
                        }
                        CWorkflowEtapeDessin graphEtape = new CWorkflowEtapeDessin();
                        graphEtape.TypeEtape = typeEtape;
                        objetGraphique       = graphEtape;
                        objetGraphique.Size  = dummyCreation.Size;
                    }

                    JusteBeforePositionneSurApresDragDrop(objetGraphique);
                    bool bParentIsInSelec = objetGraphique.Parent != null && candidats.Contains(objetGraphique.Parent);

                    bool bHasMove = false;

                    if (e.Effect == DragDropEffects.Copy)
                    {
                        Dictionary <Type, object> dicObjetsPourCloner = new Dictionary <Type, object>();
                        AddObjectsForClonerSerializer(dicObjetsPourCloner);
                        objetGraphique = (I2iObjetGraphique)objetGraphique.GetCloneAMettreDansParent(parent, dicObjetsPourCloner);

                        if (objetGraphique == null || !parent.AddChild(objetGraphique))
                        {
                            e.Effect = DragDropEffects.None;
                            objetGraphique.CancelClone();
                            continue;
                        }
                        else
                        {
                            objetGraphique.Parent = parent;
                            nouveaux.Add(objetGraphique);
                        }
                        bHasMove = true;
                    }
                    else
                    {
                        bHasMove = true;
                        if (objetGraphique.Parent != parent)
                        {
                            if (objetGraphique.Parent != null)
                            {
                                if (!bParentIsInSelec)
                                {
                                    objetGraphique.Parent.RemoveChild(objetGraphique);
                                }
                            }
                            else
                            {
                                nouveaux.Add(objetGraphique);
                            }
                            if (!bParentIsInSelec)
                            {
                                if (!parent.AddChild(objetGraphique))
                                {
                                    e.Effect = DragDropEffects.None;
                                    continue;
                                }
                                else
                                {
                                    objetGraphique.Parent = parent;
                                }
                            }
                        }
                    }


                    if (!bParentIsInSelec && bHasMove)
                    {
                        Point ptDrop = new Point(rct.RectangleDrag.Left, rct.RectangleDrag.Top);
                        objetGraphique.PositionAbsolue = ptDrop;
                    }
                }
                if (nouveaux.Count > 0)
                {
                    RefreshSelectionChanged = false;
                    Selection.Clear();
                    Selection.AddRange(nouveaux);
                    RefreshSelectionChanged = true;
                    DeclencheAfterAddElements(nouveaux);
                    Refresh();
                }
            }


            ElementModifie();
            EnDeplacement = false;
            Dessiner(true, true);
        }
Esempio n. 12
0
 //-----------------------------------------------------------------
 public override void OnMouseUpNonStandard(object sender, MouseEventArgs e)
 {
     if ((ModeSourisCustom == EModeSourisCustom.LienSequence || ModeSourisCustom == EModeSourisCustom.LienParametre) && e.Button == MouseButtons.Left)
     {
         Point ptLogique = GetLogicalPointFromDisplay(new Point(e.X, e.Y));
         CRepresentationExpressionGraphique dest = ObjetEdite.SelectionnerElementDuDessus(ptLogique) as CRepresentationExpressionGraphique;
         if (dest != null && dest != m_expressionStartJoin)
         {
             if (dest != null)
             {
                 bool bTraite = false;
                 if (ModeSourisCustom == EModeSourisCustom.LienSequence)
                 {
                     foreach (ToolStripMenuItem item in new ArrayList(m_menuSortieSequence.Items))
                     {
                         if (item != m_menuNext)
                         {
                             m_menuSortieSequence.Items.Remove(item);
                             item.Dispose();
                         }
                     }
                     C2iExpressionAnalysable expAn = m_expressionStartJoin.Formule as C2iExpressionAnalysable;
                     if (expAn != null)
                     {
                         CInfo2iExpression info = expAn.GetInfos();
                         if (info.InfosParametres.Count() == 1)
                         {
                             CInfo2iDefinitionParametres defs = info.InfosParametres[0];
                             int nNum = 0;
                             foreach (CInfoUnParametreExpression par in defs.InfosParametres)
                             {
                                 if (par.IsSortieSequence)
                                 {
                                     CMenuNumero menu = new CMenuNumero(par.NomParametre, nNum);
                                     m_menuSortieSequence.Items.Add(menu);
                                     menu.Click += new EventHandler(menu_Click);
                                     if (ModifierKeys == Keys.Control)
                                     {
                                         if (m_expressionStartJoin.GetExterne(nNum) == dest)
                                         {
                                             m_expressionStartJoin.SetExterne(nNum, null);
                                             bTraite = true;
                                         }
                                     }
                                 }
                                 nNum++;
                             }
                         }
                     }
                     if (!bTraite)
                     {
                         if (ModifierKeys == Keys.Control)
                         {
                             m_expressionStartJoin.Next = null;
                         }
                         else
                         {
                             if (m_menuSortieSequence.Items.Count != 1)
                             {
                                 ShowInterfaceLienAction(m_expressionStartJoin, dest);
                             }
                             else
                             {
                                 m_expressionStartJoin.Next = dest;
                             }
                         }
                     }
                 }
                 else if (ModeSourisCustom == EModeSourisCustom.LienParametre)
                 {
                     if (ModifierKeys == Keys.Control)
                     {
                         dest.StopUseExterne(m_expressionStartJoin);
                     }
                     else
                     {
                         ShowInterfaceLienParametre(m_expressionStartJoin, dest);
                     }
                 }
             }
         }
         m_expressionStartJoin = null;
         OnChangeFormules();
     }
 }
Esempio n. 13
0
        /// //////////////////////////////////////////////////
        protected override void Editeur_DragDrop(object sender, System.Windows.Forms.DragEventArgs e)
        {
            if (ObjetEdite == null)
            {
                return;
            }
            if (LockEdition)
            {
                return;
            }
            List <CDonneeDragDropObjetGraphique> datas = GetDragDropData(e.Data);

            if (datas == null || datas.Count == 0)
            {
                return;
            }

            List <I2iObjetGraphique> candidats = new List <I2iObjetGraphique>();

            foreach (CRectangleDragForObjetGraphique rct in RectsDrags)
            {
                candidats.Add(rct.ObjetGraphique);
            }

            Point             ptLocal = GetLogicalPointFromDisplay(PointToClient(new Point(e.X, e.Y)));
            I2iObjetGraphique parent  = ObjetEdite.SelectionnerElementConteneurDuDessus(ptLocal, candidats);

            CRepresentationExpressionGraphique repForParametre = parent as CRepresentationExpressionGraphique;

            if (RectsDrags.Count() != 1)
            {
                repForParametre = null;
            }
            parent = ObjetEdite;



            List <I2iObjetGraphique> nouveaux = new List <I2iObjetGraphique>();

            foreach (CRectangleDragForObjetGraphique rct in RectsDrags)
            {
                rct.RectangleDrag = rct.Datas.GetDragDropPosition(ptLocal);
                rct.RectangleDrag = GetRectangleSelonModesActives(rct.RectangleDrag, ptLocal);
                // rct.RectangleDrag.Offset((int)(AutoScrollPosition.X / Echelle), (int)(AutoScrollPosition.Y / Echelle));

                I2iObjetGraphique objetGraphique = rct.Datas.ObjetDragDrop;
                JusteBeforePositionneSurApresDragDrop(objetGraphique);
                bool bParentIsInSelec = objetGraphique.Parent != null && candidats.Contains(objetGraphique.Parent);

                bool bHasMove = false;

                if (e.Effect == DragDropEffects.Copy)
                {
                    Dictionary <Type, object> dicObjetsPourCloner = new Dictionary <Type, object>();
                    AddObjectsForClonerSerializer(dicObjetsPourCloner);
                    objetGraphique = (I2iObjetGraphique)objetGraphique.GetCloneAMettreDansParent(parent, dicObjetsPourCloner);

                    if (objetGraphique == null || !parent.AddChild(objetGraphique))
                    {
                        e.Effect = DragDropEffects.None;
                        objetGraphique.CancelClone();
                        continue;
                    }
                    else
                    {
                        objetGraphique.Parent = parent;
                        nouveaux.Add(objetGraphique);
                    }
                    bHasMove = true;
                }
                else
                {
                    if (repForParametre == null)
                    {
                        bHasMove = true;
                        if (objetGraphique.Parent != parent)
                        {
                            if (objetGraphique.Parent != null)
                            {
                                if (!bParentIsInSelec)
                                {
                                    objetGraphique.Parent.RemoveChild(objetGraphique);
                                }
                            }
                            else
                            {
                                nouveaux.Add(objetGraphique);
                            }
                            if (!bParentIsInSelec)
                            {
                                if (!parent.AddChild(objetGraphique))
                                {
                                    e.Effect = DragDropEffects.None;
                                    continue;
                                }
                                else
                                {
                                    objetGraphique.Parent = parent;
                                }
                            }
                        }
                    }
                }

                if (!bParentIsInSelec && bHasMove)
                {
                    Point ptDrop = new Point(rct.RectangleDrag.Left, rct.RectangleDrag.Top);
                    objetGraphique.PositionAbsolue = ptDrop;
                }
            }

            if (nouveaux.Count > 0)
            {
                RefreshSelectionChanged = false;
                Selection.Clear();
                Selection.AddRange(nouveaux);
                RefreshSelectionChanged = true;
                DeclencheAfterAddElements(nouveaux);
                Refresh();
            }
            ElementModifie();
            EnDeplacement = false;
            Dessiner(true, true);
            if (repForParametre != null)
            {
                CRepresentationExpressionGraphique repParametre = RectsDrags[0].Datas.ObjetDragDrop as CRepresentationExpressionGraphique;
                if (repParametre != null)
                {
                    ShowInterfaceLienParametre(repParametre, repForParametre);
                }
            }
        }