会员
周边
众包
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
搬砖的L先生
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
···
9
下一页
2022年9月2日
C#读取RTSP流并切录制视频
摘要: 下载Nuget包:EMGU.CV(测试用版本:4.0.1.3373) ; public void InitVideo() { VideoCapture _capture = new VideoCapture("rtsp://admin:123456@192.168.1.237:554"); Thre
阅读全文
posted @ 2022-09-02 14:46 搬砖的L先生
阅读(2331)
评论(0)
推荐(0)
2022年8月17日
C#上位机转换成Bt下发时间
摘要: long time=(now.ToUniversalTime().Ticks - 621355968000000000) / 10000000; //时间戳 bt[x++] = (byte)(time >> 24); bt[x++] = (byte)((time >> 16) & 0xFF); bt
阅读全文
posted @ 2022-08-17 13:45 搬砖的L先生
阅读(40)
评论(0)
推荐(0)
2022年8月16日
C#Hex转Str
摘要: private string hexStrToStr(string str) { //去除字符串中的空格 string[] strT = str.Split(' '); string strA = ""; foreach (string strB in strT) { strA += strB; }
阅读全文
posted @ 2022-08-16 18:09 搬砖的L先生
阅读(519)
评论(0)
推荐(0)
2022年7月29日
WPF 窗体自适应
摘要: WPF 窗口大小自适应 在设置桌面不同分辨率以及较大DPI下,窗口如何显示的问题。 方案一 设置窗口最大值和最小值显示 通过对比当前屏幕的可显示区域,将窗口高宽最大值和最小值,设置为窗口的实际高宽(此例中仅设置高度) 界面设置 设置窗口内容自适应SizeToContent="WidthAndHeig
阅读全文
posted @ 2022-07-29 13:15 搬砖的L先生
阅读(314)
评论(0)
推荐(0)
2022年7月27日
WPF GroupBox去除边框的白边
摘要: <Window.Resources> </Window.Resources>
阅读全文
posted @ 2022-07-27 16:25 搬砖的L先生
阅读(370)
评论(0)
推荐(0)
2022年7月22日
C#常用进制关系转换
摘要: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.
阅读全文
posted @ 2022-07-22 10:31 搬砖的L先生
阅读(257)
评论(0)
推荐(0)
2022年7月20日
C#时间戳准换成byte发送到下位机部分代码
摘要: public void TestA() { int time = 1658310821; string str = time.ToString("X4"); byte[] testb = strToHexByte(str); } /// <summary> /// 16进制字符串转换成16进制byt
阅读全文
posted @ 2022-07-20 10:03 搬砖的L先生
阅读(135)
评论(0)
推荐(0)
2022年7月19日
C#按比特位设置当前位的比特值
摘要: public void Test() { byte[] results = new byte[1]; results[0] = 0xff; int temp = results[0]; byte b = SetBit(results[0], 7, 0); Console.WriteLine(b);
阅读全文
posted @ 2022-07-19 17:43 搬砖的L先生
阅读(365)
评论(0)
推荐(0)
C#获取比特位
摘要: /// /// 获取字节中的指定Bit的值 /// /// 字节 /// Bit的索引值(0-7) /// public int GetBit(byte test, int index) { byte x = 1; switch (index) { case 0: { x = 0x01; } bre
阅读全文
posted @ 2022-07-19 17:30 搬砖的L先生
阅读(1091)
评论(0)
推荐(0)
2022年5月26日
C# Web请求URL编码转换 URL转码 UrlDecode UrlEncode
摘要: using System.Web; 引用system.web。 textBox2.Text = System.Web.HttpUtility.UrlDecode(textBox1.Text, System.Text.Encoding.GetEncoding("GB2312"));//将Url中的编码
阅读全文
posted @ 2022-05-26 14:56 搬砖的L先生
阅读(1120)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
···
9
下一页
公告
点击右上角即可分享