C#20 C# 마우스 인풋 API Using the Windows API to emulate hardware input in C# https://www.chriswirz.com/software/using-windows-api-to-emulate-user-input-in-c-sharp Using the Windows API to emulate hardware input in C# C# is managed code, but parts of the Windows API were built before the introduction of C#. Fortunately, there are InteropServices to call the API www.chriswirz.com 2020. 8. 19. C# shader 참고 페이지 shader 참고 페이지 https://docs.microsoft.com/ko-kr/dotnet/api/system.windows.media.effects.shadereffect?view=netframework-4.7.2 ShaderEffect Class (System.Windows.Media.Effects) 를 사용하여 사용자 지정 비트맵 효과를 제공합니다.Provides a custom bitmap effect by using a . docs.microsoft.com 2020. 8. 18. C# TCPServer with WebSocket C# TCPServer with WebSocket public class TcpServerWS { private static TcpServerWS _instance; public static TcpServerWS Instance { get { return _instance; } } private TcpListener m_TcpListener; private int _nPort = 13000; private string _sIPAddress; private List m_Clients; private Thread m_ListenThread; public TcpServerWS() { this.m_Clients = new List(); } public void ServerStart() { m_ListenThre.. 2020. 8. 13. C# UDP C# UDP UDP 메세지 보내기 UdpClient udpClient = new UdpClient("127.0.0.1", 11000); Byte[] sendBytes = Encoding.ASCII.GetBytes("PlayWall1F"); udpClient.Send(sendBytes, sendBytes.Length); udpClient.Close(); UDP 메세지 마지막에 NewLine 붙여서 보내기 UdpClient udpClient = new UdpClient(ip, port); Byte[] sendBytes = Encoding.ASCII.GetBytes(message); byte[] newLine = System.Text.ASCIIEncoding.ASCII.GetBytes(Environment.N.. 2020. 8. 13. C# WOL 컴퓨터 원격 온오프 C# WOLC# WOL 컴퓨터 원격 온오프 public class WakeOnLan : UdpClient { public WakeOnLan() : base() { } /// /// 컴퓨터 부팅 하기 /// /// 부팅 할 컴퓨터의 맥어드레스 public void TurnOnPC(string macAddress) { try { macAddress = macAddress.Replace("-", ""); macAddress = macAddress.Replace(":", ""); this.Connect(new System.Net.IPAddress(0xffffffff), 0x2fff); //255.255.255.255 : 12287 if (this.Active) { this.Client.SetSocketOptio.. 2020. 8. 7. C# Ping 테스트, 해당 IP 장치 이름 가져오기 C# Ping 테스트, 해당 IP 장치 이름 가져오기 public class PingTest { public static double Do(string ip, int timeout = 5000) { try { var pingSender = new Ping(); var options = new PingOptions(); // Use the default Ttl value which is 128, // but change the fragmentation behavior. options.DontFragment = true; // Create a buffer of 32 bytes of data to be transmitted. const string data = "aaaaaaaaaaaaaaaaaaaaaaaaaa.. 2020. 8. 7. 이전 1 2 3 4 다음