C#Winform利用DataGridView的特性实现字段排序

this.dataGridView1.Sort(this.dataGridView1.Columns["FirstName"], ListSortDirection.Ascending); …… 阅读全文

C#Winfrom设置DataGridView单元格文本格式为钱的格式

this.dataGridView1.Columns["Fare"].DefaultCellStyle.Format = "C0"; …… 阅读全文

C#WInform 从DataTable中导出XML文件

private bool ExportXML(string filepath) { bool flag = true; try { XDocument doc = new XDocument(); XElement xBoot = new XEl …… 阅读全文

C#程序中利用正则表达式对字符串分组并获取组值

匹配时设置 显示捕获 选项获取捕获的多个内容后,循环输出获取捕获的多个分组后,循环输出 …… 阅读全文

CAD .net二次开发直线转化多段线(Polyline)

Point3dCollection col_point = new Point3dCollection(); Line ent_line = item as Line; Point3d startPoint = ent_line.StartPoint; Point3d endPoint = ent_line.EndP …… 阅读全文

C#CAD二次开发图案填充对象边界提取

/// 填充边界提取转化方法 /// /// 需要转化的Hatch对象 /// 声明的事务对象 /// 数据库中的模型空间 /// 提取单位曲线中样本点的数目 public static void DrawBorder(Hatch hat, Transaction trans, BlockTableR …… 阅读全文

C#CAD二次开发读取CAD表格数据

Document doc = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument; Database data = doc.Database; Editor ed = doc.Editor; AcadApplica …… 阅读全文

C#Winform 实现ListBox中项的拖拽

private void lstRead_MouseDown(object sender, MouseEventArgs e) { if (this.lstRead.SelectedItem == null) { return; } //开始拖放操作,Dr …… 阅读全文