Files
aistudio-wpf-diagram/AIStudio.Wpf.DiagramDesigner/Models/ToolBoxData.cs

115 lines
2.5 KiB
C#
Raw Normal View History

2021-07-23 09:42:22 +08:00
using System;
using System.Collections.Generic;
2023-07-08 17:22:55 +08:00
using System.Collections.ObjectModel;
2021-07-23 09:42:22 +08:00
using System.Linq;
using System.Text;
2022-12-04 23:07:20 +08:00
using System.Windows;
2021-07-23 09:42:22 +08:00
2023-01-12 23:02:53 +08:00
namespace AIStudio.Wpf.DiagramDesigner
2021-07-23 09:42:22 +08:00
{
2023-07-09 21:03:35 +08:00
public class ToolBoxData : BindableBase
2021-07-23 09:42:22 +08:00
{
2023-07-09 21:03:35 +08:00
public virtual string Text
2023-01-25 23:55:30 +08:00
{
get; protected set;
}
public string Icon
{
get; protected set;
}
public Type Type
{
get; protected set;
}
public IColorViewModel ColorViewModel
{
get; set;
}
public double Width
{
get; set;
}
public double Height
{
get; set;
}
public Size? DesiredSize
{
get; set;
}
public Size? DesiredMinSize
{
get; set;
}
2023-01-25 23:55:30 +08:00
public string Description
{
get; set;
}
2021-07-23 09:42:22 +08:00
2023-01-25 23:55:30 +08:00
public object Addition
{
get; set;
}
2021-07-23 09:42:22 +08:00
public ToolBoxData(string text, string icon, Type type, double width, double height, Size? desiredSize = null, Size? desiredMinSize = null, string description = null)
2021-07-23 09:42:22 +08:00
{
this.Text = text;
this.Icon = icon;
this.Type = type;
this.Width = width;
2022-12-04 23:07:20 +08:00
this.Height = height;
this.DesiredSize = desiredSize;
this.DesiredMinSize = desiredMinSize;
2021-07-23 09:42:22 +08:00
this.ColorViewModel = new ColorViewModel();
2023-01-25 23:55:30 +08:00
this.Description = description;
2021-07-23 09:42:22 +08:00
}
}
2023-07-08 17:22:55 +08:00
public class ToolBoxCategory : BindableBase
{
public string Header
{
get; set;
}
private bool _isExpanded;
public bool IsExpanded
{
get
{
return _isExpanded;
}
set
{
SetProperty(ref _isExpanded, value);
}
}
private bool _isChecked = true;
public bool IsChecked
{
get
{
return _isChecked;
}
set
{
SetProperty(ref _isChecked, value);
}
}
private ObservableCollection<ToolBoxData> _toolBoxItems;
public ObservableCollection<ToolBoxData> ToolBoxItems
{
get
{
return _toolBoxItems;
}
set
{
SetProperty(ref _toolBoxItems, value);
}
}
}
2021-07-23 09:42:22 +08:00
}