随笔分类 -  C#

摘要:private void flxDetail_OwnerDrawCell(object sender, OwnerDrawCellEventArgs e) { if (this.flxDetail.Rows.Count <= 1) { return; } // セルの描画を開始 e.DrawCell 阅读全文
posted @ 2025-12-03 16:14 _jwj 阅读(2) 评论(0) 推荐(0)
摘要:https://www.cnblogs.com/yuerdongni/archive/2011/10/10/2205544.html 阅读全文
posted @ 2022-02-17 18:30 _jwj 阅读(176) 评论(0) 推荐(0)
摘要:1. File File.Exists(path) File.Delete(path) File.Create(path) File.Move(path1,path2) File.Copy(path1,path2,true) 2. FileInfo FileInfo fileInfo = new F 阅读全文
posted @ 2021-12-13 17:15 _jwj 阅读(94) 评论(0) 推荐(0)
摘要:1. FileStream :对字节进行处理的流,可以和StreamWriter,StreamReader一起使用 2. StreamWriter,StreamReader:写入和读取字符文件的 3. 使用StreamWriter,写入数据 1 try 2 { 3 FileStream Mystre 阅读全文
posted @ 2021-10-14 11:49 _jwj 阅读(343) 评论(0) 推荐(0)
摘要:1 private void txtKaisuu_KeyPress(object sender, KeyPressEventArgs e) 2 { 3 if ((e.KeyChar >= 32 && e.KeyChar <= 47) || (e.KeyChar >= 58 && e.KeyChar 阅读全文
posted @ 2021-10-11 17:06 _jwj 阅读(150) 评论(0) 推荐(0)
摘要:https://www.cnblogs.com/candyzhmm/p/5595358.html 阅读全文
posted @ 2021-10-08 15:23 _jwj 阅读(157) 评论(0) 推荐(0)
摘要:[System.Runtime.InteropServices.DllImport("imagehlp.dll")] private static extern int SearchTreeForFile(string RootPath, string FileName, StringBuilder 阅读全文
posted @ 2021-07-16 14:26 _jwj 阅读(130) 评论(0) 推荐(0)
摘要:this.fgMain.EditOptions = EditFlags.None; 阅读全文
posted @ 2021-07-13 16:09 _jwj 阅读(104) 评论(0) 推荐(0)
摘要:fgPhaseB.Rows[i].IsNode = true; fgPhaseB.Rows[i].Node.Level = 1; fgPhaseB.Tree.Column = 0; fgPhaseB.Tree.Style = TreeStyleFlags.SimpleLeaf; // 折り flex 阅读全文
posted @ 2021-07-12 18:22 _jwj 阅读(287) 评论(0) 推荐(0)
摘要:1.FlexGrid的DropMode=Manual 1 private void fgMain_DragDrop(object sender, DragEventArgs e) 2 { 3 int row = this.fgMain.MouseRow; 4 int col = this.fgMai 阅读全文
posted @ 2021-07-12 17:57 _jwj 阅读(175) 评论(0) 推荐(0)
摘要:1.有单元格右击,不显示菜单。 2.现在窗体加入控件ContextMenuStrip。 1 private void fgMain_MouseClick(object sender, MouseEventArgs e) 2 { 3 if (e.Button == MouseButtons.Right 阅读全文
posted @ 2021-07-12 17:50 _jwj 阅读(170) 评论(0) 推荐(0)
摘要:参考:https://blog.csdn.net/zhuxipan1990/article/details/83114304 阅读全文
posted @ 2021-07-12 17:41 _jwj 阅读(222) 评论(0) 推荐(0)
摘要:this.fgMain.AllowMerging = AllowMergingEnum.Custom; cellRange = this.fgMain.GetCellRange(0, 1, 0, 2); cellRange.Data = "基本小分類コード"; this.fgMain.MergedR 阅读全文
posted @ 2021-07-12 16:50 _jwj 阅读(334) 评论(0) 推荐(0)
摘要:1. 遍历文件夹 获取文件 : // 根据文件夹路径new一个DirectoryInfo对象 DirectoryInfo directoryInfo = new DirectoryInfo(folder); // 循环文件 foreach (FileInfo ofile in directoryIn 阅读全文
posted @ 2020-11-14 16:43 _jwj 阅读(176) 评论(0) 推荐(0)
摘要:// 指定合并单元格的方法。this.fg.AllowMerging = AllowMergingEnum.Spill;(Flex单元格为空白时,可以合并单元格,为了显示较长文本)// 获取或设置控件绑定到的容器的边缘并确定控件如何随其父级一起调整大小。this.fg.Anchor= Top,Bot 阅读全文
posted @ 2020-10-22 18:43 _jwj
摘要:Array.Sort<FileInfo>(fileList, delegate(FileInfo x, FileInfo y) { return x.Name.CompareTo(y.Name); }); 阅读全文
posted @ 2020-09-18 13:19 _jwj 阅读(195) 评论(0) 推荐(0)
摘要:转:https://www.cnblogs.com/bluestorm/p/3432190.html 问题:字段初始值设定项无法引用非静态字段、方法或属性的问题 下面代码出错的原因,在类中定义的字段为什么不能用?public class Test{public Test(){}public int 阅读全文
posted @ 2020-08-27 11:36 _jwj
摘要:1. 01_Com_Class项目的属性设为类库 2. 编译后生成.dll 3.在工具箱中,右键点击,选择项,.NET Framework 组件分页(第一次加载会有些慢,耐心等一会儿),这时候,里边是找不到我们的控件的,需要点击浏览,找到dll,添加进去,点击确定。 阅读全文
posted @ 2020-05-25 16:34 _jwj 阅读(2266) 评论(0) 推荐(0)
摘要:转自:https://www.cnblogs.com/YangBinChina/archive/2013/03/27/2984281.html KeyCode最为常用,记录了键盘上按了哪个键,当使用组合键时如ctrl+a,其值是"A"; KeyData可以记录组合键,当使用组合键时如ctrl+a时, 阅读全文
posted @ 2020-05-19 15:51 _jwj 阅读(1921) 评论(0) 推荐(0)
摘要:枚举是静态的,若枚举在类中,可以以类名.枚举名的方式调用 在namespace下,直接用 *修饰符不能是私有的 阅读全文
posted @ 2020-03-26 11:41 _jwj 阅读(232) 评论(0) 推荐(0)