⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmclientconsole.frm

📁 非常著名的人工智能程序bob,想学人工智能的可以参考下.
💻 FRM
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX"
Begin VB.Form FrmClientConsole 
   Caption         =   "Client Console and Event/Error Viewer"
   ClientHeight    =   2595
   ClientLeft      =   3225
   ClientTop       =   4395
   ClientWidth     =   6120
   Icon            =   "FrmClientConsole.frx":0000
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   ScaleHeight     =   2595
   ScaleWidth      =   6120
   Begin TabDlg.SSTab sChoices 
      Height          =   2565
      Left            =   30
      TabIndex        =   0
      Top             =   0
      Width           =   6075
      _ExtentX        =   10716
      _ExtentY        =   4524
      _Version        =   393216
      Style           =   1
      Tabs            =   4
      Tab             =   3
      TabsPerRow      =   4
      TabHeight       =   520
      TabCaption(0)   =   "&Console"
      TabPicture(0)   =   "FrmClientConsole.frx":0442
      Tab(0).ControlEnabled=   0   'False
      Tab(0).Control(0)=   "txtInput"
      Tab(0).Control(1)=   "txtConsoleLog"
      Tab(0).ControlCount=   2
      TabCaption(1)   =   "Event Log"
      TabPicture(1)   =   "FrmClientConsole.frx":045E
      Tab(1).ControlEnabled=   0   'False
      Tab(1).Control(0)=   "LstEventLog"
      Tab(1).ControlCount=   1
      TabCaption(2)   =   "Error Log"
      TabPicture(2)   =   "FrmClientConsole.frx":047A
      Tab(2).ControlEnabled=   0   'False
      Tab(2).Control(0)=   "lstErrorLog"
      Tab(2).ControlCount=   1
      TabCaption(3)   =   "Systems Running"
      TabPicture(3)   =   "FrmClientConsole.frx":0496
      Tab(3).ControlEnabled=   -1  'True
      Tab(3).Control(0)=   "lstSystemLog"
      Tab(3).Control(0).Enabled=   0   'False
      Tab(3).ControlCount=   1
      Begin VB.TextBox txtInput 
         Height          =   345
         Left            =   -74940
         TabIndex        =   4
         Text            =   ">>"
         Top             =   2130
         Width           =   5955
      End
      Begin VB.TextBox txtConsoleLog 
         BackColor       =   &H00000000&
         ForeColor       =   &H00FFFFFF&
         Height          =   1755
         Left            =   -74940
         Locked          =   -1  'True
         MultiLine       =   -1  'True
         ScrollBars      =   2  'Vertical
         TabIndex        =   3
         Top             =   330
         Width           =   5955
      End
      Begin MSComctlLib.ListView LstEventLog 
         Height          =   2145
         Left            =   -74970
         TabIndex        =   1
         Top             =   330
         Width           =   5985
         _ExtentX        =   10557
         _ExtentY        =   3784
         View            =   3
         LabelEdit       =   1
         LabelWrap       =   0   'False
         HideSelection   =   -1  'True
         FullRowSelect   =   -1  'True
         _Version        =   393217
         Icons           =   "ConsoleIcons"
         SmallIcons      =   "ConsoleIcons"
         ForeColor       =   -2147483640
         BackColor       =   -2147483643
         BorderStyle     =   1
         Appearance      =   1
         NumItems        =   4
         BeginProperty ColumnHeader(1) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
            Text            =   "Date and Time"
            Object.Width           =   2540
         EndProperty
         BeginProperty ColumnHeader(2) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
            SubItemIndex    =   1
            Text            =   "Event Name"
            Object.Width           =   2540
         EndProperty
         BeginProperty ColumnHeader(3) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
            SubItemIndex    =   2
            Text            =   "Generated at..."
            Object.Width           =   2540
         EndProperty
         BeginProperty ColumnHeader(4) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
            SubItemIndex    =   3
            Text            =   "Event Description"
            Object.Width           =   7056
         EndProperty
      End
      Begin MSComctlLib.ListView lstErrorLog 
         Height          =   2145
         Left            =   -74970
         TabIndex        =   2
         Top             =   330
         Width           =   5985
         _ExtentX        =   10557
         _ExtentY        =   3784
         View            =   3
         LabelEdit       =   1
         LabelWrap       =   0   'False
         HideSelection   =   -1  'True
         FullRowSelect   =   -1  'True
         _Version        =   393217
         Icons           =   "ConsoleIcons"
         SmallIcons      =   "ConsoleIcons"
         ForeColor       =   -2147483640
         BackColor       =   -2147483643
         BorderStyle     =   1
         Appearance      =   1
         NumItems        =   4
         BeginProperty ColumnHeader(1) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
            Text            =   "Date and Time"
            Object.Width           =   2540
         EndProperty
         BeginProperty ColumnHeader(2) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
            SubItemIndex    =   1
            Text            =   "Error Type"
            Object.Width           =   2540
         EndProperty
         BeginProperty ColumnHeader(3) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
            SubItemIndex    =   2
            Text            =   "Generated at..."
            Object.Width           =   2540
         EndProperty
         BeginProperty ColumnHeader(4) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
            SubItemIndex    =   3
            Text            =   "Error Description"
            Object.Width           =   7056
         EndProperty
      End
      Begin MSComctlLib.ListView lstSystemLog 
         Height          =   2145
         Left            =   30
         TabIndex        =   5
         Top             =   330
         Width           =   5985
         _ExtentX        =   10557
         _ExtentY        =   3784
         View            =   3
         LabelEdit       =   1
         LabelWrap       =   0   'False
         HideSelection   =   -1  'True
         FullRowSelect   =   -1  'True
         _Version        =   393217
         Icons           =   "ConsoleIcons"
         SmallIcons      =   "ConsoleIcons"
         ForeColor       =   -2147483640
         BackColor       =   -2147483643
         BorderStyle     =   1
         Appearance      =   1
         NumItems        =   4
         BeginProperty ColumnHeader(1) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
            Text            =   "Service Name"
            Object.Width           =   3528
         EndProperty
         BeginProperty ColumnHeader(2) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
            SubItemIndex    =   1
            Text            =   "Service Status"
            Object.Width           =   2540
         EndProperty
         BeginProperty ColumnHeader(3) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
            SubItemIndex    =   2
            Text            =   "Service Started"
            Object.Width           =   2540
         EndProperty
         BeginProperty ColumnHeader(4) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
            SubItemIndex    =   3
            Text            =   "Service Description"
            Object.Width           =   7056
         EndProperty
      End
   End
   Begin MSComctlLib.ImageList ConsoleIcons 
      Left            =   0
      Top             =   0
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   16
      ImageHeight     =   16
      MaskColor       =   12632256
      _Version        =   393216
      BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
         NumListImages   =   6
         BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "FrmClientConsole.frx":04B2
            Key             =   ""
         EndProperty
         BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "FrmClientConsole.frx":0904
            Key             =   ""
         EndProperty
         BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "FrmClientConsole.frx":0D56
            Key             =   ""
         EndProperty
         BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "FrmClientConsole.frx":11A8
            Key             =   ""
         EndProperty
         BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "FrmClientConsole.frx":15FA
            Key             =   ""
         EndProperty
         BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "FrmClientConsole.frx":1A4C
            Key             =   ""
         EndProperty
      EndProperty
   End
