添加项目文件。

This commit is contained in:
wang-yin1
2025-07-14 21:08:46 +08:00
parent f4133fc5e9
commit 6deb8d089f
58 changed files with 5593 additions and 0 deletions

View 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; }
}
}

View 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; }
}
}

View 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; }
}
}

View 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; }
}
}

View 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; }
}
}

View 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);
}
}
}
}