using ModelBasic; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Global { /// /// /// public class ProjectVar : TheVar { /// /// 浏览器发送 /// 20200916 /// private static Action cefSend { get; set; } = null; /// /// 浏览器接收 /// 20200916 /// private static Action cefRec { get; set; } = null; /// /// 工艺树刷新 /// public void RefreshCraftTree() { if (refreshCraftTree != null) { refreshCraftTree(); } } /// /// 传递工艺组 /// /// /// public void TransmitCraftGroup(string craftName, string craftCode) { if (transmitCraftGroup != null) { transmitCraftGroup.Invoke(craftName, craftCode); } } /// /// 传递模型名 /// /// /// public void TransmitModelName(string modelName, string modelCode) { if (transmitModelName != null) { transmitModelName.Invoke(modelName, modelCode); } } /// /// 非仿真工艺(空工艺),工艺组的传递 /// /// /// public void TransmitCraftGroup_UnSim(string craftName, string craftCode) { if (transmitCraftGroup_UnSim != null) { transmitCraftGroup_UnSim.Invoke(craftName, craftCode); } } /// /// (位置控制器)关闭 /// public void CloseSeatOperationForm() { if (closeSeatOperationForm != null) { closeSeatOperationForm.Invoke(); } } /// /// (位置控制器)选择模型发送消息 /// /// public void CurrTreeSelectModelHandler_SeatOperation(string modelCode, string modelName) { if (currTreeSelectModelHandler_SeatOperation != null) { currTreeSelectModelHandler_SeatOperation.Invoke(modelCode, modelName); } } /// /// 传递逻辑脚本名称 /// /// public void TransitionEditorPageScriptNameUpdate(string internalVarCode, string internalVarName) { if (transitionEditorPageScriptNameUpdate != null) { transitionEditorPageScriptNameUpdate.Invoke(internalVarCode, internalVarName); } } /// /// 发送到浏览器 /// 20200916 /// /// public static void CefSend(string str) { if (cefSend != null) { cefSend.Invoke(str); } } /// /// 浏览器接收 /// 20200916 /// /// public static void CefRec(string str) { if (cefRec != null) { cefRec.Invoke(str); } } /// /// 工艺树刷新 赋予 /// public void RefreshCraftTree_Give(Action f) { refreshCraftTree = f; } /// /// 传递工艺组 赋予 /// /// /// public void TransmitCraftGroup_Give(Func f) { transmitCraftGroup = f; } /// /// 传递模型名 赋予 /// /// /// public void TransmitModelName_Give(Func f) { transmitModelName = f; } /// /// 非仿真工艺(空工艺),工艺组的传递 赋予 /// /// /// public void TransmitCraftGroup_UnSim_Give(Func f) { transmitCraftGroup_UnSim = f; } /// /// (位置控制器)关闭 赋予 /// public void CloseSeatOperationForm_Give(Func f) { closeSeatOperationForm = f; } /// /// (位置控制器)选择模型发送消息 赋予 /// /// public void CurrTreeSelectModelHandler_SeatOperation_Give(Func f) { currTreeSelectModelHandler_SeatOperation = f; } /// /// 传递逻辑脚本名称 赋予 /// /// public void TransitionEditorPageScriptNameUpdate_Give(Func f) { transitionEditorPageScriptNameUpdate = f; } /// /// 发送到浏览器 赋予 /// 20200916 /// /// public static void CefSend_Give(Action f) { cefSend = f; } /// /// 浏览器接收 赋予 /// 20200916 /// /// public static void CefRec_Give(Action f) { cefRec = f; } /// /// 工艺树刷新 判断 /// public bool RefreshCraftTree_IsNull() { if (refreshCraftTree == null) return true; else return false; } /// /// 传递工艺组 判断 /// /// /// public bool TransmitCraftGroup_IsNull() { if (transmitCraftGroup == null) return true; else return false; } /// /// 传递模型名 判断 /// /// /// public bool TransmitModelName_IsNull() { if (transmitModelName == null) return true; else return false; } /// /// 非仿真工艺(空工艺),工艺组的传递 判断 /// /// /// public bool TransmitCraftGroup_UnSim_IsNull() { if (transmitCraftGroup_UnSim == null) return true; else return false; } /// /// (位置控制器)关闭 判断 /// public bool CloseSeatOperationForm_IsNull() { if (closeSeatOperationForm == null) return true; else return false; } /// /// (位置控制器)选择模型发送消息 判断 /// /// public bool CurrTreeSelectModelHandler_SeatOperation_IsNull() { if (currTreeSelectModelHandler_SeatOperation == null) return true; else return false; } /// /// 传递逻辑脚本名称 判断 /// /// public bool TransitionEditorPageScriptNameUpdate_IsNull() { if (transitionEditorPageScriptNameUpdate == null) return true; else return false; } /// /// 发送到浏览器 判断 /// 20200916 /// /// public static bool CefSend_IsNull() { if (cefSend == null) return true; else return false; } /// /// 浏览器接收 判断 /// 20200916 /// /// public static bool CefRec_IsNull() { if (cefRec == null) return true; else return false; } /// /// 传递项目名称 /// 2020.11.2 /// public Func projectNameFunc { get; set; } = null; /// /// 传递项目名称 /// 2020.11.2 /// /// public void ProjectNameFunc(string projectName) { if (projectNameFunc != null) { projectNameFunc.Invoke(projectName); } } /// /// 传递项目名称 赋予 /// 2020.11.2 /// /// public void ProjectNameFunc_Give(Func f) { projectNameFunc = f; } /// /// 传递项目名称 判断 /// 2020.11.2 /// /// 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); } } }