摘要:
AutoCAD中状态栏类: public sealed class StatusBar { protected StatusBar(AcApStatusBar* impObj); public PaneCollection Panes { get; } public TrayI...
阅读全文
posted @ 2015-11-04 15:01
swtool
阅读(503)
推荐(0)
摘要:
Autodesk.AutoCAD.ApplicationServices.Application.SetSystemVariable("MODEMACRO", "Hello World")
阅读全文
posted @ 2015-11-04 08:30
swtool
阅读(331)
推荐(0)
posted @ 2015-10-27 14:16
swtool
阅读(168)
推荐(0)
摘要:
5分钟实现VS2010整合NUnit进行单元测试http://www.cnblogs.com/jeffwongishandsome/archive/2012/03/18/2404845.html
阅读全文
posted @ 2015-10-26 08:20
swtool
阅读(125)
推荐(0)
摘要:
Visual Studio 2010 单元测试共分七个部分:普通单元测试、顺序单元测试、压力测试,Generic测试、数据库测试、UI界面测试和Web性能测试。Visual Studio 2010 单元测试之一---普通单元测试:http://blog.csdn.net/tjvictor/archi...
阅读全文
posted @ 2015-10-23 16:24
swtool
阅读(192)
推荐(0)
摘要:
在DataGridView中,选择行无法隐藏的问题!当直接用程序中的 DataGridView.SelectRows[0].Visible = false; 程序会报出一个异常!异常错误如下:System.InvalidOperationException: 与货币管理器的位置关联的行不能设置为不可...
阅读全文
posted @ 2015-10-15 13:23
swtool
阅读(638)
推荐(0)
摘要:
将project文件夹中所有的ob和pdf文件删除,并点击【文件】/【生成应用程序】/【重新编译应用程序】即可重新生成。
阅读全文
posted @ 2015-10-13 13:14
swtool
阅读(388)
推荐(0)
摘要:
文字水印感觉有些问题,可能是字体的原因图片水印的透明度设置无效但勉强可以用iTextSharp.dll版本5.2.1.0using System;using System.Collections.Generic;using System.Linq;using System.Text;using iT...
阅读全文
posted @ 2015-10-09 10:51
swtool
阅读(1131)
推荐(0)
摘要:
一、下载PDFBox 访问网址http://sourceforge.net/projects/pdfbox/(这个绝对是个好网站)二、引用动态链接库解压缩下载的PDFBox,找到其中的Bin目录,需要在项目中添加引用的dll文件有: IKVM.GNU.Classpath.dllPDFBox-0.7...
阅读全文
posted @ 2015-10-08 09:04
swtool
阅读(3693)
推荐(0)
摘要:
这个问题似乎以前碰到过,不过记不太清了。程序重新生成,提示错误:在证书存储区中找不到清单签名证书。可能是之前部署的程序证书被我删掉了或是证书过期了,结果出现这个问题。解决方案如下:方案1:右击项目属性—>签名—>为ClickOnce清单签名,将勾掉的选项去掉。方案2:在签名中创建一个新的签名。方案3...
阅读全文
posted @ 2015-09-30 11:03
swtool
阅读(166)
推荐(0)
摘要:
1、格式化货币(跟系统的环境有关,中文系统默认格式化人民币,英文系统格式化美元)string.Format(”{0:C}”,0.2) 结果为:¥0.20 (英文操作系统结果:$0.20)默认格式化小数点后面保留两位小数,如果需要保留一位或者更多,可以指定位数string.Format(”{0:C1}...
阅读全文
posted @ 2015-09-30 11:01
swtool
阅读(398)
推荐(0)
摘要:
string aaa = string.Format("{0:yyyy-MM-dd HH:mm:ss:fff}", UpLoadDate);
阅读全文
posted @ 2015-09-27 20:22
swtool
阅读(153)
推荐(0)
摘要:
int m = int.Parse(Enum.Format(typeof(MaterialForms), cr.MaterialType, "d")); string codem = Enum.Format(typeof(MaterialFormCode), m, "g");
阅读全文
posted @ 2015-09-18 11:14
swtool
阅读(1383)
推荐(0)
摘要:
一、字符转换函数1、ASCII()返回字符表达式最左端字符的ASCII 码值。在ASCII()函数中,纯数字的字符串可不用‘'括起来,但含其它字符的字符串必须用‘'括起来使用,否则会出错。2、CHAR()将ASCII 码转换为字符。如果没有输入0 ~ 255 之间的ASCII 码值,CHAR() 返...
阅读全文
posted @ 2015-09-15 14:02
swtool
阅读(205)
推荐(0)
摘要:
//将坐标系置为WCS ed.CurrentUserCoordinateSystem = Matrix3d.Identity;
阅读全文
posted @ 2015-08-16 13:10
swtool
阅读(313)
推荐(0)
摘要:
var NewistRows = from ff in LinkToSQL.JobNumberList from gg in LinkToSQL.M1_Test let tt = ( ...
阅读全文
posted @ 2015-07-22 13:43
swtool
阅读(1292)
推荐(0)
posted @ 2015-06-03 08:39
swtool
阅读(249)
推荐(0)
摘要:
Sub csv() Dim Fs, myFile As Object Dim myfileline As String 'txtfile的行数据 Dim sht As Worksheet For Each sht In ThisWorkbook.Sheets ns = sht.Cells(1, 8...
阅读全文
posted @ 2015-05-31 10:03
swtool
阅读(6465)
推荐(0)
摘要:
1 /// 2 /// 判断字符串是否是数字 3 /// 4 /// 5 /// 6 /// 7 /// 8 public static bool IsNumType(this string str, NumType nt...
阅读全文
posted @ 2015-05-23 22:39
swtool
阅读(7048)
推荐(2)
摘要:
在Javascript中,数学方法可以分成以下几类: constans(常数)、power functions(乘方函数)、trigonometic functions(三角函数)、rounding functions(舍入函数)、random numbers(随机数字)常数和乘方函数Math.E自...
阅读全文
posted @ 2015-05-21 09:14
swtool
阅读(359)
推荐(0)
摘要:
object aa = new DataTable().Compute("8+2*(3+4)", null);
阅读全文
posted @ 2015-05-14 10:06
swtool
阅读(145)
推荐(0)
摘要:
foreach (PropertyInfo info in saddle.GetType().GetProperties()) { try { string objString = info.Name; objec...
阅读全文
posted @ 2015-05-08 14:46
swtool
阅读(178)
推荐(0)
摘要:
1 /// 2 /// 将DataTable集合 B加入到DataTable A中,应用于两个或以上的只有单行数据的无主键的datatable的合并 3 /// 4 /// A 5 /// B 6 /// 合并后的DataTable 7 ...
阅读全文
posted @ 2015-04-01 10:52
swtool
阅读(507)
推荐(0)
摘要:
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplication1{ public interface IPrints { ...
阅读全文
posted @ 2014-12-29 21:15
swtool
阅读(191)
推荐(0)
摘要:
http://www.cnblogs.com/dragonstreak_1/archive/2011/10/07/2200296.html
阅读全文
posted @ 2014-10-26 09:43
swtool
阅读(156)
推荐(0)
摘要:
下面将简单介绍一下几种ADO连接方式:ODBCDSN,ODBCDSN-Less,OLEDBProvider,和"MSRemote"Provider. I.DSN oConn.Open"DSN=AdvWorks;UID=Admin;PWD=;" 注意:从MDAC2.1开始就不能够在使用这样的方式了...
阅读全文
posted @ 2014-10-24 13:17
swtool
阅读(974)
推荐(0)
摘要:
Microsoft Access 数据类型SQL Server 数据类型是/否 (“是/否”数据类型:一种字段数据类型,用于只有两种可能值(如是或否、True 或 False)的字段。不允许有 Null 值。) Boolean 或 YESNObit (bit 数据类型:在 Access 项目中,一种...
阅读全文
posted @ 2014-10-24 10:04
swtool
阅读(1014)
推荐(0)
摘要:
连接 Access 2007 的操作方法//无密码的连接字符串stringconStr = "Provider=Microsoft.Ace.OleDb.12.0;";conStr += @"Data Source=E:\数据库\XiaoZhen.accdb;";conStr += "Persist ...
阅读全文
posted @ 2014-10-23 14:05
swtool
阅读(2857)
推荐(0)
摘要:
FaceType是一个枚举类型;cbFace.Text是一个枚举值对应的字符串;下面的代码可以得到枚举值FaceType aaa = (FaceType)Enum.Parse(typeof(FaceType), cbFace.Text);
阅读全文
posted @ 2014-10-17 16:12
swtool
阅读(5811)
推荐(0)
摘要:
DataTable是我们在进行开发时经常用到的一个类,并且经常需要对DataTable中的数据进行筛选等操作,下面就介绍一下Datatable中经常用到的一个方法——Select,微软提供了四个函数的重载,分别是Select()Select(string filterExpression)Selec...
阅读全文
posted @ 2014-10-17 10:37
swtool
阅读(427)
推荐(0)
摘要:
//取得交集 Pn = PnFace.Intersect(PnType).ToList(); //取得并集 Pn = PnFace.Concat(PnType).ToList();
阅读全文
posted @ 2014-10-16 13:36
swtool
阅读(270)
推荐(0)
摘要:
代码如下:其中cbFace.Text为字段名,TableFace为表名var PnFace = (from n in TableFace select n.GetType().GetProperty(cbFace.Text).GetValue(n, ...
阅读全文
posted @ 2014-10-16 12:48
swtool
阅读(223)
推荐(0)
摘要:
1 private void FormNozzle_Load(object sender, EventArgs e) 2 { 3 Flange f = new Flange(); 4 f.FlangeSystem = ...
阅读全文
posted @ 2014-10-14 16:12
swtool
阅读(453)
推荐(0)
摘要:
#include "..\..\Common\IO\AppDirectoryUtil.h"#include "..\..\Common\Database\DbConnection.h"#include "..\..\Common\Database\DbCommand.h"#include "..\....
阅读全文
posted @ 2014-10-07 11:26
swtool
阅读(520)
推荐(0)
摘要:
static AcDbObjectId OffsetEnty(const ACHAR* BlkName,AcDbObjectId entId,double OfsValue,AcDbDatabase *pDb=CrtEntity:: pPurDb); //!(多段线特别处理)AcDbObjectId...
阅读全文
posted @ 2014-10-07 11:18
swtool
阅读(905)
推荐(0)
摘要:
new MenuMacro(mg, "Cmd 1", "^C^C._NETLOAD;MYDLL;MYCOMMAND", "ID_MyCmd1");
阅读全文
posted @ 2014-09-11 10:47
swtool
阅读(688)
推荐(0)
摘要:
--删除主键Declare @Pk varChar(100);Select @Pk=Name from sysobjects where Parent_Obj=OBJECT_ID('SwtoolsUpdateRecord') and xtype='PK';if @Pk is not nullexec...
阅读全文
posted @ 2014-08-30 14:29
swtool
阅读(588)
推荐(0)
摘要:
罗列了一些用到的,各进制 以及 ASCII 间的转换,记录备忘一,先说说 2,8,10 ,16 各进制之间的转化System.Convert类中提供了较为全面的各种类型、数值之间的转换功能:几个比较常用的方法 1,Convert.ToInt32(string value, int fromBase...
阅读全文
posted @ 2014-08-03 11:31
swtool
阅读(740)
推荐(0)
摘要:
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace TestConsole{ class Program { static void Main...
阅读全文
posted @ 2014-08-03 11:15
swtool
阅读(579)
推荐(0)
摘要:
要让一个Windows Form的TextBox显示多行文本就得把它的Multiline属性设置为true。 要让TextBox里面的文本换行大家往往会想到直接在要换行的地方加个转义的换行符"\n": [csharp] view plaincopyprint?this.textBoxDescript...
阅读全文
posted @ 2014-08-01 22:47
swtool
阅读(1968)
推荐(0)