随笔分类 -  NET平台

摘要:1.课表控件当在该课表控件点击(如行:星期一、列:上午第一节课),则可将教学班安排在该时段上课或删除上课时段2.合并多行列内容相同的DataGrid下图中专业描述相同的行自动合并3.跨多行显示同一条记录的DataGrid在上图中,教师ID为22的教室有三条不同的排课记录,该DataGrid自动将相同ID的记录合并显示在一起,并去除了水平线,让人看起来就像一条记录4.DataGrid中实现checkbox列在智能监控系统中的设置窗口中的DataGrid,除合并多行相同内容的列外,还实现了在数据列中绑定CheckBox控件5.在DataGrid列中绑定Multi-Column ComboBox控件 阅读全文
posted @ 2012-07-18 10:51 simplefrog 阅读(889) 评论(0) 推荐(0)
摘要:在开发单线图排版算法演示功能时,需要每执行一步排版过程,调整了电力设备的位置后就暂停一下,笔者第一个想到的方法就是让主线程暂停代码如下:private void showlayout_delay(double p_second) { DateTime now = DateTime.Now; while (now.AddSeconds(p_second) > DateTime.Now) { } return; }或System.Threading.Thread.Sleep(p_waitMilliSecond);上面的方法虽然让程序暂停下来,但是却存在一个问题:无论排版过程运行了多少步,程序 阅读全文
posted @ 2012-07-16 19:54 simplefrog 阅读(435) 评论(0) 推荐(0)
摘要:当从数据库获取单线图数据时,需一段时间等待,故在等待提示窗口中使用gif动画来表示操作正在运行中,但当笔者将等待提示窗口放在main()主线程中时,发现gif动画不会动了解决方法:带gif动画的等待提示窗口在另一个线程中运行下面是等待提示窗口的代码public partial class Form_wait_thread : Form { public Form_wait_thread() { InitializeComponent(); } private delegate void SetTextHandler(string text); public void SetText(strin 阅读全文
posted @ 2012-07-16 18:50 simplefrog 阅读(1497) 评论(0) 推荐(0)
摘要:使用.NET Remoting 在不同应用程序域之间通信可以在同一个进程中、一个系统的进程之间或不同系统的进程之间进行NET Remoting is a technology for communication between different application domains.Using .NET Remoting for communication between application domains can happen inside the same process, between processes on a single system, or between proce 阅读全文
posted @ 2012-07-15 13:39 simplefrog 阅读(784) 评论(0) 推荐(1)
摘要:In this month's column I will focus on some data management techniques commonly required in enterprise applications. These include saving parent-child data in a multitier application using ADO.NET, ADO.NET transactions, merge techniques, and a number of other ADO.NET features. I'll also disc 阅读全文
posted @ 2012-07-14 22:12 simplefrog 阅读(216) 评论(0) 推荐(0)
摘要:One of the key features of the ADO.NET DataSet is that it can be a self-contained and disconnected data store. It can contain the schema and data from several rowsets in DataTable objects as well as information about how to relate the DataTable objects—all in memory. The DataSet neither knows nor c. 阅读全文
posted @ 2012-07-14 22:08 simplefrog 阅读(200) 评论(0) 推荐(0)
摘要:在开发智能监控系统时需要不同的监控器可播放不同的声音,如果多个监控器同时报警,声音需同时播放在解决该问题时,使用了NET框架提供的声音播放类,效果都不理想,当多个监控器同时报警时,声音会出现延迟或听起来很混乱最终找到了解决方法,直接调用操作系统的Win32 API,自己实现声音播放功能参考codeprojecthttp://www.codeproject.com/Articles/3352/A-low-level-audio-player-in-C 阅读全文
posted @ 2012-07-14 21:42 simplefrog 阅读(337) 评论(0) 推荐(0)
摘要:下图是智能监控系统自定义的WinForm窗体实现方法参见codeprojecthttp://www.codeproject.com/Articles/6048/Creating-Bitmap-Regions-for-Forms-and-Buttons 阅读全文
posted @ 2012-07-14 20:49 simplefrog 阅读(260) 评论(0) 推荐(0)
摘要:在做智能监控系统时,需要用红外遥控器来操作系统功能,而红外遥控器的SDK提供了将遥控器按键信号转换成电脑键盘按键的功能。下面的文章就实现了应用程序中的键盘处理功能 This article shows several different techniques for handling .NET keyboard events in an application Whenever a new tool comes out, if it has something to do with building user interfaces, one of the very first question 阅读全文
posted @ 2012-07-14 20:34 simplefrog 阅读(145) 评论(0) 推荐(0)
摘要:如果觉得Visual studio提供的按钮控件不好看,试试下面文章的控件参考:codeprojecthttp://www.codeproject.com/Articles/18000/Enhanced-GlassButton-using-GDI 阅读全文
posted @ 2012-07-14 20:27 simplefrog 阅读(294) 评论(0) 推荐(0)
摘要:在高校排课模块中有这样一个需求:一条教学班记录有多列信息,满屏显示也无法显示完所有列,在DataGrid中出现水平滚动条其中教学班代码、课程名称、星期一到星期五这七列的信息需要同时在窗口中全部显示,如下图所示而从课程代码到授课教师22列是参考信息,不必全部列同时显示在窗口中,如下面的三幅图片所示在这不必全部列同时显示的22列中,如需要参考某列信息可使用调整列显示顺序功能拖动靠左的位置为了解决拖动水平滚动条查看不必同时显示的22列教学班信息时需要同时在窗口中全部显示的教学班代码、课程名称、星期一到星期五这七列信息不被隐藏这个问题笔者使用了两个DataGrid,同时全部显示的七列放在左边的Data 阅读全文
posted @ 2012-07-14 19:08 simplefrog 阅读(2544) 评论(1) 推荐(0)
摘要:应用遗传算法很有趣的一个示例参见MSDNhttp://msdn.microsoft.com/en-us/magazine/cc163934.aspx 阅读全文
posted @ 2012-07-14 16:44 simplefrog 阅读(365) 评论(0) 推荐(0)
摘要:One of the most enduring challenges in writing user interfaces is figuring out how to display large amounts of data efficiently and intuitively without bewildering the user. The problem becomes particularly thorny when the interface must reflect hierarchical relationships within the data that the us 阅读全文
posted @ 2012-07-14 15:51 simplefrog 阅读(180) 评论(0) 推荐(0)
摘要:详细讲解了如何自定义DataGrid控件,将多种控件(如:进度条、按钮、下拉框)绑定到数据列中参考MSDNPart 1:http://msdn.microsoft.com/en-us/library/ms996449Part 2:http://msdn.microsoft.com/en-us/library/ms996453.aspx 阅读全文
posted @ 2012-07-14 15:38 simplefrog 阅读(178) 评论(0) 推荐(0)
摘要:This sample contains the code and demonstrates the use of a Grid control that is modelled after the Microsoft Money transaction register view. It provides an editable grid that can bind to fields and/or properties of a the row type object that can layout those fields in multiple lines per row. It al 阅读全文
posted @ 2012-07-14 15:28 simplefrog 阅读(187) 评论(0) 推荐(0)
摘要:在管理信息系统(MIS)的数据维护的界面中,一些数据字段往往包含多重信息,如性别编码01代表男、02代码女,此时Multi-Column ComboBox就派上用场了NET框架默认提供的ComboBox只能显示一列的信息,Multi-Column ComboBox可以同时显示多列,如上图中显示了代码和代码描述两列的信息 实现代码:因涉及到实际应用中的项目,暂不提供下载,请谅解 阅读全文
posted @ 2012-07-14 15:20 simplefrog 阅读(371) 评论(0) 推荐(0)
摘要:Northwoods GoDiagram控件库用于开发图形应用Northwoods GoDiagram控件库是付费软件,其官方网址为http://www.nwoods.com/Northwoods为开发人员提供了开发文档和示例程序(InteractiveForce示例程序演示了force-directed autolayout;OrgCharter示例程序演示Zoom In、Zoom Out和鹰眼功能;SubGraphApp演示了组合图形的功能;UpdateDemo演示了图形对象撤销和重做功能)在配网单线图排版中使用了GoDiagram控件库提供的强大的图形功能,使开发工作可以集中在业务方面 阅读全文
posted @ 2012-07-14 11:50 simplefrog 阅读(3772) 评论(1) 推荐(0)
摘要:Crownwood公司专注于提供用户界面控件以改善您应用程序的外观。使用这些控件将节省开发人员的时间和提供效率,同时为项目节省费用Magic UI Library 1.7.4.0是Crownwood公司开放源代码、免费的控件库下图是Magic UI Library 1.7.4.0的源代码截图在高校排课模块中使用了Crownwood Magic UI Library 1.7.4.0中的Dock控件使排课模块具有了Visual Studio IDE一样的Docking功能除了Dock控件Magic UI Library 1.7.4.0还提供了其他功能非常强大的控件 阅读全文
posted @ 2012-07-14 11:16 simplefrog 阅读(1286) 评论(0) 推荐(0)
摘要:NET提供了Microsoft.VisualBasic.Interaction.CreateObject方法来引用VisualBasic的COM对象如下面代码引用了一个GeoMedia.Application COM对象Intergraph.GeoMedia.GeoMedia.Application objGMApp = (Intergraph.GeoMedia.GeoMedia.Application)Microsoft.VisualBasic.Interaction.CreateObject("GeoMedia.Application", ""); 阅读全文
posted @ 2012-07-14 10:16 simplefrog 阅读(429) 评论(0) 推荐(0)
摘要:在新建某些COM对象时要求输入GUID参数objGMApp.New("C:\Program Files\GeoMedia Professional\Templates\GeoWorkspaces\normal.gwt" , "{F7158021-6963-4e1e-9D5D-C947E5AA8A1E}", null); NET自带工具能生成GUID(1)请在“工具”菜单上单击“创建 GUID”,或者执行 guidgen.exe(window 开始菜单-->所有程序-->Microsoft Visual Studio 2005-->Vis 阅读全文
posted @ 2012-07-11 18:46 simplefrog 阅读(345) 评论(0) 推荐(0)