mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-04-08 10:16:36 +08:00
使用PointBase代替Point
This commit is contained in:
17
AIStudio.Wpf.DiagramDesigner/Models/ConnectorInfo.cs
Normal file
17
AIStudio.Wpf.DiagramDesigner/Models/ConnectorInfo.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using AIStudio.Wpf.DiagramDesigner.Geometry;
|
||||
|
||||
namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
public struct ConnectorInfo
|
||||
{
|
||||
public double DesignerItemLeft { get; set; }
|
||||
public double DesignerItemTop { get; set; }
|
||||
public SizeBase DesignerItemSize { get; set; }
|
||||
public PointBase Position { get; set; }
|
||||
public ConnectorOrientation Orientation { get; set; }
|
||||
}
|
||||
}
|
||||
18
AIStudio.Wpf.DiagramDesigner/Models/DragObject.cs
Normal file
18
AIStudio.Wpf.DiagramDesigner/Models/DragObject.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows;
|
||||
|
||||
namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
// Wraps info of the dragged object into a class
|
||||
public class DragObject
|
||||
{
|
||||
public Size? DesiredSize { get; set; }
|
||||
public Type ContentType { get; set; }
|
||||
public string Icon { get; set; }
|
||||
public IColorViewModel ColorViewModel { get; set; }
|
||||
public DesignerItemBase DesignerItem { get; set; }
|
||||
}
|
||||
}
|
||||
25
AIStudio.Wpf.DiagramDesigner/Models/EventToCommandArgs.cs
Normal file
25
AIStudio.Wpf.DiagramDesigner/Models/EventToCommandArgs.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Input;
|
||||
|
||||
namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
public class EventToCommandArgs
|
||||
{
|
||||
public Object Sender { get; private set; }
|
||||
public ICommand CommandRan { get; private set; }
|
||||
public Object CommandParameter { get; private set; }
|
||||
public EventArgs EventArgs { get; private set; }
|
||||
|
||||
public EventToCommandArgs(Object sender, ICommand commandRan, Object commandParameter, EventArgs eventArgs)
|
||||
{
|
||||
this.Sender = sender;
|
||||
this.CommandRan = commandRan;
|
||||
this.CommandParameter = commandParameter;
|
||||
this.EventArgs = eventArgs;
|
||||
}
|
||||
}
|
||||
}
|
||||
32
AIStudio.Wpf.DiagramDesigner/Models/ToolBoxData.cs
Normal file
32
AIStudio.Wpf.DiagramDesigner/Models/ToolBoxData.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows;
|
||||
|
||||
namespace AIStudio.Wpf.DiagramDesigner.Helpers
|
||||
{
|
||||
public class ToolBoxData
|
||||
{
|
||||
public string Text { 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 object Addition { get; set; }
|
||||
|
||||
public ToolBoxData(string text, string icon, Type type, double width, double height, Size? desiredSize = null)
|
||||
{
|
||||
this.Text = text;
|
||||
this.Icon = icon;
|
||||
this.Type = type;
|
||||
this.Width = width;
|
||||
this.Height = height;
|
||||
this.DesiredSize = desiredSize;
|
||||
this.ColorViewModel = new ColorViewModel();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user