Window Form 父子窗体相互更新

摘要: 主窗体 public partial class Form1 : Form { public Form1() { //LoginForm dlg = new LoginForm(); //dlg.StartPosition = FormStartPosition.CenterParent; //dl 阅读全文
posted @ 2018-06-23 10:58 hbgjh 阅读(179) 评论(0) 推荐(0) 编辑

c# from 采用WebClient调用web api 源码

摘要: ///url,web api 地址 public static string GetInfo(string url) { string URI = url; //实例化 WebClient client = new WebClient(); // client.UseDefaultCredentia 阅读全文
posted @ 2018-06-13 16:37 hbgjh 阅读(346) 评论(0) 推荐(0) 编辑

C# NEWTONSOFT.JSON更改json文件

摘要: public static void Update() { string jsonfile = Directory.GetCurrentDirectory() + "\\config.json"; if (File.Exists(jsonfile)) { string jsonString = Fi 阅读全文
posted @ 2018-06-13 16:28 hbgjh 阅读(3066) 评论(0) 推荐(0) 编辑

C# NEWTONSOFT.JSON写json文件

摘要: //写JSON文件config.json内容如下: {"Name":"lotname","Address":"wenzhou","Devices":{"id":"001111","name":"相机","ip":"192.168.1.1"},"Doors":"4"} C#源码如下: public s 阅读全文
posted @ 2018-06-13 16:27 hbgjh 阅读(7361) 评论(0) 推荐(1) 编辑

C# NEWTONSOFT.JSON读取json文件

摘要: public static void Readjson() { string jsonfile = "D://tsconfig1.json"; using (System.IO.StreamReader file = System.IO.File.OpenText(jsonfile)) { usin 阅读全文
posted @ 2018-06-13 11:13 hbgjh 阅读(16882) 评论(4) 推荐(0) 编辑