吾爱破解 - LCG - LSG |安卓破解|病毒分析|www.52pojie.cn

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 13578|回复: 84
收起左侧

[Windows] 局域网多媒体中控控制 (音量、关机、心跳)

  [复制链接]
wtujoxk 发表于 2022-5-24 14:48
本帖最后由 wtujoxk 于 2022-6-1 11:14 编辑

软件使用UDP协议编写,针对多媒体中控控制电脑的音量,关机,心跳这三个功能进行编写!
通讯协议在说明栏中,运行软件会在当前目录下生成一个config.txt文件,里面保存了设置!
修改参数设置后,记得点一下保存!

1654053166(1).jpg
1653374460(1).jpg

1653374477(1).jpg
1653374496(1).png

下载地址:https://nns.lanzoub.com/iEYKn05owqeh

调试助手下载地址:https://nns.lanzoub.com/iq1D305dcpgh
使用调试助手可以测试软件可用性!

20220525添加心跳测试小软件
用法见下图
1653458110.jpg

心跳测试小软件下载:https://nns.lanzoub.com/iEVjg05etele

音量开关机测试小程序https://nns.lanzoub.com/iOJTL05q2mta
源码:
[C#] 纯文本查看 复制代码
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Threading;
using System.Windows.Forms;
using System.Net.Sockets;
using System.Net;

namespace 心跳测试
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        //在线电脑集合
        Dictionary<string, DateTime> dicComputer = new Dictionary<string, DateTime>();
        private void Form1_Load(object sender, EventArgs e)
        {
            new Thread(() =>
            {
                UdpClient uc = new UdpClient(new IPEndPoint(IPAddress.Any, 5467));
                //设置UDP超时接收时间
                uc.Client.ReceiveTimeout = 4000;
                while (true)
                {
                    try
                    {
                        IPEndPoint ipEndPoint = null;
                        byte[] bytes = uc.Receive(ref ipEndPoint);
                        this.Invoke((EventHandler)delegate { textBox1.Text = string.Empty; });
                        string computer = ipEndPoint.Address.ToString();

                        if (!dicComputer.ContainsKey(computer))
                            dicComputer.Add(computer, DateTime.Now);
                        else
                            dicComputer[computer] = DateTime.Now;

                        //心跳时间为2秒一次,筛选离线电脑
                        dicComputer = dicComputer.Where(x => (DateTime.Now - x.Value).Seconds < 4).ToDictionary(x => x.Key, x => x.Value);

                        foreach (var onlineComputer in dicComputer)
                        {
                            this.Invoke((EventHandler)delegate
                            {
                                textBox1.AppendText(onlineComputer + "   电脑在线" + Environment.NewLine);
                            });
                        }

                    }
                    catch (Exception ex)
                    {
                        //心跳时间为2秒一次,如果服务端4秒钟都未收到新消息,则认为所有电脑离线
                        this.Invoke((EventHandler)delegate { textBox1.Text = "没有电脑在线"; });
                    }
                }
            })
            { IsBackground = true }.Start();
        }
    }
}
1653374444(1).jpg

免费评分

参与人数 13吾爱币 +13 热心值 +12 收起 理由
fengzi998 + 1 有个CAD插件能帮忙破解一下吗大师
yantf1234 + 1 + 1 用心讨论,共获提升!
db2009 + 1 + 1 我很赞同!
zaqwsx0 + 1 + 1 用心讨论,共获提升!
无olo名peng + 1 谢谢@Thanks!
gaoming513 + 1 + 1 谢谢@Thanks!
wyp858 + 1 + 1 我很赞同!
Cudet + 1 谢谢@Thanks!
明月相照 + 1 + 1 谢谢@Thanks!
3218956 + 1 + 1 热心回复!
kanglong + 1 + 1 我很赞同!
Edison_zhu + 3 + 1 我很赞同!
zlongxunz + 1 + 1 谢谢@Thanks!

查看全部评分

本帖被以下淘专辑推荐:

发帖前要善用论坛搜索功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。

gztf 发表于 2022-5-24 15:04
不错,收藏备用
头像被屏蔽
weiya909 发表于 2022-5-24 15:03
xjhbbs 发表于 2022-5-24 14:50
w-c-f5522 发表于 2022-5-24 15:16
这个牛, 网管 专用 ,,,, 感谢楼主的分享
mokson 发表于 2022-5-24 15:23
局域网内电脑,远程关机,如何操作?
szw521 发表于 2022-5-24 15:37
关机  控制端 怎么发命令
my9258 发表于 2022-5-24 15:44
控制端?服务器端?
yzhome 发表于 2022-5-24 15:58
这是干嘛用的呢?
wmufo123 发表于 2022-5-24 16:07
功能太少了    建议加入播放停止  运行程序    发送udp指令等功能
您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则 提醒:禁止复制他人回复等『恶意灌水』行为,违者重罚!

快速回复 收藏帖子 返回列表 搜索

RSS订阅|小黑屋|处罚记录|联系我们|吾爱破解 - LCG - LSG ( 京ICP备16042023号 | 京公网安备 11010502030087号 )

GMT+8, 2024-6-1 16:08

Powered by Discuz!

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表