Files
aistudio-wpf-diagram/AIStudio.Wpf.DiagramApp/Models/PathToolBoxData.cs
2023-01-25 23:55:30 +08:00

75 lines
2.9 KiB
C#

using AIStudio.Wpf.Flowchart;
using AIStudio.Wpf.SFC;
using System;
using System.Windows.Media;
using AIStudio.Wpf.DiagramDesigner;
using AIStudio.Wpf.DiagramDesigner.Helpers;
using System.Windows;
namespace AIStudio.Wpf.DiagramApp.Models
{
public class PathToolBoxData : ToolBoxData
{
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)
{
ColorViewModel.FillColor.Color = Colors.Orange;
}
}
public class TextToolBoxData : ToolBoxData
{
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)
{
ColorViewModel.FillColor.Color = Colors.Orange;
}
}
public class EllipseTextToolBoxData : ToolBoxData
{
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)
{
ColorViewModel.FillColor.Color = Colors.Orange;
}
}
public class ImageToolBoxData : ToolBoxData
{
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)
{
}
}
public class DesignerItemToolBoxData : ToolBoxData
{
public string FileName { get; set; }
public DesignerItemViewModelBase DesignerItemViewModel { get; set; }
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)
{
Addition = designerItemBase;
DesignerItemViewModel = Activator.CreateInstance(type, null, designerItemBase) as DesignerItemViewModelBase;
FileName = filename;
}
}
public class SvgToolBoxData : ToolBoxData
{
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)
{
ColorViewModel.FillColor.Color = Colors.Blue;
}
}
public class MediaToolBoxData : ToolBoxData
{
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)
{
}
}
}