public void MySendCommand(object param) { UDP udp = new UDP(); bool IsSend = (bool)param; if (IsSend == true) { udp.SendPortInit(_UdpViewModel.MyIP, _UdpViewModel.SendPort, _UdpViewModel.SendPort); udp.StartSend(_BufferSet.ST_Data, _BufferSet.ByteOffset); } else { udp.IsStopSend = true; } }