?? winform.pas.~1~
字號:
unit WinForm;
interface
uses
System.Drawing, System.Collections, System.ComponentModel,
System.Windows.Forms, System.Data, Borland.Data.Common, Borland.Data.Provider,
System.Globalization;
type
TWinForm = class(System.Windows.Forms.Form)
{$REGION 'Designer Managed Code'}
strict private
/// <summary>
/// Required designer variable.
/// </summary>
Components: System.ComponentModel.Container;
BdpConnection1: Borland.Data.Provider.BdpConnection;
BdpDataAdapter1: Borland.Data.Provider.BdpDataAdapter;
bdpSelectCommand1: Borland.Data.Provider.BdpCommand;
bdpInsertCommand1: Borland.Data.Provider.BdpCommand;
bdpUpdateCommand1: Borland.Data.Provider.BdpCommand;
bdpDeleteCommand1: Borland.Data.Provider.BdpCommand;
dataSet1: System.Data.DataSet;
DataGrid1: System.Windows.Forms.DataGrid;
Label3: System.Windows.Forms.Label;
Label1: System.Windows.Forms.Label;
Label2: System.Windows.Forms.Label;
Panel1: System.Windows.Forms.Panel;
TextBox1: System.Windows.Forms.TextBox;
TextBox2: System.Windows.Forms.TextBox;
TextBox3: System.Windows.Forms.TextBox;
TextBox4: System.Windows.Forms.TextBox;
Label4: System.Windows.Forms.Label;
Label5: System.Windows.Forms.Label;
Label6: System.Windows.Forms.Label;
TextBox5: System.Windows.Forms.TextBox;
TextBox6: System.Windows.Forms.TextBox;
Button1: System.Windows.Forms.Button;
Button2: System.Windows.Forms.Button;
Button3: System.Windows.Forms.Button;
DataTable1: System.Data.DataTable;
DataColumn1: System.Data.DataColumn;
DataColumn2: System.Data.DataColumn;
DataColumn3: System.Data.DataColumn;
DataColumn4: System.Data.DataColumn;
DataColumn5: System.Data.DataColumn;
DataColumn6: System.Data.DataColumn;
DataColumn7: System.Data.DataColumn;
DataColumn8: System.Data.DataColumn;
Button4: System.Windows.Forms.Button;
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
procedure InitializeComponent;
procedure UpdateBtn_Click(sender: System.Object; e: System.EventArgs);
procedure SelectBtn_Click(sender: System.Object; e: System.EventArgs);
procedure DeleteBtn_Click(sender: System.Object; e: System.EventArgs);
procedure InserBtn_Click(sender: System.Object; e: System.EventArgs);
procedure TextBox1_TextChanged(sender: System.Object; e: System.EventArgs);
{$ENDREGION}
strict protected
/// <summary>
/// Clean up any resources being used.
/// </summary>
procedure Dispose(Disposing: Boolean); override;
private
{ Private Declarations }
public
constructor Create;
Procedure UpdateDataSource(ChangedDataset: DataSet);
Procedure UpdateDataSet();
end;
[assembly: RuntimeRequiredAttribute(TypeOf(TWinForm))]
implementation
uses WinForm1;
var NewWinForm : TWinForm2;
{$REGION 'Windows Form Designer generated code'}
/// <summary>
/// Required method for Designer support -- do not modify
/// the contents of this method with the code editor.
/// </summary>
procedure TWinForm.InitializeComponent;
type
TSystem_Data_DataTableArray = array of System.Data.DataTable;
TSystem_Data_DataColumnArray = array of System.Data.DataColumn;
begin
Self.DataGrid1 := System.Windows.Forms.DataGrid.Create;
Self.dataSet1 := System.Data.DataSet.Create;
Self.DataTable1 := System.Data.DataTable.Create;
Self.DataColumn1 := System.Data.DataColumn.Create;
Self.DataColumn2 := System.Data.DataColumn.Create;
Self.DataColumn3 := System.Data.DataColumn.Create;
Self.DataColumn4 := System.Data.DataColumn.Create;
Self.DataColumn5 := System.Data.DataColumn.Create;
Self.DataColumn6 := System.Data.DataColumn.Create;
Self.DataColumn7 := System.Data.DataColumn.Create;
Self.DataColumn8 := System.Data.DataColumn.Create;
Self.Panel1 := System.Windows.Forms.Panel.Create;
Self.Button4 := System.Windows.Forms.Button.Create;
Self.Button3 := System.Windows.Forms.Button.Create;
Self.Button2 := System.Windows.Forms.Button.Create;
Self.Button1 := System.Windows.Forms.Button.Create;
Self.TextBox6 := System.Windows.Forms.TextBox.Create;
Self.TextBox5 := System.Windows.Forms.TextBox.Create;
Self.Label6 := System.Windows.Forms.Label.Create;
Self.Label5 := System.Windows.Forms.Label.Create;
Self.Label4 := System.Windows.Forms.Label.Create;
Self.TextBox4 := System.Windows.Forms.TextBox.Create;
Self.TextBox3 := System.Windows.Forms.TextBox.Create;
Self.TextBox2 := System.Windows.Forms.TextBox.Create;
Self.TextBox1 := System.Windows.Forms.TextBox.Create;
Self.Label3 := System.Windows.Forms.Label.Create;
Self.Label2 := System.Windows.Forms.Label.Create;
Self.Label1 := System.Windows.Forms.Label.Create;
Self.BdpConnection1 := Borland.Data.Provider.BdpConnection.Create;
Self.BdpDataAdapter1 := Borland.Data.Provider.BdpDataAdapter.Create;
Self.bdpDeleteCommand1 := Borland.Data.Provider.BdpCommand.Create;
Self.bdpInsertCommand1 := Borland.Data.Provider.BdpCommand.Create;
Self.bdpSelectCommand1 := Borland.Data.Provider.BdpCommand.Create;
Self.bdpUpdateCommand1 := Borland.Data.Provider.BdpCommand.Create;
(System.ComponentModel.ISupportInitialize(Self.DataGrid1)).BeginInit;
(System.ComponentModel.ISupportInitialize(Self.dataSet1)).BeginInit;
(System.ComponentModel.ISupportInitialize(Self.DataTable1)).BeginInit;
Self.Panel1.SuspendLayout;
(System.ComponentModel.ISupportInitialize(Self.BdpDataAdapter1)).BeginInit;
Self.SuspendLayout;
//
// DataGrid1
//
Self.DataGrid1.DataMember := 'Score';
Self.DataGrid1.DataSource := Self.dataSet1;
Self.DataGrid1.Dock := System.Windows.Forms.DockStyle.Bottom;
Self.DataGrid1.HeaderForeColor := System.Drawing.SystemColors.ControlText;
Self.DataGrid1.Location := System.Drawing.Point.Create(0, 165);
Self.DataGrid1.Name := 'DataGrid1';
Self.DataGrid1.Size := System.Drawing.Size.Create(520, 328);
Self.DataGrid1.TabIndex := 5;
//
// dataSet1
//
Self.dataSet1.DataSetName := 'NewDataSet';
Self.dataSet1.Locale := System.Globalization.CultureInfo.Create('zh-CN');
Self.dataSet1.Tables.AddRange(TSystem_Data_DataTableArray.Create(Self.DataTable1));
//
// DataTable1
//
Self.DataTable1.Columns.AddRange(TSystem_Data_DataColumnArray.Create(Self.DataColumn1,
Self.DataColumn2, Self.DataColumn3, Self.DataColumn4, Self.DataColumn5,
Self.DataColumn6, Self.DataColumn7, Self.DataColumn8));
Self.DataTable1.TableName := 'Score';
//
// DataColumn1
//
Self.DataColumn1.ColumnName := 'ID';
Self.DataColumn1.DataType := TypeOf(Integer);
//
// DataColumn2
//
Self.DataColumn2.ColumnName := 'StudentID';
//
// DataColumn3
//
Self.DataColumn3.ColumnName := 'StudentName';
//
// DataColumn4
//
Self.DataColumn4.ColumnName := 'Class';
//
// DataColumn5
//
Self.DataColumn5.ColumnName := 'CourseID';
//
// DataColumn6
//
Self.DataColumn6.ColumnName := 'CourseName';
//
// DataColumn7
//
Self.DataColumn7.ColumnName := 'Scores';
Self.DataColumn7.DataType := TypeOf(Integer);
//
// DataColumn8
//
Self.DataColumn8.ColumnName := 'Other';
//
// Panel1
//
Self.Panel1.Controls.Add(Self.Button4);
Self.Panel1.Controls.Add(Self.Button3);
Self.Panel1.Controls.Add(Self.Button2);
Self.Panel1.Controls.Add(Self.Button1);
Self.Panel1.Controls.Add(Self.TextBox6);
Self.Panel1.Controls.Add(Self.TextBox5);
Self.Panel1.Controls.Add(Self.Label6);
Self.Panel1.Controls.Add(Self.Label5);
Self.Panel1.Controls.Add(Self.Label4);
Self.Panel1.Controls.Add(Self.TextBox4);
Self.Panel1.Controls.Add(Self.TextBox3);
Self.Panel1.Controls.Add(Self.TextBox2);
Self.Panel1.Controls.Add(Self.TextBox1);
Self.Panel1.Controls.Add(Self.Label3);
Self.Panel1.Controls.Add(Self.Label2);
Self.Panel1.Controls.Add(Self.Label1);
Self.Panel1.Dock := System.Windows.Forms.DockStyle.Top;
Self.Panel1.Location := System.Drawing.Point.Create(0, 0);
Self.Panel1.Name := 'Panel1';
Self.Panel1.Size := System.Drawing.Size.Create(520, 160);
Self.Panel1.TabIndex := 9;
//
// Button4
//
Self.Button4.Location := System.Drawing.Point.Create(152, 120);
Self.Button4.Name := 'Button4';
Self.Button4.TabIndex := 24;
Self.Button4.Text := '刪除';
Include(Self.Button4.Click, Self.DeleteBtn_Click);
//
// Button3
//
Self.Button3.Location := System.Drawing.Point.Create(384, 120);
Self.Button3.Name := 'Button3';
Self.Button3.TabIndex := 23;
Self.Button3.Text := '查詢';
Include(Self.Button3.Click, Self.SelectBtn_Click);
//
// Button2
//
Self.Button2.Location := System.Drawing.Point.Create(272, 120);
Self.Button2.Name := 'Button2';
Self.Button2.TabIndex := 22;
Self.Button2.Text := '更新';
Include(Self.Button2.Click, Self.UpdateBtn_Click);
//
// Button1
//
Self.Button1.Location := System.Drawing.Point.Create(32, 120);
Self.Button1.Name := 'Button1';
Self.Button1.TabIndex := 21;
Self.Button1.Text := '插入';
Include(Self.Button1.Click, Self.InserBtn_Click);
//
// TextBox6
//
Self.TextBox6.DataBindings.Add(System.Windows.Forms.Binding.Create('Text',
Self.dataSet1, 'Score.Scores'));
Self.TextBox6.Location := System.Drawing.Point.Create(320, 80);
Self.TextBox6.Name := 'TextBox6';
Self.TextBox6.TabIndex := 20;
Self.TextBox6.Text := 'TextBox6';
//
// TextBox5
//
Self.TextBox5.DataBindings.Add(System.Windows.Forms.Binding.Create('Text',
Self.dataSet1, 'Score.CourseName'));
Self.TextBox5.Location := System.Drawing.Point.Create(320, 48);
Self.TextBox5.Name := 'TextBox5';
Self.TextBox5.Size := System.Drawing.Size.Create(144, 21);
Self.TextBox5.TabIndex := 19;
Self.TextBox5.Text := 'TextBox5';
//
// Label6
//
Self.Label6.Location := System.Drawing.Point.Create(240, 80);
Self.Label6.Name := 'Label6';
Self.Label6.TabIndex := 18;
Self.Label6.Text := '成績';
//
// Label5
//
Self.Label5.Location := System.Drawing.Point.Create(240, 48);
Self.Label5.Name := 'Label5';
Self.Label5.Size := System.Drawing.Size.Create(100, 24);
Self.Label5.TabIndex := 17;
Self.Label5.Text := '課程名稱';
//
// Label4
//
Self.Label4.Location := System.Drawing.Point.Create(240, 16);
Self.Label4.Name := 'Label4';
Self.Label4.Size := System.Drawing.Size.Create(80, 23);
Self.Label4.TabIndex := 16;
Self.Label4.Text := '課程號';
//
// TextBox4
//
Self.TextBox4.DataBindings.Add(System.Windows.Forms.Binding.Create('Text',
Self.dataSet1, 'Score.CourseID'));
Self.TextBox4.Location := System.Drawing.Point.Create(320, 16);
Self.TextBox4.Name := 'TextBox4';
Self.TextBox4.TabIndex := 15;
Self.TextBox4.Text := 'TextBox4';
//
// TextBox3
//
Self.TextBox3.DataBindings.Add(System.Windows.Forms.Binding.Create('Text',
Self.dataSet1, 'Score.Class'));
Self.TextBox3.Location := System.Drawing.Point.Create(80, 80);
Self.TextBox3.Name := 'TextBox3';
Self.TextBox3.TabIndex := 14;
Self.TextBox3.Text := 'TextBox3';
//
// TextBox2
//
Self.TextBox2.DataBindings.Add(System.Windows.Forms.Binding.Create('Text',
Self.dataSet1, 'Score.StudentName'));
Self.TextBox2.Location := System.Drawing.Point.Create(80, 48);
Self.TextBox2.Name := 'TextBox2';
Self.TextBox2.TabIndex := 13;
Self.TextBox2.Text := 'TextBox2';
//
// TextBox1
//
Self.TextBox1.DataBindings.Add(System.Windows.Forms.Binding.Create('Text',
Self.dataSet1, 'Score.StudentID'));
Self.TextBox1.Location := System.Drawing.Point.Create(80, 16);
Self.TextBox1.Name := 'TextBox1';
Self.TextBox1.TabIndex := 12;
Self.TextBox1.Text := 'TextBox1';
Include(Self.TextBox1.TextChanged, Self.TextBox1_TextChanged);
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -