- 博客(6)
- 收藏
- 关注
原创 C#读取复杂的JSON数据
1、C#读取json数据内容,使用开源的类库Newtonsoft.Jsonstring str = {"values":[{"name":"X","value":-1865,"unit":"\u00B5m"},{"name":"Y","value":9556,"unit":"\u00B5m"},{"name":"Battery","value":0,"unit":"%"},{"name":"Angle","value":120,"unit":"\u00B0"},{"name":"Lasersignal",
2021-11-17 10:47:29
1244
原创 Winform指示灯
创建线程控制label图形、字符串颜色,然后在显隐控制Thread thread;public Form(){ InitializeComponent(); label1.Text = "●"; label1.Font = new System.Drawing.Font("宋体", 12); label1.Visible = false; th = new Thread(run); th.IsBackground = true; th.Start();}
2021-11-03 15:27:28
1094
原创 Winform打开文件夹、修改路径、保存数据为txt
1、点击label控件,可以跳转到相应的文件夹1.1 使用System.Diagnostics.Process.Start()函数,这个函数有几个重载可以直接打开exe程序、文件、图片等等,可自行操作体会。 private void labelOpenPath_Click(object sender, EventArgs e) { string path2 = tbPath.Text; //调用资源管理器,打开tbPath文件夹
2021-11-03 14:55:02
2213
原创 winform画图
winform/画图 写字 paint事件public void pictureBox1_Paint(object sender, PaintEventArgs e){ // 定义字符串 String drawString = "helle,梅姐“; // 创建字体、画刷 Font drawFont = new Font("Arial", 16); SolidBrush drawBrush = new Sol
2021-11-03 14:25:44
607
原创 c#颜色表
winform、WPF写软件时太爱用Aliceblue这个颜色作为软件背景了,所以收集了以下C#中System.Drawing.Color的颜色表://ColorGuide.csusing System;using System.Windows.Forms;using System.Drawing;Color[] color = new Color[]{ Color.AliceBlue, Color.AntiqueWhite, Color.Aqua
2021-11-03 14:03:22
1553
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人