7054-3
26/12/2008hà nội 10-2007
mục lục
Trang
I Xây dựng giao diện chung chơng trình phần mềm
HYDTID 1.0 (XLSLTVVT)
1
II Xây dựng giao diện chung cho các chơng trình phần mềm
nhập và quản lý cọc và thuỷ chí
11
III Xây dựng giao diện cho các chơng trình phần mềm nhập
III. Xây dựng các chơng trình xử lý số liệu từ sổ gốc mực nớc vùng sông
ảnh hởng triều
IV. Xây dựng giao diện cho các chơng trình phần mềm nhập và xử lý số
liệu sổ đo sâu thời kỳ ảnh hởng triều yếu
V. Xây dựng giao diện cho các chơng trình phần mềm nhập và xử lý số
liệu sổ đo sâu thời kỳ ảnh hởng triều mạnh
VI. Xây dựng các chơng trình xử lý số liệu từ sổ gốc đo đại biểu và đo chi
tiết
VII. Xây dựng các chơng trình xử lý số liệu từ sổ gốc đo lu lợng nớc và
lu lợng chất lơ lửng thời kỳ ảnh hởng triều yếu
VIII. Xây dựng chơng trình chỉnh biên lu lợng nớc thời kỳ ảnh hởng
triều mạnh
IX. Xây dựng chơng trình chỉnh biên lu lợng chất lơ lửng
X. Xây dựng chơng trình truyền số liệu thuỷ văn giữa các cơ sở dữ liệu
XI. Chơng trình trợ giúp XLSLTVVT
Sau đây là phần thuyết minh cho các thành phần của hệ phần mềm XLSLTVVT.
Mỗi một thành phần (giao diện) sẽ đợc trình bày 4 phần:
1. Chức năng nhiệm vụ của thành phần
2. Giao diện của thành phần
3. Mô tả các đối tợng với các thuộc tính (Properties) của chúng
4. Mô tả các chơng trình con có trong mỗi thành phần
I. Xây dựng giao diện chung chơng trình phần mềm HYDTID 1.0
(XLSLTVVT)
I.1 Chức năng nhiệm vụ của giao diện chung cho các chơng trình phần mềm
XLSLTVVT
Giao diện chung cho các chơng trình phần mềm XLSLTVVT có tên gọi là
MDIHYDTID có một loạt các (đối tợng) menu:
mnuSystem: Quản lý danh sách trạm, mã trạm, các yếu tố quan trắc
mnuDataProcessing: Dùng để vào các menu con XLSLTVVT
Type=Exe
Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0# \ \ \WINDOWS\system32\stdole2.tlb#OLE
Automation
Reference=*\G{56BF9020-7A2F-11D0-9482-
00A0C91110ED}#1.0#0# \ \ \WINDOWS\System32\MSBIND.DLL#Microsoft Data Binding Collection
Reference=*\G{00000200-0000-0010-8000-00AA006D2EA4}#2.0#0# \ \ \Program Files\Common
Files\System\ado\msado20.tlb#Microsoft ActiveX Data Objects 2.0 Library
3
Reference=*\G{6B263850-900B-11D0-9484-
00A0C91110ED}#1.0#0# \ \ \WINDOWS\System32\msstdfmt.dll#Microsoft Data Formatting Object Library
Reference=*\G{642AC760-AAB4-11D0-8494-
00A0C90DC8A9}#1.0#0# \ \ \WINDOWS\System32\MSDBRPTR.DLL#Microsoft Data Report Designer v6.0
Reference=*\G{BD96C556-65A3-11D0-983A-00C04FC29E30}#1.5#0# \ \ \Program Files\Common
Files\System\msadc\msadco.dll#Microsoft Remote Data Services 2.1 Library
Reference=*\G{00025E01-0000-0000-C000-000000000046}#5.0#0# \ \ \Program Files\Common Files\Microsoft
Shared\DAO\dao360.dll#Microsoft DAO 3.6 Object Library
Object={C932BA88-4374-101B-A56C-00AA003668DC}#1.1#0; msmask32.ocx
Object={67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0; MSADODC.OCX
Object={65E121D4-0C60-11D2-A9FC-0000F8754DA1}#2.0#0; MSCHRT20.OCX
Object={F0D2F211-CCB0-11D0-A316-00AA00688B10}#1.0#0; MSDATLST.OCX
Object={CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0; MSDATGRD.OCX
Object={F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0; comdlg32.ocx
Object={831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0; mscomctl.ocx
Object={BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0; TABCTL32.OCX
Object={3B7C8863-D78F-101B-B9B5-04021C009402}#1.2#0; richtx32.ocx
Object={00025600-0000-0000-C000-000000000046}#5.2#0; crystl32.ocx
Object={00028C01-0000-0000-0000-000000000046}#1.0#0; DBGRID32.OCX
Object={BB5C2B20-F30E-11D0-9DB6-00AA00A478BC}#3.0#0; mapx30.ocx
Form=HYDTID.frm
Module=Module11; graphprinter.bas
Form=frmRDS.frm
Module=Module12; SPLREG.bas
Module=Module13; RatingFunc.bas
Form=frmUnitSediment.frm
Form=frmHydCharts.frm
Form=frmDocumentOfHydDataProcessing.frm
Form=frmMapOfStationNetwork.frm
Form=frmHTnTkkPEntry.frm
4
Form=frmHydSystemSetting.frm
Form=frmTimeGraphMonthSelect.frm
Form=frmSeriesStatistics.frm
Form=frmSplash.frm
Form=WaterLevelMeasurement.frm
Form=frmImportFromTextFile.frm
Form=frmExportToTextFile.frm
Form=frmDailyDataReport.frm
Form=frmComputQfronH.frm
Form=frmVmcRatingCurve.frm
Form=frmQRatingTable.frm
Form=FrmLogOn.frm
Form=vbtgraph.frm
Form=FrmHTnTkkPForTidalRegion.frm
Form=FrmHTnTkkPEntryForTidalRegion.frm
Form=frmRepresentativeVelocity.frm
Form=frmHydTimeSeriesGraph.frm
Form=frmCrossSection.frm
Module=Module7; CrossSection.bas
FlPointCheck=0
FDIVCheck=0
UnroundedFP=0
StartMode=0
Unattended=0
Retained=0
ThreadPerObject=0
MaxNumberOfThreads=1
DebugStartupOption=0
[MS Transaction Server]
5
AutoRefresh=1C¸c ®èi t−îng vµ Properties cña HYDTID 1.0 ®−îc liÖt kª nh− sau:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Begin VB.MDIForm MDIHydTidDB
BackColor = &H8000000C&
Caption = "Hydroprocessing and Database System For Tidal Region"
ClientHeight = 7455
ClientLeft = 165
ClientTop = 855
ClientWidth = 8820
LinkTopic = "MDIForm1"
StartUpPosition = 3 'Windows Default
Begin MSComctlLib.StatusBar HYdStatusBar
Align = 2 'Align Bottom
Object.Width = 1411
MinWidth = 1411
Text = "Time"
TextSave = "15:42"
EndProperty
EndProperty
End
Begin VB.Menu mnuSystem
Caption = "System"
Begin VB.Menu mnuUserManager
Caption = "User Manager"
End
6
Begin VB.Menu mnuLogonServer
Caption = "Log in"
End
Begin VB.Menu mnuOpenDataBase
Caption = "Open DataBase"
End
Begin VB.Menu mnuDatabaseManager
Caption = "Database Manager"
Begin VB.Menu mnuStationCharacteristics
Caption = "Station Characteristics"
End
Begin VB.Menu mnuVarCharacteristics
Caption = "Variable Characteristics"
End
Begin VB.Menu mnuStationVarCharacteristics
Caption = "Station Variable Characteristics"
End
Begin VB.Menu mnuQLoopEntry
Caption = "QLoop Entry"
End
Begin VB.Menu mnuUnitSediment
Caption = "Unit Sediment Entry"
End
Begin VB.Menu mnuDepthEntry
Caption = "Depth Entry"
End
Begin VB.Menu mnuTimeSeriesEntry
Caption = "Time Series Entry"
Begin VB.Menu mnuDailyseries
7
Caption = "Daily Series"
End
Begin VB.Menu mnuMonthlySeries
Caption = "Monthly Series"
End
Begin VB.Menu mnuYearlySeries
Caption = "Yearly Series"
End
End
Begin VB.Menu mnuStageDischargeTransformation
Caption = "Stage Discharge Transformation"
End
Begin VB.Menu mnuComputSedimentLoad
Caption = "Comput SedimentLoad"
Enabled = 0 'False
End
Begin VB.Menu mnuSelectHhourlyHpeakFoot
Caption = "Select HhourlyHpeakFoot"
End
End
Begin VB.Menu mnuWaterLevelMeasurement
Caption = "WaterLevel/Temprature/Rainfall Measurement"
Enabled = 0 'False
Visible = 0 'False
End
Begin VB.Menu mnuHTnTkkPMeasurement
Caption = "HTnTkkP Measurement"
Enabled = 0 'False
Visible = 0 'False
8
End
Begin VB.Menu mnuDepthMeasurement
Caption = "Depth Measurement"
End
Begin VB.Menu mnuStrongAffectedTideFlow
Caption = "StrongAffectedTideFlow"
Begin VB.Menu mnuTidCrossectionRatingTable
Caption = "Tide Crossection Rating Table"
End
Begin VB.Menu mnuRepVelocityMeasurement
Caption = "RepVelocityMeasurement"
End
Begin VB.Menu mnuADCPdataEntry
Caption = "ADCPdataEntry"
End
End
Begin VB.Menu mnuExtrapolationOfRatingCurve
Caption = "Extrapolation Of RatingCurve"
End
Begin VB.Menu mnuSedimentRatingCurve
Caption = "Sediment RatingCurve And Comput R"
Begin VB.Menu mnuUnitSedimentData
Caption = "Unit Sediment Data"
End
Begin VB.Menu mnuFittingSedimentRatingCurve
Caption = "Fitting Sediment RatingCurve and Comput R"
End
End
Begin VB.Menu mnuImportExportDataofHydProcessing
9
Caption = "Import/Export Data of HydProcessing"
End
Begin VB.Menu mnuRemoteDatAccess
Caption = "Remote Data Access"
End
End
Begin VB.Menu mnuValidation
Caption = "Validation"
Begin VB.Menu mnuScreeningOfData
Caption = "Screening of Data"
Begin VB.Menu mnuListing
Caption = "Listing"
End
Begin VB.Menu mnuTurningPointTest
Caption = "Turning PointTest"
End
Begin VB.Menu mnuDifferenceSignTest
Caption = "Difference Sign Test"
End
Begin VB.Menu RankCorrelationTest
Caption = "Rank CorrelationTest"
End
Begin VB.Menu mnuRankTrendTest
Caption = "RankTrendTest"
End
Begin VB.Menu mnuSerialCorrelationCoefficient
Caption = "Serial Correlation Coefficient"
End
End
10
Begin VB.Menu mnuSpatialHomogeneityTest
Caption = "Spatial Homogeneity Test"
End
End
Begin VB.Menu mnuAnalysis
Caption = "Analysis"
Begin VB.Menu mnuGraph
Caption = "Graph"
Begin VB.Menu mnuTimeSeriesGraph
Caption = "Time Series Graph"
End
Begin VB.Menu mnuScatterGraph
Begin VB.Menu mnuHydDataBaseReport
Caption = "HydDataBaseReport"
Begin VB.Menu mnuRptDailyData
Caption = "Daily (Monthly) Data"
End
Begin VB.Menu mnuExportToTextFile
Caption = "Export To TextFile(time series: Hourly, Daily
)"
End
Begin VB.Menu mnuRptWaterDischargeAndSediment
Caption = "Water Discharge and Sediment"
End
Begin VB.Menu mnuRptRatingTable
Caption = "Rating Table"
End
End
Begin VB.Menu mnuDataSummary
11
Caption = "Data Summary"
End
Begin VB.Menu mnuStationVar
Caption = "Station Variable"
Begin VB.Menu mnuRptDailyWaterDischargeGraph
Caption = "Daily Water Discharge Graph"
End
Begin VB.Menu mnuRptConcentration
Caption = "Concentration"
End
End
End
Begin VB.Menu mnuWindows
Caption = "Windows"
WindowList = -1 'True
End
Begin VB.Menu mnuHelp
Caption = "Help"
Begin VB.Menu mnuHydtidProcessing
Caption = "HydtidProcessing"
End
End
End
Attribute VB_Name = "MDIHydTidDB"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
12
Private Declare Function GetPrivateProfileString Lib "kernel32" Alias
"GetPrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName
As Any, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize
As Long, ByVal lpFileName As String) As Long I. 4 M« t¶ c¸c ch−¬ng tr×nh con cã trong giao diÖn chÝnh
‘ Ch−¬ng tr×nh HTnTkkPEntryForTidalRegion nhËp mùc n−íc vïng triÒu
Private Sub HTnTkkPEntryForTidalRegion_Click()
FrmHTnTkkPEntryForTidalRegion.Show
nSize = 128
lpReturnedString = Space(128)
lpFileName = "c:\Users\cau\HYDTID\HYDTIDDB.ini"
iReturn = GetPrivateProfileString(lpApplicationName, lpKeyName, lpDefault,
lpReturnedString, nSize, lpFileName)
If iReturn > 0 Then
PrinterTimeDrawWidth = Val(Left(lpReturnedString, iReturn))
End If
If Not InitialHYDTIDPath Then
lpApplicationName = "HydPath"
lpKeyName = "HYDTIDPath"
lpDefault = "c:\Users\cau\HYDTID\HYDTIDDB.mdb"
nSize = 128
lpReturnedString = Space(128)
lpFileName = "c:\Users\cau\HYDTID\HYDTIDDB.ini"
13
iReturn = GetPrivateProfileString(lpApplicationName, lpKeyName, lpDefault,
lpReturnedString, nSize, lpFileName)
If iReturn > 0 Then
HYDTIDPath1 = Left(lpReturnedString, iReturn)
End If
' MDIHYDTIDDB.Caption = ""
msg1 = "Default HydDatabse: " & HYDTIDPath & Chr(13)
msg1 = msg1 & "Please check computer network " & Chr(13)
msg1 = msg1 & "Do you want to connect to network computer with " & Chr(13)
msg1 = msg1 & "Databse: " & HYDTIDPath1 & Chr(13)
iReturn1 = MsgBox(msg1, vbOKCancel)
If iReturn1 = 1 Then
errHandler:
MsgBox "Error with MDIHYDTIDDB :" & HydConnectionString & Chr(13) &
Err.Description
Unload Me
End Sub
‘ Modul frmQDischargeAndSediment nhËp Q vµ R thùc ®o
Private Sub mnuADCPdataEntry_Click()
frmQDischargeAndSediment.Show
End Sub
Private Sub mnuComputSedimentLoad_Click()
frmComputSedimentLoad.Show
End Sub 14
‘ Modul frmCrossSection nhËp, xö lý sè liÖu mÆt c¾t ngang
Private Sub mnuCrossSectionProfileData_Click()
frmCrossSection.Show
End Sub
Private Sub mnuDailyseries_Click()
frmDailyData.Show
End Sub
‘ Modul frmDataSummary tæng kÕt sè liÖu
Private Sub mnuExportImportData_Click()
frmImportData.Show
End Sub
‘ Modul frmExportToTextFile xuÊt sè liÖu ra file v¨n b¶n
Private Sub mnuExportToTextFile_Click()
frmExportToTextFile.Show
End Sub
Private Sub mnuFittingSedimentRatingCurve_Click()
frmSedimentRatingCurve.Show
End Sub
‘ Modul frmQLoopEntry nhËp sè liÖu trÝch lò 15
Private Sub mnuFloodData_Click()
frmQLoopEntry.Show
frmQLoopEntry.Caption = " Flood Data "
End Sub Private Sub mnuHourlySeriesEntry_Click()
frmTSEntry.Show
End Sub
Private Sub mnuHydMeasurementReport_Click()
frmHydMeasurementReport.Show
' frmQDischargeAndSediment.Show
End Sub
Private Sub mnuQLoopEntry_Click()
frmQLoopEntry.Show
End Sub
Modul frmQRatingCurve Xác định Q=f(H) và chỉnh biên Q
Private Sub mnuQRatingCurve_Click()
frmQRatingCurve.Show
End Sub
Private Sub mnuRatingTable_Click()
frmQRatingTable.Show
End Sub
16
Private Sub mnuRemoteDatAccess_Click()
frmRDS.Show
End Sub
Modul frmRepresentativeVelocity nhập, tính Vdb, Vmc, chỉnh biên Q thời kỳ ảnh hởng
triều mạnh
Private Sub mnuRepVelocityMeasurement_Click()
frmRepresentativeVelocity.Show
End Sub
Private Sub mnuRptDailyData_Click()
Private Sub mnuStationVarCharacteristics_Click()
FrmStationVarCharacteristics.Show
End Sub
Modul frmTidCrossSection Khai toán diện tích mặt cắt ngang
Private Sub mnuTidCrossectionRatingTable_Click()
frmTidCrossSection.Show
End Sub
Modul frmHydTimeSeriesGraph Vẽ đờng quá trình
Private Sub mnuTimeSeriesGraph_Click()
frmHydTimeSeriesGraph.Show
End Sub
17
Private Sub mnuTimeSeriesGrapth_Click()
frmHydTimeSeriesGraph.Show
End Sub
Modul frmUnitSediment Nhập hàm lợng chất lơ lửng đại biểu
Private Sub mnuUnitSediment_Click()
frmUnitSediment.Show
End Sub
Private Sub mnuUnitSedimentData_Click()
II.3 Mô tả các đối tợng với các Properties của giao diện các chơng trình phần mềm
nhập và quản lý cọc và thuỷ chí
VERSION 5.00
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form frmStakes
Caption = "Stakes"
ClientHeight = 4245
ClientLeft = 1110
ClientTop = 345
ClientWidth = 5745
KeyPreview = -1 'True
LinkTopic = "Form2"
ScaleHeight = 4245
ScaleWidth = 5745
Begin VB.PictureBox picButtons
Align = 2 'Align Bottom
Appearance = 0 'Flat
BorderStyle = 0 'None
ForeColor = &H80000008&
19
Height = 300
Left = 0
ScaleHeight = 300
ScaleWidth = 5745
TabIndex = 1
TabIndex = 3
Top = 0
Width = 1095
End
Begin VB.CommandButton cmdAdd
Caption = "&Add"
Height = 300
Left = 59
TabIndex = 2
Top = 0
Width = 1095
End
End
Begin MSAdodcLib.Adodc datPrimaryRS
Align = 2 'Align Bottom
Height = 330
Left = 0
Top = 3915
Width = 5745
_ExtentX = 10134
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
20
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin MSDataGridLib.DataGrid grdDataGrid
Align = 1 'Align Top
Bindings = "frmStakes.frx":0000
Height = 3495
Left = 0
TabIndex = 0
Top = 0
Width = 5745
_ExtentX = 10134
_ExtentY = 6165
_Version = 393216
AllowUpdate = -1 'True
HeadLines = 1
RowHeight = 15
AllowAddNew = -1 'True
AllowDelete = -1 'True
BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
21
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 3081
SubFormatType = 0
EndProperty
EndProperty
SplitCount = 1
BeginProperty Split0
BeginProperty Column00
EndProperty
BeginProperty Column01
EndProperty
EndProperty
End
End
Attribute VB_Name = "frmStakes"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
II.4 Mô tả các chơng trình con có trong mỗi thành phần giao diện
các chơng trình
phần mềm nhập và quản lý cọc và thuỷ chí
22
Th«ng b¸o c¸c biÕn
Dim iCol, iRow As Integer
.Text = tmpdatestr
End With
End If
If Len(tmpdatestr) >= 16 Then
tmpdatestr = Left(tmpdatestr, 16)
With MaskEdBoxDateOfStakesMeasurement
.Mask = "##/##/#### ##:##"
.Text = tmpdatestr
End With
End If
End If
.Caption = Str(.Recordset.AbsolutePosition) & "/" & Str(.Recordset.RecordCount)
Else
.Caption = "0/0"
End If
End With
'If tmpRec = 0 Then Exit Sub
strSQL = "Select * from " & CurrentDetailTable
strSQL = strSQL & " where stationID='" & StationID & "'"
strSQL = strSQL & " and StakeID='" & Trim(StakeID) & "'"
strSQL = strSQL & " Order by DateOfstakeIDUse"
Adodc2.RecordSource = strSQL
Adodc2.Refresh
With Adodc2
If .Recordset.RecordCount > 0 Then
23
.Caption = Str(.Recordset.AbsolutePosition) & "/" & Str(.Recordset.RecordCount)
Else
.Text = ""
.Mask = "##/##/#### ##:##"
.SetFocus
End With
End Sub
Chơng trình tạo sơ hoạ tuyến cọc
Private Sub cmdAddNewSketch_Click()
On Error Resume Next
With DataSketchOfStakesCrossSection.Recordset
.AddNew
End With
End Sub
Chơng trình thêm thời đoạn sử dụng đầu cọc mới
Private Sub cmdAddPeriod_Click()
On Error GoTo errHandler
StartDateOfUse = CDate(MaskEdBoxStartDateOfUse.Text)
EndDateOfUse = CDate(MaskEdBoxEndDateOfUse.Text)
With Adodc1.Recordset
If .BOF Or .EOF Then
MsgBox " This is Begin or End of Table"
GoTo errHandler
End If
End With