类移动到独立文件
This commit is contained in:
parent
715342335f
commit
09e59bdf4c
17
PLCSharpWpf/VVMs/Vision/Models/FlowMenuGroup.cs
Normal file
17
PLCSharpWpf/VVMs/Vision/Models/FlowMenuGroup.cs
Normal file
@ -0,0 +1,17 @@
|
||||
namespace PLCSharp.VVMs.Vision.Models;
|
||||
|
||||
/// <summary>
|
||||
/// 添加流程菜单中的一个分组(一个子菜单)
|
||||
/// </summary>
|
||||
public class FlowMenuGroup
|
||||
{
|
||||
/// <summary>
|
||||
/// Header
|
||||
/// </summary>
|
||||
public string Header { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Items
|
||||
/// </summary>
|
||||
public List<FlowMenuItem> Items { get; set; }
|
||||
}
|
||||
19
PLCSharpWpf/VVMs/Vision/Models/FlowMenuItem.cs
Normal file
19
PLCSharpWpf/VVMs/Vision/Models/FlowMenuItem.cs
Normal file
@ -0,0 +1,19 @@
|
||||
using PLCSharp.VVMs.Vision;
|
||||
|
||||
namespace PLCSharp.VVMs.Vision.Models;
|
||||
|
||||
/// <summary>
|
||||
/// 添加流程菜单中的一个叶子菜单项
|
||||
/// </summary>
|
||||
public class FlowMenuItem
|
||||
{
|
||||
/// <summary>
|
||||
/// Header
|
||||
/// </summary>
|
||||
public string Header { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Flow类型
|
||||
/// </summary>
|
||||
public VisionFlowType FlowType { get; set; }
|
||||
}
|
||||
@ -4,6 +4,7 @@
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:controls="clr-namespace:PLCSharp.Core.UserControls"
|
||||
xmlns:local="clr-namespace:PLCSharp.VVMs.Vision"
|
||||
xmlns:models="clr-namespace:PLCSharp.VVMs.Vision.Models"
|
||||
xmlns:variables="clr-namespace:PLCSharp.VVMs.GlobalVariables"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:prism="http://prismlibrary.com/"
|
||||
@ -24,10 +25,10 @@
|
||||
<x:Type TypeName="local:VisionFlowType" />
|
||||
</ObjectDataProvider.MethodParameters>
|
||||
</ObjectDataProvider>
|
||||
<DataTemplate DataType="{x:Type local:FlowMenuItem}">
|
||||
<DataTemplate DataType="{x:Type models:FlowMenuItem}">
|
||||
<TextBlock Text="{Binding Header}" />
|
||||
</DataTemplate>
|
||||
<HierarchicalDataTemplate DataType="{x:Type local:FlowMenuGroup}" ItemsSource="{Binding Items}">
|
||||
<HierarchicalDataTemplate DataType="{x:Type models:FlowMenuGroup}" ItemsSource="{Binding Items}">
|
||||
<TextBlock Text="{Binding Header}" />
|
||||
</HierarchicalDataTemplate>
|
||||
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using PLCSharp.Core.Prism;
|
||||
using PLCSharp.VVMs.Vision.Models;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
|
||||
|
||||
@ -12,6 +12,7 @@ using PLCSharp.VVMs.Vision.VisionFlowHandler;
|
||||
using PLCSharp.VVMs.Vision.VisionFlowHandler.Access;
|
||||
using PLCSharp.VVMs.Vision.VisionFlowHandler.Algorithm;
|
||||
using PLCSharp.VVMs.Vision.VisionFlowHandler.Processing;
|
||||
using PLCSharp.VVMs.Vision.Models;
|
||||
using Prism.Commands;
|
||||
using Prism.Dialogs;
|
||||
using Prism.Events;
|
||||
@ -1908,37 +1909,5 @@ namespace PLCSharp.VVMs.Vision
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加流程菜单中的一个分组(一个子菜单)
|
||||
/// </summary>
|
||||
public class FlowMenuGroup
|
||||
{
|
||||
/// <summary>
|
||||
/// Header
|
||||
/// </summary>
|
||||
public string Header { get; set; }
|
||||
/// <summary>
|
||||
/// Items
|
||||
/// </summary>
|
||||
public List<FlowMenuItem> Items { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加流程菜单中的一个叶子菜单项
|
||||
/// </summary>
|
||||
public class FlowMenuItem
|
||||
{
|
||||
/// <summary>
|
||||
/// Header
|
||||
/// </summary>
|
||||
public string Header { get; set; }
|
||||
/// <summary>
|
||||
/// Flow类型
|
||||
/// </summary>
|
||||
public VisionFlowType FlowType { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user