📄 main.dfm
字号:
object fmMain: TfmMain
Left = 250
Top = 181
Width = 709
Height = 600
Caption = 'Oracle Data Access Demo - Working with SDO_GEOMETRY type'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
Position = poScreenCenter
OnCreate = FormCreate
OnDestroy = FormDestroy
OnResize = FormResize
PixelsPerInch = 96
TextHeight = 13
object Splitter1: TSplitter
Left = 0
Top = 156
Width = 701
Height = 3
Cursor = crVSplit
Align = alTop
MinSize = 1
ResizeStyle = rsUpdate
end
object ToolBar: TPanel
Left = 0
Top = 0
Width = 701
Height = 24
Align = alTop
BevelOuter = bvNone
TabOrder = 0
object btOpen: TButton
Left = 0
Top = 0
Width = 75
Height = 25
Caption = 'Open'
TabOrder = 0
OnClick = btOpenClick
end
object btClose: TButton
Left = 75
Top = 0
Width = 75
Height = 25
Caption = 'Close'
TabOrder = 1
OnClick = btCloseClick
end
object DBNavigator1: TDBNavigator
Left = 151
Top = 0
Width = 240
Height = 25
TabOrder = 2
end
object cbDebug: TCheckBox
Left = 558
Top = 4
Width = 55
Height = 17
Caption = 'Debug'
TabOrder = 3
OnClick = cbDebugClick
end
object btCreate: TButton
Left = 392
Top = 0
Width = 75
Height = 25
Caption = 'Create'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Pitch = fpVariable
Font.Style = [fsBold]
ParentFont = False
TabOrder = 4
OnClick = btCreateClick
end
object btDrop: TButton
Left = 468
Top = 0
Width = 75
Height = 25
Caption = 'Drop'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Pitch = fpVariable
Font.Style = [fsBold]
ParentFont = False
TabOrder = 5
OnClick = btDropClick
end
object cbDirect: TCheckBox
Left = 624
Top = 4
Width = 52
Height = 17
Caption = 'Direct'
TabOrder = 6
OnClick = cbDirectClick
end
end
object DBGrid: TDBGrid
Left = 0
Top = 24
Width = 701
Height = 132
Align = alTop
DataSource = DataSource
TabOrder = 1
TitleFont.Charset = DEFAULT_CHARSET
TitleFont.Color = clWindowText
TitleFont.Height = -11
TitleFont.Name = 'MS Sans Serif'
TitleFont.Style = []
Columns = <
item
Expanded = False
FieldName = 'ID'
Visible = True
end
item
Expanded = False
FieldName = 'DESCRIPTION'
Width = 270
Visible = True
end>
end
object FigurePanel: TPanel
Left = 0
Top = 159
Width = 701
Height = 407
Align = alClient
BevelOuter = bvNone
TabOrder = 2
object Panel2: TPanel
Left = 120
Top = 0
Width = 581
Height = 407
Align = alClient
BevelInner = bvLowered
BevelOuter = bvNone
Color = clWhite
TabOrder = 0
object FigurePaintBox: TPaintBox
Left = 1
Top = 1
Width = 579
Height = 405
Align = alClient
OnMouseDown = FigurePaintBoxMouseDown
OnMouseMove = FigurePaintBoxMouseMove
OnPaint = FigurePaintBoxPaint
end
end
object pnPalette: TPanel
Left = 0
Top = 0
Width = 120
Height = 407
Align = alLeft
BevelOuter = bvNone
TabOrder = 1
object btCreatePoint: TSpeedButton
Left = 0
Top = 0
Width = 120
Height = 25
AllowAllUp = True
GroupIndex = 1
Caption = 'Create Point'
Enabled = False
OnClick = btCreateFigureClick
end
object btCreateLine: TSpeedButton
Left = 0
Top = 24
Width = 120
Height = 25
AllowAllUp = True
GroupIndex = 1
Caption = 'Create Line string'
Enabled = False
OnClick = btCreateFigureClick
end
object btCreatePoligon: TSpeedButton
Left = 0
Top = 48
Width = 120
Height = 25
AllowAllUp = True
GroupIndex = 1
Caption = 'Create Poligon'
Enabled = False
OnClick = btCreateFigureClick
end
object btCreateRectangle: TSpeedButton
Left = 0
Top = 72
Width = 120
Height = 25
AllowAllUp = True
GroupIndex = 1
Caption = 'Create Rectangle'
Enabled = False
OnClick = btCreateFigureClick
end
object btCreateCircle: TSpeedButton
Left = 0
Top = 96
Width = 120
Height = 25
AllowAllUp = True
GroupIndex = 1
Caption = 'Create Circle'
Enabled = False
OnClick = btCreateFigureClick
end
end
end
object OraSession: TOraSession
ConnectDialog = ConnectDialog
Left = 16
Top = 88
end
object ConnectDialog: TConnectDialog
SavePassword = True
Caption = 'Connect'
UsernameLabel = 'User Name'
PasswordLabel = 'Password'
ServerLabel = 'Server'
ConnectButton = 'Connect'
CancelButton = 'Cancel'
Left = 48
Top = 88
end
object OraQuery: TOraQuery
SQLUpdate.Strings = (
'UPDATE ODAC_GEOMETRY'
'SET'
' ID = :ID, DESCRIPTION = :DESCRIPTION, GEOMETRY_OBJECT = :GEOME' +
'TRY_OBJECT'
'WHERE'
' ID = :Old_ID')
Session = OraSession
SQL.Strings = (
'SELECT * FROM odac_geometry')
AfterClose = OraQueryAfterClose
AfterCancel = OraQueryAfterScroll
AfterScroll = OraQueryAfterScroll
Left = 80
Top = 88
end
object DataSource: TDataSource
DataSet = OraQuery
Left = 112
Top = 88
end
object scCreate: TOraScript
SQL.Strings = (
'CREATE TABLE odac_geometry'
'('
' id NUMBER PRIMARY KEY,'
' description VARCHAR2(30),'
' geometry_object MDSYS.SDO_GEOMETRY'
');'
''
'INSERT INTO odac_geometry VALUES (1,'#39'Point'#39',MDSYS.SDO_GEOMETRY(2' +
'001,NULL,MDSYS.SDO_POINT_TYPE(5,7,NULL),NULL,NULL));'
'INSERT INTO odac_geometry VALUES (2,'#39'Polyline'#39',MDSYS.SDO_GEOMETR' +
'Y(2002,NULL,NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,2,1),MDSYS.SDO_ORDI' +
'NATE_ARRAY(1,10, 5,1, 5,5, 10,8)));'
'INSERT INTO odac_geometry VALUES (3,'#39'Square'#39',MDSYS.SDO_GEOMETRY(' +
'2003,NULL,NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),MDSYS.SDO_ORD' +
'INATE_ARRAY(2,2,4,4)));'
'INSERT INTO odac_geometry VALUES (4,'#39'Circle'#39',MDSYS.SDO_GEOMETRY(' +
'2003,NULL,NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,4),MDSYS.SDO_ORD' +
'INATE_ARRAY(8,7,10,9,8,11)));'
'INSERT INTO odac_geometry VALUES (5,'#39'Polygon with a Hole'#39',MDSYS.' +
'SDO_GEOMETRY(2003,NULL,NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,1,1' +
'9,2003,1),MDSYS.SDO_ORDINATE_ARRAY(2,4, 4,3, 10,3, 13,5, 13,9, 1' +
'1,13, 5,13, 2,11, 2,4, 7,5, 7,10, 10,10, 10,5, 7,5)));'
'INSERT INTO odac_geometry VALUES (6,'#39'Arc Poligon'#39',MDSYS.SDO_GEOM' +
'ETRY(2003,NULL,NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,2,19,2003,2' +
'),MDSYS.SDO_ORDINATE_ARRAY(2,4, 4,3, 10,3, 13,5, 13,9, 11,13, 5,' +
'13, 2,11, 2,4, 7,5, 7,10, 10,10, 10,5, 7,5)));'
'INSERT INTO odac_geometry VALUES (7,'#39'Compound Line String'#39',MDSYS' +
'.SDO_GEOMETRY(2002,NULL,NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,4,2,1,2' +
',1,3,2,2),MDSYS.SDO_ORDINATE_ARRAY(10,10, 10,14, 6,10, 14,10)));'
'INSERT INTO odac_geometry VALUES (8,'#39'Compound Polygon'#39',MDSYS.SDO' +
'_GEOMETRY(2003,NULL,NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1005,2, 1,2' +
',1, 5,2,2),MDSYS.SDO_ORDINATE_ARRAY(6,10, 10,1, 14,10, 10,14, 6,' +
'10)));'
''
'COMMIT;')
Session = OraSession
Left = 200
Top = 88
end
object scDrop: TOraScript
SQL.Strings = (
'DROP TABLE odac_geometry;')
Session = OraSession
Left = 232
Top = 88
end
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -