上一页 1 2 3 4 5 6 ··· 17 下一页
摘要: 遍历每一行数据: if(lv.Items.Count > 0)//列表有数据 { foreach(ListViewItem lt in lv.Items)//依次遍历每一行数据 { lt.SubItems[1].Text;//可以修改获取下标,获取每一列的数据。 } } 清空ListView的所有数 阅读全文
posted @ 2020-04-09 17:13 小大大小 阅读(581) 评论(0) 推荐(0) 编辑
摘要: C#用代码创建控件,以及它的鼠标事件: 以按钮为例: Button btn = new Button(); btn.Name = "btnOk"; btn.Text = "确定"; btn.Click += new EventHandler(btn_Click); this.panel1.Contr 阅读全文
posted @ 2020-04-09 16:52 小大大小 阅读(1077) 评论(0) 推荐(1) 编辑
摘要: C#中使用ListView控件的时候,频繁更新里面的数据时,会出现闪烁的情况。 解决办法:使用双缓冲,首先对listview类进行重写,然后通过继承重写的类,进行控件的初始化定义之后,再进行频繁数据更新是不会出现闪烁现象的。 //对ListView进行继承重写: public class Doubl 阅读全文
posted @ 2020-04-09 16:48 小大大小 阅读(1480) 评论(0) 推荐(0) 编辑
摘要: C#中ContainsKey方法可以用来判断某个键值是否存在。 用法:字典.ContainsKey("键值"); 返回值:True或Fasle。 阅读全文
posted @ 2020-04-09 16:31 小大大小 阅读(6525) 评论(0) 推荐(0) 编辑
摘要: 步骤:1,双击安装文件,点击Next:2,点击同意,Next:3,选择Custom:4,更改安装路径:5,点击Next:6,默认,Next:7,点击安装:8,在安装目录下打开pcmaster.exe:9,选择Project->option:10,选择连接模式为segger-jlink:11,选择Ma 阅读全文
posted @ 2020-03-17 09:19 小大大小 阅读(1979) 评论(0) 推荐(0) 编辑
摘要: C和C++中获取二维数组的行列数: sizeof(array[0][0]):一个元素占用的空间, sizeof(array[0]):一行元素占用的空间, sizeof(array):整个数组占用的空间, 行数 = sizeof(array)/sizeof(array[0]); 列数 = sizeof 阅读全文
posted @ 2020-03-10 10:32 小大大小 阅读(5453) 评论(0) 推荐(0) 编辑
摘要: 类的定义: class Patrolcar(): def __init__(self,pcar_ip,pnow_x,pnow_y,pnow_direction,pfuture_x,pfuture_y,pfuture_direction,pIsUp,pIsLife,pcar_speed,pcar_MA 阅读全文
posted @ 2020-03-10 10:30 小大大小 阅读(1536) 评论(0) 推荐(0) 编辑
摘要: Python创建字典和添加键值: Python还是相当简约的语言呀, 首先先创建:test_dict = {} 添加键值:test_dict[‘id’] = ‘01’ 阅读全文
posted @ 2020-03-10 10:22 小大大小 阅读(7442) 评论(0) 推荐(0) 编辑
摘要: 首先在窗体构造方法里加入: InitializeComponent(); this.MouseWheel += new System.Windows.Forms.MouseEventHandler(this.pMouseWheel); 然后编写一个鼠标事件: private void pMouseW 阅读全文
posted @ 2020-03-09 09:52 小大大小 阅读(3482) 评论(0) 推荐(0) 编辑
摘要: C#中对Excel文件执行写数据操作: 先编写一个函数 private static string CPath(string path) { var index = path.LastIndexOf("/"); var temp = path.Substring(0, index); if (!Di 阅读全文
posted @ 2020-03-09 09:36 小大大小 阅读(511) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 17 下一页