
C#学习
文章平均质量分 92
python二级题库
https://python22.blog.youkuaiyun.com/
展开
-
將數據集合綁定到多值控件上
將數據集合綁定到多值控件上using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using Nor原创 2008-04-29 14:34:00 · 689 阅读 · 0 评论 -
智能數據容器
智能數據容器在講智能數據容器之前,我們先看看控件之間是怎樣同步數據的。當創建數據綁定的時候,窗體自身會創建一些同步對象來管理同步的事情,因為窗體上的多個控件可能會綁定到同一個數據源,而且我們希望它們能夠保持同步。窗體自身有一個BindingContext屬性,保存了窗體上用作數據綁定的所有數據源的同步對象的集合。容器組件(例如Form或BindingSource)為窗體的控件指定的原创 2008-04-29 16:49:00 · 713 阅读 · 0 评论 -
數據分頁瀏覽
數據分頁瀏覽using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using NorthwindD原创 2008-04-29 18:33:00 · 646 阅读 · 0 评论 -
數據綁定的高層視圖
數據綁定是一種機制,用於自動關聯和同步內存中的數據對象和用戶界面上的顯示和管理數據的控件。我們可以使用數據綁定將數據源和控件關聯起來,讓控件自己負責管理如何顯示數據,這有助於更好地封裝用來顯示和管理數據的代碼,而且還使得數據綁定的方法具有一致性,使得代碼能夠在基類實現一次,然後在任何派生類中被重用。數據綁定的概念:想到數據綁定的時候,應該始終將一下兩個概念記在腦海里:1、在數據源和數據原创 2008-04-29 11:45:00 · 620 阅读 · 0 评论 -
將數據綁定到窗體上單獨的控件
將數據綁定到窗體上單獨的控件 private void Dept_Load(object sender, EventArgs e) { DataTable table=nwData.Customers; txtDeptno.DataBindings.Add("Text",原创 2008-04-29 15:53:00 · 800 阅读 · 0 评论 -
數據集內部的數據路徑
數據集內部的數據路徑Windows forms數據綁定中定義的數據源被當作具有層次結構的數據源。頂層對象是其他數據集合的容器(例如數據集合中包含的多個數據表),這些數據集又是單個數據項的容器(如數據集中的數據表的多個數據行)。然後,每個數據項的對象又擁有多個屬性的值(在數據行中的列的值)。數據源還能夠更加簡單:它可以包含了多個屬性的對象,或者是對象的簡單的數組。當我們需要將自定義對象集合原创 2008-04-29 16:10:00 · 756 阅读 · 0 评论 -
.NET框架2.0數據綁定的增強功能
.NET框架2.0數據綁定的增強功能1、提供了簡單的接口,隱蔽了更多的複雜性,除非我們真的需要面對這些複雜的事情;2、現在有了更多的選擇和靈活性;3、需要編寫的代碼更加直觀;4、可以獲得更加一致的結果。例如: public void BelongDeptDataBinding() { DataTable dt = dao.g原创 2008-04-29 14:29:00 · 576 阅读 · 0 评论 -
《windows forms2.0數據綁定--.net智能客戶端數據應用程序設計》代碼下載
《windows forms2.0數據綁定--.net智能客戶端數據應用程序設計》代碼下載http://www.softinsight.com/databindingbook/default.aspx《windows forms2.0數據綁定--.net智能客戶端數據應用程序設計》是一本很有价值的书,值得看,从今天起,开始学习这本书。原创 2008-04-24 14:29:00 · 1362 阅读 · 0 评论 -
什么是数据绑定 ?
数据绑定 是开发人员创建用户界面应用程序时不断碰到的问题的一种解决法案。开发人员,需要把数据从数据存储的地方检索出来,呈现给用户,为实现这一过程,开发人员不得不编写自定义代码以图形的方式绘制这些数据,或者手工将这些数据赋值给控件属性来显示它,使用这种方式来显示数据,对于不同的情况、不同的类型的数据以及不同类型的显示方式来说,处理方法都是不同的。如果还要通过用户界面允许用户与数据交换以原创 2008-04-27 10:16:00 · 2656 阅读 · 2 评论 -
主從式數據綁定
主從式數據綁定通常我們需要與有父子關係的數據聚合打交道,在這種情況下,我們希望給用戶提供一種方法,讓用戶可以查看到父對象的集合。當他們選擇了一個父對象的時候,只給他們看到相關聯的子對象,這種方法通常與數據集中的兩個表相關聯,并通過外鍵關係提供子數據行和相對應的父行之間的連接。顯示這種類型的數據並且允許用戶瀏覽這些數據的一種常見的方法是將父對象的集合放入一個網格中(我們稱作主表mas原创 2008-05-02 11:45:00 · 675 阅读 · 0 评论 -
windows Forms数据绑定全景图
要完成数据绑定,需要一系列的机制发挥作用。一、首先,需要获得数据。从显示层客户端应用程序的角度看,数据来自内存中的数据源;二、其次,还需要控件或组件,它们被设计用来与书籍打交道,自动显示数据以及将数据变更放回数据源。这种功能可能被封装到用户在屏幕上看到的顶层控件里,或者存在于一些中间层组件中,用来充当控件类型和数据类型的中介,又或者是一些控件和中间层组件的组合。三、最后,如果一个窗体上的多个控件全原创 2008-04-27 10:29:00 · 861 阅读 · 0 评论 -
第一個windows forms2.0數據綁定應用程序
步驟如下:1、創建一個windows應用程序2、添加一個新的數據源和數據連接,打開數據菜單,選擇添加新數據源,“數據源配置嚮導”對話框會顯示出來,選擇數據庫作為數據源類型,然後下一步,系統會顯示“選擇你的數據連接”的頁面,選擇希望使用的數據連接。點擊新建連接按鈕,在數據源下面,選擇“Microsoft SQL Serve”。將數據提供程序下面的選項默認設置為“用於SQL Serve的.NE原创 2008-04-28 18:38:00 · 742 阅读 · 0 评论 -
什么是智能客户端?
什么是智能客户端?智能客户端应用程序首先是一个富客户端应用程序或叫胖客户端应用程序。它运行在用户的桌面系统上。在.net的世界里,这通常意味着windows forms应用程序,但是它也可能是一个visual studio工具创建的office应用程序,或者还可能是一个智能设备用户界面。一般的来讲,智能客户端应用程序并是一个独立的完全运行在用户桌面上的应用程序,而通常是分布式的应用程序,并且原创 2008-05-04 13:02:00 · 1605 阅读 · 0 评论 -
数据源
数据源在数据绑定windows forms应用程序中,通常需要处理几种类型的数据:l 在数据持久层或数据层中的数据源,其中包括关系型数据库、xml文件、对象存储机制和某种类型的简单数据文件等等;l 在应用程序的层次结构中处于数据持久层(如数据库)和数据显示层(如windows forms应用程序)之间的数据源,其中包含了windows forms原创 2008-05-04 13:00:00 · 671 阅读 · 0 评论 -
c#2.0新特性
1、泛型为了提高应用程序的效率和可用性,c#2.0引入了泛型。泛型具有以下的功能特点:一是使用泛型可以定义安全的数据结构,而无需使用实际的数据类型;二是通过使用泛型,能够将数据参数化,以此完成代码重用的目标;三是泛型可提供编译期间的类型检查,减少不必要的显式类型转换,减少不必要的装箱操作,从而提高应用程序的运行效率。2、匿名方法匿名方法允许将与一个委托相关的代码(通常指方法原创 2008-06-21 19:21:00 · 769 阅读 · 0 评论 -
C#中DataSet的用法
C#中DataSet的用法DataSet类是内存中数据的复杂容器。DataSet类包含了DataTable实例的集合,DataTable实例包含了保存在数据集中的关系数据。每个DataTable实例包含DataColumn实例的集合用来定义表中的数据的架构,还包含DataRow实例的集合用来以数据行方式访问其中包含的数据。数据集还允许使用乐观并发处理方法更新数据库,为了支持这种功能,原创 2008-12-28 15:42:00 · 8796 阅读 · 1 评论 -
c#数据绑定概念
数据绑定概念想到数据绑定的时候应该考虑到:在数据源和数据绑定控件之间的数据流的方向和数据流什么时候发生。对于单向数据绑定来说,数据只在一个方向上流动,来自数据源的属性值被放进用户界面控件的属性中,但是当控件中的这个属性值发生了改变以后,数据是不会从控件流回数据源的。至于双向数据绑定,控件绑定属性的变更也会使客户端内存对象相应的数据源的值得到更新。Net框架内置了两种主要的数据原创 2008-12-28 18:12:00 · 3972 阅读 · 0 评论 -
C#使用Binding事件完成超越内置类型转换的功能
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using BindingEvents.E原创 2008-12-29 20:00:00 · 3363 阅读 · 0 评论 -
c#中TextBox输入提示功能
设置TextBox的AutoCompleteSource的属性为CustomSource,设置TextBox的AutoCompleteMode属性为SuggestAppend。using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using原创 2009-01-02 19:43:00 · 5852 阅读 · 2 评论 -
DataRelation 对象--多表填充DataSet
DataRelation 对象--多表填充DataSet2008-02-26 20:34介绍 DataRelation 对象 DataRelation 定义两个表之间的关系。通常,两个表通过包含相同数据的单个字段链接起来。例如,包含地址数据的表可以拥有包含代表国家/地区的代码的单个字段。包含国家/地区数据的第二个表将拥有包含识别国家/地区的代码的单个字段,正是将此代码转载 2008-11-17 16:22:00 · 2423 阅读 · 0 评论 -
用C#做一个悬浮窗口
转自:http://hi.baidu.com/hgluo/blog/item/88594fc2b3bb9235e5dd3b86.html用C#做一个悬浮窗口[含三种移动无标题窗体的办法]2006年08月24日 星期四 16:36今天看几个C#源码,再到愚翁专栏上看到了一篇类似的文章,自己就参考做了一个简单的程序,原来实现起来简单不过了!第一步:建立一个窗体,设转载 2008-11-17 16:28:00 · 6686 阅读 · 0 评论 -
c#中datagridview处理非绑定列1
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using datagridview1.D原创 2009-01-13 00:16:00 · 2229 阅读 · 0 评论 -
C#时间比较
C#时间比较 use "DateTime.Compare" static methodDateTime.Compare( dt1, dt2 ) > 0 : dt1 > dt2DateTime.Compare( dt1, dt2 ) == 0 : dt1 == dt2DateTime.Compare( dt1, dt2 ) /// /// 计算两个日期的时间间隔转载 2008-11-19 21:31:00 · 4352 阅读 · 0 评论 -
c#中datagridview处理非绑定列
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using datagridview1.D原创 2009-01-12 23:54:00 · 1689 阅读 · 0 评论 -
教你做.net的安装,卸载程序【打包 安装 卸载,支持service和托盘】
教你做.net的安装,卸载程序【打包 安装 卸载,支持service和托盘】通过10天的潜心研究,查阅了大量资料【网上资料大多不全】,终于搞定.net windows程序的打包,安装与卸载卸载贴上来与大家一起分享!希望对大家有所帮助!要知道我之前都是做web项目,很少接触windowS应用程序!第一步:创建windows程序,创建安装类1.在你创建的应用程序工程中添加一个安装类,在原创 2008-11-19 21:22:00 · 2463 阅读 · 0 评论 -
c#处理datagridview虚拟模式
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;namespace VirtualMo原创 2009-01-13 18:14:00 · 4673 阅读 · 1 评论 -
c#中datagridview的EditingControlShowing事件
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using datagridview1.DataSet原创 2009-01-14 14:36:00 · 8178 阅读 · 0 评论 -
c#非矩形窗体
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using System.Drawing.原创 2008-12-11 16:43:00 · 1389 阅读 · 1 评论 -
c#右键菜单
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;namespace WindowsAp原创 2008-12-11 16:45:00 · 1440 阅读 · 0 评论 -
c#验证错误提示
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text.RegularExpressions;using System.Windows.Forms;原创 2008-12-11 16:50:00 · 805 阅读 · 0 评论 -
c#纹理画刷TextureBrush
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Drawing.Drawing2D;using System.Text;using System.Wind原创 2008-12-11 17:13:00 · 3526 阅读 · 0 评论 -
c#透明窗体
namespace WindowsApplication1{ public partial class Form2 : Form { public Form2() { InitializeComponent(); this.Opacity = 1;原创 2008-12-11 16:41:00 · 1049 阅读 · 0 评论 -
c#处理Paint事件
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;namespace WindowsAp原创 2008-12-11 17:11:00 · 4351 阅读 · 0 评论 -
c#画笔Pen画虚线
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using System.Drawing.原创 2008-12-11 18:23:00 · 5011 阅读 · 1 评论 -
c#画笔使用复合数组绘制单个矩形
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using System.Drawing原创 2008-12-11 18:27:00 · 1066 阅读 · 0 评论 -
c#从画刷创建画笔
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using System.Drawing.原创 2008-12-11 18:30:00 · 1886 阅读 · 0 评论 -
c#画笔Pen绘制曲线
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using System.Drawing.原创 2008-12-11 18:37:00 · 1420 阅读 · 0 评论 -
c#画笔Pen绘制光滑模式曲线
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using System.Drawing原创 2008-12-11 18:50:00 · 2202 阅读 · 0 评论 -
c#画笔Pen保存和恢复图形对象的设置
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using System.Drawing.原创 2008-12-11 18:51:00 · 1621 阅读 · 0 评论 -
c#画笔Pen使用路径绘制图形
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using System.Drawing.原创 2008-12-11 18:53:00 · 1546 阅读 · 0 评论