diff --git a/AIStudio.Wpf.DiagramDesigner/Controls/DragThumb.cs b/AIStudio.Wpf.DiagramDesigner/Controls/DragThumb.cs index 4addae6..2e9fcf5 100644 --- a/AIStudio.Wpf.DiagramDesigner/Controls/DragThumb.cs +++ b/AIStudio.Wpf.DiagramDesigner/Controls/DragThumb.cs @@ -58,11 +58,6 @@ namespace AIStudio.Wpf.DiagramDesigner.Controls } } - if (designerItem is PointDesignerItemViewModel) - { - designerItems = new List { designerItem }; - } - designerItems = designerItems.Distinct().ToList(); Interlocked.Increment(ref DiagramViewModel.DoCommandManager.BeginDo); diff --git a/AIStudio.Wpf.DiagramDesigner/StyleSelectors/DesignerItemsControlItemStyleSelector.cs b/AIStudio.Wpf.DiagramDesigner/StyleSelectors/DesignerItemsControlItemStyleSelector.cs index e922031..b6f8eed 100644 --- a/AIStudio.Wpf.DiagramDesigner/StyleSelectors/DesignerItemsControlItemStyleSelector.cs +++ b/AIStudio.Wpf.DiagramDesigner/StyleSelectors/DesignerItemsControlItemStyleSelector.cs @@ -32,16 +32,6 @@ namespace AIStudio.Wpf.DiagramDesigner return (Style)itemsControl.FindResource("gifimageItemStyle"); } - if (item is LinkPointDesignerItemViewModel) - { - return (Style)itemsControl.FindResource("linkpointItemStyle"); - } - - if (item is PointDesignerItemViewModel) - { - return (Style)itemsControl.FindResource("pointItemStyle"); - } - if (item is LogicalGateItemViewModelBase) { return (Style)itemsControl.FindResource("logicalItemStyle"); diff --git a/AIStudio.Wpf.DiagramDesigner/UserControls/DiagramControl.xaml b/AIStudio.Wpf.DiagramDesigner/UserControls/DiagramControl.xaml index 7405f9e..0166608 100644 --- a/AIStudio.Wpf.DiagramDesigner/UserControls/DiagramControl.xaml +++ b/AIStudio.Wpf.DiagramDesigner/UserControls/DiagramControl.xaml @@ -766,98 +766,6 @@ - - - - - diff --git a/AIStudio.Wpf.DiagramDesigner/ViewModels/DefaultViewModel/LinkPointDesignerItemViewModel.cs b/AIStudio.Wpf.DiagramDesigner/ViewModels/DefaultViewModel/LinkPointDesignerItemViewModel.cs deleted file mode 100644 index 61ea26f..0000000 --- a/AIStudio.Wpf.DiagramDesigner/ViewModels/DefaultViewModel/LinkPointDesignerItemViewModel.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System; -using System.Windows; - -namespace AIStudio.Wpf.DiagramDesigner -{ - public class LinkPointDesignerItemViewModel : DesignerItemViewModelBase - { - public LinkPointDesignerItemViewModel(Point location) : this(null, location) - { - - } - - public LinkPointDesignerItemViewModel(IDiagramViewModel root, Point location) : base(root) - { - Left = Math.Max(0, location.X - ItemWidth / 2); - Top = Math.Max(0, location.Y - ItemHeight / 2); - } - - protected override void Init(IDiagramViewModel root, bool initNew) - { - base.Init(root, initNew); - } - - protected override void InitNew() - { - this.ClearConnectors(); - this.AddConnector(new FullyCreatedConnectorInfo(this, ConnectorOrientation.None, true)); - - ItemWidth = 5; - ItemHeight = 5; - } - - public Point CurrentLocation - { - get - { - return new Point() { X = Left + ItemWidth / 2, Y = Top + ItemHeight / 2 }; - } - } - } -} diff --git a/AIStudio.Wpf.DiagramDesigner/ViewModels/DefaultViewModel/PointDesignerItemViewModel.cs b/AIStudio.Wpf.DiagramDesigner/ViewModels/DefaultViewModel/PointDesignerItemViewModel.cs deleted file mode 100644 index 5bd90b2..0000000 --- a/AIStudio.Wpf.DiagramDesigner/ViewModels/DefaultViewModel/PointDesignerItemViewModel.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System; -using System.Windows; - -namespace AIStudio.Wpf.DiagramDesigner -{ - public class PointDesignerItemViewModel : DesignerItemViewModelBase - { - public PointDesignerItemViewModel(Point location) : this(null, location) - { - - } - - public PointDesignerItemViewModel(IDiagramViewModel root, Point location) : base(root) - { - Left = Math.Max(0, location.X - ItemWidth / 2); - Top = Math.Max(0, location.Y - ItemHeight / 2); - } - - protected override void Init(IDiagramViewModel root, bool initNew) - { - base.Init(root, initNew); - } - - protected override void InitNew() - { - ItemWidth = 5; - ItemHeight = 5; - this.ClearConnectors(); - this.AddConnector(new FullyCreatedConnectorInfo(this, ConnectorOrientation.None, true)); - } - - private bool _showConnectors = false; - public new bool ShowConnectors - { - get - { - return _showConnectors; - } - set - { - SetProperty(ref _showConnectors, value); - } - } - - public Point CurrentLocation - { - get - { - return new Point() { X = Left + ItemWidth / 2, Y = Top + ItemHeight / 2 }; - } - } - } -}