End
Attribute VB_Name = "FrmClientConsole"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub Form_Load()
    Dim Current As Byte
    
    Me.Width = 6240
    Me.Height = 3000
    ConsoleRunning = True
    Current = lstSystemLog.ListItems.Count + 1
    lstSystemLog.ListItems.Add Current, , "Console Service", 6, 6
    lstSystemLog.ListItems.Item(Current).SubItems(1) = "Running"
    lstSystemLog.ListItems.Item(Current).SubItems(2) = Now
    lstSystemLog.ListItems.Item(Current).SubItems(3) = "Console Service - Displays Error and Event Information"
    Current = lstSystemLog.ListItems.Count + 1
    lstSystemLog.ListItems.Add Current, , "Debugging Service", 6, 6
    lstSystemLog.ListItems.Item(Current).SubItems(1) = "Running"
    lstSystemLog.ListItems.Item(Current).SubItems(2) = Now
    lstSystemLog.ListItems.Item(Current).SubItems(3) = "Activates Debugging Systems when needed"
    Current = lstSystemLog.ListItems.Count + 1
    lstSystemLog.ListItems.Add Current, , "Keyword-Response Service", 6, 6
    lstSystemLog.ListItems.Item(Current).SubItems(1) = "Running"
    lstSystemLog.ListItems.Item(Current).SubItems(2) = Now
    lstSystemLog.ListItems.Item(Current).SubItems(3) = "Generates Responses based on user's query"
    
    txtConsoleLog.text = "Project Bob Client Console Initilized - All Systems have been Enabled"
End Sub

Private Sub Form_Resize()
    On Error Resume Next
    'Adjust the form
    sChoices.Height = ScaleHeight
    sChoices.Width = ScaleWidth - sChoices.Left
    'Adjust the widths of the 3 listviews
    LstEventLog.Width = sChoices.Width - 100
    lstErrorLog.Width = sChoices.Width - 100
    lstSystemLog.Width = sChoices.Width - 100
    'Adjust the heights of the 3 listviews
    LstEventLog.Height = sChoices.Height - 400
    lstErrorLog.Height = sChoices.Height - 400
    lstSystemLog.Height = sChoices.Height - 400
    'Adjust the console textbox
    txtConsoleLog.Width = sChoices.Width - 100
    txtInput.Width = sChoices.Width - 100
    txtInput.Top = sChoices.Height - 400
    txtConsoleLog.Height = sChoices.Height - 400 - txtInput.Height
End Sub

Private Sub Form_Terminate()
    ConsoleRunning = False
End Sub

Private Sub Form_Unload(Cancel As Integer)
    ConsoleRunning = False
End Sub

Private Sub txtInput_Change()
    If Len(txtInput.text) < 2 Then
        txtInput.text = ">>"
        txtInput.SelStart = 2
    End If
End Sub

Private Sub txtInput_KeyDown(KeyCode As Integer, Shift As Integer)
    On Error Resume Next
    If KeyCode = 13 Then
        txtConsoleLog.text = txtConsoleLog.text & Chr(13) & Chr(10) & Chr(13) & Chr(10) & txtInput.text & Chr(13) & Chr(10) & ParseClientCommand(Right(txtInput.text, Len(txtInput.text) - 2))
        txtConsoleLog.SelStart = Len(txtConsoleLog.text)
    End If
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -