nini
摘要:using Nini.Ini;using Nini.Config;IniDocument doc = new IniDocument("Settings.ini", IniFileType.WindowsStyle);IniConfigSource source = new IniConfigSource(doc);source.Configs["[System]"].Set("InstallDirectory", acmInstallDirTextbox.Text);source.Save();=>Try following
阅读全文
posted @
2014-01-30 16:00
武胜-阿伟
阅读(335)
推荐(0) 编辑
Using Nini .NET Configuration Library
摘要:Using Nini .NET Configuration LibraryTweetWhen developing a desktop application, there will be times when you want to store settings for your program. A database is one option, but on Windows, you might just wish to have your settings stored in an INI file. One way to work with an INI file in C# is
阅读全文
posted @
2014-01-30 15:52
武胜-阿伟
阅读(469)
推荐(0) 编辑
include a image in devexpress datagrid
摘要:Add an ImageCollection to yout form and add some icons 16x16 to it.Add a column to the Grid for the icons.Set the column's fieldName to image (whatever you like).Set the column's UnboundType to Object.Add a repositoryItemPictureEdit to the column's columnEdit.All the above can be done in
阅读全文
posted @
2014-01-30 09:41
武胜-阿伟
阅读(1389)
推荐(0) 编辑
GridControl控件添加按钮列及在按钮Click事件中得到行数据 zt
摘要:在GridControl中添加按钮列的步骤如下:1. 把列的ColumnEdit属性设置为RepositoryItemButtonEdit2. 把TextEditStyle属性设置为HideTextEditor;3. 把Buttons的Kind属性设置为Glyph;4. 把Buttons的HorzAlignment属性设置为Near;5. 如果要用到事件的话,还要注册事件:this.repositoryItemButtonEdit1.ButtonClick += new DevExpress.XtraEditors.Controls.ButtonPressedEventHandler(this
阅读全文
posted @
2014-01-27 13:05
武胜-阿伟
阅读(19551)
推荐(2) 编辑
GridControl 列中显示图片 z
摘要:如何在 DevExpress.XtraGrid.GridControl 显示图片列。 方法很多,我把它们逐一写在附言中,方便大家分情况合理使用。附言1 附言2 附言3第 1 条附言 · 6 月前GridControl一列的ColumnEdit属性中选择PictureEdit,一个RepositoryItemPictureEdit添加完成。列的FieldName设置为Image列名,如img。GridControl绑定的数据,不管是DataTable、List或者其他源,添加一个列,列名为img。 以DataTable为例:Image xx=Image.FromFile("x
阅读全文
posted @
2014-01-27 13:04
武胜-阿伟
阅读(4185)
推荐(1) 编辑
解决Windows8系统磁盘占用太多100%或99%
摘要:关闭家庭组功能:WIN+R运行Services.msc,找到HomeGroup Listener和HomeGroup Provider服务,分别停止和禁用这2个服务。然后重新启动Windows 8,看看磁盘占用是不是正常了。解决方法2:打开网络和共享中心 → 更改适配器设置 → 网络连接 → internet协议版本6(tcp/ipv6)的前面的勾去掉,然后确定退出。解决方法1:硬盘4K对齐,能减少磁盘占用100%情况。(大部分用户能解决) 解决方法2:检查硬盘AHCI驱动是否安装。 解决方法3:通过 HD Tune Pro 5 专业的硬盘测试工具 检测硬盘健康度,是否有故障。 解决方法...
阅读全文
posted @
2014-01-18 20:21
武胜-阿伟
阅读(12320)
推荐(0) 编辑
DevExpress GridControl使用方法
摘要:一、如何解决单击记录整行选中的问题View->OptionsBehavior->EditorShowMode 设置为:Click二、如何新增一条记录(1)、gridView.AddNewRow()(2)、实现gridView_InitNewRow事件三、如何解决GridControl记录能获取而没有显示出来的问题gridView.populateColumns();四、如何让行只能选择而不能编辑(或编辑某一单元格)(1)、View->OptionsBehavior->EditorShowMode 设置为:Click(2)、View->OptionsBehavior
阅读全文
posted @
2014-01-18 20:10
武胜-阿伟
阅读(36104)
推荐(5) 编辑
DevExpress中,添加Winform窗体到DockPanel z
摘要:DevExpress中,添加Winform窗体到DockPanel在使用DevExpress过程中,原先已经创建好的导航窗体,如何添加到DockPanel中进行展示?FormX frmX = new FormX();frmX.Show(this.DockPanel1); frmX.Dock = DockStyle.Fill; frmX.TopLevel = false; frmX.FormBorderStyle = FormBorderStyle.None; this.DockPanel1.Text = frmX.Text; this.DockPanel...
阅读全文
posted @
2014-01-18 10:26
武胜-阿伟
阅读(5783)
推荐(1) 编辑
Devexpress 之gridControl
摘要:1、gridControl如何去掉主面板?鼠标右键Run Designer=》OptionsView =》 ShowGroupPanel=False;2、gridControl如何设置列自动宽度?鼠标右键Run Designer=》OptionsView=》ColumnAutoWidth=True;3、gridControl如何设置单元格不可编辑?鼠标右键Run Designer=》OptionsBehavior 》Editable=False;4.修改最上面的GroupPanel内容gridView1.GroupPanelText=”盼盼”;获得选中了多少行?int index = grid
阅读全文
posted @
2014-01-12 13:38
武胜-阿伟
阅读(3486)
推荐(0) 编辑
Devexpress 之gridControl双击行事件
摘要:MouseDown事件protected internal void gridControl1_MouseDown(object sender, MouseEventArgs e){DevExpress.XtraGrid.Views.Grid.ViewInfo.GridHitInfo hInfo = gridView1.CalcHitInfo(new Point(e.X, e.Y));if (e.Button == MouseButtons.Left && e.Clicks == 2){//判断光标是否在行范围内if (hInfo.InRow){//MessageBox.Sho
阅读全文
posted @
2014-01-12 13:36
武胜-阿伟
阅读(3212)
推荐(1) 编辑
Devexpress之popupMenu
摘要:1、拖放一个BarManager控件barManager1和一个PopupMenu控件popupMenu12、设置popupMenu1的Manager属性为barManager13、拖放一个TextEdit控件textEdit1,并设置它的MouseUp事件添加如下代码if(e.Button==MouseButtons.Right){popupMenu1.ShowPopup(Control.MousePosition);}关于单击事件
阅读全文
posted @
2014-01-12 13:34
武胜-阿伟
阅读(1656)
推荐(0) 编辑
Devexpress之dxErrorProvider
摘要:DXErrorProvider:错误提示控件,用法类似于VS的winform控件中的ErrorProvider。下面为一个使用实例,验证文本框输入是否为数字:①.添加System.Text.RegularExpressions引用。②.在设计视图上拖一个textEdit控件textEdit1。③.验证输入是否为数字,不是显示错误提示。public bool IsNumeric(string sNumeric){return (new Regex(“^[\\+\\-]?[0-9]*\\.?[0-9]+$”)).IsMatch(sNumeric);}private void simpleButto
阅读全文
posted @
2014-01-12 13:33
武胜-阿伟
阅读(2017)
推荐(0) 编辑
DevExpress之lookupedit
摘要:DevExpress中的lookupedit的使用方法。绑定数据源: lookupedit.properties.valuemember = 实际要用的字段; //相当于editvaluelookupedit.properties.displaymember =要显示的字段; //相当于textlookupedit.properties.datasource = 数据源;判断是否选择下拉框:if(this.lookupedit.editvalue==null ||this.lookupedit.editvalue.tostring()=="nulltext"){//提示信息
阅读全文
posted @
2014-01-12 13:31
武胜-阿伟
阅读(628)
推荐(1) 编辑
Devexpress 汉化 代码 zt
摘要:将一下代码放到需要汉化的窗体Load事件中解压汉化初丁文件/// /// 汉化DX控件/// private void Chinesization(){//视情况而定汉化,取消下面的注释//DevExpress.XtraGrid.Localization.GridResLocalizer.Active = new Dxper.LocalizationCHS.Win.XtraGridCHS();DevExpress.XtraEditors.Controls.Localizer.Active = new Dxper.LocalizationCHS.Win.XtraEditorsCHS();//De
阅读全文
posted @
2014-01-12 13:30
武胜-阿伟
阅读(613)
推荐(1) 编辑
Devexpress之DateEdit学习,可选择日期时 zt
摘要:DateEdit默认是是值只可以选择日期的,下面就来看看怎么设置可以选择时间。代码如下。设置以下属性dateEdit1.Properties.VistaDisplayMode = DevExpress.Utils.DefaultBoolean.True;dateEdit1.Properties.VistaEditTime = DevExpress.Utils.DefaultBoolean.True;设置显示长日期模式(精确到秒):dateEdit1.Properties.DisplayFormat.FormatString=”G”(一定要大写哦!~)dateEdit1.Properties.D
阅读全文
posted @
2014-01-12 13:24
武胜-阿伟
阅读(5361)
推荐(1) 编辑
Devexpress之barManager
摘要:隐藏菜单栏左边的竖线和右边的箭头?1、隐藏菜单栏上右边的箭头属性设置:OptionsBar=>>AllowQuickCustomization=False2、隐藏菜单栏左边的竖线属性设置:OptionsBar=>>DrawDragBorder=False3、工具栏和状态栏上右边的箭头隐藏设置,和菜单栏一样。如何使用imageList里的图片?1、选中barManager设置属性:Images和LargeImages属性都设置成imageList2、选中要设置的barSubItem:PaintStyle=CaptionGlyph,ImageIndex=选择图片一,在bar
阅读全文
posted @
2014-01-12 11:48
武胜-阿伟
阅读(5912)
推荐(0) 编辑
devpress 很好的中文论坛
摘要:阿伟邀请您访问DXPER开发者论坛http://www.dxper.net/?fromuid=3701
阅读全文
posted @
2014-01-11 10:13
武胜-阿伟
阅读(1292)
推荐(0) 编辑
DevExpress控件汉化类 z
摘要:更新了一些字段,VER9.3.3using System;using DevExpress.XtraEditors.Controls;using DevExpress.XtraGrid.Localization;using DevExpress.XtraBars.Customization;using DevExpress.XtraBars.Localization;using DevExpress.XtraNavBar;using DevExpress.XtraPrinting.Localization;using DevExpress.XtraReports.Localization;us
阅读全文
posted @
2014-01-03 14:50
武胜-阿伟
阅读(1539)
推荐(0) 编辑