mirror of
https://gitee.com/wang-yin1/wpf-visual-process-framework
synced 2026-03-03 00:00:56 +08:00
添加项目文件。
This commit is contained in:
18
VisionFrame/Models/CatalogModel.cs
Normal file
18
VisionFrame/Models/CatalogModel.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace VisionFrame.Models
|
||||
{
|
||||
internal class CatalogModel
|
||||
{
|
||||
public bool IsSelected { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Description { get; set; }
|
||||
public string Icon { get; set; }
|
||||
|
||||
public List<ComponentModel> Components { get; set; }
|
||||
}
|
||||
}
|
||||
19
VisionFrame/Models/ComponentModel.cs
Normal file
19
VisionFrame/Models/ComponentModel.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace VisionFrame.Models
|
||||
{
|
||||
internal class ComponentModel
|
||||
{
|
||||
public string Icon { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string TargetNode { get; set; }
|
||||
public string TargetModel { get; set; }
|
||||
|
||||
public double W { get; set; }
|
||||
public double H { get; set; }
|
||||
}
|
||||
}
|
||||
15
VisionFrame/Models/FlowArgModel.cs
Normal file
15
VisionFrame/Models/FlowArgModel.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Zhaoxi.VisionFrame.Models
|
||||
{
|
||||
public class FlowArgModel
|
||||
{
|
||||
public string ArgName { get; set; }
|
||||
public string ArgType { get; set; }
|
||||
public object Value { get; set; }
|
||||
}
|
||||
}
|
||||
56
VisionFrame/Models/LinkModel.cs
Normal file
56
VisionFrame/Models/LinkModel.cs
Normal file
@@ -0,0 +1,56 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace VisionFrame.Models
|
||||
{
|
||||
public class LinkModel : ObservableObject
|
||||
{
|
||||
public string StartAnchor { get; set; }
|
||||
private string _endAnchor;
|
||||
|
||||
public string EndAnchor
|
||||
{
|
||||
get { return _endAnchor; }
|
||||
set { SetProperty<string>(ref _endAnchor, value); }
|
||||
}
|
||||
|
||||
|
||||
public string StartId { get; set; }
|
||||
public string EndId { get; set; }
|
||||
|
||||
private double _startX;
|
||||
|
||||
public double StartX
|
||||
{
|
||||
get { return _startX; }
|
||||
set { SetProperty<double>(ref _startX, value); }
|
||||
}
|
||||
private double _startY;
|
||||
|
||||
public double StartY
|
||||
{
|
||||
get { return _startY; }
|
||||
set { SetProperty<double>(ref _startY, value); }
|
||||
}
|
||||
private double _endX;
|
||||
|
||||
public double EndX
|
||||
{
|
||||
get { return _endX; }
|
||||
set { SetProperty<double>(ref _endX, value); }
|
||||
}
|
||||
private double _endY;
|
||||
|
||||
public double EndY
|
||||
{
|
||||
get { return _endY; }
|
||||
set { SetProperty<double>(ref _endY, value); }
|
||||
}
|
||||
|
||||
public string Condition { get; set; }
|
||||
}
|
||||
}
|
||||
15
VisionFrame/Models/LogModel.cs
Normal file
15
VisionFrame/Models/LogModel.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace VisionFrame.Models
|
||||
{
|
||||
public class LogModel
|
||||
{
|
||||
public DateTime Time { get; set; }
|
||||
public string NodeName { get; set; }
|
||||
public string LogMessage { get; set; }
|
||||
}
|
||||
}
|
||||
64
VisionFrame/Models/NodeModel.cs
Normal file
64
VisionFrame/Models/NodeModel.cs
Normal file
@@ -0,0 +1,64 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Input;
|
||||
using Zhaoxi.VisionFrame.Base;
|
||||
|
||||
namespace Zhaoxi.VisionFrame.Models
|
||||
{
|
||||
public class NodeModel : ObservableObject
|
||||
{
|
||||
// 每个节点实例 唯一编号
|
||||
public string NodeId { get; } = Guid.NewGuid().ToString();
|
||||
|
||||
public object TargetNodeObject { get; set; }
|
||||
|
||||
|
||||
private double _x;
|
||||
|
||||
public double X
|
||||
{
|
||||
get { return _x; }
|
||||
set { SetProperty<double>(ref _x, value); }
|
||||
}
|
||||
private double _y;
|
||||
|
||||
public double Y
|
||||
{
|
||||
get { return _y; }
|
||||
set { SetProperty<double>(ref _y, value); }
|
||||
}
|
||||
|
||||
public double W { get; set; }
|
||||
public double H { get; set; }
|
||||
|
||||
|
||||
private bool _isSelected = false;
|
||||
|
||||
public bool IsSelected
|
||||
{
|
||||
get { return _isSelected; }
|
||||
set { SetProperty<bool>(ref _isSelected, value); }
|
||||
}
|
||||
|
||||
|
||||
public bool ShowAnchorT { get; set; } = true;
|
||||
public bool ShowAnchorB { get; set; } = true;
|
||||
public bool ShowAnchorL { get; set; } = true;
|
||||
public bool ShowAnchorR { get; set; } = true;
|
||||
|
||||
public void SetAnchorShow(string anchor, bool show)
|
||||
{
|
||||
PropertyInfo pi = this.GetType().GetProperty("ShowAnchor" + anchor);
|
||||
if (pi != null)
|
||||
{
|
||||
pi.SetValue(this, show);
|
||||
this.OnPropertyChanged("ShowAnchor" + anchor);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user