mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-04-05 08:46:34 +08:00
Revert "Revert "block 可以拖拽到内部,还有少量问题待解决""
This reverts commit fcd7beb193.
This commit is contained in:
138
Extensions/AIStudio.Wpf.Block/Models/BlockType.cs
Normal file
138
Extensions/AIStudio.Wpf.Block/Models/BlockType.cs
Normal file
@@ -0,0 +1,138 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AIStudio.Wpf.Block.Models
|
||||
{
|
||||
public enum BlockType
|
||||
{
|
||||
//运动
|
||||
[Description("移动")]
|
||||
Move,
|
||||
[Description("右转")]
|
||||
TurnRight,
|
||||
[Description("左转")]
|
||||
TurnLeft,
|
||||
[Description("移到")]
|
||||
MoveTo,
|
||||
[Description("移到坐标")]
|
||||
MoveToPoint,
|
||||
[Description("在几s内移到")]
|
||||
TimeMoveTo,
|
||||
[Description("在几s内移到坐标")]
|
||||
TimeMoveToPoint,
|
||||
[Description("面向方向")]
|
||||
FaceTo,
|
||||
[Description("面向鼠标")]
|
||||
FaceToMouse,
|
||||
[Description("将X坐标增加")]
|
||||
PointXAdd,
|
||||
[Description("将X坐标设为")]
|
||||
PointXSet,
|
||||
[Description("将Y坐标增加")]
|
||||
PointYAdd,
|
||||
[Description("将Y坐标设为")]
|
||||
PointYSet,
|
||||
[Description("碰到边缘就反弹")]
|
||||
BorderBounce,
|
||||
[Description("旋转方式")]
|
||||
RotationMethod,
|
||||
[Description("X坐标")]
|
||||
PointX,
|
||||
[Description("Y坐标")]
|
||||
PointY,
|
||||
[Description("方向")]
|
||||
Direction,
|
||||
//外观
|
||||
//声音
|
||||
//事件
|
||||
[Description("当开始被点击")]
|
||||
Start,
|
||||
[Description("当键盘按下")]
|
||||
KeyboardPress,
|
||||
[Description("当角色被点击")]
|
||||
WhenRoleClicked,
|
||||
[Description("当背景切换")]
|
||||
WhenBackgroundSwitch,
|
||||
[Description("当大于")]
|
||||
WhenGreaterThan,
|
||||
[Description("当接收到")]
|
||||
WhenReceivedMessage,
|
||||
[Description("广播消息")]
|
||||
BroadcastMessage,
|
||||
[Description("广播消息并等待")]
|
||||
BroadcastMessageAndWaiting,
|
||||
[Description("等待1s")]
|
||||
WaitTime,
|
||||
[Description("循环执行")]
|
||||
For,
|
||||
[Description("一直执行")]
|
||||
Always,
|
||||
[Description("如果")]
|
||||
If,
|
||||
[Description("如果否则")]
|
||||
IfElse,
|
||||
[Description("等待条件")]
|
||||
Wait,
|
||||
[Description("重复执行直到")]
|
||||
While,
|
||||
[Description("停止")]
|
||||
Stop,
|
||||
[Description("克隆")]
|
||||
Clone,
|
||||
[Description("删除此克隆体")]
|
||||
DeleteThisClone,
|
||||
//侦测
|
||||
//运算
|
||||
[Description("加")]
|
||||
Add,
|
||||
[Description("减")]
|
||||
Subtract,
|
||||
[Description("乘")]
|
||||
Multiply,
|
||||
[Description("除")]
|
||||
Division,
|
||||
[Description("除")]
|
||||
Random,
|
||||
[Description("大于")]
|
||||
GreaterThan,
|
||||
[Description("小于")]
|
||||
LessThan,
|
||||
[Description("等于")]
|
||||
EqualThan,
|
||||
[Description("与")]
|
||||
And,
|
||||
[Description("或")]
|
||||
Or,
|
||||
[Description("不成立")]
|
||||
Not,
|
||||
[Description("字符串连接")]
|
||||
StringAdd,
|
||||
[Description("第几个字符")]
|
||||
StringIndex,
|
||||
[Description("字符数")]
|
||||
StringLength,
|
||||
[Description("包含")]
|
||||
StringContain,
|
||||
[Description("余数")]
|
||||
Mod,
|
||||
[Description("四舍五入")]
|
||||
Round,
|
||||
[Description("绝对值")]
|
||||
Abs,
|
||||
//变量
|
||||
[Description("变量")]
|
||||
Variable,
|
||||
[Description("设为")]
|
||||
SetValue,
|
||||
[Description("增加")]
|
||||
Increase,
|
||||
[Description("显示变量")]
|
||||
VariableVisable,
|
||||
[Description("隐藏变量")]
|
||||
VariableHidden,
|
||||
}
|
||||
}
|
||||
16
Extensions/AIStudio.Wpf.Block/Models/ConstParameter.cs
Normal file
16
Extensions/AIStudio.Wpf.Block/Models/ConstParameter.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AIStudio.Wpf.Block.Models
|
||||
{
|
||||
public class ConstParameter : IParameter
|
||||
{
|
||||
public double? Value
|
||||
{
|
||||
get;set;
|
||||
}
|
||||
}
|
||||
}
|
||||
16
Extensions/AIStudio.Wpf.Block/Models/IParameter.cs
Normal file
16
Extensions/AIStudio.Wpf.Block/Models/IParameter.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AIStudio.Wpf.Block.Models
|
||||
{
|
||||
public interface IParameter
|
||||
{
|
||||
//double Value
|
||||
//{
|
||||
// get;
|
||||
//}
|
||||
}
|
||||
}
|
||||
13
Extensions/AIStudio.Wpf.Block/Models/VarParameter.cs
Normal file
13
Extensions/AIStudio.Wpf.Block/Models/VarParameter.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AIStudio.Wpf.Block.Models
|
||||
{
|
||||
public class VarParameter : IParameter
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user