init: 导入项目到 meswork Gitea
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class CallbackBsae
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
private event Action<String> execmsg;
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="msg"></param>
|
||||
public void invoke(string msg)
|
||||
{
|
||||
Action<String> ExecMsgT = execmsg;
|
||||
if (ExecMsgT != null)
|
||||
{
|
||||
ExecMsgT(msg);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
public class CallbackObjectFromJs : CallbackBsae
|
||||
{
|
||||
public event Action<String> ExecMsg;
|
||||
|
||||
public CallbackObjectFromJs()
|
||||
{
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 必须小写
|
||||
/// </summary>
|
||||
/// <param name="msg"></param>
|
||||
public void receivemsg(string msg)
|
||||
{
|
||||
this.Invoke(msg);
|
||||
}
|
||||
|
||||
private void Invoke(string msg)
|
||||
{
|
||||
Action<String> ExecMsgT = ExecMsg;
|
||||
if (ExecMsgT != null)
|
||||
{
|
||||
ExecMsgT(msg);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
~CallbackObjectFromJs()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
511
DataMirrorTools_Simulator/Foundation/ModelBasic/ErrHandler.cs
Normal file
511
DataMirrorTools_Simulator/Foundation/ModelBasic/ErrHandler.cs
Normal file
@@ -0,0 +1,511 @@
|
||||
using Global;
|
||||
using LogNet;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
namespace ModelBasic
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
public class ErrHandler<T> : Error<T>, IErrHandler<T>
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 工艺树刷新
|
||||
/// </summary>
|
||||
public Action refreshCraftTree
|
||||
{
|
||||
get;
|
||||
set;
|
||||
} = null;
|
||||
/// <summary>
|
||||
/// 传递工艺组
|
||||
/// </summary>
|
||||
public Func<String, Int32, bool> transmitCraftGroup
|
||||
{
|
||||
get;
|
||||
set;
|
||||
} = null;
|
||||
/// <summary>
|
||||
/// 传递模型名
|
||||
/// </summary>
|
||||
public Func<String, Int32, bool> transmitModelName
|
||||
{
|
||||
get;
|
||||
set;
|
||||
} = null;
|
||||
/// <summary>
|
||||
/// 非仿真工艺(空工艺),工艺组的传递
|
||||
/// </summary>
|
||||
public Func<String, Int32, bool> transmitCraftGroup_UnSim
|
||||
{
|
||||
get;
|
||||
set;
|
||||
} = null;
|
||||
/// <summary>
|
||||
/// (位置控制器)关闭
|
||||
/// </summary>
|
||||
public Func<bool> closeSeatOperationForm
|
||||
{
|
||||
get;
|
||||
set;
|
||||
} = null;
|
||||
/// <summary>
|
||||
/// (位置控制器)选择模型发送消息
|
||||
/// </summary>
|
||||
public Func<Int32, String, bool> currTreeSelectModelHandler_SeatOperation
|
||||
{
|
||||
get;
|
||||
set;
|
||||
} = null;
|
||||
|
||||
/// <summary>
|
||||
/// 传递逻辑脚本名称
|
||||
/// </summary>
|
||||
public static Func<Int32, String, bool> transitionEditorPageScriptNameUpdate
|
||||
{
|
||||
get;
|
||||
set;
|
||||
} = null;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 浏览器发送
|
||||
/// 20200916
|
||||
/// </summary>
|
||||
private static Action<String> cefSend
|
||||
{
|
||||
get;
|
||||
set;
|
||||
} = null;
|
||||
/// <summary>
|
||||
/// 浏览器接收
|
||||
/// 20200916
|
||||
/// </summary>
|
||||
private static Action<String> cefRec
|
||||
{
|
||||
get;
|
||||
set;
|
||||
} = null;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 传递项目名称
|
||||
/// 2020.11.2
|
||||
/// </summary>
|
||||
public static Func<String, Boolean> projectNameFunc
|
||||
{
|
||||
get;
|
||||
set;
|
||||
} = null;
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 工艺树刷新
|
||||
/// </summary>
|
||||
public void RefreshCraftTree()
|
||||
{
|
||||
if (refreshCraftTree != null)
|
||||
{
|
||||
refreshCraftTree();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 传递工艺组
|
||||
/// </summary>
|
||||
/// <param name="craftName"></param>
|
||||
/// <param name="craftCode"></param>
|
||||
public void TransmitCraftGroup(string craftName, int craftCode)
|
||||
{
|
||||
if (transmitCraftGroup != null)
|
||||
{
|
||||
transmitCraftGroup.Invoke(craftName, craftCode);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 传递模型名
|
||||
/// </summary>
|
||||
/// <param name="modelName"></param>
|
||||
/// <param name="modelCode"></param>
|
||||
public void TransmitModelName(string modelName, int modelCode)
|
||||
{
|
||||
if (transmitModelName != null)
|
||||
{
|
||||
transmitModelName.Invoke(modelName, modelCode);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 非仿真工艺(空工艺),工艺组的传递
|
||||
/// </summary>
|
||||
/// <param name="craftName"></param>
|
||||
/// <param name="craftCode"></param>
|
||||
public void TransmitCraftGroup_UnSim(string craftName, int craftCode)
|
||||
{
|
||||
if (transmitCraftGroup_UnSim != null)
|
||||
{
|
||||
transmitCraftGroup_UnSim.Invoke(craftName, craftCode);
|
||||
}
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// ErrInfoTransmit
|
||||
/// </summary>
|
||||
/// <param name="s"></param>
|
||||
public void ErrInfoTransmit(string s)
|
||||
{
|
||||
if (errInfoTransmit != null)
|
||||
{
|
||||
LogisTrac.WriteLog("", s);
|
||||
|
||||
errInfoTransmit.Invoke(s);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// (位置控制器)关闭
|
||||
/// </summary>
|
||||
public void CloseSeatOperationForm()
|
||||
{
|
||||
if (closeSeatOperationForm != null)
|
||||
{
|
||||
closeSeatOperationForm.Invoke();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// (位置控制器)选择模型发送消息
|
||||
/// </summary>
|
||||
/// <param name="modelName"></param>
|
||||
public void CurrTreeSelectModelHandler_SeatOperation(int modelCode, string modelName)
|
||||
{
|
||||
if (currTreeSelectModelHandler_SeatOperation != null)
|
||||
{
|
||||
currTreeSelectModelHandler_SeatOperation.Invoke(modelCode, modelName);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 传递逻辑脚本名称
|
||||
/// </summary>
|
||||
/// <param name="modelName"></param>
|
||||
public void TransitionEditorPageScriptNameUpdate(int internalVarCode, string internalVarName)
|
||||
{
|
||||
if (transitionEditorPageScriptNameUpdate != null)
|
||||
{
|
||||
transitionEditorPageScriptNameUpdate.Invoke(internalVarCode, internalVarName);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 发送到浏览器
|
||||
/// 20200916
|
||||
/// </summary>
|
||||
/// <param name="str"></param>
|
||||
public static void CefSend(string str)
|
||||
{
|
||||
if (cefSend != null)
|
||||
{
|
||||
cefSend.Invoke(str);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 浏览器接收
|
||||
/// 20200916
|
||||
/// </summary>
|
||||
/// <param name="str"></param>
|
||||
public static void CefRec(string str)
|
||||
{
|
||||
if (cefRec != null)
|
||||
{
|
||||
cefRec.Invoke(str);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 传递项目名称 执行
|
||||
/// 2020.11.2
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static void ProjectNameFunc(string projectName)
|
||||
{
|
||||
if (projectNameFunc != null)
|
||||
projectNameFunc.Invoke(projectName);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 工艺树刷新 赋予
|
||||
/// </summary>
|
||||
public void RefreshCraftTree_Give(Action f)
|
||||
{
|
||||
refreshCraftTree = f;
|
||||
}
|
||||
/// <summary>
|
||||
/// 传递工艺组 赋予
|
||||
/// </summary>
|
||||
/// <param name="craftName"></param>
|
||||
/// <param name="craftCode"></param>
|
||||
public void TransmitCraftGroup_Give(Func<String, Int32, bool> f)
|
||||
{
|
||||
transmitCraftGroup = f;
|
||||
}
|
||||
/// <summary>
|
||||
/// ErrInfoTransmit_Give
|
||||
/// </summary>
|
||||
/// <param name="f"></param>
|
||||
public void ErrInfoTransmit_Give(ErrInfoHandler<String> f)
|
||||
{
|
||||
ErrInfoHandler<String> func = f;
|
||||
if (errInfoTransmit == null)
|
||||
{
|
||||
errInfoTransmit = func;
|
||||
}
|
||||
else
|
||||
{
|
||||
errInfoTransmit = f;
|
||||
}
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 传递模型名 赋予
|
||||
/// </summary>
|
||||
/// <param name="modelName"></param>
|
||||
/// <param name="modelCode"></param>
|
||||
public void TransmitModelName_Give(Func<String, Int32, bool> f)
|
||||
{
|
||||
transmitModelName = f;
|
||||
}
|
||||
/// <summary>
|
||||
/// 非仿真工艺(空工艺),工艺组的传递 赋予
|
||||
/// </summary>
|
||||
/// <param name="craftName"></param>
|
||||
/// <param name="craftCode"></param>
|
||||
public void TransmitCraftGroup_UnSim_Give(Func<String, Int32, bool> f)
|
||||
{
|
||||
transmitCraftGroup_UnSim = f;
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// (位置控制器)关闭 赋予
|
||||
/// </summary>
|
||||
public void CloseSeatOperationForm_Give(Func<bool> f)
|
||||
{
|
||||
closeSeatOperationForm = f;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// (位置控制器)选择模型发送消息 赋予
|
||||
/// </summary>
|
||||
/// <param name="modelName"></param>
|
||||
public void CurrTreeSelectModelHandler_SeatOperation_Give(Func<Int32, String, bool> f)
|
||||
{
|
||||
currTreeSelectModelHandler_SeatOperation = f;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 传递逻辑脚本名称 赋予
|
||||
/// </summary>
|
||||
/// <param name="f"></param>
|
||||
public void TransitionEditorPageScriptNameUpdate_Give(Func<Int32, String, bool> f)
|
||||
{
|
||||
transitionEditorPageScriptNameUpdate = f;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 发送到浏览器 赋予
|
||||
/// 20200916
|
||||
/// </summary>
|
||||
/// <param name="str"></param>
|
||||
public static void CefSend_Give(Action<String> f)
|
||||
{
|
||||
cefSend = f;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 浏览器接收 赋予
|
||||
/// 20200916
|
||||
/// </summary>
|
||||
/// <param name="str"></param>
|
||||
public static void CefRec_Give(Action<String> f)
|
||||
{
|
||||
cefRec = f;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 传递项目名称 赋予
|
||||
/// 2020.11.2
|
||||
/// </summary>
|
||||
/// <param name="f"></param>
|
||||
public static void ProjectNameFunc_Give(Func<String, Boolean> f)
|
||||
{
|
||||
projectNameFunc = f;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 工艺树刷新 判断
|
||||
/// </summary>
|
||||
public bool RefreshCraftTree_IsNull()
|
||||
{
|
||||
if (refreshCraftTree == null)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
/// <summary>
|
||||
/// 传递工艺组 判断
|
||||
/// </summary>
|
||||
/// <param name="craftName"></param>
|
||||
/// <param name="craftCode"></param>
|
||||
public bool TransmitCraftGroup_IsNull()
|
||||
{
|
||||
if (transmitCraftGroup == null)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
/// <summary>
|
||||
/// 传递模型名 判断
|
||||
/// </summary>
|
||||
/// <param name="modelName"></param>
|
||||
/// <param name="modelCode"></param>
|
||||
public bool TransmitModelName_IsNull()
|
||||
{
|
||||
if (transmitModelName == null)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
/// <summary>
|
||||
/// 非仿真工艺(空工艺),工艺组的传递 判断
|
||||
/// </summary>
|
||||
/// <param name="craftName"></param>
|
||||
/// <param name="craftCode"></param>
|
||||
public bool TransmitCraftGroup_UnSim_IsNull()
|
||||
{
|
||||
if (transmitCraftGroup_UnSim == null)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// (位置控制器)关闭 判断
|
||||
/// </summary>
|
||||
public bool CloseSeatOperationForm_IsNull()
|
||||
{
|
||||
if (closeSeatOperationForm == null)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
/// <summary>
|
||||
/// (位置控制器)选择模型发送消息 判断
|
||||
/// </summary>
|
||||
/// <param name="modelName"></param>
|
||||
public bool CurrTreeSelectModelHandler_SeatOperation_IsNull()
|
||||
{
|
||||
if (currTreeSelectModelHandler_SeatOperation == null)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 传递逻辑脚本名称 判断
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public bool TransitionEditorPageScriptNameUpdate_IsNull()
|
||||
{
|
||||
if (transitionEditorPageScriptNameUpdate == null)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 发送到浏览器 判断
|
||||
/// 20200916
|
||||
/// </summary>
|
||||
/// <param name="str"></param>
|
||||
public static bool CefSend_IsNull()
|
||||
{
|
||||
if (cefSend == null)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 浏览器接收 判断
|
||||
/// 20200916
|
||||
/// </summary>
|
||||
/// <param name="str"></param>
|
||||
public static bool CefRec_IsNull()
|
||||
{
|
||||
if (cefRec == null)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 传递项目名称 判断
|
||||
/// 2020.11.2
|
||||
/// </summary>
|
||||
/// <param name="f"></param>
|
||||
public static bool ProjectNameFunc_IsNull()
|
||||
{
|
||||
if (projectNameFunc == null)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public bool ErrInfoTransmit_IsNull()
|
||||
{
|
||||
bool b = false;
|
||||
if (errInfoTransmit == null)
|
||||
{
|
||||
b = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
b = false;
|
||||
}
|
||||
return b;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
22
DataMirrorTools_Simulator/Foundation/ModelBasic/Error.cs
Normal file
22
DataMirrorTools_Simulator/Foundation/ModelBasic/Error.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ModelBasic
|
||||
{
|
||||
public class Error<T>
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
// T t = default;
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public ErrInfoHandler<String> errInfoTransmit = null;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ModelBasic
|
||||
{
|
||||
public class ErrDef
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 错误消息列表的接口
|
||||
/// </summary>
|
||||
public static IErrHandler<String> iErrHandler = null;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
12
DataMirrorTools_Simulator/Foundation/ModelBasic/InitVar.cs
Normal file
12
DataMirrorTools_Simulator/Foundation/ModelBasic/InitVar.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using Global;
|
||||
/// <summary>
|
||||
/// InitVar
|
||||
/// </summary>
|
||||
public class InitVar
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ModelBasic
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class NewIProjectVar
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
480
DataMirrorTools_Simulator/Foundation/ModelBasic/ProjectVar.cs
Normal file
480
DataMirrorTools_Simulator/Foundation/ModelBasic/ProjectVar.cs
Normal file
@@ -0,0 +1,480 @@
|
||||
using ModelBasic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Global
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class ProjectVar : TheVar
|
||||
{
|
||||
/// <summary>
|
||||
/// 浏览器发送
|
||||
/// 20200916
|
||||
/// </summary>
|
||||
private static Action<String> cefSend
|
||||
{
|
||||
get;
|
||||
set;
|
||||
} = null;
|
||||
/// <summary>
|
||||
/// 浏览器接收
|
||||
/// 20200916
|
||||
/// </summary>
|
||||
private static Action<String> cefRec
|
||||
{
|
||||
get;
|
||||
set;
|
||||
} = null;
|
||||
|
||||
/// <summary>
|
||||
/// 工艺树刷新
|
||||
/// </summary>
|
||||
public void RefreshCraftTree()
|
||||
{
|
||||
if (refreshCraftTree != null)
|
||||
{
|
||||
refreshCraftTree();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 传递工艺组
|
||||
/// </summary>
|
||||
/// <param name="craftName"></param>
|
||||
/// <param name="craftCode"></param>
|
||||
public void TransmitCraftGroup(string craftName, string craftCode)
|
||||
{
|
||||
if (transmitCraftGroup != null)
|
||||
{
|
||||
transmitCraftGroup.Invoke(craftName, craftCode);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 传递模型名
|
||||
/// </summary>
|
||||
/// <param name="modelName"></param>
|
||||
/// <param name="modelCode"></param>
|
||||
public void TransmitModelName(string modelName, string modelCode)
|
||||
{
|
||||
if (transmitModelName != null)
|
||||
{
|
||||
transmitModelName.Invoke(modelName, modelCode);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 非仿真工艺(空工艺),工艺组的传递
|
||||
/// </summary>
|
||||
/// <param name="craftName"></param>
|
||||
/// <param name="craftCode"></param>
|
||||
public void TransmitCraftGroup_UnSim(string craftName, string craftCode)
|
||||
{
|
||||
if (transmitCraftGroup_UnSim != null)
|
||||
{
|
||||
transmitCraftGroup_UnSim.Invoke(craftName, craftCode);
|
||||
}
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// (位置控制器)关闭
|
||||
/// </summary>
|
||||
public void CloseSeatOperationForm()
|
||||
{
|
||||
if (closeSeatOperationForm != null)
|
||||
{
|
||||
closeSeatOperationForm.Invoke();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// (位置控制器)选择模型发送消息
|
||||
/// </summary>
|
||||
/// <param name="modelName"></param>
|
||||
public void CurrTreeSelectModelHandler_SeatOperation(string modelCode, string modelName)
|
||||
{
|
||||
if (currTreeSelectModelHandler_SeatOperation != null)
|
||||
{
|
||||
currTreeSelectModelHandler_SeatOperation.Invoke(modelCode, modelName);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 传递逻辑脚本名称
|
||||
/// </summary>
|
||||
/// <param name="modelName"></param>
|
||||
public void TransitionEditorPageScriptNameUpdate(string internalVarCode, string internalVarName)
|
||||
{
|
||||
if (transitionEditorPageScriptNameUpdate != null)
|
||||
{
|
||||
transitionEditorPageScriptNameUpdate.Invoke(internalVarCode, internalVarName);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 发送到浏览器
|
||||
/// 20200916
|
||||
/// </summary>
|
||||
/// <param name="str"></param>
|
||||
public static void CefSend(string str)
|
||||
{
|
||||
if (cefSend != null)
|
||||
{
|
||||
cefSend.Invoke(str);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 浏览器接收
|
||||
/// 20200916
|
||||
/// </summary>
|
||||
/// <param name="str"></param>
|
||||
public static void CefRec(string str)
|
||||
{
|
||||
if (cefRec != null)
|
||||
{
|
||||
cefRec.Invoke(str);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 工艺树刷新 赋予
|
||||
/// </summary>
|
||||
public void RefreshCraftTree_Give(Action f)
|
||||
{
|
||||
refreshCraftTree = f;
|
||||
}
|
||||
/// <summary>
|
||||
/// 传递工艺组 赋予
|
||||
/// </summary>
|
||||
/// <param name="craftName"></param>
|
||||
/// <param name="craftCode"></param>
|
||||
public void TransmitCraftGroup_Give(Func<String, String, bool> f)
|
||||
{
|
||||
transmitCraftGroup = f;
|
||||
}
|
||||
/// <summary>
|
||||
/// 传递模型名 赋予
|
||||
/// </summary>
|
||||
/// <param name="modelName"></param>
|
||||
/// <param name="modelCode"></param>
|
||||
public void TransmitModelName_Give(Func<String, String, bool> f)
|
||||
{
|
||||
transmitModelName = f;
|
||||
}
|
||||
/// <summary>
|
||||
/// 非仿真工艺(空工艺),工艺组的传递 赋予
|
||||
/// </summary>
|
||||
/// <param name="craftName"></param>
|
||||
/// <param name="craftCode"></param>
|
||||
public void TransmitCraftGroup_UnSim_Give(Func<String, String, bool> f)
|
||||
{
|
||||
transmitCraftGroup_UnSim = f;
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// (位置控制器)关闭 赋予
|
||||
/// </summary>
|
||||
public void CloseSeatOperationForm_Give(Func<bool> f)
|
||||
{
|
||||
closeSeatOperationForm = f;
|
||||
}
|
||||
/// <summary>
|
||||
/// (位置控制器)选择模型发送消息 赋予
|
||||
/// </summary>
|
||||
/// <param name="modelName"></param>
|
||||
public void CurrTreeSelectModelHandler_SeatOperation_Give(Func<String, String, bool> f)
|
||||
{
|
||||
currTreeSelectModelHandler_SeatOperation = f;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 传递逻辑脚本名称 赋予
|
||||
/// </summary>
|
||||
/// <param name="f"></param>
|
||||
public void TransitionEditorPageScriptNameUpdate_Give(Func<String, String, bool> f)
|
||||
{
|
||||
transitionEditorPageScriptNameUpdate = f;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 发送到浏览器 赋予
|
||||
/// 20200916
|
||||
/// </summary>
|
||||
/// <param name="str"></param>
|
||||
public static void CefSend_Give(Action<String> f)
|
||||
{
|
||||
cefSend = f;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 浏览器接收 赋予
|
||||
/// 20200916
|
||||
/// </summary>
|
||||
/// <param name="str"></param>
|
||||
public static void CefRec_Give(Action<String> f)
|
||||
{
|
||||
cefRec = f;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 工艺树刷新 判断
|
||||
/// </summary>
|
||||
public bool RefreshCraftTree_IsNull()
|
||||
{
|
||||
if (refreshCraftTree == null)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
/// <summary>
|
||||
/// 传递工艺组 判断
|
||||
/// </summary>
|
||||
/// <param name="craftName"></param>
|
||||
/// <param name="craftCode"></param>
|
||||
public bool TransmitCraftGroup_IsNull()
|
||||
{
|
||||
if (transmitCraftGroup == null)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
/// <summary>
|
||||
/// 传递模型名 判断
|
||||
/// </summary>
|
||||
/// <param name="modelName"></param>
|
||||
/// <param name="modelCode"></param>
|
||||
public bool TransmitModelName_IsNull()
|
||||
{
|
||||
if (transmitModelName == null)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
/// <summary>
|
||||
/// 非仿真工艺(空工艺),工艺组的传递 判断
|
||||
/// </summary>
|
||||
/// <param name="craftName"></param>
|
||||
/// <param name="craftCode"></param>
|
||||
public bool TransmitCraftGroup_UnSim_IsNull()
|
||||
{
|
||||
if (transmitCraftGroup_UnSim == null)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// (位置控制器)关闭 判断
|
||||
/// </summary>
|
||||
public bool CloseSeatOperationForm_IsNull()
|
||||
{
|
||||
if (closeSeatOperationForm == null)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
/// <summary>
|
||||
/// (位置控制器)选择模型发送消息 判断
|
||||
/// </summary>
|
||||
/// <param name="modelName"></param>
|
||||
public bool CurrTreeSelectModelHandler_SeatOperation_IsNull()
|
||||
{
|
||||
if (currTreeSelectModelHandler_SeatOperation == null)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 传递逻辑脚本名称 判断
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public bool TransitionEditorPageScriptNameUpdate_IsNull()
|
||||
{
|
||||
if (transitionEditorPageScriptNameUpdate == null)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 发送到浏览器 判断
|
||||
/// 20200916
|
||||
/// </summary>
|
||||
/// <param name="str"></param>
|
||||
public static bool CefSend_IsNull()
|
||||
{
|
||||
if (cefSend == null)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 浏览器接收 判断
|
||||
/// 20200916
|
||||
/// </summary>
|
||||
/// <param name="str"></param>
|
||||
public static bool CefRec_IsNull()
|
||||
{
|
||||
if (cefRec == null)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 传递项目名称
|
||||
/// 2020.11.2
|
||||
/// </summary>
|
||||
public Func<String, Boolean> projectNameFunc
|
||||
{
|
||||
get;
|
||||
set;
|
||||
} = null;
|
||||
|
||||
/// <summary>
|
||||
/// 传递项目名称
|
||||
/// 2020.11.2
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public void ProjectNameFunc(string projectName)
|
||||
{
|
||||
|
||||
if (projectNameFunc != null)
|
||||
{
|
||||
projectNameFunc.Invoke(projectName);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 传递项目名称 赋予
|
||||
/// 2020.11.2
|
||||
/// </summary>
|
||||
/// <param name="f"></param>
|
||||
public void ProjectNameFunc_Give(Func<String, Boolean> f)
|
||||
{
|
||||
projectNameFunc = f;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 传递项目名称 判断
|
||||
/// 2020.11.2
|
||||
/// </summary>
|
||||
/// <param name="f"></param>
|
||||
public bool ProjectNameFunc_IsNull()
|
||||
{
|
||||
if (projectNameFunc == null)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public ShowMainProgressSet showMainProgressSet
|
||||
{
|
||||
get;
|
||||
set;
|
||||
} = null;
|
||||
public ShowMainProgress showMainProgress
|
||||
{
|
||||
get;
|
||||
set;
|
||||
} = null;
|
||||
|
||||
public ShowMainProgressCountPer showMainProgressCountPer
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
public bool ShowMainProgressSet_IsNull(string n, int m)
|
||||
{
|
||||
bool b = false;
|
||||
if (showMainProgressSet == null)
|
||||
{
|
||||
b = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
b = false;
|
||||
}
|
||||
return b;
|
||||
}
|
||||
|
||||
public bool ShowMainProgress_IsNull(int c)
|
||||
{
|
||||
bool b = false;
|
||||
if (showMainProgress == null)
|
||||
{
|
||||
b = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
b = false;
|
||||
}
|
||||
return b;
|
||||
}
|
||||
public void ShowMainProgressSet_Give(ShowMainProgressSet f)
|
||||
{
|
||||
showMainProgressSet = f;
|
||||
}
|
||||
|
||||
public void ShowMainProgress_Give(ShowMainProgress f)
|
||||
{
|
||||
showMainProgress = f;
|
||||
}
|
||||
public void ShowMainProgress_Give_CountPer(ShowMainProgressCountPer f)
|
||||
{
|
||||
showMainProgressCountPer = f;
|
||||
}
|
||||
|
||||
public void ShowMainProgressSet(string n, int m)
|
||||
{
|
||||
if(showMainProgressSet!=null)
|
||||
{
|
||||
|
||||
}
|
||||
showMainProgressSet.Invoke(n, m);
|
||||
}
|
||||
|
||||
public void ShowMainProgress(int c)
|
||||
{
|
||||
showMainProgress.Invoke(c);
|
||||
}
|
||||
public void ShowMainProgressCountPer(string msg,int c)
|
||||
{
|
||||
showMainProgressCountPer.Invoke(msg,c);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
namespace ModelBasic
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class ProjectVarDef
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// IProjectVar
|
||||
/// </summary>
|
||||
public static Global.IProjectVar iProjectVar = null;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
85
DataMirrorTools_Simulator/Foundation/ModelBasic/TheVar.cs
Normal file
85
DataMirrorTools_Simulator/Foundation/ModelBasic/TheVar.cs
Normal file
@@ -0,0 +1,85 @@
|
||||
using Global;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
namespace ModelBasic
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class TheVar
|
||||
{
|
||||
/// <summary>
|
||||
/// 工艺树刷新
|
||||
/// </summary>
|
||||
public Action refreshCraftTree
|
||||
{
|
||||
get;
|
||||
set;
|
||||
} = null;
|
||||
/// <summary>
|
||||
/// 传递工艺组
|
||||
/// </summary>
|
||||
public Func<String, String, bool> transmitCraftGroup
|
||||
{
|
||||
get;
|
||||
set;
|
||||
} = null;
|
||||
/// <summary>
|
||||
/// 传递模型名
|
||||
/// </summary>
|
||||
public Func<String, String, bool> transmitModelName
|
||||
{
|
||||
get;
|
||||
set;
|
||||
} = null;
|
||||
/// <summary>
|
||||
/// 非仿真工艺(空工艺),工艺组的传递
|
||||
/// </summary>
|
||||
public Func<String, String, bool> transmitCraftGroup_UnSim
|
||||
{
|
||||
get;
|
||||
set;
|
||||
} = null;
|
||||
/// <summary>
|
||||
/// (位置控制器)关闭
|
||||
/// </summary>
|
||||
public Func<bool> closeSeatOperationForm
|
||||
{
|
||||
get;
|
||||
set;
|
||||
} = null;
|
||||
/// <summary>
|
||||
/// (位置控制器)选择模型发送消息
|
||||
/// </summary>
|
||||
public Func<String, String, bool> currTreeSelectModelHandler_SeatOperation
|
||||
{
|
||||
get;
|
||||
set;
|
||||
} = null;
|
||||
|
||||
/// <summary>
|
||||
/// 传递逻辑脚本名称
|
||||
/// </summary>
|
||||
public static Func<String, String, bool> transitionEditorPageScriptNameUpdate
|
||||
{
|
||||
get;
|
||||
set;
|
||||
} = null;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user