📄 frmmain.frm
字号:
VERSION 5.00
Begin VB.MDIForm FrmMain
BackColor = &H8000000C&
Caption = "Project Bob Interface Shell - Designed and Developed by Greg Cohen and Brandon Resnick"
ClientHeight = 6780
ClientLeft = 165
ClientTop = 735
ClientWidth = 9000
Icon = "FrmMain.frx":0000
LinkTopic = "MDIForm1"
StartUpPosition = 3 'Windows Default
WindowState = 2 'Maximized
Begin VB.Menu MnuFile
Caption = "&File"
Begin VB.Menu MnuFileExit
Caption = "&Exit"
Shortcut = ^X
End
End
Begin VB.Menu MnuView
Caption = "&View"
Begin VB.Menu MnuViewClientConsole
Caption = "Client Console"
Shortcut = ^C
End
End
Begin VB.Menu MnuBob
Caption = "&Bob"
Begin VB.Menu MnuBobGoto
Caption = "&Goto Bob"
Shortcut = ^B
End
Begin VB.Menu MnuBobConfigure
Caption = "&Configure"
Shortcut = ^O
End
End
Begin VB.Menu MnuDebugging
Caption = "&Debugging"
Begin VB.Menu MnuDebugMode
Caption = "Debug Mode"
End
Begin VB.Menu MnuDebugSep1
Caption = "-"
End
Begin VB.Menu MnuDebugSimulate
Caption = "&Simulate..."
Begin VB.Menu MnuDebugSimEvent
Caption = "Event Log Message"
End
Begin VB.Menu MnuDebugSimError
Caption = "Error Log Message"
End
Begin VB.Menu MnuDebugSimSep1
Caption = "-"
End
Begin VB.Menu MnuDebugSimConverse
Caption = "Simulate Conversation"
End
End
Begin VB.Menu mnuDebugTest
Caption = "&Test..."
Begin VB.Menu MnuDebugKeyword
Caption = "&Keyword Lookup"
End
Begin VB.Menu MnuDebugTextMass
Caption = "&Mass Keyword Lookup "
End
Begin VB.Menu mnuDebugTestBob
Caption = "&Bob on Bob System"
End
End
Begin VB.Menu MnuDebugValid
Caption = "&Validate..."
Begin VB.Menu MnuDebugValidKeyword
Caption = "&Keyword-Response System"
End
End
Begin VB.Menu MnuDebugGenerate
Caption = "&Generate..."
Begin VB.Menu MnuDebugGenerateCRC
Caption = "&CRC String"
End
End
End
Begin VB.Menu mnuWindow
Caption = "&Window"
WindowList = -1 'True
Begin VB.Menu mnuWindowCascade
Caption = "&Cascade"
End
Begin VB.Menu mnuWindowTileHorizontal
Caption = "Tile &Horizontal"
End
Begin VB.Menu mnuWindowTileVertical
Caption = "Tile &Vertical"
End
End
Begin VB.Menu MnuHelp
Caption = "&Help"
Begin VB.Menu MnuHelpAbout
Caption = "&About"
End
End
End
Attribute VB_Name = "FrmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub MnuBobGoto_Click()
Me.WindowState = vbMinimized
BobWindow.Show 1
End Sub
Private Sub MnuDebugGenerateCRC_Click()
FrmGenerateCRC.Show 1
End Sub
Private Sub MnuDebugKeyword_Click()
Dim Response As String
Dim Logd As LogEntry
MsgBox "A Keyword lookup is being simulated..."
Response = TestAnsweringSystem
Logd.sName = "Test Result"
Logd.sGenerated = "Debug Menu --> Test"
Logd.sDescription = Response
AddtoEventLog Logd
End Sub
Private Sub MnuDebugSimConverse_Click()
FrmChecker.Show 1
End Sub
Private Sub mnuDebugTestBob_Click()
BobonBob.Show 1
End Sub
Private Sub MnuDebugTextMass_Click()
Dim A As Keyword
Dim B As String
Dim C As Response
Dim D As Integer
B = InputBox("Please enter a test sentence", "Testing Answering System")
If ModFunctions.Username = "" Then ModFunctions.Username = "Greg"
If B = "" Then Exit Sub
A = KeywordSearch(B)
If A.KeywordFile <> "" Then
FrmTextWindow.Show
FrmTextWindow.txtNotepad.Text = " Generating responses for '" & A.KeywordText & "'..." & Chr(13) & Chr(10)
For D = 0 To 19
C = GetRandomReply(A, Either)
FrmTextWindow.txtNotepad.Text = FrmTextWindow.txtNotepad.Text & Chr(13) & Chr(10) & (D + 1) & " - " & C.ResponseText
Next
End If
End Sub
Private Sub MnuDebugValidKeyword_Click()
FrmValidKeyword.Show 1
End Sub
Private Sub MnuHelpAbout_Click()
frmAbout.Show 1
End Sub
Private Sub mnuWindowCascade_Click()
Me.Arrange vbCascade
End Sub
Private Sub mnuWindowTileHorizontal_Click()
Me.Arrange vbTileHorizontal
End Sub
Private Sub mnuWindowTileVertical_Click()
Me.Arrange vbTileVertical
End Sub
Private Sub MnuDebugMode_Click()
MnuDebugMode.Checked = Not MnuDebugMode.Checked
DebugMode = MnuDebugMode.Checked
End Sub
Private Sub MnuDebugSimError_Click()
Dim TempError As LogEntry
MsgBox "An Error is being written to the Error log..."
TempError.sName = "Test Error"
TempError.sGenerated = "Debugging Menu -> Simulate"
TempError.sDescription = " A Test Error with Priority 1 has been added to the event log"
AddtoErrorLog TempError
End Sub
Private Sub MnuDebugSimEvent_Click()
Dim TempEvent As LogEntry
MsgBox "An Event is being written to the event log..."
TempEvent.sName = "Test Event"
TempEvent.sGenerated = "Debugging Menu -> Simulate"
TempEvent.sDescription = " A Test Event with Priority 1 has been added to the event log"
AddtoEventLog TempEvent
End Sub
Private Sub MnuViewClientConsole_Click()
FrmClientConsole.Show
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -