随笔分类 -  C#

上一页 1 ··· 4 5 6 7 8 9 下一页
摘要:List对象没有实例化 使用之前先实例化: ReadData_List = new List<string[]>(); 阅读全文
posted @ 2021-09-03 14:46 txwtech 阅读(329) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2021-09-03 11:50 txwtech 阅读(574) 评论(0) 推荐(0)
摘要:callOnClick(button_Search_Click); c# 无法从方程组转为button button_Search_Click是一个方法(双击button_Search产生的),实际需要传递button按钮的属性,所以改为: callOnClick(button_Search); / 阅读全文
posted @ 2021-09-03 10:39 txwtech 阅读(87) 评论(0) 推荐(0)
摘要:OPCServer:使用KEPServer https://www.cnblogs.com/ioufev/p/9366877.html 1.下载安装 实际OPCServer使用(450M,中文,破解时间限制):KEPServer V6,百度网盘 ,密码: ykj2 2. 添加仿真器或者硬件PLC S 阅读全文
posted @ 2021-09-02 15:50 txwtech 阅读(2990) 评论(0) 推荐(0)
摘要:https://files-cdn.cnblogs.com/files/txwtech/c_sharp_kepServer_demo_cnblogs.rar OPCServer:使用KEPServer安装方法_如何添加仿真器与添加西门子S7PLC 阅读全文
posted @ 2021-09-02 15:47 txwtech 阅读(1170) 评论(4) 推荐(0)
摘要:c# winform程序启动时判断本身是否在运行,是否已经运行 Program.cs里面修改 using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using Syst 阅读全文
posted @ 2021-09-01 16:39 txwtech 阅读(326) 评论(0) 推荐(0)
摘要:using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System. 阅读全文
posted @ 2021-08-31 14:53 txwtech 阅读(325) 评论(0) 推荐(0)
摘要:using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System. 阅读全文
posted @ 2021-08-30 14:06 txwtech 阅读(880) 评论(0) 推荐(0)
摘要:c#语音播报播放语音功能 public void Speaking(string saying) { string say = saying; Task task = new Task(() => { SpeechSynthesizer speech = new SpeechSynthesizer( 阅读全文
posted @ 2021-08-23 14:08 txwtech 阅读(1138) 评论(0) 推荐(0)
摘要:c#字符串序列化-字符串转对象转字符串 using System; using System.IO; using System.Runtime.Serialization; using System.Runtime.Serialization.Formatters.Binary; using Sys 阅读全文
posted @ 2021-08-04 10:25 txwtech 阅读(706) 评论(0) 推荐(0)
摘要:label_idle_time9.Font = new System.Drawing.Font("幼圆", 22F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 阅读全文
posted @ 2021-08-02 11:47 txwtech 阅读(2393) 评论(0) 推荐(1)
摘要:c#秒转成时分秒显示 public DateTime GetDateTimeBySeconds(double seconds) { return DateTime.Parse(DateTime.Now.ToString("1970-01-01 00:00:00")).AddSeconds(secon 阅读全文
posted @ 2021-07-30 16:01 txwtech 阅读(386) 评论(0) 推荐(0)
摘要:public static HttpWebResponse CreatePostHttpResponse(string url, string json, ref string erro) { Console.WriteLine(url); HttpWebRequest request = WebR 阅读全文
posted @ 2021-07-21 17:05 txwtech 阅读(1475) 评论(0) 推荐(0)
摘要:unsigned short Cal_CRC_Code(const unsigned char *ucpdata,int len) { unsigned short crc=0xffff; unsigned char temp; int n; while(len--) { crc=*ucpdata^ 阅读全文
posted @ 2021-07-21 14:58 txwtech 阅读(534) 评论(0) 推荐(0)
摘要:visual studio 2015 vs2015 c#调试模式中,程序退出后,调试模式没有停止,这种情况说明还有线程在运行中。比如主窗口调用了子窗口,子窗口启动了线程。 主窗口执行退出程序,但没有关闭子窗口的线程,因此调试模式不会停止。 阅读全文
posted @ 2021-07-01 16:11 txwtech 阅读(672) 评论(0) 推荐(0)
摘要:C#中多线程的线程加.IsBackground = true与不加有什么区别? 按照MSDN上讲:“获取或设置一个值,该值指示某个线程是否为后台线程。” 其实这个解释并不到位,至少应该解释一下后台线程的概念! https://docs.microsoft.com/zh-cn/dotnet/stand 阅读全文
posted @ 2021-06-28 08:27 txwtech 阅读(210) 评论(1) 推荐(0)
摘要:string str = ""; if( !(listBox1.SelectedIndex>0)) { MessageBox.Show("请选择需要发料的MC_ID"); return; } str = listBox1.SelectedItems[0].ToString();//获取选中的内容 M 阅读全文
posted @ 2021-06-25 13:08 txwtech 阅读(1975) 评论(1) 推荐(0)
摘要:private void save_ip_port(object sender, EventArgs e) { string content = comboBox1.Text + "\r\n" + textBox_server_port.Text; Http_Class.WriteConfigFil 阅读全文
posted @ 2021-06-24 15:28 txwtech 阅读(131) 评论(0) 推荐(0)
摘要:listView_task_list.Focus(); //聚焦光标 // listView_task_list.HideSelection = false; listView_task_list.Items[task_list_count-1].Selected = true; //选中最后一行 阅读全文
posted @ 2021-06-15 11:05 txwtech 阅读(3043) 评论(0) 推荐(0)
摘要:c#大括号自动对齐快捷键 vs2015 CTRL+K+D 阅读全文
posted @ 2021-06-09 22:55 txwtech 阅读(498) 评论(0) 推荐(0)

上一页 1 ··· 4 5 6 7 8 9 下一页