c#

位置:IT落伍者 >> c# >> 浏览文章

C#高级编程:数据绑定对象[3]


发布日期:2020年10月05日
 
C#高级编程:数据绑定对象[3]
——此文章摘自《C#高级编程(第版)》定价元 特价元 购买

ScrollingDataBinding示例的代码如下所示

using System;

using SystemWindowsForms;

using SystemData;

using SystemDataSqlClient;

public class ScrollingDataBinding : SystemWindowsFormsForm

{

private Button retrieveButton;

private TextBox textName;

private TextBox textQuan;

private TrackBar trackBar;

private DataSet ds;

应用程序在ScrollingDataBinding构造函数中创建窗口以及该窗口中的所有控件

public ScrollingDataBinding()

{

thisAutoScaleBaseSize = new SystemDrawingSize( );

thisClientSize = new SystemDrawingSize( );

thisText = _ScrollingDataBinding;

thisretrieveButton = new Button();

retrieveButtonLocation = new SystemDrawingPoint( );

retrieveButtonSize = new SystemDrawingSize( );

retrieveButtonTabIndex = ;

retrieveButtonAnchor = AnchorStylesTop | AnchorStylesLeft;

retrieveButtonText = Retrieve;

retrieveButtonClick += new SystemEventHandler

(thisretrieveButton_Click);

thisControlsAdd(thisretrieveButton);

thistextName = new TextBox();

textNameLocation = new SystemDrawingPoint( );

textNameText = Please click retrieve;

textNameTabIndex = ;

textNameAnchor = AnchorStylesTop | AnchorStylesLeft |

AnchorStylesRight ;

textNameSize = new SystemDrawingSize( );

textNameEnabled = false;

thisControlsAdd(thistextName);

thistextQuan = new TextBox();

textQuanLocation = new SystemDrawingPoint( );

textQuanText = ;

textQuanTabIndex = ;

[] [] [] []

               

上一篇:C#高级编程:数据绑定对象[1]

下一篇:C#高级编程:数据绑定对象[2]