void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 14 "..\..\OverviewWindow.xaml"
                ((SampleCode.OverviewWindow)(target)).MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.Window_MouseDown);

            #line default
            #line hidden
                return;

            case 2:
                this.overview = ((ZoomAndPan.ZoomAndPanControl)(target));

            #line 156 "..\..\OverviewWindow.xaml"
                this.overview.Loaded += new System.Windows.RoutedEventHandler(this.overview_Loaded);

            #line default
            #line hidden

            #line 157 "..\..\OverviewWindow.xaml"
                this.overview.SizeChanged += new System.Windows.SizeChangedEventHandler(this.overview_SizeChanged);

            #line default
            #line hidden
                return;

            case 3:
                this.networkControl = ((NetworkUI.NetworkView)(target));
                return;

            case 4:
                this.overviewZoomRectThumb = ((System.Windows.Controls.Primitives.Thumb)(target));

            #line 191 "..\..\OverviewWindow.xaml"
                this.overviewZoomRectThumb.DragDelta += new System.Windows.Controls.Primitives.DragDeltaEventHandler(this.overviewZoomRectThumb_DragDelta);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
 /// <summary>
 /// 
 /// </summary>
 /// <param name="nodes_"></param>
 public void OnNodesSelectedChanged(NetworkView view_, IEnumerable<NodeViewModel> nodes_)
 {
     UndoRedoManager.Add(new SelectNodesUndoCommand(view_, nodes_));
 }
