private static string GetUISessionFolder(string uiGetFunctionName) { if (UICommunicator.CallStaticFunction(CLASS_NAME_UISessionInfo, uiGetFunctionName, out TSObject thePath, out string errMsg)) { return(thePath.GetValue <string>()); } MessageBox.Show(errMsg); return(string.Empty); }
public static Form GetActiveMainForm() { if (UICommunicator.CallStaticFunction(CLASS_NAME_UISessionInfo, "GetActiveMainForm", out TSObject theForm, out string errMsg)) { return(theForm.GetValue <Form>()); } MessageBox.Show(errMsg); return(null); }
private static T CallUIFunction <T>(string uiGetFunctionName, Dictionary <string, object> parameters = null) { if (UICommunicator.CallStaticFunction(CLASS_NAME_UISessionInfo, uiGetFunctionName, out TSObject theList, out string errMsg, UICommunicator.ComposeParameters(parameters))) { return(theList.GetValue <T>()); } MessageBox.Show(errMsg); return(default(T)); }
public static bool GetCAOInfo(out TSDictionary info, bool includeCountries = true, bool includeAddOns = true, bool openOnly = false) { info = new TSDictionary(); TSDictionary parameters = UICommunicator.ComposeParameters("includeCountries", includeCountries, "includeAddOns", includeAddOns, "openOnly", openOnly); if (UICommunicator.CallStaticFunction(CLASS_NAME_UISessionInfo, "GetCAOInfo", out TSObject retVal, out string errMsg, parameters)) { if (retVal.GetValue <bool>() == true) { info = parameters.GetItem <TSDictionary>("info"); } return(retVal.GetValue <bool>()); } MessageBox.Show(errMsg); return(false); }