コード例 #1
0
 public WorkflowEditorUserControl()
 {
     InitializeComponent();
     _myLines            = new List <CustomPath>();
     DataContextChanged += WorkflowEditorUserControl_DataContextChanged;
     SizeChanged        += (sender, args) => MouseHelper.ClearMouseTrap();
 }
コード例 #2
0
 /// <summary>
 /// Finishes the drag and drop action
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void FinishMoving(object sender, MouseButtonEventArgs e)
 {
     MouseHelper.ClearMouseTrap();
     if (_selectedComponent != null)
     {
         _startPoint        = new Point();
         MouseMove         -= MoveComponent;
         _selectedComponent = null;
     }
     if (_customPath != null)
     {
         MouseMove -= MovePath;
         editorCanvas.Children.Remove(_customPath.Path);
         if (CurrentHoveredComponent != null)
         {
             AddConnection(_customPath.Source, (CurrentHoveredComponent as WorkflowComponentUserControl).Component);
         }
         _customPath = null;
         DrawCanvas(this, null);
     }
 }