Beispiel #3
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.mainWindow = ((SampleCode.MainWindow)(target));

            #line 16 "..\..\MainWindow.xaml"
                this.mainWindow.Loaded += new System.Windows.RoutedEventHandler(this.MainWindow_Loaded);

            #line default
            #line hidden
                return;

            case 3:

            #line 481 "..\..\MainWindow.xaml"
                ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.DeleteSelectedNodes_Executed);

            #line default
            #line hidden
                return;

            case 4:

            #line 485 "..\..\MainWindow.xaml"
                ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.CreateNode_Executed);

            #line default
            #line hidden
                return;

            case 5:

            #line 489 "..\..\MainWindow.xaml"
                ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.DeleteNode_Executed);

            #line default
            #line hidden
                return;

            case 6:

            #line 493 "..\..\MainWindow.xaml"
                ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.DeleteConnection_Executed);

            #line default
            #line hidden
                return;

            case 7:

            #line 497 "..\..\MainWindow.xaml"
                ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.ZoomOut_Executed);

            #line default
            #line hidden
                return;

            case 8:

            #line 501 "..\..\MainWindow.xaml"
                ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.ZoomIn_Executed);

            #line default
            #line hidden
                return;

            case 9:

            #line 505 "..\..\MainWindow.xaml"
                ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.JumpBackToPrevZoom_Executed);

            #line default
            #line hidden

            #line 506 "..\..\MainWindow.xaml"
                ((System.Windows.Input.CommandBinding)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.JumpBackToPrevZoom_CanExecuted);

            #line default
            #line hidden
                return;

            case 10:

            #line 510 "..\..\MainWindow.xaml"
                ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.FitContent_Executed);

            #line default
            #line hidden
                return;

            case 11:

            #line 514 "..\..\MainWindow.xaml"
                ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.Fill_Executed);

            #line default
            #line hidden
                return;

            case 12:

            #line 518 "..\..\MainWindow.xaml"
                ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.OneHundredPercent_Executed);

            #line default
            #line hidden
                return;

            case 13:
                this.zoomAndPanControl = ((ZoomAndPan.ZoomAndPanControl)(target));
                return;

            case 14:
                this.networkControl = ((NetworkUI.NetworkView)(target));

            #line 779 "..\..\MainWindow.xaml"
                this.networkControl.ConnectionDragStarted += new NetworkUI.ConnectionDragStartedEventHandler(this.networkControl_ConnectionDragStarted);

            #line default
            #line hidden

            #line 780 "..\..\MainWindow.xaml"
                this.networkControl.QueryConnectionFeedback += new NetworkUI.QueryConnectionFeedbackEventHandler(this.networkControl_QueryConnectionFeedback);

            #line default
            #line hidden

            #line 781 "..\..\MainWindow.xaml"
                this.networkControl.ConnectionDragging += new NetworkUI.ConnectionDraggingEventHandler(this.networkControl_ConnectionDragging);

            #line default
            #line hidden

            #line 782 "..\..\MainWindow.xaml"
                this.networkControl.ConnectionDragCompleted += new NetworkUI.ConnectionDragCompletedEventHandler(this.networkControl_ConnectionDragCompleted);

            #line default
            #line hidden

            #line 784 "..\..\MainWindow.xaml"
                this.networkControl.MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.networkControl_MouseDown);

            #line default
            #line hidden

            #line 785 "..\..\MainWindow.xaml"
                this.networkControl.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.networkControl_MouseUp);

            #line default
            #line hidden

            #line 786 "..\..\MainWindow.xaml"
                this.networkControl.MouseMove += new System.Windows.Input.MouseEventHandler(this.networkControl_MouseMove);

            #line default
            #line hidden

            #line 787 "..\..\MainWindow.xaml"
                this.networkControl.MouseWheel += new System.Windows.Input.MouseWheelEventHandler(this.networkControl_MouseWheel);

            #line default
            #line hidden
                return;

            case 15:
                this.dragZoomCanvas = ((System.Windows.Controls.Canvas)(target));
                return;

            case 16:
                this.dragZoomBorder = ((System.Windows.Controls.Border)(target));
                return;
            }
            this._contentLoaded = true;
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public void OnNodeDragCompleted(NetworkView sender, NodeDragCompletedEventArgs e)
        {
            foreach (PositionNodeUndoCommand.NodeDraggingInfo info in m_CachedNodesDraggingList)
            {
                info.EndX = info.Node.X;
                info.EndY = info.Node.Y;
            }

            UndoRedoManager.Add(new PositionNodeUndoCommand(this, m_CachedNodesDraggingList));
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public void OnNodeDragStarted(NetworkView sender, NodeDragStartedEventArgs e)
        {
            m_CachedNodesDraggingList.Clear();

            foreach (NodeViewModel node in e.Nodes)
            {
                m_CachedNodesDraggingList.Add(new PositionNodeUndoCommand.NodeDraggingInfo { Node = node, StartX = node.X, StartY = node.Y });
            }
        }
Beispiel #6
0
        /// <summary>
        /// Executes the 'CancelConnectionDragging' command.
        /// </summary>
        private static void CancelConnectionDragging_Executed(object sender, ExecutedRoutedEventArgs e)
        {
            NetworkView c = (NetworkView)sender;

            c.CancelConnectionDragging();
        }
Beispiel #7
0
        /// <summary>
        /// Executes the 'InvertSelection' command.
        /// </summary>
        private static void InvertSelection_Executed(object sender, ExecutedRoutedEventArgs e)
        {
            NetworkView c = (NetworkView)sender;

            c.InvertSelection();
        }
Beispiel #8
0
        /// <summary>
        /// Executes the 'SelectNone' command.
        /// </summary>
        private static void SelectNone_Executed(object sender, ExecutedRoutedEventArgs e)
        {
            NetworkView c = (NetworkView)sender;

            c.SelectNone();
        }
Beispiel #9
0
 /// <summary>
 /// 
 /// </summary>
 public SelectNodesUndoCommand(NetworkView view_, IEnumerable<NodeViewModel> nodesVM_)
 {
     m_View = view_;
     m_NodesVM = new List<NodeViewModel>(nodesVM_);
 }
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.mainWindow = ((SampleCode.BlockEditor)(target));
     
     #line 14 "..\..\BlockEditor.xaml"
     this.mainWindow.Loaded += new System.Windows.RoutedEventHandler(this.LoadedHandler);
     
     #line default
     #line hidden
     return;
     case 2:
     
     #line 171 "..\..\BlockEditor.xaml"
     ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.DeleteSelectedNodes_Executed);
     
     #line default
     #line hidden
     return;
     case 3:
     
     #line 172 "..\..\BlockEditor.xaml"
     ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.CreateNode_Executed);
     
     #line default
     #line hidden
     return;
     case 4:
     this.networkControl = ((NetworkUI.NetworkView)(target));
     return;
     }
     this._contentLoaded = true;
 }