摘要:
lbl.Font = new System.Drawing.Font(new FontFamily("黑体"), 12.0F, FontStyle.Bold);
阅读全文
posted @ 2016-03-29 19:55
swtool
阅读(456)
推荐(0)
摘要:
最近在做一个程序,需要实现窗口下的F5 刷新功能。 研究了一下KeyDown,KeyPress 和KeyUp ,发现之间还是有点学问的。 让我们带着如下问题来说明,如果你看到这些问题你都知道,那么这篇文章你就当复习吧:) 1.这三个事件的顺序是怎么样的? 2.KeyDown 触发后,KeyUp是不是
阅读全文
posted @ 2016-03-29 16:06
swtool
阅读(1126)
推荐(0)
摘要:
当CAD图形中无法进行复制、粘贴时,请将此DWG另存一下或许就可以了
阅读全文
posted @ 2016-03-25 16:13
swtool
阅读(507)
推荐(0)
摘要:
原来是要安装MySQL的驱动 下载地址:http://dev.mysql.com/downloads/connector/net/ 支持32/64bit
阅读全文
posted @ 2016-03-23 14:15
swtool
阅读(1911)
推荐(0)
摘要:
很感谢creativepeter(头皮屑)提供的本连接地址(http://www.connectionstrings.com/) Read more about connecting to Interbase in this Borland Developer Network article htt
阅读全文
posted @ 2016-03-23 13:11
swtool
阅读(2507)
推荐(0)
摘要:
1.获取所有数据库名 --SELECT Name FROM Master..SysDatabases ORDER BY Name -- 2.获取所有表名: --SELECT Name NAMEtemp,* FROM TEST..SysObjects Where XType='U' ORDER BY
阅读全文
posted @ 2016-03-22 13:03
swtool
阅读(2693)
推荐(0)
摘要:
this.WindowState = FormWindowState.Normal; this.FormBorderStyle = FormBorderStyle.Sizable; this.Top = 0; this.Left = 0; this.Width = Screen.PrimaryScreen.WorkingArea.Wid...
阅读全文
posted @ 2016-03-21 15:51
swtool
阅读(3062)
推荐(0)
摘要:
1 public class FtpHelper 2 { 3 string ftpServerIP; 4 string ftpRemotePath; 5 string ftpUserID; 6 string ftpPassword; 7 string ftpURI; 8 /// 9 /// 连...
阅读全文
posted @ 2016-03-20 21:38
swtool
阅读(1139)
推荐(0)
摘要:
http://www.360doc.com/content/13/0728/16/286397_303156680.shtml
阅读全文
posted @ 2016-03-19 22:59
swtool
阅读(254)
推荐(0)
摘要:
if (TargetFileInfo.FullName.Contains("\\\\")) { directory = TargetFileInfo.Directory.FullName.Replace("\\\\", ""); isServerFolder = true; } TargetFile
阅读全文
posted @ 2016-03-18 10:24
swtool
阅读(214)
推荐(0)
摘要:
以下是直接从代码中复制出来的 Data Source=192.168.2.1\\SQLEXPRESS;Initial Catalog=DesignSystem;Persist Security Info=True;User ID=sa;Password=******** 而正确的应该是 Data S
阅读全文
posted @ 2016-03-16 09:11
swtool
阅读(158)
推荐(0)
摘要:
在C#中,如果要删除DataTable中的某一行,大约有以下几种办法: 1。使用DataTable.Rows.Remove(DataRow),或者DataTable.Rows.RemoveAt(index);可以直接删除行 2。datatable.Rows[i].Delete()。 Delete()
阅读全文
posted @ 2016-03-10 16:30
swtool
阅读(206)
推荐(0)
摘要:
DataRow dr = dtNow.NewRow(); dr.ItemArray = dtNow.Rows[rowIndex].ItemArray;
阅读全文
posted @ 2016-03-10 15:39
swtool
阅读(693)
推荐(0)
摘要:
private DataTable SwapRow(int index1,int index2,DataTable dt) { DataRow dr=dt.NewRow(); dr.ItemArray=dt.Rows[index1].ItemArray; dt.Rows[index1].ItemAr
阅读全文
posted @ 2016-03-06 10:12
swtool
阅读(860)
推荐(0)
摘要:
参考:http://blog.csdn.net/soarheaven/article/details/3267379 1.界面准备 (1)首先在form中添加一个DataGridView控件,将默认AllowDrop=false 的属性设置为True,否侧不能拖动! (2)对DataGridView
阅读全文
posted @ 2016-03-06 08:50
swtool
阅读(4896)
推荐(0)
摘要:
Pgp文件中不但可以编辑系统命令,也可以编辑自定义的命令,如果有重复的,后面自动覆盖前面的。
阅读全文
posted @ 2016-03-04 11:16
swtool
阅读(223)
推荐(0)
摘要:
MySQL / SQL Server / Oracle / MS Access的sql语句联系区别总结 各数据库的sql语句差别 1.取前几条数据 MySQL 语法 SELECT * FROM Persons LIMIT 5 Oracle 语法 SELECT * FROM Persons WHERE
阅读全文
posted @ 2016-03-03 16:33
swtool
阅读(1508)
推荐(0)
摘要:
/// <summary> /// 利用Excel中VBA的Evaluate方法对字符串进行解析计算 /// </summary> /// <param name="str"></param> /// <returns></returns> public static double Cal(this
阅读全文
posted @ 2016-02-23 13:55
swtool
阅读(2051)
推荐(0)
摘要:
//this.MaximizeBox = false; ; //this.MinimizeBox = false; ; //this.MaximumSize = new Size(800, 600); //this.MinimumSize = new Size(650, 500); 当上面这些代码体
阅读全文
posted @ 2016-02-19 15:23
swtool
阅读(236)
推荐(0)
摘要:
this.Size=Screen.PrimaryScreen.WorkingArea.Size;
阅读全文
posted @ 2016-01-24 11:38
swtool
阅读(501)
推荐(0)
摘要:
MessageBox.Show("当前窗体标题栏高度"+(this.Height - this.ClientRectangle.Height).ToString());//获得当前窗体标题栏高度ClientRectangle//获取表示控件的工作区的矩形MessageBox.Show(SystemI...
阅读全文
posted @ 2016-01-23 22:01
swtool
阅读(1160)
推荐(0)
摘要:
1.新建一个Database,new Database(true, false);2.以A.DWG为原型新建一个Database,new Database(false,true);3.将2中的块表记录复制到1的块表中;4.新建一个块参照,new BlockReference(blockReferen...
阅读全文
posted @ 2016-01-23 10:04
swtool
阅读(710)
推荐(0)
摘要:
//正确 var weldtable = (from tt in database.NDEWeldingCheckData where tt.IsDelete == false && tt.FK_T...
阅读全文
posted @ 2016-01-22 13:13
swtool
阅读(450)
推荐(0)
摘要:
orderby 子句解析为 OrderBy()方法,orderby descending 子句解析为OrderBy Descending()方法: var racers = Formula1.GetChampions(). Where(r = > r.Country == "Brazil"). Or...
阅读全文
posted @ 2016-01-22 13:01
swtool
阅读(6181)
推荐(0)
摘要:
selectedNode=treView.GetNodeAt(e.X,e.Y); if(selectedNode!=null) { if(e.Button == MouseButtons.Left) { Rectangle rec = new Rectangle(selectedNode....
阅读全文
posted @ 2016-01-19 14:55
swtool
阅读(293)
推荐(0)
摘要:
CAD是一个多文档的应用程序,所以在CAD中大量应用静态类是有好处的,特别是一些常量、固定设置等。自定义的菜单及菜单中的内容都可以采用静态类来处理。
阅读全文
posted @ 2016-01-13 09:52
swtool
阅读(343)
推荐(0)
摘要:
由于种种原因需要向CAD的Editor发送命令,此时应特别注意:能用代码解决的问题绝不用sendcommand的方式,因为不知道什么时候就出了什么鸟问题,向命令行发送命令其不可控因素太多了;能用异步的就用异步吧,因为经过近段时间的测试发现异步反而不容易出问题,所谓异步即:SendStringToEx...
阅读全文
posted @ 2016-01-13 09:27
swtool
阅读(1480)
推荐(0)
摘要:
我是在winform代码中出现这个错误的,前面还没有错误,昨天整理了一下代码后出错了。仔细回忆才发现有几行代码移到靠前了,后来反思才发现出错的原因,现写出来供大家分享,因为这个错误很隐蔽,生成时不会报错,运行时不可以单步检查,所以如果不注意可能会导致浪费很多时间:下面的代码就会报这种错误 publ...
阅读全文
posted @ 2016-01-13 09:14
swtool
阅读(3987)
推荐(0)
摘要:
//如何获得系统字体列表 System.Drawing.Text.InstalledFontCollection fonts=new System.Drawing.Text.InstalledFontCollection(); foreach(System.Drawing.FontFamily ff...
阅读全文
posted @ 2015-12-25 15:28
swtool
阅读(190)
推荐(0)
摘要:
设 p1=(x1,y1), p2=(x2,y2), p3=(x3,y3) 求向量 p12=(x2-x1,y2-y1) p23=(x3-x2,y3-y2) 则当 p12 与 p23 的叉乘(向量积) p12 x p23 = (x2-x1)*(...
阅读全文
posted @ 2015-12-23 08:53
swtool
阅读(495)
推荐(0)
摘要:
CadBaseSet:静态类cbName:静态属性value:要赋给属性的值typeof(CadBaseSet).GetProperty(cbName).SetValue(typeof(CadBaseSet), value, null);
阅读全文
posted @ 2015-12-21 21:44
swtool
阅读(1066)
推荐(1)
摘要:
假如各自实例化后的Color分别为:SysColor和CadColor那么SysColor转AutoDesk.AutoCAD.Colors.Color为:Autodesk.AutoCAD.Colors.Color.FromColor(SysColor)CadColor转System.Drawing....
阅读全文
posted @ 2015-12-05 08:32
swtool
阅读(379)
推荐(0)
摘要:
数据类型数据类型简写标准命名举例ArrayarrarrShoppingListBoolean blnblnIsPostBackByte bytbytPixelValueChar chrchrDelimiterDateTime dtmdtmStartDateDecimaldecdecA...
阅读全文
posted @ 2015-11-28 10:13
swtool
阅读(1221)
推荐(0)
摘要:
//cmd:方法名,sb:类的实例 sb.GetType().GetMethod(cmd).Invoke(sb, null);
阅读全文
posted @ 2015-11-17 16:36
swtool
阅读(719)
推荐(0)
摘要:
1.首先如果直接将项目设置为启动项目,在项目属性里把启动项目修改为cad.exe的路径,则无法进行任何调试,无法命中断点。2.还有另一种方式,就是把 acad.exe放到解决方案中,并将其设置为启动项目,此时按F5会启动CAD,不过别的项目默认是不会自动生成的,因此会导致调试代码与原来生成的代码不一...
阅读全文
posted @ 2015-11-13 13:44
swtool
阅读(254)
推荐(0)
摘要:
E0144B5EF508141116499922416808527281254352467918169578633294856113276452749952053893952
阅读全文
posted @ 2015-11-07 17:32
swtool
阅读(228)
推荐(0)
摘要:
//复制内容到剪切板Clipboard.SetData(DataFormats.Text, "复制内容");//清空剪切板Clipboard.Clear();
阅读全文
posted @ 2015-11-06 21:20
swtool
阅读(481)
推荐(0)
摘要:
/// /// 链接到当前地址 /// /// public static void LinkTo(this string URL) { ProcessStartInfo startInfo = new ProcessStartInfo("IEx...
阅读全文
posted @ 2015-11-06 15:25
swtool
阅读(174)
推荐(0)
摘要:
using System.Net;using System.Management; //计算机名 string MachineName = System.Environment.MachineName; //域名 string UserDomainName =...
阅读全文
posted @ 2015-11-04 16:05
swtool
阅读(301)
推荐(0)
摘要:
Document doc = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument;//向命令行发送命令doc.SendStringToExecute(FunctionName.First...
阅读全文
posted @ 2015-11-04 15:05
swtool
阅读(566)
推荐(0)