mirror of
https://gitee.com/langsisi_admin/serein-flow
synced 2026-04-27 18:23:23 +08:00
1. 重新设计了Generate项目及相关特性的命名,避免与其他类型混淆。
2. 补充了部分注释。 3. 修改了删除容器节点时,容器内子节点未正确删除的问题。
This commit is contained in:
@@ -18,7 +18,7 @@ namespace Serein.Workbench.Services
|
||||
/// <summary>
|
||||
/// 流程节点管理
|
||||
/// </summary>
|
||||
public class FlowNodeService
|
||||
internal class FlowNodeService
|
||||
{
|
||||
|
||||
|
||||
@@ -120,7 +120,7 @@ namespace Serein.Workbench.Services
|
||||
/// <summary>
|
||||
/// 连接数据
|
||||
/// </summary>
|
||||
public ConnectingData ConnectingData { get; } = new ConnectingData();
|
||||
internal ConnectingData ConnectingData { get; } = new ConnectingData();
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -471,12 +471,12 @@ namespace Serein.Workbench.Services
|
||||
return NodeControls.TryGetValue(nodeGuid, out nodeControl);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 从Guid获取画布视图
|
||||
/// </summary>
|
||||
/// <param name="nodeGuid"></param>
|
||||
/// <param name="nodeControl"></param>
|
||||
/// <param name="flowCanvas"></param>
|
||||
/// <returns></returns>
|
||||
private bool TryGetCanvas(string nodeGuid, out FlowCanvasView flowCanvas)
|
||||
{
|
||||
@@ -643,8 +643,7 @@ namespace Serein.Workbench.Services
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
//SereinEnv.WriteLine(InfoType.ERROR, $"粘贴节点时发生异常:{ex}");
|
||||
SereinEnv.WriteLine(InfoType.ERROR, $"粘贴节点时发生异常:{ex}");
|
||||
}
|
||||
// SereinEnv.WriteLine(InfoType.INFO, $"剪贴板文本内容: {clipboardText}");
|
||||
}
|
||||
|
||||
@@ -11,35 +11,46 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace Serein.Workbench.Services
|
||||
{
|
||||
/// <summary>
|
||||
/// 流程项目服务
|
||||
/// </summary>
|
||||
public class FlowProjectService
|
||||
{
|
||||
private readonly IFlowEnvironment flowEnvironment;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 流程项目服务
|
||||
/// </summary>
|
||||
/// <param name="flowEnvironment"></param>
|
||||
public FlowProjectService(IFlowEnvironment flowEnvironment)
|
||||
{
|
||||
this.flowEnvironment = flowEnvironment;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 启动流程项目管理服务器
|
||||
/// </summary>
|
||||
public void StartProjectManagementServer()
|
||||
{
|
||||
// CollabrationSideManagement
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 加载本地流程项目到当前环境中
|
||||
/// </summary>
|
||||
/// <param name="filePath"></param>
|
||||
public void LoadLocalProject(string filePath)
|
||||
{
|
||||
if (File.Exists(filePath))
|
||||
{
|
||||
/*
|
||||
var dir = Path.GetDirectoryName(filePath);
|
||||
var flowEnvInfo = new FlowEnvInfo
|
||||
{
|
||||
Project = FlowProjectData,
|
||||
};*/
|
||||
flowEnvironment.LoadProject(filePath);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 选择本地流程项目文件并加载到当前环境中
|
||||
/// </summary>
|
||||
public void SelectProjectFile()
|
||||
{
|
||||
System.Windows.Forms.OpenFileDialog openFileDialog = new System.Windows.Forms.OpenFileDialog();
|
||||
|
||||
@@ -10,7 +10,16 @@ using static System.Windows.Forms.AxHost;
|
||||
|
||||
namespace Serein.Workbench.Services
|
||||
{
|
||||
/// <summary>
|
||||
/// 全局按键事件委托
|
||||
/// </summary>
|
||||
/// <param name="key"></param>
|
||||
public delegate void KeyDownEventHandler(Key key);
|
||||
|
||||
/// <summary>
|
||||
/// 全局按键抬起事件委托
|
||||
/// </summary>
|
||||
/// <param name="key"></param>
|
||||
public delegate void KeyUpEventHandler(Key key);
|
||||
|
||||
/// <summary>
|
||||
@@ -18,7 +27,14 @@ namespace Serein.Workbench.Services
|
||||
/// </summary>
|
||||
public interface IKeyEventService
|
||||
{
|
||||
/// <summary>
|
||||
/// 按键按下事件
|
||||
/// </summary>
|
||||
event KeyDownEventHandler OnKeyDown;
|
||||
|
||||
/// <summary>
|
||||
/// 按键抬起事件
|
||||
/// </summary>
|
||||
event KeyUpEventHandler OnKeyUp;
|
||||
|
||||
/// <summary>
|
||||
@@ -56,6 +72,9 @@ namespace Serein.Workbench.Services
|
||||
/// </summary>
|
||||
public event KeyUpEventHandler OnKeyUp;
|
||||
|
||||
/// <summary>
|
||||
/// 全局按键事件服务构造函数
|
||||
/// </summary>
|
||||
public KeyEventService()
|
||||
{
|
||||
var arr = Enum.GetValues<Key>();
|
||||
@@ -66,6 +85,12 @@ namespace Serein.Workbench.Services
|
||||
}
|
||||
|
||||
private readonly bool[] KeysState;
|
||||
|
||||
/// <summary>
|
||||
/// 获取某个按键的状态
|
||||
/// </summary>
|
||||
/// <param name="key"></param>
|
||||
/// <returns></returns>
|
||||
public bool GetKeyState(Key key)
|
||||
{
|
||||
return KeysState[(int)key];
|
||||
@@ -73,7 +98,10 @@ namespace Serein.Workbench.Services
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 按键按下事件
|
||||
/// </summary>
|
||||
/// <param name="key"></param>
|
||||
public void KeyDown(Key key)
|
||||
{
|
||||
KeysState[(int)key] = true;
|
||||
@@ -81,6 +109,10 @@ namespace Serein.Workbench.Services
|
||||
//Debug.WriteLine($"按键按下事件:{key}");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 按键抬起事件
|
||||
/// </summary>
|
||||
/// <param name="key"></param>
|
||||
public void KeyUp(Key key)
|
||||
{
|
||||
KeysState[(int)key] = false;
|
||||
|
||||
Reference in New Issue
Block a user