mirror of
https://gitee.com/langsisi_admin/serein-flow
synced 2026-04-05 07:46:35 +08:00
补充了Library的注释
This commit is contained in:
@@ -51,15 +51,13 @@ namespace Net462DllTest.LogicControl
|
||||
#region 触发器节点
|
||||
|
||||
[NodeAction(NodeType.Flipflop, "等待变量更新")]
|
||||
public async Task<IFlipflopContext<dynamic>> WaitTask(PlcVarName varName = PlcVarName.ErrorCode)
|
||||
public async Task<IFlipflopContext<object>> WaitTask(PlcVarName varName = PlcVarName.ErrorCode)
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
var triggerData = await MyPlc.CreateTaskAsync<dynamic>(varName);
|
||||
|
||||
var triggerData = await MyPlc.CreateTaskAsync<object>(varName);
|
||||
await Console.Out.WriteLineAsync($"PLC变量触发器[{varName}]传递数据:{triggerData}");
|
||||
return new FlipflopContext<dynamic>(FlipflopStateType.Succeed, triggerData);
|
||||
return new FlipflopContext<object>(FlipflopStateType.Succeed, triggerData);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
@@ -51,18 +51,7 @@ namespace Net462DllTest.LogicControl
|
||||
}
|
||||
|
||||
#endregion
|
||||
//[NodeAction(NodeType.Action, "打开窗体(指定枚举值)")]
|
||||
//public void OpenForm(IDynamicContext context,
|
||||
// FromValue fromId = FromValue.FromWorkBenchView,
|
||||
// bool isTop = true)
|
||||
//{
|
||||
// var fromType = EnumHelper.GetBoundValue<FromValue, Type>(fromId, attr => attr.Value);
|
||||
// if (fromType is null) return;
|
||||
// if (context.Env.IOC.Instantiate(fromType) is Form form)
|
||||
// {
|
||||
// ViewManagement.OpenView(form, isTop);
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
[NodeAction(NodeType.Action, "打开窗体(转换器)")]
|
||||
public void OpenForm2([EnumTypeConvertor(typeof(FromValue))] Form form, bool isTop = true)
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace Net462DllTest.Web
|
||||
[WebApi(ApiType.POST)]
|
||||
public dynamic PlcOp([Url] string var, int value)
|
||||
{
|
||||
if (EnumHelper.TryConvertEnum<PlcVarName>(var,out var signal))
|
||||
if (EnumHelper.TryConvertEnum<PlcVarName>(var, out var signal))
|
||||
{
|
||||
Console.WriteLine($"外部触发 {signal} 信号,信号内容 : {value} ");
|
||||
plcDevice.Trigger(signal, value);// 通过 Web Api 模拟外部输入信号
|
||||
|
||||
Reference in New Issue
Block a user