Files
aistudio-wpf-diagram/AIStudio.Wpf.Flowchart/ViewModels/ToolBoxViewModel.cs

39 lines
1.6 KiB
C#
Raw Normal View History

2022-11-30 19:07:40 +08:00
using System;
using System.Collections.Generic;
using System.Text;
2022-12-04 23:07:20 +08:00
using System.Windows;
2022-11-30 19:07:40 +08:00
using System.Windows.Media;
2022-12-04 23:07:20 +08:00
using AIStudio.Wpf.DiagramDesigner;
2022-11-30 19:07:40 +08:00
using AIStudio.Wpf.DiagramDesigner.Helpers;
using AIStudio.Wpf.Flowchart;
using AIStudio.Wpf.Flowchart.Models;
using AIStudio.Wpf.Flowchart.ViewModels;
2022-12-02 23:06:31 +08:00
namespace AIStudio.Wpf.Flowchart.ViewModels
2022-11-30 19:07:40 +08:00
{
public class ToolBoxViewModel
{
private List<ToolBoxData> toolBoxItems = new List<ToolBoxData>();
public ToolBoxViewModel()
{
2022-12-04 23:07:20 +08:00
var screenScale = ScreenHelper.ResetScreenScale();
toolBoxItems.Add(new FlowchartToolBoxData(NodeKinds.Start, typeof(StartFlowNode), 80, 60, new Size(100 / screenScale, 80/ screenScale)));
toolBoxItems.Add(new FlowchartToolBoxData(NodeKinds.End, typeof(EndFlowNode), 80, 60, new Size(100 / screenScale, 80 / screenScale)));
toolBoxItems.Add(new FlowchartToolBoxData(NodeKinds.Middle, typeof(MiddleFlowNode), 80, 60, new Size(100 / screenScale, 80 / screenScale)));
toolBoxItems.Add(new FlowchartToolBoxData(NodeKinds.Decide, typeof(DecideFlowNode), 80, 60, new Size(100 / screenScale, 80 / screenScale)));
toolBoxItems.Add(new FlowchartToolBoxData(NodeKinds.COBegin, typeof(COBeginFlowNode), 80, 60, new Size(100 / screenScale, 80 / screenScale)));
toolBoxItems.Add(new FlowchartToolBoxData(NodeKinds.COEnd, typeof(COEndFlowNode), 80, 60, new Size(100 / screenScale, 80 / screenScale)));
2022-11-30 19:07:40 +08:00
}
public List<ToolBoxData> ToolBoxItems
{
get
{
return toolBoxItems;
}
}
}
}