diff --git a/AIStudio.Wpf.DiagramApp/Themes/Styles/Expander.xaml b/AIStudio.Wpf.DiagramApp/Styles/Expander.xaml similarity index 100% rename from AIStudio.Wpf.DiagramApp/Themes/Styles/Expander.xaml rename to AIStudio.Wpf.DiagramApp/Styles/Expander.xaml diff --git a/AIStudio.Wpf.DiagramApp/Themes/Styles/Fluent.xaml b/AIStudio.Wpf.DiagramApp/Styles/Fluent.xaml similarity index 100% rename from AIStudio.Wpf.DiagramApp/Themes/Styles/Fluent.xaml rename to AIStudio.Wpf.DiagramApp/Styles/Fluent.xaml diff --git a/AIStudio.Wpf.DiagramApp/Themes/Styles/ListBox.xaml b/AIStudio.Wpf.DiagramApp/Styles/ListBox.xaml similarity index 100% rename from AIStudio.Wpf.DiagramApp/Themes/Styles/ListBox.xaml rename to AIStudio.Wpf.DiagramApp/Styles/ListBox.xaml diff --git a/AIStudio.Wpf.DiagramApp/Themes/Styles/Slider.xaml b/AIStudio.Wpf.DiagramApp/Styles/Slider.xaml similarity index 100% rename from AIStudio.Wpf.DiagramApp/Themes/Styles/Slider.xaml rename to AIStudio.Wpf.DiagramApp/Styles/Slider.xaml diff --git a/AIStudio.Wpf.DiagramApp/Themes/Styles/TabControl.xaml b/AIStudio.Wpf.DiagramApp/Styles/TabControl.xaml similarity index 100% rename from AIStudio.Wpf.DiagramApp/Themes/Styles/TabControl.xaml rename to AIStudio.Wpf.DiagramApp/Styles/TabControl.xaml diff --git a/AIStudio.Wpf.DiagramApp/Themes/Styles/ToggleButton.xaml b/AIStudio.Wpf.DiagramApp/Styles/ToggleButton.xaml similarity index 100% rename from AIStudio.Wpf.DiagramApp/Themes/Styles/ToggleButton.xaml rename to AIStudio.Wpf.DiagramApp/Styles/ToggleButton.xaml diff --git a/AIStudio.Wpf.DiagramApp/Themes/Generic.xaml b/AIStudio.Wpf.DiagramApp/Themes/Generic.xaml index acecd78..834adaf 100644 --- a/AIStudio.Wpf.DiagramApp/Themes/Generic.xaml +++ b/AIStudio.Wpf.DiagramApp/Themes/Generic.xaml @@ -2,20 +2,20 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> - - - - - - - - - - - - - - + + + + + + + + + + + + + + diff --git a/AIStudio.Wpf.DiagramDesigner.Test/App.xaml b/AIStudio.Wpf.DiagramDesigner.Test/App.xaml index cf8e9da..2493cd6 100644 --- a/AIStudio.Wpf.DiagramDesigner.Test/App.xaml +++ b/AIStudio.Wpf.DiagramDesigner.Test/App.xaml @@ -6,14 +6,13 @@ - - - - - - - - + + + + + + + diff --git a/AIStudio.Wpf.DiagramDesigner.Test/MainWindow.xaml b/AIStudio.Wpf.DiagramDesigner.Test/MainWindow.xaml index a6c8af3..916856c 100644 --- a/AIStudio.Wpf.DiagramDesigner.Test/MainWindow.xaml +++ b/AIStudio.Wpf.DiagramDesigner.Test/MainWindow.xaml @@ -12,7 +12,7 @@ - + #FF0078D7 diff --git a/AIStudio.Wpf.DiagramDesigner/AIStudio.Wpf.DiagramDesigner.csproj b/AIStudio.Wpf.DiagramDesigner/AIStudio.Wpf.DiagramDesigner.csproj index 8a69c51..c70117e 100644 --- a/AIStudio.Wpf.DiagramDesigner/AIStudio.Wpf.DiagramDesigner.csproj +++ b/AIStudio.Wpf.DiagramDesigner/AIStudio.Wpf.DiagramDesigner.csproj @@ -30,5 +30,12 @@ PreserveNewest + + + + $(DefaultXamlRuntime) + Designer + + \ No newline at end of file diff --git a/AIStudio.Wpf.DiagramDesigner/Converters/ConnectionDataConverter.cs b/AIStudio.Wpf.DiagramDesigner/Converters/ConnectionDataConverter.cs index 5050d15..0053700 100644 --- a/AIStudio.Wpf.DiagramDesigner/Converters/ConnectionDataConverter.cs +++ b/AIStudio.Wpf.DiagramDesigner/Converters/ConnectionDataConverter.cs @@ -25,42 +25,46 @@ namespace AIStudio.Wpf.DiagramDesigner public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) { - List points = (List)values[0]; PathGeometry pathGeometry = new PathGeometry(); - PathFigure figure = new PathFigure(); - figure.StartPoint = points[0]; - if (values[1]?.ToString() == DrawMode.RadiusConnectingLine.ToString()) + if (values[0] != null) { - for (var i = 0; i < points.Count - 1; i++) - { - int current = i, last = i - 1, next = i + 1, next2 = i + 2; - if (last == -1) - { - last = 0; - } - if (next == points.Count) - { - next = points.Count - 1; - } - if (next2 == points.Count) - { - next2 = points.Count - 1; - } - var bzs = SegmentHelper.GetBezierSegment(points[current], points[last], points[next], points[next2]); - figure.Segments.Add(bzs); - } - } - else - { - for (int i = 0; i < points.Count; i++) - { + List points = (List)values[0]; - LineSegment arc = new LineSegment(points[i], true); - figure.Segments.Add(arc); + PathFigure figure = new PathFigure(); + figure.StartPoint = points[0]; + if (values[1]?.ToString() == DrawMode.RadiusConnectingLine.ToString()) + { + for (var i = 0; i < points.Count - 1; i++) + { + int current = i, last = i - 1, next = i + 1, next2 = i + 2; + if (last == -1) + { + last = 0; + } + if (next == points.Count) + { + next = points.Count - 1; + } + if (next2 == points.Count) + { + next2 = points.Count - 1; + } + var bzs = SegmentHelper.GetBezierSegment(points[current], points[last], points[next], points[next2]); + figure.Segments.Add(bzs); + } } - } + else + { + for (int i = 0; i < points.Count; i++) + { - pathGeometry.Figures.Add(figure); + LineSegment arc = new LineSegment(points[i], true); + figure.Segments.Add(arc); + } + } + + pathGeometry.Figures.Add(figure); + } return pathGeometry; } diff --git a/AIStudio.Wpf.DiagramDesigner/Resources/Styles/Expander.xaml b/AIStudio.Wpf.DiagramDesigner/Resources/Styles/Expander.xaml deleted file mode 100644 index 5974bb0..0000000 --- a/AIStudio.Wpf.DiagramDesigner/Resources/Styles/Expander.xaml +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/AIStudio.Wpf.DiagramDesigner/Resources/Styles/GroupBox.xaml b/AIStudio.Wpf.DiagramDesigner/Resources/Styles/GroupBox.xaml deleted file mode 100644 index f418927..0000000 --- a/AIStudio.Wpf.DiagramDesigner/Resources/Styles/GroupBox.xaml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/AIStudio.Wpf.DiagramDesigner/Resources/Styles/ScrollBar.xaml b/AIStudio.Wpf.DiagramDesigner/Resources/Styles/ScrollBar.xaml deleted file mode 100644 index f81c8a5..0000000 --- a/AIStudio.Wpf.DiagramDesigner/Resources/Styles/ScrollBar.xaml +++ /dev/null @@ -1,186 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/AIStudio.Wpf.DiagramDesigner/Resources/Styles/ScrollViewer.xaml b/AIStudio.Wpf.DiagramDesigner/Resources/Styles/ScrollViewer.xaml deleted file mode 100644 index 07fa158..0000000 --- a/AIStudio.Wpf.DiagramDesigner/Resources/Styles/ScrollViewer.xaml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/AIStudio.Wpf.DiagramDesigner/Resources/Styles/Shared.xaml b/AIStudio.Wpf.DiagramDesigner/Resources/Styles/Shared.xaml deleted file mode 100644 index fd557d4..0000000 --- a/AIStudio.Wpf.DiagramDesigner/Resources/Styles/Shared.xaml +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/AIStudio.Wpf.DiagramDesigner/Resources/Styles/ToolTip.xaml b/AIStudio.Wpf.DiagramDesigner/Resources/Styles/ToolTip.xaml deleted file mode 100644 index bdc742c..0000000 --- a/AIStudio.Wpf.DiagramDesigner/Resources/Styles/ToolTip.xaml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/AIStudio.Wpf.DiagramDesigner/Resources/Styles/ZoomBox.xaml b/AIStudio.Wpf.DiagramDesigner/Resources/Styles/ZoomBox.xaml deleted file mode 100644 index 53efc24..0000000 --- a/AIStudio.Wpf.DiagramDesigner/Resources/Styles/ZoomBox.xaml +++ /dev/null @@ -1,245 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/AIStudio.Wpf.DiagramHelper/Controls/ComboBox.xaml b/AIStudio.Wpf.DiagramDesigner/Styles/ComboBox.xaml similarity index 100% rename from AIStudio.Wpf.DiagramHelper/Controls/ComboBox.xaml rename to AIStudio.Wpf.DiagramDesigner/Styles/ComboBox.xaml diff --git a/AIStudio.Wpf.DiagramDesigner/Styles/DesignerItems.xaml b/AIStudio.Wpf.DiagramDesigner/Styles/DesignerItems.xaml deleted file mode 100644 index 4b9a3b4..0000000 --- a/AIStudio.Wpf.DiagramDesigner/Styles/DesignerItems.xaml +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/AIStudio.Wpf.DiagramDesigner/Styles/Expander.xaml b/AIStudio.Wpf.DiagramDesigner/Styles/Expander.xaml index 5974bb0..6d740d7 100644 --- a/AIStudio.Wpf.DiagramDesigner/Styles/Expander.xaml +++ b/AIStudio.Wpf.DiagramDesigner/Styles/Expander.xaml @@ -2,116 +2,116 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" > - - - + + + - + - - + - - - - - + + + - - - + + - - - + + - - - + + - - - - - - + + + - + + + + + \ No newline at end of file diff --git a/AIStudio.Wpf.DiagramDesigner/Styles/GroupBox.xaml b/AIStudio.Wpf.DiagramDesigner/Styles/GroupBox.xaml index f418927..61969d7 100644 --- a/AIStudio.Wpf.DiagramDesigner/Styles/GroupBox.xaml +++ b/AIStudio.Wpf.DiagramDesigner/Styles/GroupBox.xaml @@ -2,46 +2,46 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" > - - - + + + - - + + + + + + \ No newline at end of file diff --git a/AIStudio.Wpf.DiagramDesigner/Styles/ScrollBar.xaml b/AIStudio.Wpf.DiagramDesigner/Styles/ScrollBar.xaml index f81c8a5..592fdaf 100644 --- a/AIStudio.Wpf.DiagramDesigner/Styles/ScrollBar.xaml +++ b/AIStudio.Wpf.DiagramDesigner/Styles/ScrollBar.xaml @@ -2,185 +2,185 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" > - - - + + + - + + + + + + + + + + + + + - + - + + + + - - - - - - - - + + + + + + + - - - - + - - - + + - - - + + - - - + + - - + + - - - - - - - - + + + + + + + - - - - + - - - + + - - - + + - - - + + - - + + - + \ No newline at end of file diff --git a/AIStudio.Wpf.DiagramDesigner/Styles/ScrollViewer.xaml b/AIStudio.Wpf.DiagramDesigner/Styles/ScrollViewer.xaml index 07fa158..74f8657 100644 --- a/AIStudio.Wpf.DiagramDesigner/Styles/ScrollViewer.xaml +++ b/AIStudio.Wpf.DiagramDesigner/Styles/ScrollViewer.xaml @@ -2,31 +2,31 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" > - + - + + + + + + \ No newline at end of file diff --git a/AIStudio.Wpf.DiagramDesigner/Styles/Shared.xaml b/AIStudio.Wpf.DiagramDesigner/Styles/Shared.xaml index fd557d4..5497c1f 100644 --- a/AIStudio.Wpf.DiagramDesigner/Styles/Shared.xaml +++ b/AIStudio.Wpf.DiagramDesigner/Styles/Shared.xaml @@ -1,118 +1,118 @@ - - - - - - - - - - + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - - - + + + + + + + + - + + + + + + + + + + - + - + - + - + - - - - - - - - + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - + + + + + + + + - + - - - + - + + + + + \ No newline at end of file diff --git a/AIStudio.Wpf.DiagramDesigner/Styles/ToolTip.xaml b/AIStudio.Wpf.DiagramDesigner/Styles/ToolTip.xaml index bdc742c..5461cea 100644 --- a/AIStudio.Wpf.DiagramDesigner/Styles/ToolTip.xaml +++ b/AIStudio.Wpf.DiagramDesigner/Styles/ToolTip.xaml @@ -2,37 +2,37 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" > - - - + + + - - + + + + + + + + + + + \ No newline at end of file diff --git a/AIStudio.Wpf.DiagramDesigner/Resources/Styles/DesignerItems.xaml b/AIStudio.Wpf.DiagramDesigner/Themes/ConnectorItem.xaml similarity index 100% rename from AIStudio.Wpf.DiagramDesigner/Resources/Styles/DesignerItems.xaml rename to AIStudio.Wpf.DiagramDesigner/Themes/ConnectorItem.xaml diff --git a/AIStudio.Wpf.DiagramDesigner/Themes/DesignerItem.xaml b/AIStudio.Wpf.DiagramDesigner/Themes/DesignerItem.xaml new file mode 100644 index 0000000..06fa030 --- /dev/null +++ b/AIStudio.Wpf.DiagramDesigner/Themes/DesignerItem.xaml @@ -0,0 +1,204 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/AIStudio.Wpf.DiagramDesigner/Themes/Generic.xaml b/AIStudio.Wpf.DiagramDesigner/Themes/Generic.xaml index 85eefd4..9d0778d 100644 --- a/AIStudio.Wpf.DiagramDesigner/Themes/Generic.xaml +++ b/AIStudio.Wpf.DiagramDesigner/Themes/Generic.xaml @@ -6,199 +6,8 @@ xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:gif="http://wpfanimatedgif.codeplex.com" > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + \ No newline at end of file diff --git a/AIStudio.Wpf.DiagramDesigner/UserControls/DiagramControl.xaml b/AIStudio.Wpf.DiagramDesigner/UserControls/DiagramControl.xaml index 2d9ad0d..593166f 100644 --- a/AIStudio.Wpf.DiagramDesigner/UserControls/DiagramControl.xaml +++ b/AIStudio.Wpf.DiagramDesigner/UserControls/DiagramControl.xaml @@ -1013,6 +1013,11 @@ + diff --git a/AIStudio.Wpf.DiagramDesigner/UserControls/DiagramControl.xaml.cs b/AIStudio.Wpf.DiagramDesigner/UserControls/DiagramControl.xaml.cs index e1c6234..868cae5 100644 --- a/AIStudio.Wpf.DiagramDesigner/UserControls/DiagramControl.xaml.cs +++ b/AIStudio.Wpf.DiagramDesigner/UserControls/DiagramControl.xaml.cs @@ -24,7 +24,7 @@ namespace AIStudio.Wpf.DiagramDesigner InitializeComponent(); } - public static readonly DependencyProperty ZoomValueProperty = DependencyProperty.Register("ZoomValue", typeof(double), typeof(DiagramControl), new UIPropertyMetadata(1d)); + public static readonly DependencyProperty ZoomValueProperty = DependencyProperty.Register(nameof(ZoomValue), typeof(double), typeof(DiagramControl), new UIPropertyMetadata(1d)); public double ZoomValue { get @@ -40,7 +40,8 @@ namespace AIStudio.Wpf.DiagramDesigner private void DesignerCanvas_Loaded(object sender, RoutedEventArgs e) { - + //DesignerCanvas myDesignerCanvas = sender as DesignerCanvas; + //zoomBox.DesignerCanvas = myDesignerCanvas; } private async void ScaleTransform_Changed(object sender, EventArgs e) diff --git a/AIStudio.Wpf.DiagramDesigner/ViewModels/BaseViewModel/SelectableDesignerItemViewModelBase.cs b/AIStudio.Wpf.DiagramDesigner/ViewModels/BaseViewModel/SelectableDesignerItemViewModelBase.cs index 9188450..0cb9e95 100644 --- a/AIStudio.Wpf.DiagramDesigner/ViewModels/BaseViewModel/SelectableDesignerItemViewModelBase.cs +++ b/AIStudio.Wpf.DiagramDesigner/ViewModels/BaseViewModel/SelectableDesignerItemViewModelBase.cs @@ -144,7 +144,7 @@ namespace AIStudio.Wpf.DiagramDesigner { get { - if (Parent?.IsReadOnly == true) + if (Parent?.IsReadOnly == true && Parent?.IsLoading == false) { return true; } diff --git a/AIStudio.Wpf.DiagramDesigner/ViewModels/DiagramViewModel.cs b/AIStudio.Wpf.DiagramDesigner/ViewModels/DiagramViewModel.cs index 494c20b..8f2db89 100644 --- a/AIStudio.Wpf.DiagramDesigner/ViewModels/DiagramViewModel.cs +++ b/AIStudio.Wpf.DiagramDesigner/ViewModels/DiagramViewModel.cs @@ -27,6 +27,11 @@ namespace AIStudio.Wpf.DiagramDesigner } } + public bool IsLoading + { + get; set; + } + public DrawMode? VectorLineDrawMode { get; set; diff --git a/AIStudio.Wpf.DiagramDesigner/ViewModels/IDiagramViewModel.cs b/AIStudio.Wpf.DiagramDesigner/ViewModels/IDiagramViewModel.cs index e9ddf18..a99f334 100644 --- a/AIStudio.Wpf.DiagramDesigner/ViewModels/IDiagramViewModel.cs +++ b/AIStudio.Wpf.DiagramDesigner/ViewModels/IDiagramViewModel.cs @@ -46,6 +46,7 @@ namespace AIStudio.Wpf.DiagramDesigner void UpdateZIndex(); bool IsReadOnly{ get; set; } + bool IsLoading{get;set;} Size PageSize { get; set; } PageSizeType PageSizeType { get; set; } bool ShowGrid { get; set; } diff --git a/AIStudio.Wpf.DiagramHelper/AIStudio.Wpf.DiagramHelper.csproj b/AIStudio.Wpf.DiagramHelper/AIStudio.Wpf.DiagramHelper.csproj index 120ffc4..944a2fd 100644 --- a/AIStudio.Wpf.DiagramHelper/AIStudio.Wpf.DiagramHelper.csproj +++ b/AIStudio.Wpf.DiagramHelper/AIStudio.Wpf.DiagramHelper.csproj @@ -68,4 +68,8 @@ + + + + diff --git a/AIStudio.Wpf.DiagramHelper/Themes/Generic.xaml b/AIStudio.Wpf.DiagramHelper/Themes/Generic.xaml deleted file mode 100644 index 01a6b5d..0000000 --- a/AIStudio.Wpf.DiagramHelper/Themes/Generic.xaml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/AIStudio.Wpf.Flowchart/AIStudio.Wpf.Flowchart_sf4layqv_wpftmp.csproj b/AIStudio.Wpf.Flowchart/AIStudio.Wpf.Flowchart_sf4layqv_wpftmp.csproj new file mode 100644 index 0000000..35d6f60 --- /dev/null +++ b/AIStudio.Wpf.Flowchart/AIStudio.Wpf.Flowchart_sf4layqv_wpftmp.csproj @@ -0,0 +1,273 @@ + + + AIStudio.Wpf.Flowchart + obj\Debug\ + obj\ + F:\aistudio.-wpf.-diagram\AIStudio.Wpf.Flowchart\obj\ + <_TargetAssemblyProjectName>AIStudio.Wpf.Flowchart + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/AIStudio.Wpf.Flowchart/Controls/FlowchartEditor.xaml b/AIStudio.Wpf.Flowchart/Controls/FlowchartEditor.xaml index 8e8c944..c0a9919 100644 --- a/AIStudio.Wpf.Flowchart/Controls/FlowchartEditor.xaml +++ b/AIStudio.Wpf.Flowchart/Controls/FlowchartEditor.xaml @@ -4,7 +4,7 @@ xmlns:dd="https://gitee.com/akwkevin/aistudio.-wpf.-diagram"> - +