From 8a508548682a5d876c58d7b6eb74b8d5613fcf0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=89=BE=E7=AB=B9?= Date: Sun, 12 Feb 2023 09:26:27 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=A7=E7=BB=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AIStudio.Wpf.DiagramApp.csproj | 3 --- AIStudio.Wpf.DiagramApp/DesignItems/Customs/1.json | 2 +- AIStudio.Wpf.DiagramApp/Views/MainWindow.xaml | 10 +++++----- .../BaseViewModel/DesignerItemViewModelBase.cs | 13 +++++-------- 4 files changed, 11 insertions(+), 17 deletions(-) diff --git a/AIStudio.Wpf.DiagramApp/AIStudio.Wpf.DiagramApp.csproj b/AIStudio.Wpf.DiagramApp/AIStudio.Wpf.DiagramApp.csproj index e1a927f..4b6e5f1 100644 --- a/AIStudio.Wpf.DiagramApp/AIStudio.Wpf.DiagramApp.csproj +++ b/AIStudio.Wpf.DiagramApp/AIStudio.Wpf.DiagramApp.csproj @@ -231,9 +231,6 @@ - - PreserveNewest - PreserveNewest diff --git a/AIStudio.Wpf.DiagramApp/DesignItems/Customs/1.json b/AIStudio.Wpf.DiagramApp/DesignItems/Customs/1.json index 58a1ea3..ee09f6c 100644 --- a/AIStudio.Wpf.DiagramApp/DesignItems/Customs/1.json +++ b/AIStudio.Wpf.DiagramApp/DesignItems/Customs/1.json @@ -1 +1 @@ -{"Title":null,"DiagramType":0,"DiagramItems":[{"Name":null,"DiagramType":0,"ShowGrid":false,"GridCellSize":"0,0","CellHorizontalAlignment":0,"CellVerticalAlignment":0,"PageSizeOrientation":0,"PageSize":"0,0","PageSizeType":0,"GridMarginSize":"0,0","GridColor":"#00000000","DesignerItems":[{"ModelType":null,"ModelTypeName":"AIStudio.Wpf.DiagramDesigner.DefaultDesignerItemViewModel","SerializableType":null,"SerializableTypeName":"AIStudio.Wpf.DiagramDesigner.DesignerItemBase","SerializableString":"{\"Left\":244.0,\"Top\":144.46000022888188,\"Angle\":0.0,\"ScaleX\":1.0,\"ScaleY\":1.0,\"Margin\":0.0,\"ItemWidth\":65.0,\"ItemHeight\":65.0,\"Icon\":null,\"Reserve\":null,\"ItemTypeName\":\"AIStudio.Wpf.DiagramDesigner.DefaultDesignerItemViewModel\",\"ParentId\":\"00000000-0000-0000-0000-000000000000\",\"Id\":\"35365569-5f02-4edd-b040-2cd0150641d7\",\"ZIndex\":0,\"IsGroup\":false,\"Text\":\"AIStudio\",\"ColorItem\":{\"LineColor\":{\"BrushType\":1,\"Color\":\"#FF808080\",\"GradientStop\":null,\"Offset\":null,\"Image\":null,\"SubType\":0,\"StartPoint\":\"0,0\",\"EndPoint\":\"0,0\",\"Opacity\":1.0,\"LinearOrientation\":0,\"RadialOrientation\":0,\"Angle\":0},\"FillColor\":{\"BrushType\":1,\"Color\":\"#FFFFA500\",\"GradientStop\":null,\"Offset\":null,\"Image\":null,\"SubType\":0,\"StartPoint\":\"0,0\",\"EndPoint\":\"0,0\",\"Opacity\":1.0,\"LinearOrientation\":0,\"RadialOrientation\":0,\"Angle\":0},\"ShadowColor\":\"#00FFFFFF\",\"LineWidth\":1.0,\"LineDashStyle\":0,\"LineAnimation\":0},\"FontItem\":{\"FontWeight\":\"Normal\",\"FontStyle\":\"Normal\",\"FontStretch\":\"Normal\",\"Underline\":false,\"Strikethrough\":false,\"OverLine\":false,\"FontColor\":\"#FF000000\",\"FontFamily\":\"Arial\",\"FontSize\":12.0,\"FontObject\":\"Arial, 12pt\",\"TextEffectColor\":\"#00FFFFFF\",\"HighlightColor\":\"#00FFFFFF\",\"FontCase\":0,\"HorizontalAlignment\":1,\"VerticalAlignment\":1,\"LineHeight\":0.0},\"SharpItem\":{\"SourceMarker\":{\"Path\":\"\",\"Width\":10.0,\"PathStyle\":0,\"SizeStyle\":10},\"SinkMarker\":{\"Path\":\"M 0 -5 10 0 0 5 z\",\"Width\":10.0,\"PathStyle\":1,\"SizeStyle\":10}}}"}],"Connections":[]}]} \ No newline at end of file +{"Title":null,"DiagramType":0,"DiagramItems":[{"Name":null,"DiagramType":0,"ShowGrid":false,"PhysicalGridCellSize":"0,0","CellHorizontalAlignment":0,"CellVerticalAlignment":0,"PageSizeOrientation":0,"PhysicalPageSize":"0,0","PageSizeType":0,"PhysicalGridMarginSize":"0,0","GridColor":"#00000000","DesignerItems":[{"ModelType":null,"ModelTypeName":"AIStudio.Wpf.DiagramDesigner.DefaultDesignerItemViewModel","SerializableType":null,"SerializableTypeName":"AIStudio.Wpf.DiagramDesigner.DesignerItemBase","SerializableString":"{\"PhysicalLeft\":55.071354166666666,\"PhysicalTop\":10.13635421792666,\"Angle\":0.0,\"ScaleX\":1.0,\"ScaleY\":1.0,\"Margin\":0.0,\"ItemWidth\":14.557291666666666,\"ItemHeight\":14.557291666666666,\"Icon\":null,\"Reserve\":null,\"ItemTypeName\":\"AIStudio.Wpf.DiagramDesigner.DefaultDesignerItemViewModel\",\"ParentId\":\"00000000-0000-0000-0000-000000000000\",\"Id\":\"e400c493-a6e9-4ac6-88b0-387bb35a83bc\",\"ZIndex\":0,\"IsGroup\":false,\"Text\":\"AIStudio\",\"ColorItem\":{\"LineColor\":{\"BrushType\":1,\"Color\":\"#FF808080\",\"GradientStop\":null,\"Offset\":null,\"Image\":null,\"SubType\":0,\"StartPoint\":\"0,0\",\"EndPoint\":\"0,0\",\"Opacity\":1.0,\"LinearOrientation\":0,\"RadialOrientation\":0,\"Angle\":0},\"FillColor\":{\"BrushType\":1,\"Color\":\"#FFFFA500\",\"GradientStop\":null,\"Offset\":null,\"Image\":null,\"SubType\":0,\"StartPoint\":\"0,0\",\"EndPoint\":\"0,0\",\"Opacity\":1.0,\"LinearOrientation\":0,\"RadialOrientation\":0,\"Angle\":0},\"ShadowColor\":\"#00FFFFFF\",\"LineWidth\":1.0,\"LineDashStyle\":0,\"LineAnimation\":0,\"LineAnimationDuration\":1.0},\"FontItem\":{\"FontWeight\":\"Normal\",\"FontStyle\":\"Normal\",\"FontStretch\":\"Normal\",\"Underline\":false,\"Strikethrough\":false,\"OverLine\":false,\"FontColor\":\"#FF000000\",\"FontFamily\":\"Arial\",\"FontSize\":12.0,\"FontObject\":\"Arial, 12pt\",\"TextEffectColor\":\"#00FFFFFF\",\"HighlightColor\":\"#00FFFFFF\",\"FontCase\":0,\"HorizontalAlignment\":1,\"VerticalAlignment\":1,\"LineHeight\":0.0},\"SharpItem\":{\"SourceMarker\":{\"Path\":\"\",\"Width\":10.0,\"Height\":10.0,\"PathStyle\":0,\"SizeStyle\":10},\"SinkMarker\":{\"Path\":\"M 0 -5 10 0 0 5 z\",\"Width\":10.0,\"Height\":10.0,\"PathStyle\":1,\"SizeStyle\":10}}}"}],"Connections":[]}]} \ No newline at end of file diff --git a/AIStudio.Wpf.DiagramApp/Views/MainWindow.xaml b/AIStudio.Wpf.DiagramApp/Views/MainWindow.xaml index 9dc5435..cb8752b 100644 --- a/AIStudio.Wpf.DiagramApp/Views/MainWindow.xaml +++ b/AIStudio.Wpf.DiagramApp/Views/MainWindow.xaml @@ -1523,15 +1523,15 @@ - + - + - + - + @@ -2022,7 +2022,7 @@ - 鼠标位置mm: + 鼠标位置(mm): , diff --git a/AIStudio.Wpf.DiagramDesigner/ViewModels/BaseViewModel/DesignerItemViewModelBase.cs b/AIStudio.Wpf.DiagramDesigner/ViewModels/BaseViewModel/DesignerItemViewModelBase.cs index efb5d5a..8573662 100644 --- a/AIStudio.Wpf.DiagramDesigner/ViewModels/BaseViewModel/DesignerItemViewModelBase.cs +++ b/AIStudio.Wpf.DiagramDesigner/ViewModels/BaseViewModel/DesignerItemViewModelBase.cs @@ -180,7 +180,6 @@ namespace AIStudio.Wpf.DiagramDesigner } private double _itemWidth = 65; - [Browsable(true)] [CanDo] public double ItemWidth { @@ -198,8 +197,7 @@ namespace AIStudio.Wpf.DiagramDesigner } } - private double _itemHeight = 65; - [Browsable(true)] + private double _itemHeight = 65; [CanDo] public double ItemHeight { @@ -217,6 +215,7 @@ namespace AIStudio.Wpf.DiagramDesigner } } + [DisplayName("ItemWidth(mm)")] [Browsable(true)] public double PhysicalItemWidth { @@ -230,6 +229,7 @@ namespace AIStudio.Wpf.DiagramDesigner } } + [DisplayName("ItemHeight(mm)")] [Browsable(true)] public double PhysicalItemHeight { @@ -258,7 +258,6 @@ namespace AIStudio.Wpf.DiagramDesigner } private bool _showConnectors = false; - [Browsable(false)] public bool ShowConnectors { get @@ -278,7 +277,6 @@ namespace AIStudio.Wpf.DiagramDesigner } private bool _showResize = true; - [Browsable(false)] public bool ShowResize { get @@ -292,7 +290,6 @@ namespace AIStudio.Wpf.DiagramDesigner } private bool _showRotate = false; - [Browsable(true)] public bool ShowRotate { get @@ -308,7 +305,6 @@ namespace AIStudio.Wpf.DiagramDesigner public bool ShowArrow { get; set; } = true; private double _left; - [Browsable(true)] [CanDo] public double Left { @@ -323,7 +319,6 @@ namespace AIStudio.Wpf.DiagramDesigner } private double _top; - [Browsable(true)] [CanDo] public double Top { @@ -337,6 +332,7 @@ namespace AIStudio.Wpf.DiagramDesigner } } + [DisplayName("Left(mm)")] [Browsable(true)] public double PhysicalLeft { @@ -350,6 +346,7 @@ namespace AIStudio.Wpf.DiagramDesigner } } + [DisplayName("Top(mm)")] [Browsable(true)] public double PhysicalTop {