摘要: DevExpress skin 1 2 //加载皮肤 3 void InitSkinGallery() 4 { 5 SkinHelper.InitSkinGallery(rgbiSkins, true); 6 } 7 8 9 //构造函数初始化是加载皮肤10 public MasterForm()11 {12 InitializeComponent();13 InitSkinGallery();14 }选项卡切换 private DevE... 阅读全文
posted @ 2012-06-27 10:45 石 磊 阅读(477) 评论(0) 推荐(0) 编辑
摘要: 查询操作符和扩展方法查询操作符是linq的一个重要设施,linq使用扩展方式定义查询操作;例如where 操作符:初始linq表达式Linq 核心实现 1 public static IEnumerable<T> Where<T>(this IEnumerable<T> source, Func<T, bool> predicate) 2 { 3 foreach (T item in source) 4 { 5 if (predicate(item)) 6 { 7 ... 阅读全文
posted @ 2012-06-20 01:04 石 磊 阅读(353) 评论(0) 推荐(0) 编辑
摘要: 将控件的内容滚动到当前插入符号位置。 richTextBox1.ScrollToCaret(); 阅读全文
posted @ 2012-06-19 19:11 石 磊 阅读(242) 评论(0) 推荐(0) 编辑
摘要: linux 系统简单命令、文件操作等 阅读全文
posted @ 2012-06-09 17:24 石 磊 阅读(331) 评论(0) 推荐(0) 编辑
摘要: (一)双击展开,收缩字表ExpandedChild1 Private Sub ExpandedChild(ByVal sender As DevExpress.XtraGrid.Views.Grid.GridView)2 '找出焦点行3 Dim VIntPage As Integer = sender.FocusedRowHandle4 If sender.GetMasterRowExpanded(VIntPage) Then5 sender.CollapseMasterRow(VIntPage)6 Else7 sender.ExpandMasterRow(VIntPage)8 End 阅读全文
posted @ 2012-06-08 13:35 石 磊 阅读(14114) 评论(0) 推荐(2) 编辑
摘要: 用的 Linux 发行版是 Debian ,其它发行版类似。安装步骤如下:1. 给硬盘分区,一个给 Windows,一个给 Linux,一个做 Swap,剩下的随便。2. 在第一个分区上装 Windows 73. 在第二个分区上装 Debian。光盘安装,注意装 grub 的时候不要装在 MBR,要装在 Linux 所在的分区,我这里是 /dev/sda2。安装完成后,别着急重启,重启就杯具了。4. 返回安装步骤,选择 "Excute a shell",执行如下命令: dd if=/dev/sda2 of=/mnt/linux.bin bs=512 count=1 moun 阅读全文
posted @ 2012-05-29 09:45 石 磊 阅读(2307) 评论(0) 推荐(0) 编辑
摘要: View Code bool isModified = false; foreach (string key in ConfigurationManager.AppSettings) { if (key == "box") { isModified = true; } } Configuration config = ConfigurationManager.OpenExeConfiguration(Configu... 阅读全文
posted @ 2012-05-24 17:30 石 磊 阅读(373) 评论(0) 推荐(0) 编辑
摘要: View Code 1 #region 枚举公用转换类 2 public class EnumDescConverter : System.ComponentModel.EnumConverter 3 { 4 protected System.Type m_MyVal; 5 public static string GetEnumDescription(Enum value) 6 { 7 FieldInfo fi = value.GetType().GetField(value.ToString(... 阅读全文
posted @ 2012-05-24 02:45 石 磊 阅读(441) 评论(0) 推荐(0) 编辑
摘要: View Code 1 public ProjectInstaller() 2 { 3 InitializeComponent(); 4 this.Committed += new InstallEventHandler(ProjectInstaller_Committed); 5 } 6 7 private void ProjectInstaller_Committed(object sender, InstallEventArgs e) 8 { 9 ... 阅读全文
posted @ 2012-05-24 02:41 石 磊 阅读(561) 评论(0) 推荐(0) 编辑
摘要: View Code 1 XmlDocument doc = new XmlDocument(); 2 XmlDeclaration dec = doc.CreateXmlDeclaration("1.0", "GB2312", null); 3 doc.AppendChild(dec); 4 //创建一个根节点(一级) 5 XmlElement root = doc.CreateElement("First"); 6 doc.AppendChild(root); 7 ... 阅读全文
posted @ 2012-05-24 02:39 石 磊 阅读(342) 评论(0) 推荐(0) 编辑