上一页 1 ··· 29 30 31 32 33 34 35 36 37 ··· 54 下一页
摘要: 例如:string c = @"net start ServiceDemo"; Cmd(c);string c = @"c:\windows\microsoft.net\framework\v2.0.50727\InstallUtil.exe " + AppDomain.CurrentDomain.BaseDirectory + "ServiceDemo.exe"; Cmd(c); /// <summary> /// 执行Cmd命令 /// </summary> public void Cmd(string c 阅读全文
posted @ 2011-09-30 15:13 小锋神 阅读(7698) 评论(0) 推荐(0)
摘要: this.lvwInfoList.EnsureVisible(this.lvwInfoList.Items.Count - 1);//自动滚动到指定行 阅读全文
posted @ 2011-09-30 14:00 小锋神 阅读(6347) 评论(0) 推荐(0)
摘要: WinForm 和 Windows Service 通信 - 消息队列如题,WinForm 和 Windows Service 通信,就是应用程序和系统服务通信,可以看成是进程间的通信。通信的方式有很多,这里只介绍通过消息队列(MessageQueue)方式。理论知识就不介绍了,直接介绍实例吧。工程下载/Files/newspring/WindowsService.rar一、建立工程建立3个项目,其中,Common 为类库,包含错误日志类(Log.cs)和数据库访问类(MsSql.cs)ServiceDemo 为Windows Service服务,包含安装类(Installer1.cs)和服务 阅读全文
posted @ 2011-09-28 17:15 小锋神 阅读(865) 评论(1) 推荐(1)
摘要: 0 一.应用场景 客户服务器上装的软件越来越多,由原来一个人管理改为几个人同时管理了,因此不同的管理员需要经常进行远程登陆,注销操作。 服务器上原有的一些程序是windows程序,用户登陆注销后,程序就退出了,咋办?把GUI程序改成windows服务程序是可行的,但客户希望能尽快解决此问题啊,咋办?于是就有了本文的想法,先这样用用吧! 呵呵...二.本文难点 说起来就一句话,做起来可得考虑以下三个问题: 1.如程序要访问Oracle数据库,在启动你的程序前,得先将Oracle数据库服务启动。 2.让Windows服务程序支持启动你的有界面的应用程序。(默认是不能与桌面交互的) 3.如何让W.. 阅读全文
posted @ 2011-09-28 13:21 小锋神 阅读(5012) 评论(0) 推荐(0)
摘要: 如题,WinForm 和 Windows Service 通信,就是应用程序和系统服务通信,可以看成是进程间的通信。通信的方式有很多,这里只介绍通过消息队列(MessageQueue)方式。理论知识就不介绍了,直接介绍实例吧。工程下载/Files/newspring/WindowsService.rar一、建立工程建立3个项目,其中,Common 为类库,包含错误日志类(Log.cs)和数据库访问类(MsSql.cs)ServiceDemo 为Windows Service服务,包含安装类(Installer1.cs)和服务类(Service1.cs)ServiceDesk 为WinForm应 阅读全文
posted @ 2011-09-28 11:00 小锋神 阅读(7726) 评论(1) 推荐(1)
摘要: //复制: private void button1_Click(object sender, System.EventArgs e) { if(textBox1.SelectedText != "") Clipboard.SetDataObject(textBox1.SelectedText); } //粘贴: private void button2_Click(object sender, System.EventArgs e) { IDataObject iData = Clipboard.GetDataObject(); if(iData.GetDataPres. 阅读全文
posted @ 2011-09-19 12:36 小锋神 阅读(30059) 评论(0) 推荐(3)
摘要: DevExpress XtraGrid的功能实在强大,刚使用的时候看到一大片属性设置,分不清东南西北,参照demo和使用中的一些经验,记录一下使用方法。现在数据库访问都使用ORM技术了,对于DataSouce绑定以下是以IList为说明对象。控件基本定义 DevExpress.XtraGrid.GridControl gridControl1; 1、 数据绑定(IList) DevExpress.XtraGrid.Views.Grid.GridView gridView1;IList<MyClass> list = new BindingList<MyClass>(); 阅读全文
posted @ 2011-09-18 23:00 小锋神 阅读(3768) 评论(0) 推荐(2)
摘要: 来源:网络收集一。ASPXGridView外观显示属性:Caption----列的标题(KeyFieldName----数据库字段SEOFriendly 是否启用搜索引擎优化Summary 指定分页汇总信息的格式Setting节点的ShowFilterRow=True设置快速查找功能SettingsBehavior.AllowFocusedRow=true 高亮选中的行,即选中行变色SettingsBehavior.AllDragDrop=false禁止拖动标题列头SettingsBehavior.AllowSort实现列头点击后是否可以排序SettingsPager.ShowEmptyDat 阅读全文
posted @ 2011-09-18 22:55 小锋神 阅读(8172) 评论(0) 推荐(1)
摘要: 1.在单元里显示日历控件、下拉框等Imports DevExpress.XtraEditors.RepositoryDim irdata As New RepositoryItemCalcEditGridView1.Columns(1).ColumnEdit = irdata2.格式化数字 ###,###.00 GridView1.Columns(4).DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric '此行必须要,不然下面的没有作用 GridView1.Columns(4).Displa... 阅读全文
posted @ 2011-09-18 22:52 小锋神 阅读(1158) 评论(0) 推荐(1)
摘要: private void dataGridView1_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e) { DataGridView dgv = (DataGridView)sender; if (e.RowIndex < dgv.Rows.Count - 1)//这个判断,如果DataGridView没有设置为添加.就可以不要了 { if (e.ColumnIndex == 4... 阅读全文
posted @ 2011-09-18 22:45 小锋神 阅读(3575) 评论(0) 推荐(1)
上一页 1 ··· 29 30 31 32 33 34 35 36 37 ··· 54 下一页