随笔分类 - C#
摘要:private void ScanAllPLCStatus() { foreach (OpcUtil.PLC_Sensor_Enum e in Enum.GetValues(typeof(OpcUtil.PLC_Sensor_Enum))) { Console.WriteLine(e.ToStrin
阅读全文
摘要:Visual Assist X for vs2005 http://www.rsdown.cn/down/165522.html#download http://d1.xszdll.cn:8001/rsdown/Visual%20Assist%20X%20for%20vs2005.rar
阅读全文
摘要:c#信号量实现线程挂起,暂停,继续,停止操作 using System; using System.Threading; using System.Threading.Tasks; using System.Windows.Forms; namespace testManualResetEvent
阅读全文
摘要:string[] aa_tt = new string[20]; string[] aa_tt2 = new string[20]; Array.Clear(aa_tt,0,aa_tt.Length); //数组每个元素置零 Array.Copy(aa_tt,aa_tt2,aa_tt.Length)
阅读全文
摘要:List对象没有实例化 使用之前先实例化: ReadData_List = new List<string[]>();
阅读全文
摘要:https://zhidao.baidu.com/question/546884030.html 第一种DateTime time1 =new DateTime(1982,4,24,14,23,06);DateTime time2 =new DateTime(1982,1,21,8,16,32);T
阅读全文
摘要:callOnClick(button_Search_Click); c# 无法从方程组转为button button_Search_Click是一个方法(双击button_Search产生的),实际需要传递button按钮的属性,所以改为: callOnClick(button_Search); /
阅读全文
摘要:OPCServer:使用KEPServer https://www.cnblogs.com/ioufev/p/9366877.html 1.下载安装 实际OPCServer使用(450M,中文,破解时间限制):KEPServer V6,百度网盘 ,密码: ykj2 2. 添加仿真器或者硬件PLC S
阅读全文
摘要:https://files-cdn.cnblogs.com/files/txwtech/c_sharp_kepServer_demo_cnblogs.rar OPCServer:使用KEPServer安装方法_如何添加仿真器与添加西门子S7PLC
阅读全文
摘要:c# winform程序启动时判断本身是否在运行,是否已经运行 Program.cs里面修改 using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using Syst
阅读全文
摘要:using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.
阅读全文
摘要:using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.
阅读全文
摘要:c#语音播报播放语音功能 public void Speaking(string saying) { string say = saying; Task task = new Task(() => { SpeechSynthesizer speech = new SpeechSynthesizer(
阅读全文
摘要:c#字符串序列化-字符串转对象转字符串 using System; using System.IO; using System.Runtime.Serialization; using System.Runtime.Serialization.Formatters.Binary; using Sys
阅读全文
摘要:label_idle_time9.Font = new System.Drawing.Font("幼圆", 22F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
阅读全文
摘要:c#秒转成时分秒显示 public DateTime GetDateTimeBySeconds(double seconds) { return DateTime.Parse(DateTime.Now.ToString("1970-01-01 00:00:00")).AddSeconds(secon
阅读全文
摘要:public static HttpWebResponse CreatePostHttpResponse(string url, string json, ref string erro) { Console.WriteLine(url); HttpWebRequest request = WebR
阅读全文
摘要:unsigned short Cal_CRC_Code(const unsigned char *ucpdata,int len) { unsigned short crc=0xffff; unsigned char temp; int n; while(len--) { crc=*ucpdata^
阅读全文
摘要:visual studio 2015 vs2015 c#调试模式中,程序退出后,调试模式没有停止,这种情况说明还有线程在运行中。比如主窗口调用了子窗口,子窗口启动了线程。 主窗口执行退出程序,但没有关闭子窗口的线程,因此调试模式不会停止。
阅读全文
摘要:C#中多线程的线程加.IsBackground = true与不加有什么区别? 按照MSDN上讲:“获取或设置一个值,该值指示某个线程是否为后台线程。” 其实这个解释并不到位,至少应该解释一下后台线程的概念! https://docs.microsoft.com/zh-cn/dotnet/stand
阅读全文

浙公网安备 33010602011771号