/// <summary> /// 清空计费结果 /// </summary> /// <param name="displayController"></param> /// <param name="screenIp"></param> /// <param name="screenPort"></param> /// <param name="chargeRtnValue"></param> /// <param name="chargeMsg"></param> private void ClearChareRes(DisplayController displayController, string screenIp, int screenPort) { try { MsgChareResRow chareResRow = new MsgChareResRow(); chareResRow.RowAddress = BitConverter.GetBytes(GetScreenAddress(ScreenMsgType.ChareResRow)); Array.Reverse(chareResRow.RowAddress);//大小端转换 chareResRow.ChargeMessage = GetStandandArray(chareResRow, "ChargeMessage", string.Empty); PackSendData(displayController, screenIp, screenPort, chareResRow);//发送计费结果数据到屏 } catch (Exception ex) { InternalLogger.Log.Error("清理屏出错:" + ex.Message); } }
static void testSizeOf() { MsgChareResRow t = new MsgChareResRow(); Console.WriteLine("MsgChareResRow(50):" + Marshal.SizeOf(t).ToString()); MsgDEmployeeRow t1 = new MsgDEmployeeRow(); Console.WriteLine("MsgDEmployeeRow(38):" + Marshal.SizeOf(t1).ToString()); MsgDrugRow t2 = new MsgDrugRow(); Console.WriteLine("MsgDrugRow(116):" + Marshal.SizeOf(t2).ToString()); MsgPatientRow t3 = new MsgPatientRow(); Console.WriteLine("MsgPatientRow(92):" + Marshal.SizeOf(t3).ToString()); MsgGeneral t4 = new MsgGeneral(); Console.WriteLine("MsgGeneral(4):" + Marshal.SizeOf(t4).ToString()); }