public void Draw(Event eEvent, Action action)
 {
     foreach (var actionControl in actionControls)
     {
         foreach (var eventControl in eventControls)
         {
             if (eEvent == eventControl.DataContext && action == actionControl.DataContext)
             {
                 DLine dLine = new DLine();
                 dLine.ActionControl = actionControl;
                 dLine.EventControl = eventControl;
                 dLine.ActionIsMain = false;
                 layer.DLines.Add(dLine);
                 Gridt.Children.Add(dLine.GetLine());
                 break;
             }
         }
     }
     foreach (var dLine in layer.DLines)
     {
         dLine.RefreshLine();
     }
 }
 private void Addlines()
 {
     foreach (var actionControl in actionControls)
     {
         foreach (var eventControl in eventControls)
         {
             if (((Event)eventControl.DataContext).ParentAction == actionControl.DataContext)
             {
                 DLine dLine = new DLine();
                 dLine.ActionControl = actionControl;
                 dLine.EventControl = eventControl;
                 dLine.ActionIsMain = true;
                 layer.DLines.Add(dLine);
                 var line = dLine.GetLine();
                 Gridt.Children.Add(line);
             }
         }
     }
 }