2021-07-29 13:55:18 +08:00
|
|
|
|
using AIStudio.Wpf.Flowchart;
|
2021-07-30 18:26:35 +08:00
|
|
|
|
using AIStudio.Wpf.SFC;
|
2021-07-23 09:42:22 +08:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Windows.Media;
|
2022-10-28 22:45:39 +08:00
|
|
|
|
using AIStudio.Wpf.DiagramDesigner;
|
|
|
|
|
|
using AIStudio.Wpf.DiagramDesigner.Helpers;
|
2023-01-25 23:55:30 +08:00
|
|
|
|
using System.Windows;
|
2021-07-23 09:42:22 +08:00
|
|
|
|
|
2022-10-28 22:45:39 +08:00
|
|
|
|
namespace AIStudio.Wpf.DiagramApp.Models
|
2021-07-23 09:42:22 +08:00
|
|
|
|
{
|
|
|
|
|
|
public class PathToolBoxData : ToolBoxData
|
|
|
|
|
|
{
|
2023-01-25 23:55:30 +08:00
|
|
|
|
public PathToolBoxData(string icon, Type type, double width = 32, double height = 32, Size? desiredSize = null, string description = null) : base(null, icon, type, width, height, desiredSize, description)
|
2021-07-23 09:42:22 +08:00
|
|
|
|
{
|
|
|
|
|
|
ColorViewModel.FillColor.Color = Colors.Orange;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public class TextToolBoxData : ToolBoxData
|
|
|
|
|
|
{
|
2023-01-25 23:55:30 +08:00
|
|
|
|
public TextToolBoxData(string text, Type type, double width = 32, double height = 32, Size? desiredSize = null, string description = null) : base(text, null, type, width, height, desiredSize, description)
|
2021-07-23 09:42:22 +08:00
|
|
|
|
{
|
|
|
|
|
|
ColorViewModel.FillColor.Color = Colors.Orange;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public class EllipseTextToolBoxData : ToolBoxData
|
|
|
|
|
|
{
|
2023-01-25 23:55:30 +08:00
|
|
|
|
public EllipseTextToolBoxData(string text, Type type, double width = 32, double height = 32, Size? desiredSize = null, string description = null) : base(text, null, type, width, height, desiredSize, description)
|
2021-07-23 09:42:22 +08:00
|
|
|
|
{
|
|
|
|
|
|
ColorViewModel.FillColor.Color = Colors.Orange;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public class ImageToolBoxData : ToolBoxData
|
|
|
|
|
|
{
|
2023-01-25 23:55:30 +08:00
|
|
|
|
public ImageToolBoxData(string icon, Type type, double width = 32, double height = 32, Size? desiredSize = null, string description = null) : base(null, icon, type, width, height, desiredSize, description)
|
2021-07-23 09:42:22 +08:00
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public class DesignerItemToolBoxData : ToolBoxData
|
|
|
|
|
|
{
|
|
|
|
|
|
public string FileName { get; set; }
|
|
|
|
|
|
public DesignerItemViewModelBase DesignerItemViewModel { get; set; }
|
2023-01-25 23:55:30 +08:00
|
|
|
|
public DesignerItemToolBoxData(DesignerItemBase designerItemBase, string filename, Type type, double width = 32, double height = 32, Size? desiredSize = null, string description = null) : base(null, null, type, width, height, desiredSize, description)
|
2021-07-23 09:42:22 +08:00
|
|
|
|
{
|
|
|
|
|
|
Addition = designerItemBase;
|
2023-01-24 23:10:57 +08:00
|
|
|
|
DesignerItemViewModel = Activator.CreateInstance(type, null, designerItemBase) as DesignerItemViewModelBase;
|
2021-07-23 09:42:22 +08:00
|
|
|
|
FileName = filename;
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public class SvgToolBoxData : ToolBoxData
|
|
|
|
|
|
{
|
2023-01-25 23:55:30 +08:00
|
|
|
|
public SvgToolBoxData(string filename, Type type, double width = 32, double height = 32, Size? desiredSize = null, string description = null) : base(null, filename, type, width, height, desiredSize, description)
|
2021-07-23 09:42:22 +08:00
|
|
|
|
{
|
|
|
|
|
|
ColorViewModel.FillColor.Color = Colors.Blue;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public class MediaToolBoxData : ToolBoxData
|
|
|
|
|
|
{
|
2023-01-25 23:55:30 +08:00
|
|
|
|
public MediaToolBoxData(string icon, Type type, double width = 32, double height = 32, Size? desiredSize = null, string description = null) : base(icon, null, type, width, height, desiredSize, description)
|
2021-07-23 09:42:22 +08:00
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|