?? kzfrm.frm
字號:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form KZfrm
Caption = "微震監測"
ClientHeight = 8595
ClientLeft = 60
ClientTop = 345
ClientWidth = 15240
LinkTopic = "Form1"
ScaleHeight = 8595
ScaleWidth = 15240
StartUpPosition = 3 '窗口缺省
Begin MSComDlg.CommonDialog dkfiles
Left = 8280
Top = 5400
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin VB.PictureBox Pictools
Align = 2 'Align Bottom
Height = 1515
Left = 0
ScaleHeight = 1455
ScaleWidth = 15180
TabIndex = 9
Top = 7080
Width = 15240
Begin VB.TextBox txtMaxT
Height = 375
Left = 11760
TabIndex = 34
Top = 0
Width = 1335
End
Begin VB.TextBox txtZhenji
Height = 375
Left = 13920
TabIndex = 33
Top = 240
Width = 1215
End
Begin VB.CommandButton cmdZhenji
Caption = "震級"
Height = 375
Left = 13080
TabIndex = 32
Top = 240
Width = 735
End
Begin VB.TextBox TextPoint
Height = 375
Left = 10320
TabIndex = 31
Top = 0
Width = 1335
End
Begin VB.TextBox TextReaPoint
Height = 375
Left = 10320
TabIndex = 30
Top = 480
Width = 1335
End
Begin VB.TextBox TextTime
Height = 375
Left = 1680
TabIndex = 28
Text = "0"
Top = 960
Width = 2295
End
Begin VB.TextBox TextName
Height = 390
Left = 1680
TabIndex = 27
Text = "No Files"
Top = 0
Width = 2340
End
Begin VB.CommandButton Cmdratio
Caption = "比值圖"
Height = 375
Left = 10200
TabIndex = 26
Top = 960
Width = 1215
End
Begin VB.TextBox TextLine
Height = 375
Left = 7440
TabIndex = 25
Text = "30"
Top = 960
Width = 1335
End
Begin VB.TextBox TextWin
Height = 375
Left = 7440
TabIndex = 24
Text = "30"
Top = 480
Width = 1335
End
Begin VB.CommandButton CmdLine
Caption = "線長法"
Height = 375
Left = 8880
TabIndex = 23
Top = 960
Width = 1335
End
Begin VB.CommandButton CmdAuto
Caption = "自回歸法"
Height = 375
Left = 8880
TabIndex = 22
Top = 480
Width = 1335
End
Begin VB.TextBox TextDirection
Height = 375
Left = 5880
TabIndex = 21
Top = 0
Width = 1335
End
Begin VB.TextBox TextFlat
Height = 375
Left = 1680
TabIndex = 18
Text = "0"
Top = 480
Width = 2295
End
Begin VB.CommandButton cdfiles
Caption = "打開數據文件"
Height = 495
Left = 0
TabIndex = 16
Top = 0
Width = 1575
End
Begin VB.CommandButton exit
Caption = "退出"
Height = 615
Left = 13320
TabIndex = 15
Top = 840
Width = 1935
End
Begin VB.OptionButton CheckdrawWZoom
Caption = "波形放大"
Height = 375
Left = 6000
TabIndex = 14
Top = 480
Width = 1215
End
Begin VB.TextBox TextBeishu
Height = 375
Left = 7440
TabIndex = 13
Text = "2"
Top = 0
Width = 1335
End
Begin VB.CommandButton CmdInput
Caption = "標準差法"
Height = 375
Left = 8880
TabIndex = 12
Top = 0
Width = 1335
End
Begin VB.CommandButton draw2
Caption = "畫波形"
Height = 375
Left = 4680
TabIndex = 11
Top = 480
Width = 1095
End
Begin VB.CommandButton drawRatio
Caption = "比值圖"
Height = 375
Left = 11760
TabIndex = 10
Top = 480
Width = 1215
End
Begin VB.Label Label5
Caption = "日期:"
Height = 255
Left = 960
TabIndex = 29
Top = 1080
Width = 615
End
Begin VB.Label LabDirect
Alignment = 2 'Center
BackColor = &H80000018&
Caption = " 方向:"
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 4680
TabIndex = 20
Top = 0
Width = 1095
End
Begin VB.Label LabelFlat
Caption = "子臺:"
Height = 375
Left = 960
TabIndex = 17
Top = 600
Width = 615
End
End
Begin VB.PictureBox PicSdev
Appearance = 0 'Flat
BackColor = &H80000005&
ForeColor = &H80000008&
Height = 2655
Left = 360
ScaleHeight = 2625
ScaleWidth = 7185
TabIndex = 1
Top = 2760
Width = 7215
Begin VB.Label LabelT
Appearance = 0 'Flat
BackColor = &H80000005&
Caption = "Label1"
ForeColor = &H80000008&
Height = 375
Left = 0
TabIndex = 2
Top = 0
Width = 735
End
End
Begin VB.PictureBox PicW
Appearance = 0 'Flat
BackColor = &H80000005&
ForeColor = &H80000008&
Height = 2535
Left = 360
ScaleHeight = 2505
ScaleWidth = 7185
TabIndex = 0
Top = 120
Width = 7215
Begin VB.Label Label1
Appearance = 0 'Flat
BackColor = &H80000005&
Caption = "Label1"
ForeColor = &H80000008&
Height = 255
Left = 1800
TabIndex = 19
Top = 120
Width = 855
End
Begin VB.Label LabBeishu
Caption = "Label7"
Height = 255
Left = 3720
TabIndex = 8
Top = 120
Width = 855
End
Begin VB.Label LabSquare
Caption = "Label6"
Height = 255
Left = 4560
TabIndex = 7
Top = 120
Width = 855
End
Begin VB.Label LabAverage
Caption = "Label5"
Height = 255
Left = 2880
TabIndex = 6
Top = 120
Width = 855
End
Begin VB.Label Label4
Appearance = 0 'Flat
BackColor = &H80000005&
Caption = "Y:"
ForeColor = &H80000008&
Height = 255
Left = 1320
TabIndex = 5
Top = 120
Width = 375
End
Begin VB.Label Label3
Appearance = 0 'Flat
BackColor = &H80000005&
Caption = "X:"
ForeColor = &H80000008&
Height = 255
Left = 120
TabIndex = 4
Top = 120
Width = 375
End
Begin VB.Label Label2
Appearance = 0 'Flat
BackColor = &H80000005&
Caption = "Label2"
ForeColor = &H80000008&
Height = 375
Left = 480
TabIndex = 3
Top = 120
Width = 735
End
End
End
Attribute VB_Name = "KZfrm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Type TWaveWinPara
t1 As Currency
t2 As Currency
ZoomPara As Single
End Type
Private Type tMT
EventTime As Currency
MaxAmplitude As Single
End Type
Dim Entry As TEntry
Dim wavedata() As Long
Dim ns As Currency
Dim Zoom As Boolean
Dim x1 As Single, y1 As Single, x2 As Single, y2 As Single
Dim x3 As Single
Dim Lx As Single
Dim WinNum As Integer
Dim WinT0 As Currency
Dim FileNum As Integer
Dim WaveWinPara() As TWaveWinPara
Dim CurrentParaNo As Integer
Dim Start As Long
Dim over As Long
Dim AVE As Single
Dim SDEV As Single
Dim Beishu As Single
Dim M As Long
Dim MinT As Long
Dim MaxT As Long
Dim Max As Single
Dim Min As Single
Private Sub CmdAuto_Click()
Call drawline1(Sdev_Extremum)
TextReaPoint.Text = Sdev_Extremum
End Sub
Private Sub cmdZhenji_Click()
Dim a As Long
MaxValue
'a = M
a = MaxT - MinT
txtZhenji.Text = 2.189 + 0.396 * Log(a / 40000)
End Sub
Private Sub drawRatio_Click()
draw_Sdev
End Sub
Private Sub draw2_Click()
drawWave
End Sub
Private Sub exit_Click()
End
End Sub
Private Sub Form_Load()
Dim i As Long
Dim j As Long
Dim ns As Currency
Dim Max As Single
TextBeishu.Text = "3"
TextDirection.Text = "x"
End Sub
Private Sub GetEntry()
Dim CNum As Long
Dim i As Long
KZ.LoadFileParas (FileName)
AE.CurrentRecNo = KZ.CurrentEventNo
AE.ns = KZ.RecorduS
AE.KZDate = KZ.RecordDate
AE.ADdT = 1 / KZ.CurrentADFreNo
AE.UnitNo = KZ.UnitNo
AE.SampleLength = KZ.SampleLength
AE.RecordNum = KZ.TotalRecordNum
AE.DelayNo = KZ.CurrentDelayNo
AE.TrigLevel = KZ.CurrentTrigNo
AE.ZoomPara = 1
ReDim Preserve AE.wavedata(1 To KZ.SampleLength) As Long
Call KZ.GetWaveDATA(Direction, ns, wavedata)
For i = 1 To AE.SampleLength
AE.wavedata(i) = wavedata(i)
Next i
End Sub
Public Sub cdfiles_Click()
OpenFile
TextName.Text = FileName
GetEntry
TextTime.Text = AE.KZDate
End Sub
Private Sub drawWave()
Dim j As Long
Dim i As Long
Debug.Print AE.KZDate
If TextDirection.Text = "x" Then
Direction = 1
ElseIf TextDirection.Text = "y" Then
Direction = 2
ElseIf TextDirection.Text = "z" Then
Direction = 3
End If
GetEntry
ReDim wavedata(1 To AE.SampleLength) As Long
PicW.Scale (1, 3000)-(AE.SampleLength, -3000)
Call KZ.GetWaveDATA(Direction, ns, wavedata)
PicW.Cls
For j = 1 To AE.SampleLength - 1
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -