/// <summary>デリゲード</summary> private void SetResultDgt(object result) { object[] param = (object[])result; AsyncEventHeader aeh = (AsyncEventHeader)param[0]; string msg = (string)BinarySerialize.BytesToObject((byte[])param[1]); MessageBox.Show(this.NPS + " - " + DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss") + "WindowsFormsApplication.Form1.SetResultDgtメソッドが呼ばれた。" + "\r\nDstEventClass:" + aeh.DstEventClass.ToString() + "\r\nDstFuncID:" + (new string(aeh.DstFuncID)).Trim() + "\r\nSrcEventClass:" + aeh.SrcEventClass.ToString() + "\r\nSrcFuncID:" + (new string(aeh.SrcFuncID)).Trim() + "\r\nSrcPipeName:" + (new string(aeh.SrcPipeName)).Trim() + "\r\nメッセージ:" + msg, this.NPS); }
/// <summary>デリゲード</summary> private void WaitCallbackDgt(object state) { object[] param = (object[])state; AsyncEventHeader aeh = (AsyncEventHeader)param[0]; string msg = (string)BinarySerialize.BytesToObject((byte[])param[1]); // ファイルにテキストを書き出し。 using (StreamWriter sw = new StreamWriter(this.NPS + @"_test_tpl.txt", true)) { sw.WriteLine("\r\n" + this.NPS + " - " + DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss") + "WindowsFormsApplication.Form1.WaitCallbackDgtメソッドが呼ばれた。" + "\r\nDstEventClass:" + aeh.DstEventClass.ToString() + "\r\nDstFuncID:" + (new string(aeh.DstFuncID)).Trim() + "\r\nSrcEventClass:" + aeh.SrcEventClass.ToString() + "\r\nSrcFuncID:" + (new string(aeh.SrcFuncID)).Trim() + "\r\nSrcPipeName:" + (new string(aeh.SrcPipeName)).Trim() + "\r\nメッセージ:" + msg, this.NPS); } }