Ejemplo n.º 1
0
        private void MainCanvas_Drop(object sender, DragEventArgs e)
        {
            FrameworkElement elem = sender as FrameworkElement;

            if (elem == null)
            {
                return;
            }
            IDataObject data = e.Data;

            if (!data.GetDataPresent(typeof(FlowElement)))
            {
                return;
            }
            FlowElement source = data.GetData(typeof(FlowElement)) as FlowElement;

            if (source == null)
            {
                return;
            }

            if (e.Source is FlowElement)
            {
                FlowLink FL = new FlowLink(source, (FlowElement)e.Source);

                FL.LinkStyle = FlowLink.eLinkStyle.Arrow;
                GEList.Add(FL);
                SetFlowLinkConnectorsLocations(FL, e);
                FL.Draw();

                MainCanvas.Children.Add(FL);
            }
        }
Ejemplo n.º 2
0
 public void AddConnector(FlowLink FL)
 {
     GEList.Add(FL);
     FL.Draw();
     MainCanvas.Children.Add(FL);
 }