/// <summary> /// EXE로부터 전달받은 메세지를 처리 /// </summary> /// <param name="receiveData"></param> /// <param name="token"></param> public static void Receive(WinMessage_ClientToServer receiveData, HY_AjaxAgent.TokenData token) { AJAX_Response sendData; switch (receiveData.RESULT_COMMAND) { case "workComplete": sendData = new AJAX_Response(receiveData.PARAM); HY_AjaxAgent.sendToWEB(sendData, token); break; case "startSuccess": exeLogging(receiveData.PROCESS_KIND.ToString() + "프로그램 실행 완료 메세지 받음"); break; case "closeProcess": exeLogging(receiveData.PROCESS_KIND.ToString() + "프로그램 종료 메세지"); sendData = new AJAX_Response(new Response_Error("exe close...", "508", "user click exe close before workcomplete.")); HY_AjaxAgent.sendToWEB(sendData, token); break; default: exeLogging("알 수 없는 EXE Command 받음 : " + receiveData.RESULT_COMMAND); break; } }
/// <summary> /// WEB으로 결과값 전달 /// </summary> /// <param name="sendData"></param> /// <param name="token"></param> public static void Send(AJAX_Response sendData, HY_AjaxAgent.TokenData token) { //PARAM, PATH 처리 string responseString = Json.ToString(sendData); //jsonp 처리 hychoi if (token.jsonpCheck.isJsonp) { responseString = string.Format("{0}({1});", token.jsonpCheck.callback, responseString); } HY_AjaxAgent.AddText(HY_AjaxAgent.MSGVIEW.WEB, "보내는 데이터 : " + responseString); writeResponse(responseString, token.response); }