mirror of
https://e.coding.net/circlecloud/SixiBroadcast.git
synced 2025-11-24 23:56:05 +00:00
客户端添加开机自动启 服务端添加指令系统...
This commit is contained in:
@@ -9,6 +9,7 @@ using System.Net.Sockets;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
using Microsoft.Win32;
|
||||
using UDPClient.Properties;
|
||||
|
||||
namespace UDPClient
|
||||
@@ -30,6 +31,12 @@ namespace UDPClient
|
||||
|
||||
private void Frm_Client_Load(object sender, EventArgs e)
|
||||
{
|
||||
//开机自启动添加
|
||||
string path = Application.ExecutablePath;
|
||||
RegistryKey rk = Registry.LocalMachine.CreateSubKey(@"Software\Microsoft\Windows\CurrentVersion\Run");
|
||||
rk.SetValue("SixiBroadcast", path);
|
||||
rk.Close();
|
||||
//初始化数据
|
||||
client = new UdpClient(new IPEndPoint(IPAddress.Any, 25333));
|
||||
serverendpoint = new IPEndPoint(IPAddress.Loopback, 25433);
|
||||
//启动客户端监听
|
||||
|
||||
Reference in New Issue
Block a user