NetBlog主题
2017-06-12 22:47
3151
using System;
using System.Collections.Generic;
using System.Text;namespace 获取文件名
{class Program{static void Main(string[] args){string s = @"c:\ss\b.txt";string ss= s.Substring(s.LastIndexOf("\\") + 1);Console.WriteLine(ss);//输入…
2022-01-16 21:53
3397
效果图设置 panel2.AutoScroll = true; 内容大于可视区的时间有滚动条核心代码private void AddControl(Control control){//转载请保留http://www.luofenming.com/show.aspx?id=ART2022011600001for (int i = 0; i 25; i++){Button button = new Button();button.Size = …
2023-03-19 11:31
2552
MQTT用的就是TCP/IP协议 ,Socket通讯,MQTT定义了一套自己的数据传输格式。 在这里我们引用的是MQTTnet.dll,它将数据的传输格式、数据监听和数据转发封装了,我们只要调用就可以。开源库地址:https://github.com/chkr1011/MQTTnet对应文档:https://github.com/chkr1011/MQT…
2023-06-23 18:39
318
import res=luo1feng2ming3#提取字符串中所有的数字 [0-9]为通用的正则表达式r=re.findall([0-9],s)print(r)#正则相关的内容 http://www.luofenming.com/show.aspx?id=ART2017082700001本文来自 www.luofenming.com
2023-10-24 16:41
521
效果图,源码下载地址: https://pan.baidu.com/s/1BbaUtzqMsKNj3PtT6IsncQ?pwd=q245 提取码: q245 核心代码using System;using System.Data;using System.Drawing;using System.Windows.Forms;namespace TreeViewDemo{ public class TreeViewEnhanced : TreeView …
2018-02-06 16:39
4581
有些软件不想在同一台电脑上运行两个可以用以下方法在Program.cs类里面写上以下代码即可/// <summary>/// 应用程序的主入口点。/// </summary>[STAThread]static void Main(){bool ret;System.Threading.Mutex mutex = new System.Threading.Mutex(true, Applicat…
2024-01-28 18:53
832
/// summary /// 下载 302跳转文件 /// /summary /// param name="parentUrl"父Url/param /// param name="url"302跳转的Url/param /// returns/returns public bool DownFile(string parentUrl,string url) { using (HttpClient client = new …
2018-08-29 14:39
9696
SQLite异常报错其他信息: 未能加载文件或程序集“System.Data.SQLite, Version=1.0.103.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139”或它的某一个依赖项。试图加载格式不正确的程序。System.BadImageFormatException: 未能加载文件或程序集“System.Data.SQLite.dl…