From 78558a305fe992c1b2193812b00dc95ef6fe2429 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=89=BE=E7=AB=B9?= Date: Sun, 11 Jun 2023 23:59:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=9C=AA=E5=AE=8C=E5=96=84?= =?UTF-8?q?=E7=9A=84=E9=A1=B9=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Extensions/AIStudio.Wpf.Block/A.png | Bin 11835 -> 0 bytes .../AIStudio.Wpf.Block.csproj | 26 -- .../AIStudio.Wpf.Block_4a4h4ycz_wpftmp.csproj | 246 ---------- .../AIStudio.Wpf.Block_attaon4q_wpftmp.csproj | 244 ---------- .../AIStudio.Wpf.Block_axsfel0m_wpftmp.csproj | 177 ------- .../AIStudio.Wpf.Block_gkma3gbh_wpftmp.csproj | 244 ---------- .../AIStudio.Wpf.Block_ohjhbtlx_wpftmp.csproj | 244 ---------- .../Controls/BlockDecorator.cs | 114 ----- .../AIStudio.Wpf.Block/Controls/BlockPanel.cs | 114 ----- .../Controls/EndBlockBorder.cs | 144 ------ .../Controls/NextBlockBorder.cs | 164 ------- .../Controls/NextFor2BlockPanel.cs | 435 ------------------ .../Controls/NextForBlockPanel.cs | 309 ------------- .../Controls/OperationBlockBorder.cs | 114 ----- .../Controls/StartBlockBorder.cs | 147 ------ .../Controls/VariableBlockBorder.cs | 114 ----- .../AIStudio.Wpf.Block/Models/BlockType.cs | 138 ------ .../Models/ConstParameter.cs | 16 - .../AIStudio.Wpf.Block/Models/IParameter.cs | 16 - .../AIStudio.Wpf.Block/Models/VarParameter.cs | 13 - .../Themes/BlockItemViewModel.xaml | 68 --- .../AIStudio.Wpf.Block/Themes/Brushes.xaml | 30 -- .../AIStudio.Wpf.Block/Themes/Geometries.xaml | 6 - .../AddBlockItemViewModel.cs | 64 --- .../ControlBlockItemViewModel.cs | 36 -- .../KeyboardPressBlockItemViewModel.cs | 47 -- .../ControlModules/StartBlockItemViewModel.cs | 30 -- .../WaitTimeBlockItemViewModel.cs | 50 -- .../VariableBlockItemViewModel.cs | 50 -- 29 files changed, 3400 deletions(-) delete mode 100644 Extensions/AIStudio.Wpf.Block/A.png delete mode 100644 Extensions/AIStudio.Wpf.Block/AIStudio.Wpf.Block.csproj delete mode 100644 Extensions/AIStudio.Wpf.Block/AIStudio.Wpf.Block_4a4h4ycz_wpftmp.csproj delete mode 100644 Extensions/AIStudio.Wpf.Block/AIStudio.Wpf.Block_attaon4q_wpftmp.csproj delete mode 100644 Extensions/AIStudio.Wpf.Block/AIStudio.Wpf.Block_axsfel0m_wpftmp.csproj delete mode 100644 Extensions/AIStudio.Wpf.Block/AIStudio.Wpf.Block_gkma3gbh_wpftmp.csproj delete mode 100644 Extensions/AIStudio.Wpf.Block/AIStudio.Wpf.Block_ohjhbtlx_wpftmp.csproj delete mode 100644 Extensions/AIStudio.Wpf.Block/Controls/BlockDecorator.cs delete mode 100644 Extensions/AIStudio.Wpf.Block/Controls/BlockPanel.cs delete mode 100644 Extensions/AIStudio.Wpf.Block/Controls/EndBlockBorder.cs delete mode 100644 Extensions/AIStudio.Wpf.Block/Controls/NextBlockBorder.cs delete mode 100644 Extensions/AIStudio.Wpf.Block/Controls/NextFor2BlockPanel.cs delete mode 100644 Extensions/AIStudio.Wpf.Block/Controls/NextForBlockPanel.cs delete mode 100644 Extensions/AIStudio.Wpf.Block/Controls/OperationBlockBorder.cs delete mode 100644 Extensions/AIStudio.Wpf.Block/Controls/StartBlockBorder.cs delete mode 100644 Extensions/AIStudio.Wpf.Block/Controls/VariableBlockBorder.cs delete mode 100644 Extensions/AIStudio.Wpf.Block/Models/BlockType.cs delete mode 100644 Extensions/AIStudio.Wpf.Block/Models/ConstParameter.cs delete mode 100644 Extensions/AIStudio.Wpf.Block/Models/IParameter.cs delete mode 100644 Extensions/AIStudio.Wpf.Block/Models/VarParameter.cs delete mode 100644 Extensions/AIStudio.Wpf.Block/Themes/BlockItemViewModel.xaml delete mode 100644 Extensions/AIStudio.Wpf.Block/Themes/Brushes.xaml delete mode 100644 Extensions/AIStudio.Wpf.Block/Themes/Geometries.xaml delete mode 100644 Extensions/AIStudio.Wpf.Block/ViewModels/ArithmeticModules/AddBlockItemViewModel.cs delete mode 100644 Extensions/AIStudio.Wpf.Block/ViewModels/ControlModules/ControlBlockItemViewModel.cs delete mode 100644 Extensions/AIStudio.Wpf.Block/ViewModels/ControlModules/KeyboardPressBlockItemViewModel.cs delete mode 100644 Extensions/AIStudio.Wpf.Block/ViewModels/ControlModules/StartBlockItemViewModel.cs delete mode 100644 Extensions/AIStudio.Wpf.Block/ViewModels/EventModules/WaitTimeBlockItemViewModel.cs delete mode 100644 Extensions/AIStudio.Wpf.Block/ViewModels/VariableModules/VariableBlockItemViewModel.cs diff --git a/Extensions/AIStudio.Wpf.Block/A.png b/Extensions/AIStudio.Wpf.Block/A.png deleted file mode 100644 index b6949fae3d9962793e33e0959509bb6bfed04dc0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 11835 zcmXw6cXxO9;x5JA-Q9W9=l6bdU7Pu1 zH`&>pnRCwlxhGgoMjQo+00{s9ph$qf$wS(~e+L2_0Duoz{|+cX zN*W#jfFx}qA|fYeY-Mj{XKZCnDj_05YHe#}Xku;v05~tDD>$jf-s1?Y-y5JQ3ol$$ zCz|^J$SKMY2GP}W&|?5PztJ&4ef~j6${(>Y(!ff+zOzW+^q{RQnkFNmkRbI?rJr19 zBrApW9y8D?nSx zN1h(o^#_nu1|t6o(^UcGt=7OI4)kt^1vo~iMxlYU0p7{N^rHY$E+9bU6V@0ssT6b; z({$%Xv6i)e6Br86H4;CTC^^mgu_=C%!0GB@V~cF-k9oDQ4(=CpL&P2Ow8T^jEbu9*NlmW);kD9E@h*|1Lldg}UE?h65PZ`;AgM7q9NFP3&Qt4*5Gi`?oyt8gv zZG?K>LC(G{yIufnQb5V&UAca*HaeD$74i}LBQV0umiP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w zzFBU^{gWE^H*5baFQaRXB|Exh_xe}!#n7s+MU+x3ivtC^5V~Y*brqA478Sn6}34v(Ry^v~D zh6!owi?l;oz5j30-(Sa1cvSZ)xbB>tZ;W2;z7q6!Bkl;ueyU7r6IgjX?%0VfS`I(D z_AeI|_LrehKDfyrb`&;<%~;A}UMO7-uPCBB9sCUj*h2iGHGeVlOB+fPh+QJ~*-u!P zm8Onbe9`|lpK%M~Z=Stt#xaH_pOX!jn8Cxl$an}?AqRs5B+TIG(J&wO5^Rr_OvVQo z^64=Cut>z0gf?haXr?etXhx|N!V@y`A_pBOFlGe6>BEE6t#l#ru`&g6QA1C30QpWKMtpP<8;|m`9kycJ?wwxSzshQ zy$Cdc6^F^;EV37yg*QP_h*&XZBT_qJ_&R&oo!=|DF`B&Vcjtv#0^(u0H~XT>IrYgs zDgP>UPvkb4@Oz^UD-Cr^>xvL5pvmd*MbA_6hEbG3)iPh%-t1n;@YV|ux zE2u?ptl5;qPwdV*Ur!O2V5mXVY-Lzi?f|kIr9TVnaGcFI-Gs!ccQC7ZY_eSPQQqkn*?y#eXQfLR&b@@h04G+V^`m9)1?z8VoJpehs@9iBhjVk}G TVIkWS0QpFW%6zL3*7p5>@a(=e diff --git a/Extensions/AIStudio.Wpf.Block/AIStudio.Wpf.Block.csproj b/Extensions/AIStudio.Wpf.Block/AIStudio.Wpf.Block.csproj deleted file mode 100644 index 8c745f5..0000000 --- a/Extensions/AIStudio.Wpf.Block/AIStudio.Wpf.Block.csproj +++ /dev/null @@ -1,26 +0,0 @@ - - - - true - AIStudio.Wpf.Controls - akwkevin - https://gitee.com/akwkevin - A.png - - - 1.0.7 - 一个Wpf的流程图控件 - - - - - True - - - - - - - - - diff --git a/Extensions/AIStudio.Wpf.Block/AIStudio.Wpf.Block_4a4h4ycz_wpftmp.csproj b/Extensions/AIStudio.Wpf.Block/AIStudio.Wpf.Block_4a4h4ycz_wpftmp.csproj deleted file mode 100644 index b366cc1..0000000 --- a/Extensions/AIStudio.Wpf.Block/AIStudio.Wpf.Block_4a4h4ycz_wpftmp.csproj +++ /dev/null @@ -1,246 +0,0 @@ - - - AIStudio.Wpf.Block - obj\Debug\ - obj\ - F:\aistudio.-wpf.-diagram\Extensions\AIStudio.Wpf.Block\obj\ - <_TargetAssemblyProjectName>AIStudio.Wpf.Block - - - - true - AIStudio.Wpf.Controls - akwkevin - https://gitee.com/akwkevin - A.png - - - 1.0.7 - 一个Wpf的流程图控件 - - - - True - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Extensions/AIStudio.Wpf.Block/AIStudio.Wpf.Block_attaon4q_wpftmp.csproj b/Extensions/AIStudio.Wpf.Block/AIStudio.Wpf.Block_attaon4q_wpftmp.csproj deleted file mode 100644 index 98ee754..0000000 --- a/Extensions/AIStudio.Wpf.Block/AIStudio.Wpf.Block_attaon4q_wpftmp.csproj +++ /dev/null @@ -1,244 +0,0 @@ - - - AIStudio.Wpf.Block - obj\Debug\ - obj\ - F:\aistudio.-wpf.-diagram\Extensions\AIStudio.Wpf.Block\obj\ - <_TargetAssemblyProjectName>AIStudio.Wpf.Block - - - - true - AIStudio.Wpf.Controls - akwkevin - https://gitee.com/akwkevin - A.png - - - 1.0.7 - 一个Wpf的流程图控件 - - - - True - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Extensions/AIStudio.Wpf.Block/AIStudio.Wpf.Block_axsfel0m_wpftmp.csproj b/Extensions/AIStudio.Wpf.Block/AIStudio.Wpf.Block_axsfel0m_wpftmp.csproj deleted file mode 100644 index 18a4093..0000000 --- a/Extensions/AIStudio.Wpf.Block/AIStudio.Wpf.Block_axsfel0m_wpftmp.csproj +++ /dev/null @@ -1,177 +0,0 @@ - - - AIStudio.Wpf.Block - obj\Debug\ - obj\ - F:\aistudio.-wpf.-diagram\Extensions\AIStudio.Wpf.Block\obj\ - <_TargetAssemblyProjectName>AIStudio.Wpf.Block - - - - true - AIStudio.Wpf.Controls - akwkevin - https://gitee.com/akwkevin - A.png - - - 1.0.7 - 一个Wpf的流程图控件 - - - - True - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Extensions/AIStudio.Wpf.Block/AIStudio.Wpf.Block_gkma3gbh_wpftmp.csproj b/Extensions/AIStudio.Wpf.Block/AIStudio.Wpf.Block_gkma3gbh_wpftmp.csproj deleted file mode 100644 index 98ee754..0000000 --- a/Extensions/AIStudio.Wpf.Block/AIStudio.Wpf.Block_gkma3gbh_wpftmp.csproj +++ /dev/null @@ -1,244 +0,0 @@ - - - AIStudio.Wpf.Block - obj\Debug\ - obj\ - F:\aistudio.-wpf.-diagram\Extensions\AIStudio.Wpf.Block\obj\ - <_TargetAssemblyProjectName>AIStudio.Wpf.Block - - - - true - AIStudio.Wpf.Controls - akwkevin - https://gitee.com/akwkevin - A.png - - - 1.0.7 - 一个Wpf的流程图控件 - - - - True - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Extensions/AIStudio.Wpf.Block/AIStudio.Wpf.Block_ohjhbtlx_wpftmp.csproj b/Extensions/AIStudio.Wpf.Block/AIStudio.Wpf.Block_ohjhbtlx_wpftmp.csproj deleted file mode 100644 index 98ee754..0000000 --- a/Extensions/AIStudio.Wpf.Block/AIStudio.Wpf.Block_ohjhbtlx_wpftmp.csproj +++ /dev/null @@ -1,244 +0,0 @@ - - - AIStudio.Wpf.Block - obj\Debug\ - obj\ - F:\aistudio.-wpf.-diagram\Extensions\AIStudio.Wpf.Block\obj\ - <_TargetAssemblyProjectName>AIStudio.Wpf.Block - - - - true - AIStudio.Wpf.Controls - akwkevin - https://gitee.com/akwkevin - A.png - - - 1.0.7 - 一个Wpf的流程图控件 - - - - True - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Extensions/AIStudio.Wpf.Block/Controls/BlockDecorator.cs b/Extensions/AIStudio.Wpf.Block/Controls/BlockDecorator.cs deleted file mode 100644 index df7b037..0000000 --- a/Extensions/AIStudio.Wpf.Block/Controls/BlockDecorator.cs +++ /dev/null @@ -1,114 +0,0 @@ -using System.Windows; -using System.Windows.Controls; -using System.Windows.Media; - -namespace AIStudio.Wpf.Block.Controls -{ - public class BlockDecorator : Decorator - { - #region 依赖属性 - public static readonly DependencyProperty BackgroundProperty = - DependencyProperty.Register(nameof(Background), typeof(Brush), typeof(BlockDecorator) - , new PropertyMetadata(new SolidColorBrush(Color.FromRgb(255, 255, 255)))); - /// - /// 背景色,默认值为#FFFFFF,白色 - /// - public Brush Background - { - get - { - return (Brush)GetValue(BackgroundProperty); - } - set - { - SetValue(BackgroundProperty, value); - } - } - - public static readonly DependencyProperty PaddingProperty = - DependencyProperty.Register(nameof(Padding), typeof(Thickness), typeof(BlockDecorator) - , new PropertyMetadata(new Thickness(0, 0, 0, 0))); - /// - /// 内边距 - /// - public Thickness Padding - { - get - { - return (Thickness)GetValue(PaddingProperty); - } - set - { - SetValue(PaddingProperty, value); - } - } - - public static readonly DependencyProperty BorderBrushProperty = - DependencyProperty.Register(nameof(BorderBrush), typeof(Brush), typeof(BlockDecorator) - , new PropertyMetadata(default(Brush))); - /// - /// 边框颜色 - /// - public Brush BorderBrush - { - get - { - return (Brush)GetValue(BorderBrushProperty); - } - set - { - SetValue(BorderBrushProperty, value); - } - } - - public static readonly DependencyProperty BorderThicknessProperty = - DependencyProperty.Register(nameof(BorderThickness), typeof(Thickness), typeof(BlockDecorator), new PropertyMetadata(new Thickness(0d))); - /// - /// 边框大小 - /// - public Thickness BorderThickness - { - get - { - return (Thickness)GetValue(BorderThicknessProperty); - } - set - { - SetValue(BorderThicknessProperty, value); - } - } - #endregion - - protected override HitTestResult HitTestCore(PointHitTestParameters hitTestParameters) - { - Point hitPoint = hitTestParameters.HitPoint; - - // 在此处实现自定义的命中测试逻辑 - if (IsPointInsideCustomRegion(hitPoint)) - { - return new PointHitTestResult(this, hitPoint); - } - - return null; // 不命中 - } - - private bool IsPointInsideCustomRegion(Point point) - { - // 在此处检测点是否在自定义区域内 - // 返回 true 表示命中,返回 false 表示不命中 - return false; - } - - protected Brush CreateFillBrush() - { - Brush result = null; - - System.Windows.Media.GradientStopCollection gsc = new System.Windows.Media.GradientStopCollection(); - gsc.Add(new System.Windows.Media.GradientStop(((SolidColorBrush)this.Background).Color, 0)); - LinearGradientBrush backGroundBrush = new LinearGradientBrush(gsc, new Point(0, 0), new Point(0, 1)); - result = backGroundBrush; - - return result; - } - } -} diff --git a/Extensions/AIStudio.Wpf.Block/Controls/BlockPanel.cs b/Extensions/AIStudio.Wpf.Block/Controls/BlockPanel.cs deleted file mode 100644 index 85049a9..0000000 --- a/Extensions/AIStudio.Wpf.Block/Controls/BlockPanel.cs +++ /dev/null @@ -1,114 +0,0 @@ -using System.Windows; -using System.Windows.Controls; -using System.Windows.Media; - -namespace AIStudio.Wpf.Block.Controls -{ - public class BlockPanel : Panel - { - #region 依赖属性 - public static readonly DependencyProperty BackgroundProperty = - DependencyProperty.Register(nameof(Background), typeof(Brush), typeof(BlockPanel) - , new PropertyMetadata(new SolidColorBrush(Color.FromRgb(255, 255, 255)))); - /// - /// 背景色,默认值为#FFFFFF,白色 - /// - public Brush Background - { - get - { - return (Brush)GetValue(BackgroundProperty); - } - set - { - SetValue(BackgroundProperty, value); - } - } - - public static readonly DependencyProperty PaddingProperty = - DependencyProperty.Register(nameof(Padding), typeof(Thickness), typeof(BlockPanel) - , new PropertyMetadata(new Thickness(0, 0, 0, 0))); - /// - /// 内边距 - /// - public Thickness Padding - { - get - { - return (Thickness)GetValue(PaddingProperty); - } - set - { - SetValue(PaddingProperty, value); - } - } - - public static readonly DependencyProperty BorderBrushProperty = - DependencyProperty.Register(nameof(BorderBrush), typeof(Brush), typeof(BlockPanel) - , new PropertyMetadata(default(Brush))); - /// - /// 边框颜色 - /// - public Brush BorderBrush - { - get - { - return (Brush)GetValue(BorderBrushProperty); - } - set - { - SetValue(BorderBrushProperty, value); - } - } - - public static readonly DependencyProperty BorderThicknessProperty = - DependencyProperty.Register(nameof(BorderThickness), typeof(Thickness), typeof(BlockPanel), new PropertyMetadata(new Thickness(0d))); - /// - /// 边框大小 - /// - public Thickness BorderThickness - { - get - { - return (Thickness)GetValue(BorderThicknessProperty); - } - set - { - SetValue(BorderThicknessProperty, value); - } - } - #endregion - - protected override HitTestResult HitTestCore(PointHitTestParameters hitTestParameters) - { - Point hitPoint = hitTestParameters.HitPoint; - - // 在此处实现自定义的命中测试逻辑 - if (IsPointInsideCustomRegion(hitPoint)) - { - return new PointHitTestResult(this, hitPoint); - } - - return null; // 不命中 - } - - private bool IsPointInsideCustomRegion(Point point) - { - // 在此处检测点是否在自定义区域内 - // 返回 true 表示命中,返回 false 表示不命中 - return false; - } - - protected Brush CreateFillBrush() - { - Brush result = null; - - System.Windows.Media.GradientStopCollection gsc = new System.Windows.Media.GradientStopCollection(); - gsc.Add(new System.Windows.Media.GradientStop(((SolidColorBrush)this.Background).Color, 0)); - LinearGradientBrush backGroundBrush = new LinearGradientBrush(gsc, new Point(0, 0), new Point(0, 1)); - result = backGroundBrush; - - return result; - } - } -} diff --git a/Extensions/AIStudio.Wpf.Block/Controls/EndBlockBorder.cs b/Extensions/AIStudio.Wpf.Block/Controls/EndBlockBorder.cs deleted file mode 100644 index f61ab79..0000000 --- a/Extensions/AIStudio.Wpf.Block/Controls/EndBlockBorder.cs +++ /dev/null @@ -1,144 +0,0 @@ -using System; -using System.Windows; -using System.Windows.Media; - -namespace AIStudio.Wpf.Block.Controls -{ - public class EndBlockBorder : BlockDecorator - { - public EndBlockBorder() - { - - } - - #region 方法重写 - public double Insideheight { get; set; } = 6; - public double Insidewidth { get; set; } = 21; - public double Insideoffset { get; set; } = 14; - public double Minwidth { get; set; } = 86; - public double Minheight { get; set; } = 34; - /// - /// 该方法用于测量整个控件的大小 - /// - /// - /// 控件的大小 - protected override Size MeasureOverride(Size constraint) - { - Thickness padding = this.Padding; - - Size result = new Size(); - if (Child != null) - { - //测量子控件的大小 - Child.Measure(constraint); - - result.Width = Math.Max(Minwidth, Child.DesiredSize.Width + padding.Left + padding.Right); - result.Height = Math.Max(Minheight, Child.DesiredSize.Height + padding.Top + padding.Bottom); - } - else - { - result.Width = Minwidth; - result.Height = Minheight; - } - return result; - } - - /// - /// 设置子控件的大小与位置 - /// - /// - /// - protected override Size ArrangeOverride(Size arrangeSize) - { - Thickness padding = this.Padding; - if (Child != null) - { - Child.Arrange(new Rect(new Point(padding.Left, padding.Top), - new Size(Math.Max(Minwidth - padding.Left - padding.Right, Child.DesiredSize.Width ), Math.Max(Minheight - padding.Top - padding.Bottom, Child.DesiredSize.Height)))); - } - return arrangeSize; - } - - /// - /// 绘制控件 - /// - /// - protected override void OnRender(DrawingContext drawingContext) - { - Thickness padding = this.Padding; - - Pen pen = new Pen(); - pen.Brush = this.BorderBrush; - pen.Thickness = this.BorderThickness.Left;// NextForBlockBorder.RoundLayoutValue(BorderThickness.Left, DoubleUtil.DpiScaleX); - - Geometry cg = CreateGeometry(Math.Max(Minwidth, Child?.DesiredSize.Width??0 + padding.Left + padding.Right), Math.Max(Minheight, Child?.DesiredSize.Height??0 + padding.Top + padding.Bottom)); - Brush brush = CreateFillBrush(); - - GuidelineSet guideLines = new GuidelineSet(); - drawingContext.PushGuidelineSet(guideLines); - drawingContext.DrawGeometry(brush, pen, cg); - - } - #endregion - - #region 私有方法 - private Geometry CreateGeometry(double x, double y) - { - #region - PathFigure pf = new PathFigure(); - pf.IsClosed = true; - pf.StartPoint = new Point(0, 2); - - //第一横线 - ArcSegment seg1 = new ArcSegment() { Size = new Size(2, 2), SweepDirection = SweepDirection.Clockwise, Point = new Point(2, 0) }; - pf.Segments.Add(seg1); - - LineSegment seg2 = new LineSegment() { Point = new Point(Insideoffset, 0) }; - pf.Segments.Add(seg2); - - //第二in - QuadraticBezierSegment seg3 = new QuadraticBezierSegment() { Point1 = new Point(Insideoffset + 1, 0), Point2 = new Point(Insideoffset + 2, 2) }; - pf.Segments.Add(seg3); - - QuadraticBezierSegment seg4 = new QuadraticBezierSegment() { Point1 = new Point(Insideoffset + 4, 6), Point2 = new Point(Insideoffset + 5, 6) }; - pf.Segments.Add(seg4); - - LineSegment seg5 = new LineSegment() { Point = new Point(Insideoffset + Insidewidth - 5, 6) }; - pf.Segments.Add(seg5); - - QuadraticBezierSegment seg6 = new QuadraticBezierSegment() { Point1 = new Point(Insideoffset + Insidewidth - 4, 6), Point2 = new Point(Insideoffset + Insidewidth - 2, 2) }; - pf.Segments.Add(seg6); - - QuadraticBezierSegment seg7 = new QuadraticBezierSegment() { Point1 = new Point(Insideoffset + Insidewidth - 1, 0), Point2 = new Point(Insideoffset + Insidewidth, 0) }; - pf.Segments.Add(seg7); - - //第三横线 - LineSegment seg8 = new LineSegment() { Point = new Point(x - 2, 0) }; - pf.Segments.Add(seg8); - - //第四竖线 - ArcSegment seg9 = new ArcSegment() { Size = new Size(2, 2), SweepDirection = SweepDirection.Clockwise, Point = new Point(x, 2) }; - pf.Segments.Add(seg9); - - LineSegment seg10 = new LineSegment() { Point = new Point(x, y - 2) }; - pf.Segments.Add(seg10); - - //第五横线 - ArcSegment seg11 = new ArcSegment() { Size = new Size(2, 2), SweepDirection = SweepDirection.Clockwise, Point = new Point(x - 2, y) }; - pf.Segments.Add(seg11); - - LineSegment seg12 = new LineSegment() { Point = new Point(2, y) }; - pf.Segments.Add(seg12); - - ArcSegment seg13 = new ArcSegment() { Size = new Size(2, 2), SweepDirection = SweepDirection.Clockwise, Point = new Point(0, y - 2) }; - pf.Segments.Add(seg13); - - PathGeometry g1 = new PathGeometry(); - g1.Figures.Add(pf); - #endregion - - return g1; - } - #endregion - } -} diff --git a/Extensions/AIStudio.Wpf.Block/Controls/NextBlockBorder.cs b/Extensions/AIStudio.Wpf.Block/Controls/NextBlockBorder.cs deleted file mode 100644 index 8552a4a..0000000 --- a/Extensions/AIStudio.Wpf.Block/Controls/NextBlockBorder.cs +++ /dev/null @@ -1,164 +0,0 @@ -using System; -using System.Windows; -using System.Windows.Media; - -namespace AIStudio.Wpf.Block.Controls -{ - public class NextBlockBorder : BlockDecorator - { - public NextBlockBorder() - { - - } - - #region 方法重写 - public double Insideheight { get; set; } = 6; - public double Insidewidth { get; set; } = 21; - public double Insideoffset { get; set; } = 14; - public double Minwidth { get; set; } = 86; - public double Minheight { get; set; } = 34; - /// - /// 该方法用于测量整个控件的大小 - /// - /// - /// 控件的大小 - protected override Size MeasureOverride(Size constraint) - { - Thickness padding = this.Padding; - - Size result = new Size(); - if (Child != null) - { - //测量子控件的大小 - Child.Measure(constraint); - - result.Width = Math.Max(Minwidth, Child.DesiredSize.Width + padding.Left + padding.Right); - result.Height = Math.Max(Minheight, Child.DesiredSize.Height + padding.Top + padding.Bottom); - } - else - { - result.Width = Minwidth; - result.Height = Minheight; - } - return result; - } - - /// - /// 设置子控件的大小与位置 - /// - /// - /// - protected override Size ArrangeOverride(Size arrangeSize) - { - Thickness padding = this.Padding; - if (Child != null) - { - Child.Arrange(new Rect(new Point(padding.Left, padding.Top), - new Size(Math.Max(Minwidth - padding.Left - padding.Right, Child.DesiredSize.Width ), Math.Max(Minheight - padding.Top - padding.Bottom, Child.DesiredSize.Height)))); - } - return arrangeSize; - } - - /// - /// 绘制控件 - /// - /// - protected override void OnRender(DrawingContext drawingContext) - { - Thickness padding = this.Padding; - - Pen pen = new Pen(); - pen.Brush = this.BorderBrush; - pen.Thickness = this.BorderThickness.Left;// NextForBlockBorder.RoundLayoutValue(BorderThickness.Left, DoubleUtil.DpiScaleX); - - Geometry cg = CreateGeometry(Math.Max(Minwidth, Child?.DesiredSize.Width??0 + padding.Left + padding.Right), Math.Max(Minheight, Child?.DesiredSize.Height??0 + padding.Top + padding.Bottom)); - Brush brush = CreateFillBrush(); - - GuidelineSet guideLines = new GuidelineSet(); - drawingContext.PushGuidelineSet(guideLines); - drawingContext.DrawGeometry(brush, pen, cg); - - } - #endregion - - #region 私有方法 - private Geometry CreateGeometry(double x, double y) - { - #region - PathFigure pf = new PathFigure(); - pf.IsClosed = true; - pf.StartPoint = new Point(0, 2); - - //第一横线 - ArcSegment seg1 = new ArcSegment() { Size = new Size(2, 2), SweepDirection = SweepDirection.Clockwise, Point = new Point(2, 0) }; - pf.Segments.Add(seg1); - - LineSegment seg2 = new LineSegment() { Point = new Point(Insideoffset, 0) }; - pf.Segments.Add(seg2); - - //第二in - QuadraticBezierSegment seg3 = new QuadraticBezierSegment() { Point1 = new Point(Insideoffset + 1, 0), Point2 = new Point(Insideoffset + 2, 2) }; - pf.Segments.Add(seg3); - - QuadraticBezierSegment seg4 = new QuadraticBezierSegment() { Point1 = new Point(Insideoffset + 4, 6), Point2 = new Point(Insideoffset + 5, 6) }; - pf.Segments.Add(seg4); - - LineSegment seg5 = new LineSegment() { Point = new Point(Insideoffset + Insidewidth - 5, 6) }; - pf.Segments.Add(seg5); - - QuadraticBezierSegment seg6 = new QuadraticBezierSegment() { Point1 = new Point(Insideoffset + Insidewidth - 4, 6), Point2 = new Point(Insideoffset + Insidewidth - 2, 2) }; - pf.Segments.Add(seg6); - - QuadraticBezierSegment seg7 = new QuadraticBezierSegment() { Point1 = new Point(Insideoffset + Insidewidth - 1, 0), Point2 = new Point(Insideoffset + Insidewidth, 0) }; - pf.Segments.Add(seg7); - - //第三横线 - LineSegment seg8 = new LineSegment() { Point = new Point(x - 2, 0) }; - pf.Segments.Add(seg8); - - //第四竖线 - ArcSegment seg9 = new ArcSegment() { Size = new Size(2, 2), SweepDirection = SweepDirection.Clockwise, Point = new Point(x, 2) }; - pf.Segments.Add(seg9); - - LineSegment seg10 = new LineSegment() { Point = new Point(x, y - 2) }; - pf.Segments.Add(seg10); - - //第五横线 - ArcSegment seg11 = new ArcSegment() { Size = new Size(2, 2), SweepDirection = SweepDirection.Clockwise, Point = new Point(x - 2, y) }; - pf.Segments.Add(seg11); - - LineSegment seg12 = new LineSegment() { Point = new Point(Insideoffset + Insidewidth, y) }; - pf.Segments.Add(seg12); - - //第六in - QuadraticBezierSegment seg13 = new QuadraticBezierSegment() { Point1 = new Point(Insideoffset + Insidewidth - 1, y), Point2 = new Point(Insideoffset + Insidewidth - 2, y + 2) }; - pf.Segments.Add(seg13); - - QuadraticBezierSegment seg14 = new QuadraticBezierSegment() { Point1 = new Point(Insideoffset + Insidewidth - 4, y + Insideheight), Point2 = new Point(Insideoffset + Insidewidth - 5, y + Insideheight) }; - pf.Segments.Add(seg14); - - LineSegment seg15 = new LineSegment() { Point = new Point(Insideoffset + 5, y + Insideheight) }; - pf.Segments.Add(seg15); - - QuadraticBezierSegment seg16 = new QuadraticBezierSegment() { Point1 = new Point(Insideoffset + 4, y + Insideheight), Point2 = new Point(Insideoffset + 2, y + 2) }; - pf.Segments.Add(seg16); - - QuadraticBezierSegment seg17 = new QuadraticBezierSegment() { Point1 = new Point(Insideoffset + 1, y), Point2 = new Point(Insideoffset, y) }; - pf.Segments.Add(seg17); - - //第七横线 - LineSegment seg18 = new LineSegment() { Point = new Point(2, y) }; - pf.Segments.Add(seg18); - - ArcSegment seg19 = new ArcSegment() { Size = new Size(2, 2), SweepDirection = SweepDirection.Clockwise, Point = new Point(0, y - 2) }; - pf.Segments.Add(seg19); - - PathGeometry g1 = new PathGeometry(); - g1.Figures.Add(pf); - #endregion - - return g1; - } - #endregion - } -} diff --git a/Extensions/AIStudio.Wpf.Block/Controls/NextFor2BlockPanel.cs b/Extensions/AIStudio.Wpf.Block/Controls/NextFor2BlockPanel.cs deleted file mode 100644 index 988c193..0000000 --- a/Extensions/AIStudio.Wpf.Block/Controls/NextFor2BlockPanel.cs +++ /dev/null @@ -1,435 +0,0 @@ -using System; -using System.ComponentModel; -using System.Data; -using System.Runtime.InteropServices; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Media; - -namespace AIStudio.Wpf.Block.Controls -{ - - public class NextFor2BlockPanel : BlockPanel - { - public NextFor2BlockPanel() - { - - } - - #region 方法重写 - private UIElement Header - { - get - { - return InternalChildren.Count >= 0 ? InternalChildren[0] : null; - } - } - - private UIElement Content1 - { - get - { - return InternalChildren.Count >= 1 ? InternalChildren[1] : null; - } - } - - private UIElement Footer1 - { - get - { - return InternalChildren.Count >= 2 ? InternalChildren[2] : null; - } - } - - private UIElement Content2 - { - get - { - return InternalChildren.Count >= 3 ? InternalChildren[3] : null; - } - } - - private UIElement Footer2 - { - get - { - return InternalChildren.Count >= 4 ? InternalChildren[4] : null; - } - } - - public double Insideheight { get; set; } = 6; - public double Insidewidth { get; set; } = 21; - public double insideoffset { get; set; } = 14; - public double Leftpanelwidth { get; set; } = 10; - public double Minwidth { get; set; } = 109; - public double Minheaderheight { get; set; } = 34; - public double Mincontentheight { get; set; } = 16; - public double Minfooterheight { get; set; } = 26; - - - private double _width; - private double _headerheight; - private double _content1height; - private double _footer1height; - private double _content2height; - private double _footer2height; - /// - /// 该方法用于测量整个控件的大小 - /// - /// - /// 控件的大小 - protected override Size MeasureOverride(Size constraint) - { - Thickness padding = this.Padding; - - _width = Minwidth; - if (Header != null) - { - //测量子控件的大小 - Header.Measure(constraint); - _width = Math.Max(Minwidth, Header.DesiredSize.Width + padding.Left + padding.Right); - _headerheight = Math.Max(Minheaderheight, Header.DesiredSize.Height + padding.Top + padding.Bottom); - } - else - { - _headerheight = Minheaderheight; - } - - if (Content1 != null) - { - //测量子控件的大小 - Content1.Measure(constraint); - _width = Math.Max(Minwidth, Content1.DesiredSize.Width + padding.Left + padding.Right + Leftpanelwidth); - _content1height = Math.Max(Mincontentheight, Content1.DesiredSize.Height + padding.Top + padding.Bottom); - } - else - { - _content1height = Mincontentheight; - } - - if (Footer1 != null) - { - //测量子控件的大小 - Footer1.Measure(constraint); - _width = Math.Max(Minwidth, Footer1.DesiredSize.Width + padding.Left + padding.Right); - _footer1height = Math.Max(Minfooterheight, Footer1.DesiredSize.Height + padding.Top + padding.Bottom); - } - else - { - _footer1height = Minfooterheight; - } - - if (Content2!= null) - { - //测量子控件的大小 - Content2.Measure(constraint); - _width = Math.Max(Minwidth, Content2.DesiredSize.Width + padding.Left + padding.Right + Leftpanelwidth); - _content2height = Math.Max(Mincontentheight, Content2.DesiredSize.Height + padding.Top + padding.Bottom); - } - else - { - _content2height = Mincontentheight; - } - - if (Footer2 != null) - { - //测量子控件的大小 - Footer2.Measure(constraint); - _width = Math.Max(Minwidth, Footer2.DesiredSize.Width + padding.Left + padding.Right); - _footer2height = Math.Max(Minfooterheight, Footer2.DesiredSize.Height + padding.Top + padding.Bottom); - } - else - { - _footer2height = Minfooterheight; - } - - return new Size(_width, _headerheight + _content1height + _footer1height + _content2height + _footer2height); - } - - /// - /// 设置子控件的大小与位置 - /// - /// - /// - protected override Size ArrangeOverride(Size arrangeSize) - { - Thickness padding = this.Padding; - - if (Header != null) - { - Header.Arrange(new Rect(new Point(padding.Left, padding.Top), new Size(_width - padding.Left - padding.Right, _headerheight - padding.Top - padding.Bottom))); - } - - - if (Content1 != null) - { - Content1.Arrange(new Rect(new Point(padding.Left + Leftpanelwidth, padding.Top + _headerheight), new Size(_width - Leftpanelwidth - padding.Left - padding.Right, _content1height - padding.Top - padding.Bottom))); - } - - - if (Footer1 != null) - { - Footer1.Arrange(new Rect(new Point(padding.Left, padding.Top + _headerheight + _content1height), new Size(_width - padding.Left - padding.Right, _footer1height - padding.Top - padding.Bottom))); - } - - if (Content2 != null) - { - Content2.Arrange(new Rect(new Point(padding.Left + Leftpanelwidth, padding.Top + _headerheight + _content1height + _footer1height), new Size(_width - Leftpanelwidth - padding.Left - padding.Right, _content2height - padding.Top - padding.Bottom))); - } - - - if (Footer2 != null) - { - Footer2.Arrange(new Rect(new Point(padding.Left, padding.Top + _headerheight + _content1height + _footer1height + _content2height), new Size(_width - padding.Left - padding.Right, _footer2height - padding.Top - padding.Bottom))); - } - - - return base.ArrangeOverride(arrangeSize); - } - - /// - /// 绘制控件 - /// - /// - protected override void OnRender(DrawingContext drawingContext) - { - Thickness padding = this.Padding; - - Pen pen = new Pen(); - pen.Brush = this.BorderBrush; - pen.Thickness = this.BorderThickness.Left;// NextForBlockBorder.RoundLayoutValue(BorderThickness.Left, DoubleUtil.DpiScaleX); - - Geometry cg = CreateGeometry(_width, _headerheight, _content1height, _footer1height, _content2height, _footer2height); - Brush brush = CreateFillBrush(); - - GuidelineSet guideLines = new GuidelineSet(); - drawingContext.PushGuidelineSet(guideLines); - drawingContext.DrawGeometry(brush, pen, cg); - - base.OnRender(drawingContext); - } - #endregion - - #region 私有方法 - private Geometry CreateGeometry(double x, double y0, double y1, double y2, double y3, double y4) - { - #region - PathFigure pf = new PathFigure(); - pf.IsClosed = true; - pf.StartPoint = new Point(0, 2); - - //第一横线 - ArcSegment seg1 = new ArcSegment() { Size = new Size(2, 2), SweepDirection = SweepDirection.Clockwise, Point = new Point(2, 0) }; - pf.Segments.Add(seg1); - - LineSegment seg2 = new LineSegment() { Point = new Point(insideoffset, 0) }; - pf.Segments.Add(seg2); - - //第二in - QuadraticBezierSegment seg3 = new QuadraticBezierSegment() { Point1 = new Point(insideoffset + 1, 0), Point2 = new Point(insideoffset + 2, 2) }; - pf.Segments.Add(seg3); - - QuadraticBezierSegment seg4 = new QuadraticBezierSegment() { Point1 = new Point(insideoffset + 4, Insideheight), Point2 = new Point(insideoffset + 5, Insideheight) }; - pf.Segments.Add(seg4); - - LineSegment seg5 = new LineSegment() { Point = new Point(insideoffset + Insidewidth - 5, Insideheight) }; - pf.Segments.Add(seg5); - - QuadraticBezierSegment seg6 = new QuadraticBezierSegment() { Point1 = new Point(insideoffset + Insidewidth - 4, Insideheight), Point2 = new Point(insideoffset + Insidewidth - 2, 2) }; - pf.Segments.Add(seg6); - - QuadraticBezierSegment seg7 = new QuadraticBezierSegment() { Point1 = new Point(insideoffset + Insidewidth - 1, 0), Point2 = new Point(insideoffset + Insidewidth, 0) }; - pf.Segments.Add(seg7); - - //第三横线 - LineSegment seg8 = new LineSegment() { Point = new Point(x - 2, 0) }; - pf.Segments.Add(seg8); - - //第四竖线 - ArcSegment seg9 = new ArcSegment() { Size = new Size(2, 2), SweepDirection = SweepDirection.Clockwise, Point = new Point(x, 2) }; - pf.Segments.Add(seg9); - - LineSegment seg10 = new LineSegment() { Point = new Point(x, y0 - 2) }; - pf.Segments.Add(seg10); - - //第五横线 - ArcSegment seg11 = new ArcSegment() { Size = new Size(2, 2), SweepDirection = SweepDirection.Clockwise, Point = new Point(x - 2, y0) }; - pf.Segments.Add(seg11); - - LineSegment seg12 = new LineSegment() { Point = new Point(Leftpanelwidth + insideoffset + Insidewidth, y0) }; - pf.Segments.Add(seg12); - - //第六in - QuadraticBezierSegment seg13 = new QuadraticBezierSegment() { Point1 = new Point(Leftpanelwidth + insideoffset + Insidewidth - 1, y0), Point2 = new Point(Leftpanelwidth + insideoffset + Insidewidth - 2, y0 + 2) }; - pf.Segments.Add(seg13); - - QuadraticBezierSegment seg14 = new QuadraticBezierSegment() { Point1 = new Point(Leftpanelwidth + insideoffset + Insidewidth - 4, y0 + Insideheight), Point2 = new Point(Leftpanelwidth + insideoffset + Insidewidth - 5, y0 + Insideheight) }; - pf.Segments.Add(seg14); - - LineSegment seg15 = new LineSegment() { Point = new Point(Leftpanelwidth + insideoffset + 5, y0 + Insideheight) }; - pf.Segments.Add(seg15); - - QuadraticBezierSegment seg16 = new QuadraticBezierSegment() { Point1 = new Point(Leftpanelwidth + insideoffset + 4, y0 + Insideheight), Point2 = new Point(Leftpanelwidth + insideoffset + 2, y0 + 2) }; - pf.Segments.Add(seg16); - - QuadraticBezierSegment seg17 = new QuadraticBezierSegment() { Point1 = new Point(Leftpanelwidth + insideoffset + 1, y0), Point2 = new Point(insideoffset, y0) }; - pf.Segments.Add(seg17); - - //第七横线 - LineSegment seg18 = new LineSegment() { Point = new Point(Leftpanelwidth + 2, y0) }; - pf.Segments.Add(seg18); - - ArcSegment seg19 = new ArcSegment() { Size = new Size(2, 2), SweepDirection = SweepDirection.Counterclockwise, Point = new Point(Leftpanelwidth, y0 + 2) }; - pf.Segments.Add(seg19); - - //第八竖线 - LineSegment seg20 = new LineSegment() { Point = new Point(Leftpanelwidth, y0 + y1 - 2) }; - pf.Segments.Add(seg20); - - ArcSegment seg21 = new ArcSegment() { Size = new Size(2, 2), SweepDirection = SweepDirection.Counterclockwise, Point = new Point(Leftpanelwidth + 2, y0 + y1) }; - pf.Segments.Add(seg21); - - //第九横线 - LineSegment seg22 = new LineSegment() { Point = new Point(Leftpanelwidth + insideoffset, y0 + y1) }; - pf.Segments.Add(seg22); - - //第十in - QuadraticBezierSegment seg23 = new QuadraticBezierSegment() { Point1 = new Point(Leftpanelwidth + insideoffset + 1, y0 + y1), Point2 = new Point(Leftpanelwidth + insideoffset + 2, y0 + y1 + 2) }; - pf.Segments.Add(seg23); - - QuadraticBezierSegment seg24 = new QuadraticBezierSegment() { Point1 = new Point(Leftpanelwidth + insideoffset + 4, y0 + y1 + Insideheight), Point2 = new Point(Leftpanelwidth + insideoffset + 5, y0 + y1 + Insideheight) }; - pf.Segments.Add(seg24); - - LineSegment seg25 = new LineSegment() { Point = new Point(Leftpanelwidth + insideoffset + Insidewidth - 5, y0 + y1 + Insideheight) }; - pf.Segments.Add(seg25); - - QuadraticBezierSegment seg26 = new QuadraticBezierSegment() { Point1 = new Point(Leftpanelwidth + insideoffset + Insidewidth - 4, y0 + y1 + Insideheight), Point2 = new Point(Leftpanelwidth + insideoffset + Insidewidth - 2, y0 + y1 + 2) }; - pf.Segments.Add(seg26); - - QuadraticBezierSegment seg27 = new QuadraticBezierSegment() { Point1 = new Point(Leftpanelwidth + insideoffset + Insidewidth - 1, y0 + y1), Point2 = new Point(Leftpanelwidth + insideoffset + Insidewidth, y0 + y1) }; - pf.Segments.Add(seg27); - - //第十一横线 - LineSegment seg28 = new LineSegment() { Point = new Point(x - 2, y0 + y1) }; - pf.Segments.Add(seg28); - - //第十二竖线 - ArcSegment seg29 = new ArcSegment() { Size = new Size(2, 2), SweepDirection = SweepDirection.Clockwise, Point = new Point(x, y0 + y1 + 2) }; - pf.Segments.Add(seg29); - - LineSegment seg30 = new LineSegment() { Point = new Point(x, y0 + y1 + y2 - 2) }; - pf.Segments.Add(seg30); - - //第十三横线 - ArcSegment seg31 = new ArcSegment() { Size = new Size(2, 2), SweepDirection = SweepDirection.Clockwise, Point = new Point(x - 2, y0 + y1 + y2) }; - pf.Segments.Add(seg31); - - - - LineSegment seg32 = new LineSegment() { Point = new Point(Leftpanelwidth + insideoffset + Insidewidth, y0 + y1 + y2) }; - pf.Segments.Add(seg32); - - //第十四in - QuadraticBezierSegment seg33 = new QuadraticBezierSegment() { Point1 = new Point(Leftpanelwidth + insideoffset + Insidewidth - 1, y0 + y1 + y2), Point2 = new Point(Leftpanelwidth + insideoffset + Insidewidth - 2, y0 + y1 + y2 + 2) }; - pf.Segments.Add(seg33); - - QuadraticBezierSegment seg34 = new QuadraticBezierSegment() { Point1 = new Point(Leftpanelwidth + insideoffset + Insidewidth - 4, y0 + y1 + y2 + Insideheight), Point2 = new Point(Leftpanelwidth + insideoffset + Insidewidth - 5, y0 + y1 + y2 + Insideheight) }; - pf.Segments.Add(seg34); - - LineSegment seg35 = new LineSegment() { Point = new Point(Leftpanelwidth + insideoffset + 5, y0 + y1 + y2 + Insideheight) }; - pf.Segments.Add(seg35); - - QuadraticBezierSegment seg36 = new QuadraticBezierSegment() { Point1 = new Point(Leftpanelwidth + insideoffset + 4, y0 + y1 + y2 + Insideheight), Point2 = new Point(Leftpanelwidth + insideoffset + 2, y0 + y1 + y2 + 2) }; - pf.Segments.Add(seg36); - - QuadraticBezierSegment seg37 = new QuadraticBezierSegment() { Point1 = new Point(Leftpanelwidth + insideoffset + 1, y0 + y1 + y2), Point2 = new Point(Leftpanelwidth + insideoffset, y0 + y1 + y2) }; - pf.Segments.Add(seg37); - - //第十五横线 - LineSegment seg38 = new LineSegment() { Point = new Point(Leftpanelwidth + 2, y0 + y1 + y2) }; - pf.Segments.Add(seg38); - - ArcSegment seg39 = new ArcSegment() { Size = new Size(2, 2), SweepDirection = SweepDirection.Counterclockwise, Point = new Point(Leftpanelwidth, y0 + y1 + y2 + 2) }; - pf.Segments.Add(seg39); - - //第十六竖向 - LineSegment seg40 = new LineSegment() { Point = new Point(Leftpanelwidth, y0 + y1 + y2 + y3 - 2) }; - pf.Segments.Add(seg40); - - ArcSegment seg41 = new ArcSegment() { Size = new Size(2, 2), SweepDirection = SweepDirection.Counterclockwise, Point = new Point(Leftpanelwidth + 2, y0 + y1 + y2 + y3) }; - pf.Segments.Add(seg41); - - //第十七横线 - LineSegment seg42 = new LineSegment() { Point = new Point(Leftpanelwidth + insideoffset, y0 + y1 + y2 + y3) }; - pf.Segments.Add(seg42); - - //第十八in - QuadraticBezierSegment seg43 = new QuadraticBezierSegment() { Point1 = new Point(Leftpanelwidth + insideoffset + 1, y0 + y1 + y2 + y3), Point2 = new Point(Leftpanelwidth + insideoffset + 2, y0 + y1 + y2 + y3 + 2) }; - pf.Segments.Add(seg43); - - QuadraticBezierSegment seg44 = new QuadraticBezierSegment() { Point1 = new Point(Leftpanelwidth + insideoffset + 4, y0 + y1 + y2 + y3 + Insideheight), Point2 = new Point(Leftpanelwidth + insideoffset + 5, y0 + y1 + y2 + y3 + Insideheight) }; - pf.Segments.Add(seg44); - - LineSegment seg45 = new LineSegment() { Point = new Point(Leftpanelwidth + insideoffset + Insidewidth - 5, y0 + y1 + y2 + y3 + Insideheight) }; - pf.Segments.Add(seg45); - - QuadraticBezierSegment seg46 = new QuadraticBezierSegment() { Point1 = new Point(Leftpanelwidth + insideoffset + Insidewidth - 4, y0 + y1 + y2 + y3 + Insideheight), Point2 = new Point(Leftpanelwidth + insideoffset + Insidewidth - 2, y0 + y1 + y2 + y3 + 2) }; - pf.Segments.Add(seg46); - - QuadraticBezierSegment seg47 = new QuadraticBezierSegment() { Point1 = new Point(Leftpanelwidth + insideoffset + Insidewidth - 1, y0 + y1 + y2 + y3), Point2 = new Point(Leftpanelwidth + insideoffset + Insidewidth, y0 + y1 + y2 + y3) }; - pf.Segments.Add(seg47); - - //第十一横线 - LineSegment seg48 = new LineSegment() { Point = new Point(x - 2, y0 + y1 + y2 + y3) }; - pf.Segments.Add(seg48); - - //第十二竖线 - ArcSegment seg49 = new ArcSegment() { Size = new Size(2, 2), SweepDirection = SweepDirection.Clockwise, Point = new Point(x, y0 + y1 + y2 + y3 + 2) }; - pf.Segments.Add(seg49); - - LineSegment seg50 = new LineSegment() { Point = new Point(x, y0 + y1 + y2 + y3 + y4 - 2) }; - pf.Segments.Add(seg50); - - //第十三横线 - ArcSegment seg51 = new ArcSegment() { Size = new Size(2, 2), SweepDirection = SweepDirection.Clockwise, Point = new Point(x - 2, y0 + y1 + y2 + y3 + y4) }; - pf.Segments.Add(seg51); - - - - LineSegment seg52 = new LineSegment() { Point = new Point(insideoffset + Insidewidth, y0 + y1 + y2 + y3 + y4) }; - pf.Segments.Add(seg52); - - //第十四in - QuadraticBezierSegment seg53 = new QuadraticBezierSegment() { Point1 = new Point(insideoffset + Insidewidth - 1, y0 + y1 + y2 + y3 + y4), Point2 = new Point(insideoffset + Insidewidth - 2, y0 + y1 + y2 + y3 + y4 + 2) }; - pf.Segments.Add(seg53); - - QuadraticBezierSegment seg54 = new QuadraticBezierSegment() { Point1 = new Point(insideoffset + Insidewidth - 4, y0 + y1 + y2 + y3 + y4 + Insideheight), Point2 = new Point(insideoffset + Insidewidth - 5, y0 + y1 + y2 + y3 + y4 + Insideheight) }; - pf.Segments.Add(seg54); - - LineSegment seg55 = new LineSegment() { Point = new Point(insideoffset + 5, y0 + y1 + y2 + y3 + y4 + Insideheight) }; - pf.Segments.Add(seg55); - - QuadraticBezierSegment seg56 = new QuadraticBezierSegment() { Point1 = new Point(insideoffset + 4, y0 + y1 + y2 + y3 + y4 + Insideheight), Point2 = new Point(insideoffset + 2, y0 + y1 + y2 + y3 + y4 + 2) }; - pf.Segments.Add(seg56); - - QuadraticBezierSegment seg57 = new QuadraticBezierSegment() { Point1 = new Point(insideoffset + 1, y0 + y1 + y2 + y3 + y4), Point2 = new Point(insideoffset, y0 + y1 + y2 + y3 + y4) }; - pf.Segments.Add(seg57); - - //第十五横线 - LineSegment seg58 = new LineSegment() { Point = new Point(2, y0 + y1 + y2 + y3 + y4) }; - pf.Segments.Add(seg58); - - ArcSegment seg59 = new ArcSegment() { Size = new Size(2, 2), SweepDirection = SweepDirection.Counterclockwise, Point = new Point(0, y0 + y1 + y2 + y3 + y4 - 2) }; - pf.Segments.Add(seg59); - - - PathGeometry g1 = new PathGeometry(); - g1.Figures.Add(pf); - #endregion - - return g1; - } - - #endregion - } -} diff --git a/Extensions/AIStudio.Wpf.Block/Controls/NextForBlockPanel.cs b/Extensions/AIStudio.Wpf.Block/Controls/NextForBlockPanel.cs deleted file mode 100644 index 5880309..0000000 --- a/Extensions/AIStudio.Wpf.Block/Controls/NextForBlockPanel.cs +++ /dev/null @@ -1,309 +0,0 @@ -using System; -using System.ComponentModel; -using System.Data; -using System.Runtime.InteropServices; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Media; - -namespace AIStudio.Wpf.Block.Controls -{ - - public class NextForBlockPanel : BlockPanel - { - public NextForBlockPanel() - { - - } - - #region 方法重写 - private UIElement Header - { - get - { - return InternalChildren.Count >= 0 ? InternalChildren[0] : null; - } - } - - private UIElement Content - { - get - { - return InternalChildren.Count >= 1 ? InternalChildren[1] : null; - } - } - - private UIElement Footer - { - get - { - return InternalChildren.Count >= 2 ? InternalChildren[2] : null; - } - } - - public double Insideheight { get; set; } = 6; - public double Insidewidth { get; set; } = 21; - public double Insideoffset { get; set; } = 14; - public double Leftpanelwidth { get; set; } = 10; - public double Minwidth { get; set; } = 109; - public double Minheaderheight { get; set; } = 34; - public double Mincontentheight { get; set; } = 16; - public double Minfooterheight { get; set; } = 26; - - - private double _width; - private double _headerheight; - private double _contentheight; - private double _footerheight; - /// - /// 该方法用于测量整个控件的大小 - /// - /// - /// 控件的大小 - protected override Size MeasureOverride(Size constraint) - { - Thickness padding = this.Padding; - - _width = Minwidth; - if (Header != null) - { - //测量子控件的大小 - Header.Measure(constraint); - _width = Math.Max(Minwidth, Header.DesiredSize.Width + padding.Left + padding.Right); - _headerheight = Math.Max(Minheaderheight, Header.DesiredSize.Height + padding.Top + padding.Bottom); - } - else - { - _headerheight = Minheaderheight; - } - - if (Content != null) - { - //测量子控件的大小 - Content.Measure(constraint); - _width = Math.Max(Minwidth, Content.DesiredSize.Width + padding.Left + padding.Right + Leftpanelwidth); - _contentheight = Math.Max(Mincontentheight, Content.DesiredSize.Height + padding.Top + padding.Bottom); - } - else - { - _contentheight = Mincontentheight; - } - - if (Footer != null) - { - //测量子控件的大小 - Footer.Measure(constraint); - _width = Math.Max(Minwidth, Footer.DesiredSize.Width + padding.Left + padding.Right); - _footerheight = Math.Max(Minfooterheight, Footer.DesiredSize.Height + padding.Top + padding.Bottom); - } - else - { - _footerheight = Minfooterheight; - } - - return new Size(_width, _headerheight + _contentheight + _footerheight); - } - - /// - /// 设置子控件的大小与位置 - /// - /// - /// - protected override Size ArrangeOverride(Size arrangeSize) - { - Thickness padding = this.Padding; - - if (Header != null) - { - Header.Arrange(new Rect(new Point(padding.Left, padding.Top), new Size(_width - padding.Left - padding.Right, _headerheight - padding.Top - padding.Bottom))); - } - - - if (Content != null) - { - Content.Arrange(new Rect(new Point(padding.Left + Leftpanelwidth, padding.Top + _headerheight), new Size(_width - Leftpanelwidth - padding.Left - padding.Right, _contentheight - padding.Top - padding.Bottom))); - } - - - if (Footer != null) - { - Footer.Arrange(new Rect(new Point(padding.Left, padding.Top + _headerheight + _contentheight), new Size(_width - padding.Left - padding.Right, _footerheight - padding.Top - padding.Bottom))); - } - - - return base.ArrangeOverride(arrangeSize); - } - - /// - /// 绘制控件 - /// - /// - protected override void OnRender(DrawingContext drawingContext) - { - Thickness padding = this.Padding; - - Pen pen = new Pen(); - pen.Brush = this.BorderBrush; - pen.Thickness = this.BorderThickness.Left;// NextForBlockBorder.RoundLayoutValue(BorderThickness.Left, DoubleUtil.DpiScaleX); - - Geometry cg = CreateGeometry(_width, _headerheight, _contentheight, _footerheight); - Brush brush = CreateFillBrush(); - - GuidelineSet guideLines = new GuidelineSet(); - drawingContext.PushGuidelineSet(guideLines); - drawingContext.DrawGeometry(brush, pen, cg); - - base.OnRender(drawingContext); - } - #endregion - - #region 私有方法 - private Geometry CreateGeometry(double x, double y0, double y1, double y2) - { - #region - PathFigure pf = new PathFigure(); - pf.IsClosed = true; - pf.StartPoint = new Point(0, 2); - - //第一横线 - ArcSegment seg1 = new ArcSegment() { Size = new Size(2, 2), SweepDirection = SweepDirection.Clockwise, Point = new Point(2, 0) }; - pf.Segments.Add(seg1); - - LineSegment seg2 = new LineSegment() { Point = new Point(Insideoffset, 0) }; - pf.Segments.Add(seg2); - - //第二in - QuadraticBezierSegment seg3 = new QuadraticBezierSegment() { Point1 = new Point(Insideoffset + 1, 0), Point2 = new Point(Insideoffset + 2, 2) }; - pf.Segments.Add(seg3); - - QuadraticBezierSegment seg4 = new QuadraticBezierSegment() { Point1 = new Point(Insideoffset + 4, Insideheight), Point2 = new Point(Insideoffset + 5, Insideheight) }; - pf.Segments.Add(seg4); - - LineSegment seg5 = new LineSegment() { Point = new Point(Insideoffset + Insidewidth - 5, Insideheight) }; - pf.Segments.Add(seg5); - - QuadraticBezierSegment seg6 = new QuadraticBezierSegment() { Point1 = new Point(Insideoffset + Insidewidth - 4, Insideheight), Point2 = new Point(Insideoffset + Insidewidth - 2, 2) }; - pf.Segments.Add(seg6); - - QuadraticBezierSegment seg7 = new QuadraticBezierSegment() { Point1 = new Point(Insideoffset + Insidewidth - 1, 0), Point2 = new Point(Insideoffset + Insidewidth, 0) }; - pf.Segments.Add(seg7); - - //第三横线 - LineSegment seg8 = new LineSegment() { Point = new Point(x - 2, 0) }; - pf.Segments.Add(seg8); - - //第四竖线 - ArcSegment seg9 = new ArcSegment() { Size = new Size(2, 2), SweepDirection = SweepDirection.Clockwise, Point = new Point(x, 2) }; - pf.Segments.Add(seg9); - - LineSegment seg10 = new LineSegment() { Point = new Point(x, y0 - 2) }; - pf.Segments.Add(seg10); - - //第五横线 - ArcSegment seg11 = new ArcSegment() { Size = new Size(2, 2), SweepDirection = SweepDirection.Clockwise, Point = new Point(x - 2, y0) }; - pf.Segments.Add(seg11); - - LineSegment seg12 = new LineSegment() { Point = new Point(Leftpanelwidth + Insideoffset + Insidewidth, y0) }; - pf.Segments.Add(seg12); - - //第六in - QuadraticBezierSegment seg13 = new QuadraticBezierSegment() { Point1 = new Point(Leftpanelwidth + Insideoffset + Insidewidth - 1, y0), Point2 = new Point(Leftpanelwidth + Insideoffset + Insidewidth - 2, y0 + 2) }; - pf.Segments.Add(seg13); - - QuadraticBezierSegment seg14 = new QuadraticBezierSegment() { Point1 = new Point(Leftpanelwidth + Insideoffset + Insidewidth - 4, y0 + Insideheight), Point2 = new Point(Leftpanelwidth + Insideoffset + Insidewidth - 5, y0 + Insideheight) }; - pf.Segments.Add(seg14); - - LineSegment seg15 = new LineSegment() { Point = new Point(Leftpanelwidth + Insideoffset + 5, y0 + Insideheight) }; - pf.Segments.Add(seg15); - - QuadraticBezierSegment seg16 = new QuadraticBezierSegment() { Point1 = new Point(Leftpanelwidth + Insideoffset + 4, y0 + Insideheight), Point2 = new Point(Leftpanelwidth + Insideoffset + 2, y0 + 2) }; - pf.Segments.Add(seg16); - - QuadraticBezierSegment seg17 = new QuadraticBezierSegment() { Point1 = new Point(Leftpanelwidth + Insideoffset + 1, y0), Point2 = new Point(Insideoffset, y0) }; - pf.Segments.Add(seg17); - - //第七横线 - LineSegment seg18 = new LineSegment() { Point = new Point(Leftpanelwidth + 2, y0) }; - pf.Segments.Add(seg18); - - ArcSegment seg19 = new ArcSegment() { Size = new Size(2, 2), SweepDirection = SweepDirection.Counterclockwise, Point = new Point(Leftpanelwidth, y0 + 2) }; - pf.Segments.Add(seg19); - - //第八竖线 - LineSegment seg20 = new LineSegment() { Point = new Point(Leftpanelwidth, y0 + y1 - 2) }; - pf.Segments.Add(seg20); - - ArcSegment seg21 = new ArcSegment() { Size = new Size(2, 2), SweepDirection = SweepDirection.Counterclockwise, Point = new Point(Leftpanelwidth + 2, y0 + y1) }; - pf.Segments.Add(seg21); - - //第九横线 - LineSegment seg22 = new LineSegment() { Point = new Point(Leftpanelwidth + Insideoffset, y0 + y1) }; - pf.Segments.Add(seg22); - - //第十in - QuadraticBezierSegment seg23 = new QuadraticBezierSegment() { Point1 = new Point(Leftpanelwidth + Insideoffset + 1, y0 + y1), Point2 = new Point(Leftpanelwidth + Insideoffset + 2, y0 + y1 + 2) }; - pf.Segments.Add(seg23); - - QuadraticBezierSegment seg24 = new QuadraticBezierSegment() { Point1 = new Point(Leftpanelwidth + Insideoffset + 4, y0 + y1 + Insideheight), Point2 = new Point(Leftpanelwidth + Insideoffset + 5, y0 + y1 + Insideheight) }; - pf.Segments.Add(seg24); - - LineSegment seg25 = new LineSegment() { Point = new Point(Leftpanelwidth + Insideoffset + Insidewidth - 5, y0 + y1 + Insideheight) }; - pf.Segments.Add(seg25); - - QuadraticBezierSegment seg26 = new QuadraticBezierSegment() { Point1 = new Point(Leftpanelwidth + Insideoffset + Insidewidth - 4, y0 + y1 + Insideheight), Point2 = new Point(Leftpanelwidth + Insideoffset + Insidewidth - 2, y0 + y1 + 2) }; - pf.Segments.Add(seg26); - - QuadraticBezierSegment seg27 = new QuadraticBezierSegment() { Point1 = new Point(Leftpanelwidth + Insideoffset + Insidewidth - 1, y0 + y1), Point2 = new Point(Leftpanelwidth + Insideoffset + Insidewidth, y0 + y1) }; - pf.Segments.Add(seg27); - - //第十一横线 - LineSegment seg28 = new LineSegment() { Point = new Point(x - 2, y0 + y1) }; - pf.Segments.Add(seg28); - - //第十二竖线 - ArcSegment seg29 = new ArcSegment() { Size = new Size(2, 2), SweepDirection = SweepDirection.Clockwise, Point = new Point(x, y0 + y1 + 2) }; - pf.Segments.Add(seg29); - - LineSegment seg30 = new LineSegment() { Point = new Point(x, y0 + y1 + y2 - 2) }; - pf.Segments.Add(seg30); - - //第十三横线 - ArcSegment seg31 = new ArcSegment() { Size = new Size(2, 2), SweepDirection = SweepDirection.Clockwise, Point = new Point(x - 2, y0 + y1 + y2) }; - pf.Segments.Add(seg31); - - LineSegment seg32 = new LineSegment() { Point = new Point(Insideoffset + Insidewidth, y0 + y1 + y2) }; - pf.Segments.Add(seg32); - - //第十四in - QuadraticBezierSegment seg33 = new QuadraticBezierSegment() { Point1 = new Point(Insideoffset + Insidewidth - 1, y0 + y1 + y2), Point2 = new Point(Insideoffset + Insidewidth - 2, y0 + y1 + y2 + 2) }; - pf.Segments.Add(seg33); - - QuadraticBezierSegment seg34 = new QuadraticBezierSegment() { Point1 = new Point(Insideoffset + Insidewidth - 4, y0 + y1 + y2 + Insideheight), Point2 = new Point(Insideoffset + Insidewidth - 5, y0 + y1 + y2 + Insideheight) }; - pf.Segments.Add(seg34); - - LineSegment seg35 = new LineSegment() { Point = new Point(Insideoffset + 5, y0 + y1 + y2 + Insideheight) }; - pf.Segments.Add(seg35); - - QuadraticBezierSegment seg36 = new QuadraticBezierSegment() { Point1 = new Point(Insideoffset + 4, y0 + y1 + y2 + Insideheight), Point2 = new Point(Insideoffset + 2, y0 + y1 + y2 + 2) }; - pf.Segments.Add(seg36); - - QuadraticBezierSegment seg37 = new QuadraticBezierSegment() { Point1 = new Point(Insideoffset + 1, y0 + y1 + y2), Point2 = new Point(Insideoffset, y0 + y1 + y2) }; - pf.Segments.Add(seg37); - - //第十五横线 - LineSegment seg38 = new LineSegment() { Point = new Point(2, y0 + y1 + y2) }; - pf.Segments.Add(seg38); - - ArcSegment seg39 = new ArcSegment() { Size = new Size(2, 2), SweepDirection = SweepDirection.Clockwise, Point = new Point(0, y0 + y1 + y2 - 2) }; - pf.Segments.Add(seg39); - - PathGeometry g1 = new PathGeometry(); - g1.Figures.Add(pf); - #endregion - - return g1; - } - - #endregion - } -} diff --git a/Extensions/AIStudio.Wpf.Block/Controls/OperationBlockBorder.cs b/Extensions/AIStudio.Wpf.Block/Controls/OperationBlockBorder.cs deleted file mode 100644 index 723afb1..0000000 --- a/Extensions/AIStudio.Wpf.Block/Controls/OperationBlockBorder.cs +++ /dev/null @@ -1,114 +0,0 @@ -using System; -using System.Windows; -using System.Windows.Media; - -namespace AIStudio.Wpf.Block.Controls -{ - public class OperationBlockBorder : BlockDecorator - { - public OperationBlockBorder() - { - - } - - #region 方法重写 - public double Minwidth { get; set; } = 100; - public double Minheight { get; set; } = 30; - - /// - /// 该方法用于测量整个控件的大小 - /// - /// - /// 控件的大小 - protected override Size MeasureOverride(Size constraint) - { - Thickness padding = this.Padding; - - Size result = new Size(); - if (Child != null) - { - //测量子控件的大小 - Child.Measure(constraint); - - result.Width = Math.Max(Minwidth, Child.DesiredSize.Width + padding.Left + padding.Right); - result.Height = Math.Max(Minheight, Child.DesiredSize.Height + padding.Top + padding.Bottom); - } - else - { - result.Width = Minwidth; - result.Height = Minheight; - } - return result; - } - - /// - /// 设置子控件的大小与位置 - /// - /// - /// - protected override Size ArrangeOverride(Size arrangeSize) - { - Thickness padding = this.Padding; - if (Child != null) - { - Child.Arrange(new Rect(new Point(padding.Left, padding.Top), - new Size(Math.Max(Minwidth - padding.Left - padding.Right, Child.DesiredSize.Width), Math.Max(Minheight - padding.Top - padding.Bottom, Child.DesiredSize.Height)))); - } - return arrangeSize; - } - - /// - /// 绘制控件 - /// - /// - protected override void OnRender(DrawingContext drawingContext) - { - Thickness padding = this.Padding; - - Pen pen = new Pen(); - pen.Brush = this.BorderBrush; - pen.Thickness = this.BorderThickness.Left;// NextForBlockBorder.RoundLayoutValue(BorderThickness.Left, DoubleUtil.DpiScaleX); - - Geometry cg = CreateGeometry(Math.Max(Minwidth, Child?.DesiredSize.Width ?? 0 + padding.Left + padding.Right), Math.Max(Minheight, Child?.DesiredSize.Height ?? 0 + padding.Top + padding.Bottom)); - Brush brush = CreateFillBrush(); - - GuidelineSet guideLines = new GuidelineSet(); - drawingContext.PushGuidelineSet(guideLines); - drawingContext.DrawGeometry(brush, pen, cg); - } - #endregion - - #region 私有方法 - //按Element的大小计算 - private Geometry CreateGeometry(double x, double y) - { - #region - PathFigure pf = new PathFigure(); - pf.IsClosed = true; - pf.StartPoint = new Point(0, y/ 2 + 1); - - - LineSegment seg1 = new LineSegment() { Point = new Point(y / 2 + 1, 0) }; - pf.Segments.Add(seg1); - - LineSegment seg2 = new LineSegment() { Point = new Point(x - y / 2 - 1, 0) }; - pf.Segments.Add(seg2); - - LineSegment seg3 = new LineSegment() { Point = new Point(x, y / 2) }; - pf.Segments.Add(seg3); - - LineSegment seg4 = new LineSegment() { Point = new Point(x - y / 2 - 1, y) }; - pf.Segments.Add(seg4); - - LineSegment seg5 = new LineSegment() { Point = new Point(y / 2 + 1, y) }; - pf.Segments.Add(seg5); - - PathGeometry g1 = new PathGeometry(); - g1.Figures.Add(pf); - #endregion - - return g1; - } - #endregion - } -} diff --git a/Extensions/AIStudio.Wpf.Block/Controls/StartBlockBorder.cs b/Extensions/AIStudio.Wpf.Block/Controls/StartBlockBorder.cs deleted file mode 100644 index 393646e..0000000 --- a/Extensions/AIStudio.Wpf.Block/Controls/StartBlockBorder.cs +++ /dev/null @@ -1,147 +0,0 @@ -using System; -using System.Windows; -using System.Windows.Media; - -namespace AIStudio.Wpf.Block.Controls -{ - public class StartBlockBorder : BlockDecorator - { - public StartBlockBorder() - { - - } - - #region 方法重写 - public double Outsideheight { get; set; } = 13; - public double Outsidewidth { get; set; } = 70; - public double Insideheight { get; set; } = 6; - public double Insidewidth { get; set; } = 21; - public double Insideoffset { get; set; } = 14; - public double Minwidth { get; set; } = 86; - public double Minheight { get; set; } = 47; - - /// - /// 该方法用于测量整个控件的大小 - /// - /// - /// 控件的大小 - protected override Size MeasureOverride(Size constraint) - { - Thickness padding = this.Padding; - - Size result = new Size(); - if (Child != null) - { - //测量子控件的大小 - Child.Measure(constraint); - - result.Width = Math.Max(Minwidth, Child.DesiredSize.Width + padding.Left + padding.Right); - result.Height = Math.Max(Minheight, Child.DesiredSize.Height + padding.Top + padding.Bottom + Outsideheight); - } - else - { - result.Width = Minwidth; - result.Height = Minheight; - } - return result; - } - - /// - /// 设置子控件的大小与位置 - /// - /// - /// - protected override Size ArrangeOverride(Size arrangeSize) - { - Thickness padding = this.Padding; - if (Child != null) - { - Child.Arrange(new Rect(new Point(padding.Left, Outsideheight + padding.Top), - new Size(Math.Max(Minwidth - padding.Left - padding.Right, Child.DesiredSize.Width), Math.Max(Minheight - Outsideheight - padding.Top - padding.Bottom, Child.DesiredSize.Height )))); - } - return arrangeSize; - } - - /// - /// 绘制控件 - /// - /// - protected override void OnRender(DrawingContext drawingContext) - { - Thickness padding = this.Padding; - - Pen pen = new Pen(); - pen.Brush = this.BorderBrush; - pen.Thickness = this.BorderThickness.Left;// NextForBlockBorder.RoundLayoutValue(BorderThickness.Left, DoubleUtil.DpiScaleX); - - Geometry cg = CreateGeometry(Math.Max(Minwidth, Child?.DesiredSize.Width ?? 0 + padding.Left + padding.Right), Math.Max(Minheight - Outsideheight, Child?.DesiredSize.Height ?? 0 + padding.Top + padding.Bottom)); - Brush brush = CreateFillBrush(); - - GuidelineSet guideLines = new GuidelineSet(); - drawingContext.PushGuidelineSet(guideLines); - drawingContext.DrawGeometry(brush, pen, cg); - } - #endregion - - #region 私有方法 - //按Element的大小计算 - private Geometry CreateGeometry(double x, double y) - { - #region - PathFigure pf = new PathFigure(); - pf.IsClosed = true; - pf.StartPoint = new Point(0, Outsideheight); - - //第一横线 - QuadraticBezierSegment seg1 = new QuadraticBezierSegment() { Point1 = new Point(Outsidewidth / 2, 3 - Outsideheight), Point2 = new Point(Outsidewidth, Outsideheight) }; - pf.Segments.Add(seg1); - - LineSegment seg2 = new LineSegment() { Point = new Point(x - 2, Outsideheight) }; - pf.Segments.Add(seg2); - - //第二竖线 - ArcSegment seg3 = new ArcSegment() { Size = new Size(2, 2), SweepDirection = SweepDirection.Clockwise, Point = new Point(x, Outsideheight + 2) }; - pf.Segments.Add(seg3); - - LineSegment seg4 = new LineSegment() { Point = new Point(x, Outsideheight + y - 2) }; - pf.Segments.Add(seg4); - - //第三横线 - ArcSegment seg5 = new ArcSegment() { Size = new Size(2, 2), SweepDirection = SweepDirection.Clockwise, Point = new Point(x - 2, Outsideheight + y) }; - pf.Segments.Add(seg5); - - LineSegment seg6 = new LineSegment() { Point = new Point(Insideoffset + Insidewidth, Outsideheight + y) }; - pf.Segments.Add(seg6); - - //第四in - QuadraticBezierSegment seg7 = new QuadraticBezierSegment() { Point1 = new Point(Insideoffset + Insidewidth - 1, Outsideheight + y), Point2 = new Point(Insideoffset + Insidewidth - 2, Outsideheight + y + 2) }; - pf.Segments.Add(seg7); - - QuadraticBezierSegment seg8 = new QuadraticBezierSegment() { Point1 = new Point(Insideoffset + Insidewidth - 4, Outsideheight + y + Insideheight), Point2 = new Point(Insideoffset + Insidewidth - 5, Outsideheight + y + Insideheight) }; - pf.Segments.Add(seg8); - - LineSegment seg9 = new LineSegment() { Point = new Point(Insideoffset + 5, Outsideheight + y + Insideheight) }; - pf.Segments.Add(seg9); - - QuadraticBezierSegment seg10 = new QuadraticBezierSegment() { Point1 = new Point(Insideoffset + 4, Outsideheight + y + Insideheight), Point2 = new Point(Insideoffset + 2, Outsideheight + y + 2) }; - pf.Segments.Add(seg10); - - QuadraticBezierSegment seg11 = new QuadraticBezierSegment() { Point1 = new Point(Insideoffset + 1, Outsideheight + y), Point2 = new Point(Insideoffset, Outsideheight + y) }; - pf.Segments.Add(seg11); - - //第五横线 - LineSegment seg12 = new LineSegment() { Point = new Point(2, Outsideheight + y) }; - pf.Segments.Add(seg12); - - ArcSegment seg13 = new ArcSegment() { Size = new Size(2, 2), SweepDirection = SweepDirection.Clockwise, Point = new Point(0, Outsideheight + y - 2) }; - pf.Segments.Add(seg13); - - PathGeometry g1 = new PathGeometry(); - g1.Figures.Add(pf); - #endregion - - return g1; - } - #endregion - } -} diff --git a/Extensions/AIStudio.Wpf.Block/Controls/VariableBlockBorder.cs b/Extensions/AIStudio.Wpf.Block/Controls/VariableBlockBorder.cs deleted file mode 100644 index c4b6d2f..0000000 --- a/Extensions/AIStudio.Wpf.Block/Controls/VariableBlockBorder.cs +++ /dev/null @@ -1,114 +0,0 @@ -using System; -using System.Windows; -using System.Windows.Input; -using System.Windows.Media; - -namespace AIStudio.Wpf.Block.Controls -{ - public class VariableBlockBorder : BlockDecorator - { - public VariableBlockBorder() - { - - } - - #region 方法重写 - public double Minwidth { get; set; } = 64; - public double Minheight { get; set; } = 28; - - /// - /// 该方法用于测量整个控件的大小 - /// - /// - /// 控件的大小 - protected override Size MeasureOverride(Size constraint) - { - Thickness padding = this.Padding; - - Size result = new Size(); - if (Child != null) - { - //测量子控件的大小 - Child.Measure(constraint); - - result.Width = Math.Max(Minwidth, Child.DesiredSize.Width + padding.Left + padding.Right); - result.Height = Math.Max(Minheight, Child.DesiredSize.Height + padding.Top + padding.Bottom); - } - else - { - result.Width = Minwidth; - result.Height = Minheight; - } - return result; - } - - /// - /// 设置子控件的大小与位置 - /// - /// - /// - protected override Size ArrangeOverride(Size arrangeSize) - { - Thickness padding = this.Padding; - if (Child != null) - { - Child.Arrange(new Rect(new Point(padding.Left, padding.Top), - new Size(Math.Max(Minwidth - padding.Left - padding.Right, Child.DesiredSize.Width), Math.Max(Minheight - padding.Top - padding.Bottom, Child.DesiredSize.Height)))); - } - return arrangeSize; - } - - /// - /// 绘制控件 - /// - /// - protected override void OnRender(DrawingContext drawingContext) - { - Thickness padding = this.Padding; - - Pen pen = new Pen(); - pen.Brush = this.BorderBrush; - pen.Thickness = this.BorderThickness.Left;// NextForBlockBorder.RoundLayoutValue(BorderThickness.Left, DoubleUtil.DpiScaleX); - - Geometry cg = CreateGeometry(Math.Max(Minwidth, Child?.DesiredSize.Width ?? 0 + padding.Left + padding.Right), Math.Max(Minheight, Child?.DesiredSize.Height ?? 0 + padding.Top + padding.Bottom)); - Brush brush = CreateFillBrush(); - - GuidelineSet guideLines = new GuidelineSet(); - drawingContext.PushGuidelineSet(guideLines); - drawingContext.DrawGeometry(brush, pen, cg); - } - #endregion - - #region 私有方法 - //按Element的大小计算 - private Geometry CreateGeometry(double x, double y) - { - #region - PathFigure pf = new PathFigure(); - pf.IsClosed = true; - pf.StartPoint = new Point(y / 2, 0); - - - LineSegment seg1 = new LineSegment() { Point = new Point(x - y / 2, 0) }; - pf.Segments.Add(seg1); - - ArcSegment seg2= new ArcSegment() { Size = new Size(y / 2, y / 2), SweepDirection = SweepDirection.Clockwise, Point = new Point(x - y / 2, y) }; - pf.Segments.Add(seg2); - - LineSegment seg3 = new LineSegment() { Point = new Point(y / 2, y) }; - pf.Segments.Add(seg3); - - ArcSegment seg4 = new ArcSegment() { Size = new Size(y / 2, y / 2), SweepDirection = SweepDirection.Clockwise, Point = new Point(y / 2, 0) }; - pf.Segments.Add(seg4); - - PathGeometry g1 = new PathGeometry(); - g1.Figures.Add(pf); - #endregion - - return g1; - } - #endregion - - - } -} diff --git a/Extensions/AIStudio.Wpf.Block/Models/BlockType.cs b/Extensions/AIStudio.Wpf.Block/Models/BlockType.cs deleted file mode 100644 index 617cf47..0000000 --- a/Extensions/AIStudio.Wpf.Block/Models/BlockType.cs +++ /dev/null @@ -1,138 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace AIStudio.Wpf.Block.Models -{ - public enum BlockType - { - //运动 - [Description("移动")] - Move, - [Description("右转")] - TurnRight, - [Description("左转")] - TurnLeft, - [Description("移到")] - MoveTo, - [Description("移到坐标")] - MoveToPoint, - [Description("在几s内移到")] - TimeMoveTo, - [Description("在几s内移到坐标")] - TimeMoveToPoint, - [Description("面向方向")] - FaceTo, - [Description("面向鼠标")] - FaceToMouse, - [Description("将X坐标增加")] - PointXAdd, - [Description("将X坐标设为")] - PointXSet, - [Description("将Y坐标增加")] - PointYAdd, - [Description("将Y坐标设为")] - PointYSet, - [Description("碰到边缘就反弹")] - BorderBounce, - [Description("旋转方式")] - RotationMethod, - [Description("X坐标")] - PointX, - [Description("Y坐标")] - PointY, - [Description("方向")] - Direction, - //外观 - //声音 - //事件 - [Description("当开始被点击")] - Start, - [Description("当键盘按下")] - KeyboardPress, - [Description("当角色被点击")] - WhenRoleClicked, - [Description("当背景切换")] - WhenBackgroundSwitch, - [Description("当大于")] - WhenGreaterThan, - [Description("当接收到")] - WhenReceivedMessage, - [Description("广播消息")] - BroadcastMessage, - [Description("广播消息并等待")] - BroadcastMessageAndWaiting, - [Description("等待1s")] - WaitTime, - [Description("循环执行")] - For, - [Description("一直执行")] - Always, - [Description("如果")] - If, - [Description("如果否则")] - IfElse, - [Description("等待条件")] - Wait, - [Description("重复执行直到")] - While, - [Description("停止")] - Stop, - [Description("克隆")] - Clone, - [Description("删除此克隆体")] - DeleteThisClone, - //侦测 - //运算 - [Description("加")] - Add, - [Description("减")] - Subtract, - [Description("乘")] - Multiply, - [Description("除")] - Division, - [Description("除")] - Random, - [Description("大于")] - GreaterThan, - [Description("小于")] - LessThan, - [Description("等于")] - EqualThan, - [Description("与")] - And, - [Description("或")] - Or, - [Description("不成立")] - Not, - [Description("字符串连接")] - StringAdd, - [Description("第几个字符")] - StringIndex, - [Description("字符数")] - StringLength, - [Description("包含")] - StringContain, - [Description("余数")] - Mod, - [Description("四舍五入")] - Round, - [Description("绝对值")] - Abs, - //变量 - [Description("变量")] - Variable, - [Description("设为")] - SetValue, - [Description("增加")] - Increase, - [Description("显示变量")] - VariableVisable, - [Description("隐藏变量")] - VariableHidden, - } -} diff --git a/Extensions/AIStudio.Wpf.Block/Models/ConstParameter.cs b/Extensions/AIStudio.Wpf.Block/Models/ConstParameter.cs deleted file mode 100644 index 440d0dd..0000000 --- a/Extensions/AIStudio.Wpf.Block/Models/ConstParameter.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace AIStudio.Wpf.Block.Models -{ - public class ConstParameter : IParameter - { - public double? Value - { - get;set; - } - } -} diff --git a/Extensions/AIStudio.Wpf.Block/Models/IParameter.cs b/Extensions/AIStudio.Wpf.Block/Models/IParameter.cs deleted file mode 100644 index bc51972..0000000 --- a/Extensions/AIStudio.Wpf.Block/Models/IParameter.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace AIStudio.Wpf.Block.Models -{ - public interface IParameter - { - //double Value - //{ - // get; - //} - } -} diff --git a/Extensions/AIStudio.Wpf.Block/Models/VarParameter.cs b/Extensions/AIStudio.Wpf.Block/Models/VarParameter.cs deleted file mode 100644 index 071af07..0000000 --- a/Extensions/AIStudio.Wpf.Block/Models/VarParameter.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace AIStudio.Wpf.Block.Models -{ - public class VarParameter : IParameter - { - - } -} diff --git a/Extensions/AIStudio.Wpf.Block/Themes/BlockItemViewModel.xaml b/Extensions/AIStudio.Wpf.Block/Themes/BlockItemViewModel.xaml deleted file mode 100644 index 33a35da..0000000 --- a/Extensions/AIStudio.Wpf.Block/Themes/BlockItemViewModel.xaml +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Extensions/AIStudio.Wpf.Block/Themes/Brushes.xaml b/Extensions/AIStudio.Wpf.Block/Themes/Brushes.xaml deleted file mode 100644 index f9df8c8..0000000 --- a/Extensions/AIStudio.Wpf.Block/Themes/Brushes.xaml +++ /dev/null @@ -1,30 +0,0 @@ - - - #ffbf00 - #cc9900 - White - #ffab19 - #cf8b17 - White - #59c059 - #389438 - White - - #4cbf56 - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Extensions/AIStudio.Wpf.Block/Themes/Geometries.xaml b/Extensions/AIStudio.Wpf.Block/Themes/Geometries.xaml deleted file mode 100644 index 5ca17af..0000000 --- a/Extensions/AIStudio.Wpf.Block/Themes/Geometries.xaml +++ /dev/null @@ -1,6 +0,0 @@ - - - M152.474 62.225c-26.856 0-56.286 21.748-56.286 48.663v802.451c0 26.798 28.773 48.653 55.579 48.653 26.789 0 56.286-21.857 56.286-48.663v-802.434c0-26.914-28.78-48.663-55.579-48.663zM730.146 129.011c-157.836 0-157.836-64.694-315.663-64.694-91.108 0-161.46 42.504-161.46 42.504l-0.658 484.313s71.010-42.446 162.119-42.446c157.827 0 157.827 64.694 315.663 64.694 98.74 0 197.923-51.845 197.923-51.845v-484.264s-99.183 51.737-197.923 51.737z - \ No newline at end of file diff --git a/Extensions/AIStudio.Wpf.Block/ViewModels/ArithmeticModules/AddBlockItemViewModel.cs b/Extensions/AIStudio.Wpf.Block/ViewModels/ArithmeticModules/AddBlockItemViewModel.cs deleted file mode 100644 index 30672f9..0000000 --- a/Extensions/AIStudio.Wpf.Block/ViewModels/ArithmeticModules/AddBlockItemViewModel.cs +++ /dev/null @@ -1,64 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using AIStudio.Wpf.Block.Models; -using AIStudio.Wpf.DiagramDesigner; -using AIStudio.Wpf.DiagramDesigner.Models; - -namespace AIStudio.Wpf.Block.ViewModels -{ - public class AddBlockItemViewModel : BlockDesignerItemViewModel - { - public AddBlockItemViewModel() - { - } - - public AddBlockItemViewModel(IDiagramViewModel root) : base(root) - { - } - - public AddBlockItemViewModel(IDiagramViewModel root, SelectableItemBase designer) : base(root, designer) - { - } - - public AddBlockItemViewModel(IDiagramViewModel root, SerializableItem serializableItem, string serializableType) : base(root, serializableItem, serializableType) - { - } - - protected override void InitNew() - { - ItemWidth = double.NaN; - ItemHeight = double.NaN; - Add1 = new ConstParameter(); - Add2 = new ConstParameter(); - } - - private IParameter _add1; - public IParameter Add1 - { - get - { - return _add1; - } - set - { - SetProperty(ref _add1, value); - } - } - - private IParameter _add2; - public IParameter Add2 - { - get - { - return _add2; - } - set - { - SetProperty(ref _add2, value); - } - } - } -} diff --git a/Extensions/AIStudio.Wpf.Block/ViewModels/ControlModules/ControlBlockItemViewModel.cs b/Extensions/AIStudio.Wpf.Block/ViewModels/ControlModules/ControlBlockItemViewModel.cs deleted file mode 100644 index 30c86bd..0000000 --- a/Extensions/AIStudio.Wpf.Block/ViewModels/ControlModules/ControlBlockItemViewModel.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using AIStudio.Wpf.DiagramDesigner; -using AIStudio.Wpf.DiagramDesigner.Models; - -namespace AIStudio.Wpf.Block.ViewModels -{ - public class ControlBlockItemViewModel : BlockDesignerItemViewModel - { - public ControlBlockItemViewModel() - { - } - - public ControlBlockItemViewModel(IDiagramViewModel root) : base(root) - { - } - - public ControlBlockItemViewModel(IDiagramViewModel root, SelectableItemBase designer) : base(root, designer) - { - } - - public ControlBlockItemViewModel(IDiagramViewModel root, SerializableItem serializableItem, string serializableType) : base(root, serializableItem, serializableType) - { - } - - protected override void InitNew() - { - ItemWidth = double.NaN; - ItemHeight = double.NaN; - AddConnector(new BlockConnectorInfo(this.Root, this, ConnectorOrientation.Bottom)); - } - } -} diff --git a/Extensions/AIStudio.Wpf.Block/ViewModels/ControlModules/KeyboardPressBlockItemViewModel.cs b/Extensions/AIStudio.Wpf.Block/ViewModels/ControlModules/KeyboardPressBlockItemViewModel.cs deleted file mode 100644 index 63114c4..0000000 --- a/Extensions/AIStudio.Wpf.Block/ViewModels/ControlModules/KeyboardPressBlockItemViewModel.cs +++ /dev/null @@ -1,47 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using AIStudio.Wpf.DiagramDesigner; -using AIStudio.Wpf.DiagramDesigner.Models; - -namespace AIStudio.Wpf.Block.ViewModels -{ - public class KeyboardPressBlockItemViewModel : ControlBlockItemViewModel - { - public KeyboardPressBlockItemViewModel() - { - } - - public KeyboardPressBlockItemViewModel(IDiagramViewModel root) : base(root) - { - } - - public KeyboardPressBlockItemViewModel(IDiagramViewModel root, SelectableItemBase designer) : base(root, designer) - { - } - - public KeyboardPressBlockItemViewModel(IDiagramViewModel root, SerializableItem serializableItem, string serializableType) : base(root, serializableItem, serializableType) - { - } - - public List KeyItemsSource - { - get;set; - } - - private string _key; - public string Key - { - get - { - return _key; - } - set - { - SetProperty(ref _key, value); - } - } - } -} diff --git a/Extensions/AIStudio.Wpf.Block/ViewModels/ControlModules/StartBlockItemViewModel.cs b/Extensions/AIStudio.Wpf.Block/ViewModels/ControlModules/StartBlockItemViewModel.cs deleted file mode 100644 index d5e3e1c..0000000 --- a/Extensions/AIStudio.Wpf.Block/ViewModels/ControlModules/StartBlockItemViewModel.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using AIStudio.Wpf.DiagramDesigner; -using AIStudio.Wpf.DiagramDesigner.Models; - -namespace AIStudio.Wpf.Block.ViewModels -{ - public class StartBlockItemViewModel : ControlBlockItemViewModel - { - public StartBlockItemViewModel() - { - } - - public StartBlockItemViewModel(IDiagramViewModel root) : base(root) - { - } - - public StartBlockItemViewModel(IDiagramViewModel root, SelectableItemBase designer) : base(root, designer) - { - } - - public StartBlockItemViewModel(IDiagramViewModel root, SerializableItem serializableItem, string serializableType) : base(root, serializableItem, serializableType) - { - } - - } -} diff --git a/Extensions/AIStudio.Wpf.Block/ViewModels/EventModules/WaitTimeBlockItemViewModel.cs b/Extensions/AIStudio.Wpf.Block/ViewModels/EventModules/WaitTimeBlockItemViewModel.cs deleted file mode 100644 index e36318c..0000000 --- a/Extensions/AIStudio.Wpf.Block/ViewModels/EventModules/WaitTimeBlockItemViewModel.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using AIStudio.Wpf.Block.Models; -using AIStudio.Wpf.DiagramDesigner; -using AIStudio.Wpf.DiagramDesigner.Models; - -namespace AIStudio.Wpf.Block.ViewModels -{ - public class WaitTimeBlockItemViewModel : BlockDesignerItemViewModel - { - public WaitTimeBlockItemViewModel() - { - } - - public WaitTimeBlockItemViewModel(IDiagramViewModel root) : base(root) - { - } - - public WaitTimeBlockItemViewModel(IDiagramViewModel root, SelectableItemBase designer) : base(root, designer) - { - } - - public WaitTimeBlockItemViewModel(IDiagramViewModel root, SerializableItem serializableItem, string serializableType) : base(root, serializableItem, serializableType) - { - } - - protected override void InitNew() - { - ItemWidth = double.NaN; - ItemHeight = double.NaN; - Second = new ConstParameter(); - } - - private IParameter _second; - public IParameter Second - { - get - { - return _second; - } - set - { - SetProperty(ref _second, value); - } - } - } -} diff --git a/Extensions/AIStudio.Wpf.Block/ViewModels/VariableModules/VariableBlockItemViewModel.cs b/Extensions/AIStudio.Wpf.Block/ViewModels/VariableModules/VariableBlockItemViewModel.cs deleted file mode 100644 index ffe346c..0000000 --- a/Extensions/AIStudio.Wpf.Block/ViewModels/VariableModules/VariableBlockItemViewModel.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using AIStudio.Wpf.Block.Models; -using AIStudio.Wpf.DiagramDesigner; -using AIStudio.Wpf.DiagramDesigner.Models; - -namespace AIStudio.Wpf.Block.ViewModels.VariableModules -{ - public class VariableBlockItemViewModel : BlockDesignerItemViewModel - { - public VariableBlockItemViewModel() - { - } - - public VariableBlockItemViewModel(IDiagramViewModel root) : base(root) - { - } - - public VariableBlockItemViewModel(IDiagramViewModel root, SelectableItemBase designer) : base(root, designer) - { - } - - public VariableBlockItemViewModel(IDiagramViewModel root, SerializableItem serializableItem, string serializableType) : base(root, serializableItem, serializableType) - { - } - - protected override void InitNew() - { - ItemWidth = double.NaN; - ItemHeight = double.NaN; - Value = new VarParameter(); - } - - private IParameter _value; - public IParameter Value - { - get - { - return _value; - } - set - { - SetProperty(ref _value, value); - } - } - } -}