Ignore:
Timestamp:
Oct 23, 2010, 7:13:29 AM (11 years ago)
Author:
matkovic
Message:

-Mandatory Connector now indicated by the red border
-Textbox added for custom description
-Major Style changes
-Icon updated
-WorkSpace Scrolling now Possible

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrypPlugins/WorkspaceManager/View/Container/WorkSpaceEditorView.xaml.cs

    r1991 r2007  
    3939        private Point point;
    4040        private PluginContainerView currentFullViewContainer;
     41        private Panel root { get { return (this.ViewBox.Content as Panel); } }
    4142
    4243        public UserContentWrapper UserContentWrapper { get; set; }
     
    7273            this.DragEnter += new DragEventHandler(WorkSpaceEditorView_DragEnter);
    7374            this.Drop += new DragEventHandler(WorkSpaceEditorView_Drop);
    74             this.MouseMove += new MouseEventHandler(WorkSpaceEditorView_MouseMove);
    7575            this.PreviewMouseRightButtonDown += new MouseButtonEventHandler(WorkSpaceEditorView_PreviewMouseRightButtonDown);
    7676            this.Model = WorkspaceModel;
     
    248248        void WorkSpaceEditorView_MouseMove(object sender, MouseEventArgs e)
    249249        {
    250             if (e.LeftButton == MouseButtonState.Pressed && selectedPluginContainer != null)
    251             {
    252                 point = selectedPluginContainer.GetPosition();
    253                 this.selectedPluginContainer.SetPosition(new Point((Math.Round((Mouse.GetPosition(root).X - previousDragPoint.X) / Properties.Settings.Default.GridScale)) * Properties.Settings.Default.GridScale,
    254                                                             (Math.Round((Mouse.GetPosition(root).Y - previousDragPoint.Y) / Properties.Settings.Default.GridScale)) * Properties.Settings.Default.GridScale));
    255                 Model.WorkspaceManagerEditor.HasChanges = true;
    256                 //this.selectedPluginContainer.SetPosition(new Point((Math.Round(( Mouse.GetPosition(root).X )/Properties.Settings.Default.GridScale)) * Properties.Settings.Default.GridScale,
    257                 //                                            (Math.Round(( Mouse.GetPosition(root).Y ) / Properties.Settings.Default.GridScale)) * Properties.Settings.Default.GridScale));
    258             }
    259 
    260 
    261 
    262             if (selectedConnector != null && root.Children.Contains(dummyLine))
    263             {
    264                 this.dummyLine.EndPoint = Mouse.GetPosition(root);
    265             }
     250            this.dummyLine.EndPoint = Mouse.GetPosition(root);
     251            previousDragPoint = e.GetPosition(root);
    266252        }
    267253
Note: See TracChangeset for help on using the changeset viewer.