摘要:
#cs 学习deercao提供的正则30分钟资料的笔记 正则表达式就是个字符串处理语言,是用来“查找你想要的字符串和进行字符串的替换“。 网页、程序或文件中有关文本内容的处理部分都可以应用正则表达式完成。 在正则表达式中,元字符有特殊功能,如\w匹配“数字、字母、下划线、汉字”,这个在afan的正则
阅读全文
posted @ 2017-05-19 11:00
swtool
阅读(324)
推荐(0)
摘要:
调用 this.ImeMode = ImeMode.OnHalf; ImeMode 枚举:指定一个值,该值是用来确定在选定了对象时该对象的输入法编辑器 (IME) 的状态。 以下是微软的解释: 成员名称 说明 Alpha 字母数字单字节字符 (SBC)。此设置仅对朝鲜语和日语 IME 有效。 Alp
阅读全文
posted @ 2017-05-18 14:41
swtool
阅读(582)
推荐(0)
摘要:
首先先看一下什么情况下需要对按键进行识别: KeyPress事件响应函数中,有KeyPressEventArgs, 对应于e.KeyChar; KeyDown事件响应中有 KeyEventArgs 求取值时用e.KeyValue 键盘符号,对应的键值表 该类包含用于处理键盘输入的常数。键由键值是由键
阅读全文
posted @ 2017-05-16 12:38
swtool
阅读(15865)
推荐(0)
摘要:
string sCode = Strings.Replace(sCode, "point", "", 1, -1, CompareMethod.Text);
阅读全文
posted @ 2017-05-03 10:13
swtool
阅读(235)
推荐(0)
posted @ 2017-04-07 14:21
swtool
阅读(977)
推荐(0)
摘要:
http://www.cnblogs.com/gosteps/p/5289955.html
阅读全文
posted @ 2017-03-20 10:15
swtool
阅读(115)
推荐(0)
摘要:
最近在做一个程序,需要实现窗口下的F5 刷新功能。 研究了一下KeyDown,KeyPress 和KeyUp ,发现之间还是有点学问的。 让我们带着如下问题来说明,如果你看到这些问题你都知道,那么这篇文章你就当复习吧:) 1.这三个事件的顺序是怎么样的? 2.KeyDown 触发后,KeyUp是不是
阅读全文
posted @ 2017-03-16 08:38
swtool
阅读(337)
推荐(0)
摘要:
首先定义一个枚举 /// <summary> /// 枚举注释的自定义属性类 /// </summary> public class EnumDescriptionAttribute : Attribute { private string m_strDescription; public Enum
阅读全文
posted @ 2017-03-14 09:55
swtool
阅读(9093)
推荐(0)
摘要:
#region 得到光标在屏幕上的位置 [DllImport("user32")] public static extern bool GetCaretPos(out Point lpPoint); [DllImport("user32.dll")] private static extern In
阅读全文
posted @ 2017-03-14 09:53
swtool
阅读(412)
推荐(0)
摘要:
Found this a problem with Acad 2015 - if you get this error go into your code and look for 'mapcar' then within that look for 'command' and change to
阅读全文
posted @ 2016-12-16 14:31
swtool
阅读(1275)
推荐(0)
摘要:
http://forums.autodesk.com/t5/net/readdwgfile-efilesharingviolation/td-p/2076678 当语句为:dbInsert.ReadDwgFile(frmDwg, System.IO.FileShare.Read, true, nul
阅读全文
posted @ 2016-12-16 09:41
swtool
阅读(687)
推荐(0)
摘要:
ACTC好像被列入黑名单了一样就是不能加载,不得不换ACVC,晕死。
阅读全文
posted @ 2016-12-15 16:28
swtool
阅读(545)
推荐(0)
摘要:
测试了很多台机器,直接启动外部程序方式在按F5后启动CAD,在不加载DLL情况下,只要点击文字样式管理器必死。
阅读全文
posted @ 2016-12-14 15:42
swtool
阅读(673)
推荐(0)
摘要:
foreach (string s in Enum.GetNames(typeof(WallKind))) { WinFormTools.MsgBox(s); }
阅读全文
posted @ 2016-09-20 13:44
swtool
阅读(227)
推荐(0)
摘要:
关于部分类: 1.部分类不能应用于两个项目、模块中,即只能在一个dll或exe中。 2.可以在一个项目中的同一个程序集中的不同的cs中。
阅读全文
posted @ 2016-09-16 14:11
swtool
阅读(209)
推荐(0)
摘要:
public abstract class PartBase : Space { #region 基本属性 /// <summary> /// 是否复合板 /// </summary> public bool IsCladPart { get; set; } /// <summary> /// 基层
阅读全文
posted @ 2016-09-16 09:58
swtool
阅读(6889)
推荐(0)
摘要:
public static class FolderBrowserLauncher { /// /// Using title text to look for the top level dialog window is fragile. /// In particular, this will fail in non-Engl...
阅读全文
posted @ 2016-08-17 15:09
swtool
阅读(2315)
推荐(0)
摘要:
本贴类积发现的问题: 自2015开始,statusbar修改了。
阅读全文
posted @ 2016-07-27 21:10
swtool
阅读(460)
推荐(0)
摘要:
http://bbs.mjtd.com/thread-109497-1-1.html ★ AutoCAD 2015 必备优化★ (使用软件自带的"将设置重置为默认值"功能,会还原以下所有优化为软件默认值) ★1 关闭 软件启动时的新选项卡 提高启动速度关闭启动时新选项卡方法:启动AutoCAD使用命
阅读全文
posted @ 2016-07-27 20:07
swtool
阅读(3284)
推荐(0)
摘要:
MouseDown MouseClick MouseUp
阅读全文
posted @ 2016-07-13 09:25
swtool
阅读(643)
推荐(0)
摘要:
private void getDtModel() { dtModel = new DataTable(); List arrValue = (from ee in dtSapProcessModel.AsEnumerable() ...
阅读全文
posted @ 2016-07-12 14:28
swtool
阅读(314)
推荐(0)
摘要:
当在工具箱中无法加载自定义的控件时可以尝试重新生成该控件所在的项目
阅读全文
posted @ 2016-07-07 13:50
swtool
阅读(1389)
推荐(1)
摘要:
var docStatusBar = from ee in zDtNetRecord.AsEnumerable() from ff in zDtPvMenu.AsEnumerable() ...
阅读全文
posted @ 2016-06-24 16:17
swtool
阅读(196)
推荐(0)
摘要:
using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespac
阅读全文
posted @ 2016-05-24 21:21
swtool
阅读(331)
推荐(0)
摘要:
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Ch10Ex01 { class Program
阅读全文
posted @ 2016-05-24 10:04
swtool
阅读(322)
推荐(0)
摘要:
类的定义 修饰符 含义 1 无或internal 只能在当前项目中访问类,其它项目引用后也无法访问 2 public 可以任何地方访问类 3 abstract 不能实例化,只能供继承之用 4 sealed 不能供派生之用,只能实例化 5 internal abstract 1+3 6 public abstract 2+3 7 in...
阅读全文
posted @ 2016-05-22 15:36
swtool
阅读(478)
推荐(0)
摘要:
抽象类主要用作对象系列的基类,共享某些主要特性,例如,共同的目的和结构。接口则主要用于类,这些类在基础水平上有所不同,但仍可以完成某些相同的任务。 抽象类和接口都包含可以由派生类继承的成员。接口和抽象类都不能直接实例化,但可以声明这些类型的变量。如果这样做,就可以使用多态性把继承这两种类型的对象指定
阅读全文
posted @ 2016-05-22 12:18
swtool
阅读(290)
推荐(0)
摘要:
除了base 关键字外,这里还可以将另一个关键字this 用作构造函数初始化器。这个关键字指定在调用指定的构造函数前,.NET 实例化过程对当前类使用非默认的构造函数。例如;public class MyDerivedClass : MyBaseClass{public MyDerivedClass
阅读全文
posted @ 2016-05-22 09:56
swtool
阅读(133)
推荐(0)
摘要:
A类继承B类,那么A类的构造函数必须实现与B类相同的构造函数 如:B(),B(string filename) 那么A类中必须实现: A(),A(string filename)
阅读全文
posted @ 2016-05-08 18:45
swtool
阅读(537)
推荐(0)
摘要:
使用g.MeasureString()获得 使用MeasureString测量出来的字符宽度,总是比实际宽度大一些,而且随着字符的长度增大,貌似实际宽度和测量宽度的差距也越来越大了。查了一下MSDN,找到了下面这个理由: MeasureString 方法旨在与个别字符串一起使用,它在字符串前后包括少
阅读全文
posted @ 2016-04-23 18:07
swtool
阅读(9966)
推荐(2)
摘要:
最近在看工厂开发模式,发现用到了反射,之前只听说过也没怎么用过;所以花了点时间重新温习了一遍; 反射的作用是动态的加载某个dll(程序集),并执行该程序集中的某个方法,并返回结果;当然也可以给该方法传递参数 namespace assembly_name { public class assembl
阅读全文
posted @ 2016-04-20 15:42
swtool
阅读(3428)
推荐(0)
摘要:
ARC Arc Arc ARC; ATTDEF AttributeDefinition AttributeDefinition ATTDEF; ATTRIB AttributeReference AttributeReference ATTRIB; CIRCLE Circle Circle CIRC
阅读全文
posted @ 2016-04-19 09:31
swtool
阅读(535)
推荐(0)
摘要:
本文实例总结了C#中WinForm程序退出方法技巧。分享给大家供大家参考。具体分析如下: 在c#中退出WinForm程序包括有很多方法,如:this.Close(); Application.Exit();Application.ExitThread(); System.Environment.Ex
阅读全文
posted @ 2016-04-12 09:50
swtool
阅读(5653)
推荐(0)
摘要:
DBText除了左右左对齐且上下Base对齐的其对齐点为Position外,其余的都是AlignmentPoint
阅读全文
posted @ 2016-04-07 15:47
swtool
阅读(1574)
推荐(0)
摘要:
窗体控件中是有个List控件(ASP.Net)和一个ListView控件(WinForm)。 就以ListView为例子吧,ListView控件可以包含很多项,也可以说是一个集合,就让我们来看看它的Items属性吧! ListView的Items类型是ListView.ListViewItemCol
阅读全文
posted @ 2016-04-06 14:35
swtool
阅读(2671)
推荐(0)
摘要:
/// <summary> /// 从上到下排列选择行 /// </summary> /// <param name="dgv"></param> /// <returns></returns> public static List<DataGridViewRow> SortedUpDownSele
阅读全文
posted @ 2016-04-06 14:29
swtool
阅读(968)
推荐(0)
摘要:
//获取鼠标相对于当前控件的位置 Point mousePos = dgvAddCommand.PointToClient(MousePosition); //获取鼠标相对于当前窗体的位置 mousePos = PointToClient(MousePosition); //获取鼠标相对于屏幕左上点
阅读全文
posted @ 2016-04-04 22:16
swtool
阅读(3876)
推荐(0)
摘要:
Database本身就有TileMode的属性,我还去写了一个方法,晕!
阅读全文
posted @ 2016-04-03 17:43
swtool
阅读(243)
推荐(0)
摘要:
进行一番测试后发现KeyUp可以用,非常不理解
阅读全文
posted @ 2016-03-29 21:38
swtool
阅读(425)
推荐(0)
摘要:
//【03-27-16 04:17PM 129536 acbt 4 mgd.dll】替换成【acbt 4 mgd.dll】 string fileName = System.Text.RegularExpressions.Regex.Replace(fileInfo, @"^\d.*M *\d* *
阅读全文
posted @ 2016-03-29 21:36
swtool
阅读(1102)
推荐(0)