/// <summary> /// 재난운영대에서 수신되는 데이터 리시브 이벤트 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void pDMainTcpServer_RecvNetSessionClient(object sender, NCasNetSessionRecvEventArgs e) { if (e.Len == 1) { return; } byte[] tmpBuff = new byte[e.Len]; System.Buffer.BlockCopy(e.Buff, 0, tmpBuff, 0, e.Len); XmlSerializer serializer = new XmlSerializer(typeof(DistIconDataContainer), new Type[] { typeof(DistIconData) }); string tmpStr = Encoding.UTF8.GetString(tmpBuff, 0, tmpBuff.Length); StringReader sr = new StringReader(tmpStr); DistIconDataContainer distIconDataContainer = (DistIconDataContainer)serializer.Deserialize(sr); DistIconMng.LstDistIconData = distIconDataContainer.LstDistIconData; DistIconMng.SaveDistIconDatas(); OrderView19201080 orderView = (OrderView19201080)this.dicViews[ViewKind.OrderView19201080]; MethodInvoker invoker = delegate() { orderView.SetDistIconReArrange(); }; if (this.InvokeRequired) { Invoke(invoker); } else { invoker(); } }
/// <summary> /// 듀얼 시스템에서 수신받는 데이터 리시브 이벤트 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void dualSessionMng_RecvNetSessionClient(object sender, NCasNetSessionRecvEventArgs e) { if (e.Len == 1) { return; } byte[] tmpBuff = new byte[e.Len]; System.Buffer.BlockCopy(e.Buff, 0, tmpBuff, 0, e.Len); NCasKeyData dualKeyData = new NCasKeyData(tmpBuff); KeyBizData keyBizData = new KeyBizData(); keyBizData.IsLocal = false; keyBizData.KeyData = dualKeyData; this.pAlmScreenBiz.AddBizData(keyBizData); }
/// <summary> /// TCP에서 데이터를 수신받으면 해당 이벤트가 발생한다. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void OnNCasNetSessionRecvEventHandler(object sender, NCasNetSessionRecvEventArgs e){ //List<NCasProtocolBase> lstProtocol=null; // //NCasNetSessionContext //context=tcpServerMng. //GetNCasNetSessionContext(e.NCasProfile. //IpAddr, e.NCasProfile.Port); //NCasNetDataReceiver.ParseNCasPacket(e. //Buff, e.len, contexxt.TcpClient, out //lstResult); //foreach(NCasProtocolBase p in //lstResult) //{AddBizData(p);} }