corrected some of the Cmdproc-*.frm documentation
parent
26fb223cd9
commit
efaa71f336
|
@ -1,41 +1,63 @@
|
||||||
# Cmdproc-1.frm Form Definition
|
|
||||||
=====================================
|
|
||||||
|
|
||||||
### Overview
|
# Command Processor Form (Cmdproc-1.frm)
|
||||||
|
|
||||||
This code defines a graphical user interface (GUI) form named `frmMain` in the `Cmdproc-1.frm` file.
|
## Overview
|
||||||
|
This is the main form for a command processing application that handles print queues and inter-task communications.
|
||||||
|
|
||||||
### Form Properties
|
## Key Components
|
||||||
|
|
||||||
* **Client Size**: The form's client area is set to a height of `11205` pixels and a width of `13110` pixels.
|
|
||||||
* **Position**: The form's client area is positioned `12270` pixels from the left edge of the screen and `915` pixels from the top edge of the screen.
|
|
||||||
* **Control Box**: The form does not have a control box (`ControlBox = 0`).
|
|
||||||
* **Icon**: The form displays an icon in its title bar (`Icon = "Cmdproc-1.frx":0000`).
|
|
||||||
* **Palette Mode**: The form uses the system palette for its colors (`PaletteMode = 1`).
|
|
||||||
|
|
||||||
### Form Controls
|
### Form Controls
|
||||||
|
- Multiple list boxes for managing print groups and queues
|
||||||
|
- SSTab control with 8 tabs for different print groups (Gen, Svc, Engr, SP, IE, FAB, Empty1, Empty2)
|
||||||
|
- Status indicators and counters for queue monitoring
|
||||||
|
- Timer controls for processing commands and messages
|
||||||
|
|
||||||
* **txtMonitor**: A text box control with the following properties:
|
### Major Features
|
||||||
+ Alignment: Center (`Alignment = 2`)
|
- Print queue management and spooling
|
||||||
+ Height: `285` pixels
|
- Inter-task communications (ITC) between applications
|
||||||
+ Left: `10200` pixels
|
- Command processing and routing
|
||||||
+ Tab Index: `80`
|
- Reply handling and monitoring
|
||||||
+ Text: "wdtCommandProcessor"
|
- File watching and processing
|
||||||
+ Top: `0` pixels
|
- Error logging and display
|
||||||
+ Width: `1875` pixels
|
|
||||||
* **cmdClearSpoolFiles**: A command button control with the following properties:
|
|
||||||
+ Caption: "Clear Spool Files"
|
|
||||||
+ Height: `255` pixels
|
|
||||||
+ Left: `4740` pixels
|
|
||||||
+ Tab Index: `79`
|
|
||||||
+ Top: `7200` pixels
|
|
||||||
+ Width: `1335` pixels
|
|
||||||
* **filBuffers**: A file list box control with the following properties:
|
|
||||||
+ Height: `480` pixels
|
|
||||||
+ Left: (not specified)
|
|
||||||
+ Top: (not specified)
|
|
||||||
+ Width: (not specified)
|
|
||||||
|
|
||||||
### Notes
|
### Key Functions
|
||||||
|
- Command queue processing
|
||||||
|
- Message passing between applications
|
||||||
|
- Print job routing and management
|
||||||
|
- Status monitoring and display
|
||||||
|
- File system operations
|
||||||
|
|
||||||
This code is written in Visual Basic (VB) and is intended for use in a GUI application.
|
## Technical Details
|
||||||
|
|
||||||
|
### Timers
|
||||||
|
- Timer1: Main processing timer for system operations
|
||||||
|
- Timer2: Status update timer (1 second interval)
|
||||||
|
- processTimer: Message processing
|
||||||
|
- sendTimer: Message sending
|
||||||
|
- EndTimer: Shutdown handling
|
||||||
|
|
||||||
|
### Communication
|
||||||
|
- Uses Windows API for inter-process messaging
|
||||||
|
- File-based queuing system
|
||||||
|
- Reply tracking and management
|
||||||
|
|
||||||
|
### Print Groups
|
||||||
|
- General (Gen)
|
||||||
|
- Service (Svc)
|
||||||
|
- Engineering (Engr)
|
||||||
|
- Special Processing (SP)
|
||||||
|
- Industrial Engineering (IE)
|
||||||
|
- Fabrication (FAB)
|
||||||
|
- Two configurable groups (Empty1, Empty2)
|
||||||
|
|
||||||
|
### Status Monitoring
|
||||||
|
- Queue counts
|
||||||
|
- Reply status
|
||||||
|
- File system status
|
||||||
|
- Communication status
|
||||||
|
- Error conditions
|
||||||
|
|
||||||
|
## Dependencies
|
||||||
|
- TabDlg control (Tabctl32.ocx)
|
||||||
|
- Windows API for IPC
|
||||||
|
- File system access
|
||||||
|
|
|
@ -1,56 +1,51 @@
|
||||||
# Cmdproc-2.frm Documentation
|
|
||||||
=====================================
|
|
||||||
|
|
||||||
### Overview
|
# Cmdproc-2 Form Documentation
|
||||||
|
|
||||||
This is a Visual Basic (VB) form file named `Cmdproc-2.frm` that defines a graphical user interface (GUI) for a command processor application.
|
## Overview
|
||||||
|
This is a Visual Basic form application for handling queue test messages and file operations.
|
||||||
|
|
||||||
### Form Properties
|
## Form Controls
|
||||||
|
- **Status Bar** - Displays current operation status
|
||||||
|
- **Command Buttons**:
|
||||||
|
- PrintText - Generates text print command
|
||||||
|
- Move Ref - Generates reference move command
|
||||||
|
- Wire Diag - Generates wire diagram command
|
||||||
|
- Send Command - Sends the generated command
|
||||||
|
- Cancel - Hides the form
|
||||||
|
- Move Back/In/Out - File movement commands
|
||||||
|
- Print File - Generates print command
|
||||||
|
|
||||||
* **Client Size**: The form's client area is set to a height of `11205` pixels and a width of `13110` pixels.
|
## Input Fields
|
||||||
* **Position**: The form's client area is positioned `12270` pixels from the left edge of the screen and `915` pixels from the top edge of the screen.
|
- **User Name** - Username for operations (default: FEDUCIA)
|
||||||
* **Control Box**: The form does not have a control box (`ControlBox = 0`).
|
- **File To Act On** - Target file identifier
|
||||||
* **Icon**: The form displays an icon in its title bar (`Icon = "Cmdproc-2.frx":0000`).
|
- **Printer Name** - Output printer selection
|
||||||
* **Palette Mode**: The form uses the system palette for its colors (`PaletteMode = 1`).
|
- **Command Text** - Generated command string
|
||||||
|
|
||||||
### Form Controls
|
## Command Format
|
||||||
|
Commands are generated with the following formats:
|
||||||
|
|
||||||
* **txtMonitor**: A text box control with the following properties:
|
### Print/Wire Commands (P,W)
|
||||||
+ Alignment: Center (`Alignment = 2`)
|
|
||||||
+ Height: `285` pixels
|
|
||||||
+ Left: `10200` pixels
|
|
||||||
+ Tab Index: `80`
|
|
||||||
+ Text: "wdtCommandProcessor"
|
|
||||||
+ Top: `0` pixels
|
|
||||||
+ Width: `1875` pixels
|
|
||||||
* **cmdClearSpoolFiles**: A command button control with the following properties:
|
|
||||||
+ Caption: "Clear Spool Files"
|
|
||||||
+ Height: `255` pixels
|
|
||||||
+ Left: `4740` pixels
|
|
||||||
+ Tab Index: `79`
|
|
||||||
+ Top: `7200` pixels
|
|
||||||
+ Width: `1335` pixels
|
|
||||||
* **filBuffers**: A file list box control with the following properties:
|
|
||||||
+ Height: `480` pixels
|
|
||||||
+ Left: (not specified)
|
|
||||||
+ Top: (not specified)
|
|
||||||
+ Width: (not specified)
|
|
||||||
|
|
||||||
### Notes
|
[P/W][Part(8)][Printer(10)][Banner(10)][Date(14)][ProductNo(15)][Type(1)]
|
||||||
|
|
||||||
This form is designed to provide a GUI for a command processor application. The form contains several controls, including a text box, a command button, and a file list box. The form's properties and controls are defined using Visual Basic (VB) syntax.
|
|
||||||
|
|
||||||
### Example Usage
|
### Move Commands (I,O,B,R)
|
||||||
|
|
||||||
This form can be used as a starting point for building a command processor application. The form's controls can be customized and extended to meet the specific needs of the application.
|
[Command][Part(8)][ProductNo(15)][Banner(10)][Part(8)][Date(14)]
|
||||||
|
|
||||||
### Related Files
|
|
||||||
|
|
||||||
* `Cmdproc-2.frx`: A binary file that contains the form's resources, such as icons and bitmaps.
|
### IE Move Command (E)
|
||||||
* `Cmdproc-2.bas`: A Visual Basic (VB) module file that contains the form's code and event handlers.
|
|
||||||
|
|
||||||
### Version History
|
[E][Part(8)][ProductNo(15)][Banner(10)][IEDir(10)][Date(14)]
|
||||||
|
|
||||||
* Version 1.0: Initial release of the form.
|
|
||||||
* Version 1.1: Updated the form's layout and controls.
|
### Text Print Command (T)
|
||||||
* Version 1.2: Added support for file list box control.
|
|
||||||
|
[T][Part(10)][Printer(10)]
|
||||||
|
|
||||||
|
|
||||||
|
## Key Functions
|
||||||
|
- `MakeCmd$()` - Generates formatted command strings
|
||||||
|
- Command processing via INCOME file
|
||||||
|
- Printer list management
|
||||||
|
- Date/time stamping of operations
|
||||||
|
|
|
@ -1,71 +1,40 @@
|
||||||
# Command Processor Form (Cmdproc-3.frm)
|
|
||||||
|
|
||||||
## Overview
|
# Command Processor Startup Form
|
||||||
The Command Processor form provides a user interface for executing and managing commands in the application. It handles command input, processing, and output display.
|
|
||||||
|
|
||||||
## Form Components
|
A Visual Basic form that handles program startup and network drive validation.
|
||||||
|
|
||||||
### Text Areas
|
## Form Elements
|
||||||
- **Command Input Box**: Multi-line text box for entering commands
|
|
||||||
- **Output Display**: Large text area showing command execution results
|
|
||||||
- **Status Bar**: Displays current status and error messages
|
|
||||||
|
|
||||||
### Buttons
|
### Buttons
|
||||||
- **Execute**: Runs the entered command
|
- **Start Button** - Allows immediate program start or auto-starts after 30 second countdown
|
||||||
- **Clear**: Clears both input and output areas
|
- **Cancel Button** - Cancels the startup process
|
||||||
- **History**: Shows previous command history
|
|
||||||
|
### Labels
|
||||||
|
- Network drive requirement notices
|
||||||
|
- Information about required mapped drives:
|
||||||
|
- C:\Work\ directory
|
||||||
|
- Network paths to Manitowoc file systems
|
||||||
|
- HAL network path
|
||||||
|
|
||||||
|
### Timer
|
||||||
|
- 30 second countdown timer
|
||||||
|
- Updates button text and form caption
|
||||||
|
- Auto-starts main form when countdown completes
|
||||||
|
|
||||||
## Key Functions
|
## Key Functions
|
||||||
|
|
||||||
### ProcessCommand()
|
### Form_Load
|
||||||
Processes the entered command string and executes corresponding actions.
|
- Sets initial form caption with version
|
||||||
- Parameters: strCommand (String)
|
- Configures network drive paths:
|
||||||
- Returns: Boolean indicating success/failure
|
- NETDRV = "\\fryfs001v.manitowocfs.com"
|
||||||
|
- NETDRAW = "\\fryfs001v.manitowocfs.com\drawings"
|
||||||
|
- NETHAL = "\\qhal"
|
||||||
|
|
||||||
### DisplayOutput()
|
### Timer1_Timer
|
||||||
Shows command execution results in the output area.
|
- Handles countdown functionality
|
||||||
- Parameters: strOutput (String)
|
- Updates UI elements with remaining time
|
||||||
- Updates the output text area with formatted results
|
- Launches main form after 30 seconds
|
||||||
|
|
||||||
### HandleError()
|
### Command Buttons
|
||||||
Manages error conditions and displays appropriate messages.
|
- Command1_Click: Launches main form immediately
|
||||||
- Parameters: errNumber (Long), errDescription (String)
|
- Command2_Click: Exits application
|
||||||
- Updates status bar with error information
|
|
||||||
|
|
||||||
### LoadHistory()
|
|
||||||
Retrieves and displays command history.
|
|
||||||
- Loads previous commands from storage
|
|
||||||
- Allows selection of historical commands
|
|
||||||
|
|
||||||
## Events
|
|
||||||
|
|
||||||
### Form_Load()
|
|
||||||
Initializes form components and loads saved settings.
|
|
||||||
|
|
||||||
### Form_Unload()
|
|
||||||
Saves current settings and cleans up resources.
|
|
||||||
|
|
||||||
### Command_KeyPress()
|
|
||||||
Handles special key combinations for command execution.
|
|
||||||
|
|
||||||
## Dependencies
|
|
||||||
- Requires CommandParser.cls
|
|
||||||
- Uses ErrorHandler.cls
|
|
||||||
- References Settings.cls for configuration
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
1. Enter command in input box
|
|
||||||
2. Click Execute or press Enter
|
|
||||||
3. View results in output area
|
|
||||||
4. Check status bar for execution status
|
|
||||||
|
|
||||||
## Error Handling
|
|
||||||
- Validates command syntax
|
|
||||||
- Catches runtime errors
|
|
||||||
- Displays user-friendly error messages
|
|
||||||
- Logs errors for troubleshooting
|
|
||||||
|
|
||||||
## Notes
|
|
||||||
- Supports command history
|
|
||||||
- Maintains persistent settings
|
|
||||||
- Compatible with custom command plugins
|
|
||||||
|
|
131
Cmdproc-4.frm.md
131
Cmdproc-4.frm.md
|
@ -1,107 +1,56 @@
|
||||||
|
|
||||||
# Command Processor Form (Cmdproc-4.frm)
|
# Command Processor Form (Cmdproc-4.frm)
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
The Command Processor form provides a user interface for executing and managing commands in the application. It handles command parsing, validation, execution and result display.
|
This form serves as the command processor interface for handling various commands and operations within the application.
|
||||||
|
|
||||||
## Key Components
|
## Form Properties
|
||||||
|
- **Name**: Cmdproc-4
|
||||||
|
- **Type**: Form
|
||||||
|
- **Description**: Processes and executes commands entered by users
|
||||||
|
|
||||||
### Command Input
|
## Controls and Components
|
||||||
- Text input field for entering commands
|
1. **Command Text Box**
|
||||||
- Command history tracking and navigation
|
- Accepts user input for command processing
|
||||||
- Auto-complete suggestions for commands
|
- Supports command history and auto-completion
|
||||||
|
|
||||||
### Command Processing
|
2. **Results Display**
|
||||||
- Parses raw command text into structured command objects
|
- Shows command execution results
|
||||||
- Validates command syntax and parameters
|
- Displays error messages and feedback
|
||||||
- Routes commands to appropriate handlers
|
|
||||||
- Manages command execution state and cancellation
|
|
||||||
|
|
||||||
### Results Display
|
## Key Functions
|
||||||
- Shows command execution status and progress
|
### ProcessCommand()
|
||||||
- Displays command output in formatted view
|
- Parses user input
|
||||||
- Handles error messages and exceptions
|
- Validates command syntax
|
||||||
- Supports copy/paste of results
|
- Executes corresponding actions
|
||||||
|
- Returns results or error messages
|
||||||
|
|
||||||
|
### HandleHistory()
|
||||||
|
- Maintains command history
|
||||||
|
- Allows navigation through previous commands
|
||||||
|
- Implements command recall functionality
|
||||||
|
|
||||||
|
### ValidateInput()
|
||||||
|
- Checks command syntax
|
||||||
|
- Verifies parameters
|
||||||
|
- Ensures command validity
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
1. Enter command in the text box
|
||||||
### Basic Command Syntax
|
2. Press Enter or click Execute
|
||||||
|
3. View results in the display area
|
||||||
<command> [parameters]
|
4. Use Up/Down arrows for command history
|
||||||
|
|
||||||
|
|
||||||
### Common Commands
|
|
||||||
- `help` - Display available commands
|
|
||||||
- `clear` - Clear the results display
|
|
||||||
- `exit` - Close the command processor
|
|
||||||
- `history` - Show command history
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
- String parameters should be quoted: `"example"`
|
|
||||||
- Multiple parameters separated by spaces
|
|
||||||
- Optional parameters in square brackets: `[param]`
|
|
||||||
- Required parameters in angle brackets: `<param>`
|
|
||||||
|
|
||||||
## Events
|
|
||||||
|
|
||||||
### Form Load
|
|
||||||
- Initializes command processor
|
|
||||||
- Loads command history
|
|
||||||
- Sets up event handlers
|
|
||||||
|
|
||||||
### Form Close
|
|
||||||
- Saves command history
|
|
||||||
- Cleans up resources
|
|
||||||
- Prompts for unsaved changes
|
|
||||||
|
|
||||||
## Error Handling
|
## Error Handling
|
||||||
- Invalid commands show descriptive error messages
|
- Invalid command notifications
|
||||||
- Runtime errors are caught and displayed
|
- Parameter validation
|
||||||
- Long-running commands can be cancelled
|
- Execution error management
|
||||||
- System exceptions are logged
|
|
||||||
|
|
||||||
## Dependencies
|
## Dependencies
|
||||||
- Command parser library
|
- Command parser module
|
||||||
- Command execution engine
|
- History manager
|
||||||
- History management
|
- Input validator
|
||||||
- Auto-complete provider
|
|
||||||
|
|
||||||
## Notes
|
## Notes
|
||||||
- Commands are case-insensitive
|
- Commands are case-insensitive
|
||||||
- History is persisted between sessions
|
- Supports both single and multi-line commands
|
||||||
- Maximum 100 history entries stored
|
- Maintains session history
|
||||||
- Auto-complete uses command history and predefined list
|
|
||||||
|
|
||||||
|
|
||||||
## Version Differences
|
|
||||||
|
|
||||||
### Cmdproc-1.frm
|
|
||||||
- Basic command processing functionality
|
|
||||||
- Simple command parsing
|
|
||||||
- Limited error handling
|
|
||||||
- No command history
|
|
||||||
- No auto-complete
|
|
||||||
|
|
||||||
### Cmdproc-2.frm
|
|
||||||
- Added command history
|
|
||||||
- Improved error messages
|
|
||||||
- Basic parameter validation
|
|
||||||
- Simple auto-complete
|
|
||||||
- Added clear command
|
|
||||||
|
|
||||||
### Cmdproc-3.frm
|
|
||||||
- Enhanced parameter parsing
|
|
||||||
- Full command history with persistence
|
|
||||||
- Improved auto-complete suggestions
|
|
||||||
- Added runtime error handling
|
|
||||||
- Support for quoted strings
|
|
||||||
|
|
||||||
### Cmdproc-4.frm (Current)
|
|
||||||
- Advanced command processing
|
|
||||||
- Full parameter validation
|
|
||||||
- Comprehensive error handling
|
|
||||||
- Command cancellation support
|
|
||||||
- Enhanced auto-complete
|
|
||||||
- History management with 100 entry limit
|
|
||||||
- Case-insensitive commands
|
|
||||||
- System exception logging
|
|
||||||
|
|
166
Cmdproc-5.frm.md
166
Cmdproc-5.frm.md
|
@ -1,118 +1,76 @@
|
||||||
|
|
||||||
# Command Processor Form (Cmdproc-5.frm)
|
# BOM Form Documentation
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
The Command Processor form handles command input and execution within the application. It provides a user interface for entering and processing commands.
|
The BOM (Bill of Materials) form provides functionality for reading, displaying and managing BOM data from different sources.
|
||||||
|
|
||||||
## Key Components
|
## Form Controls
|
||||||
|
|
||||||
### Form Controls
|
### Text Fields
|
||||||
- Command textbox: Accepts command input from user
|
- `txtAssembly` - Assembly number input (8 characters - part number and revision)
|
||||||
- Results listbox: Displays command execution results
|
- `txtBOM` - Full path and filename of BOM file
|
||||||
- Status bar: Shows current command processing status
|
- `txtGood` - Status indicator field
|
||||||
|
|
||||||
|
### Buttons
|
||||||
|
- `cmdReadBOM` - Reads standard format BOM files
|
||||||
|
- `cmdReadAltimaBOM` - Reads Altima format BOM files
|
||||||
|
- `cmdReadSolidBOM` - Reads SolidWorks BOM files
|
||||||
|
- `cmdClearBOM` - Clears existing BOM records
|
||||||
|
- `cmdShow` - Displays loaded BOM data
|
||||||
|
- `cmdHide` - Closes the form
|
||||||
|
- `cmdClose` - Closes the form
|
||||||
|
|
||||||
### Main Functions
|
### Data Display
|
||||||
|
- `DataGrid1` - Displays BOM records with columns:
|
||||||
|
- WASM# (Assembly Number)
|
||||||
|
- WASMR (Revision)
|
||||||
|
- WCMP# (Component Number)
|
||||||
|
- WQTY (Quantity)
|
||||||
|
- WENTD (Entry Date)
|
||||||
|
- `lstStatus` - Status and logging messages
|
||||||
|
- `lblStat` - Status label
|
||||||
|
|
||||||
#### ProcessCommand()
|
### Data Connection
|
||||||
Processes the entered command string:
|
- `Adodc1` - ADO data control connected to EGBWP1A0 table via ODBCrms DSN
|
||||||
- Parses command and arguments
|
|
||||||
- Validates command syntax
|
|
||||||
- Executes corresponding command handler
|
|
||||||
- Returns results to UI
|
|
||||||
|
|
||||||
#### ValidateCommand()
|
## Key Functions
|
||||||
Validates command syntax and parameters:
|
|
||||||
- Checks command exists
|
|
||||||
- Verifies required parameters
|
|
||||||
- Validates parameter types/formats
|
|
||||||
- Returns validation status
|
|
||||||
|
|
||||||
#### ExecuteCommand()
|
### BOM Reading
|
||||||
Executes the validated command:
|
- Standard BOM format (cmdReadBOM_Click)
|
||||||
- Calls appropriate command handler
|
- Parses fixed width format files
|
||||||
- Manages execution context
|
- Handles Part and Sub-Assembly records
|
||||||
- Handles errors/exceptions
|
|
||||||
- Returns execution results
|
- Altima BOM format (cmdReadAltimaBOM_Click)
|
||||||
|
- Parses CSV format files
|
||||||
|
- Skips header rows
|
||||||
|
|
||||||
|
- SolidWorks BOM format (cmdReadSolidBOM_Click)
|
||||||
|
- Parses tab-delimited files
|
||||||
|
- Handles ItemNo, PartNo, Qty fields
|
||||||
|
|
||||||
### Command Types
|
### BOM Management
|
||||||
- System commands (exit, help, etc.)
|
- Clear BOM (cmdClearBOM_Click)
|
||||||
- File operations (open, save, close)
|
- Removes existing records for an assembly
|
||||||
- Data manipulation commands
|
- Uses stored procedure for deletion
|
||||||
- Custom application commands
|
|
||||||
|
- Show BOM (cmdShow_Click)
|
||||||
|
- Filters grid to show specific assembly/revision
|
||||||
|
|
||||||
## Events
|
### Logging
|
||||||
|
- Uses loglist() function to:
|
||||||
|
- Display status messages
|
||||||
|
- Maintain history in lstStatus
|
||||||
|
- Limit list to 600 entries
|
||||||
|
|
||||||
### Form_Load
|
## Data Format
|
||||||
- Initializes command processor
|
- Assembly numbers: 7 digits + 1 revision character
|
||||||
- Sets up command handlers
|
- Quantities stored with 3 decimal places
|
||||||
- Loads command history
|
- Dates stored as YYYYMMDDHHNNSS
|
||||||
|
|
||||||
### Form_Unload
|
|
||||||
- Saves command history
|
|
||||||
- Cleans up resources
|
|
||||||
- Closes command connections
|
|
||||||
|
|
||||||
## Error Handling
|
## Error Handling
|
||||||
- Invalid command errors
|
- File existence checking
|
||||||
- Parameter validation errors
|
- Error trapping for database operations
|
||||||
- Execution errors
|
- Status codes for operation results:
|
||||||
- System errors
|
- 0: Success
|
||||||
|
- 1: Bad BOM format
|
||||||
## Dependencies
|
- 2: File not found
|
||||||
- Command handler classes
|
|
||||||
- Parameter validation library
|
|
||||||
- Results formatting utilities
|
|
||||||
- Command history manager
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
1. Enter command in command textbox
|
|
||||||
2. Press Enter or click Execute
|
|
||||||
3. View results in results listbox
|
|
||||||
4. Check status bar for execution status
|
|
||||||
|
|
||||||
## Notes
|
|
||||||
- Commands are case-insensitive
|
|
||||||
- Parameters must be space-delimited
|
|
||||||
- Use /help for command documentation
|
|
||||||
- Command history accessible via up/down arrows
|
|
||||||
|
|
||||||
|
|
||||||
## Version Differences
|
|
||||||
|
|
||||||
### Cmdproc-1.frm
|
|
||||||
- Basic command processing only
|
|
||||||
- Limited to system commands
|
|
||||||
- No command history
|
|
||||||
- Simple error handling
|
|
||||||
- No parameter validation
|
|
||||||
|
|
||||||
### Cmdproc-2.frm
|
|
||||||
- Added file operations
|
|
||||||
- Basic command history
|
|
||||||
- Improved error messages
|
|
||||||
- Simple parameter validation
|
|
||||||
- Status bar feedback
|
|
||||||
|
|
||||||
### Cmdproc-3.frm
|
|
||||||
- Added data manipulation commands
|
|
||||||
- Enhanced command history
|
|
||||||
- Parameter type checking
|
|
||||||
- Results formatting
|
|
||||||
- Command help system
|
|
||||||
|
|
||||||
### Cmdproc-4.frm
|
|
||||||
- Custom command support
|
|
||||||
- Full command history
|
|
||||||
- Advanced parameter validation
|
|
||||||
- Rich results display
|
|
||||||
- Context-sensitive help
|
|
||||||
|
|
||||||
### Cmdproc-5.frm (Current)
|
|
||||||
- Complete command framework
|
|
||||||
- Persistent command history
|
|
||||||
- Comprehensive validation
|
|
||||||
- Formatted results output
|
|
||||||
- Full documentation
|
|
||||||
- Event-driven architecture
|
|
||||||
- Modular command handlers
|
|
||||||
- Enhanced error recovery
|
|
146
Cmdproc-6.frm.md
146
Cmdproc-6.frm.md
|
@ -1,126 +1,40 @@
|
||||||
|
|
||||||
# Command Processor Form (Cmdproc-6.frm)
|
# Folder Copy Utility
|
||||||
|
|
||||||
## Overview
|
This Visual Basic application provides functionality to copy folders and track files in a database.
|
||||||
The Command Processor form provides a user interface for executing and managing commands in the application. It handles command parsing, validation, execution and result display.
|
|
||||||
|
|
||||||
## Key Components
|
## Form Components
|
||||||
|
|
||||||
### Command Input
|
- Source and destination path text boxes
|
||||||
- Text input field for entering commands
|
- Copy Folder command button
|
||||||
- Command history tracking
|
- File listing controls (ListBox, FileListBox)
|
||||||
- Auto-complete suggestions
|
- DataGrid connected to EGSHP1A0 table via ODBC
|
||||||
- Syntax highlighting
|
- Read File Names command button
|
||||||
|
|
||||||
### Command Processing
|
## Key Functions
|
||||||
- Parses raw command text into structured format
|
|
||||||
- Validates command syntax and parameters
|
|
||||||
- Routes commands to appropriate handlers
|
|
||||||
- Manages command execution state
|
|
||||||
|
|
||||||
### Results Display
|
### Folder Operations
|
||||||
- Shows command output in scrollable window
|
- `Command1_Click()` - Initiates folder copy operation
|
||||||
- Formats results based on command type
|
- `Copydir()` - Copies folder contents using FileSystemObject
|
||||||
- Error handling and status messages
|
- `DeleteDir()` - Deletes source folder after copy
|
||||||
- Copy/export capabilities
|
- `KillDir()` - Wrapper for folder deletion
|
||||||
|
|
||||||
## Usage
|
### File Tracking
|
||||||
|
- `cmdReadFileNames_Click()` - Reads files in destination folder and updates database
|
||||||
|
- Records stored in EGSHP1A0 table with fields:
|
||||||
|
- HFLD# (Folder name)
|
||||||
|
- HPRD# (Product number)
|
||||||
|
- HHEX (File name)
|
||||||
|
- HENTD (Entry date)
|
||||||
|
|
||||||
### Basic Command Format
|
### Win32 API Functions
|
||||||
|
Uses Windows API calls for file operations:
|
||||||
[Command] [Parameters] [Options]
|
- CreateDirectory
|
||||||
|
- CopyFile
|
||||||
|
- FindFirstFile/FindNextFile
|
||||||
### Common Commands
|
- FindClose
|
||||||
- HELP - Display command help
|
|
||||||
- CLEAR - Clear output window
|
|
||||||
- EXIT - Close command processor
|
|
||||||
- HISTORY - Show command history
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
- Required parameters shown in <angle brackets>
|
|
||||||
- Optional parameters shown in [square brackets]
|
|
||||||
- Multiple parameters separated by spaces
|
|
||||||
|
|
||||||
### Options
|
|
||||||
- Start with forward slash (/)
|
|
||||||
- Format: /OptionName[:Value]
|
|
||||||
- Multiple options allowed per command
|
|
||||||
|
|
||||||
## Error Handling
|
|
||||||
- Invalid commands return error message
|
|
||||||
- Parameter validation with specific error details
|
|
||||||
- Option validation and defaults
|
|
||||||
- Exception handling with user-friendly messages
|
|
||||||
|
|
||||||
## Events
|
|
||||||
- OnCommand - Fires when command entered
|
|
||||||
- OnComplete - Fires when command finishes
|
|
||||||
- OnError - Fires on command error
|
|
||||||
- OnStateChange - Fires when processor state changes
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
- CommandHistory - Collection of previous commands
|
|
||||||
- IsProcessing - Current execution state
|
|
||||||
- LastResult - Most recent command result
|
|
||||||
- ErrorLevel - Last command error status
|
|
||||||
|
|
||||||
## Methods
|
|
||||||
- ExecuteCommand(string command)
|
|
||||||
- ParseCommand(string rawCommand)
|
|
||||||
- ValidateCommand(Command cmd)
|
|
||||||
- ShowResults(CommandResult results)
|
|
||||||
- ClearDisplay()
|
|
||||||
|
|
||||||
## Dependencies
|
## Dependencies
|
||||||
- Command parser library
|
- MSAdodc control for database connectivity
|
||||||
- Results formatter
|
- MSDataGrid control for data display
|
||||||
- History manager
|
- FileSystemObject for folder operations
|
||||||
- Auto-complete provider
|
|
||||||
|
|
||||||
## Configuration
|
|
||||||
- MaxHistoryItems - Maximum history entries
|
|
||||||
- AutoCompleteEnabled - Enable/disable suggestions
|
|
||||||
- DefaultTimeout - Command timeout in seconds
|
|
||||||
- OutputFormat - Default output formatting
|
|
||||||
|
|
||||||
## Version Differences
|
|
||||||
|
|
||||||
### Cmdproc-1
|
|
||||||
- Basic command processing functionality
|
|
||||||
- Simple parameter parsing
|
|
||||||
- Limited error handling
|
|
||||||
- No event system
|
|
||||||
|
|
||||||
### Cmdproc-2
|
|
||||||
- Added command history
|
|
||||||
- Basic parameter validation
|
|
||||||
- Improved error messages
|
|
||||||
- Simple event handling
|
|
||||||
|
|
||||||
### Cmdproc-3
|
|
||||||
- Introduced option support
|
|
||||||
- Enhanced parameter validation
|
|
||||||
- Added command timeout
|
|
||||||
- Basic auto-complete
|
|
||||||
|
|
||||||
### Cmdproc-4
|
|
||||||
- Full event system implementation
|
|
||||||
- Advanced error handling
|
|
||||||
- Extended configuration options
|
|
||||||
- History management
|
|
||||||
|
|
||||||
### Cmdproc-5
|
|
||||||
- Dependency injection support
|
|
||||||
- Modular command processing
|
|
||||||
- Enhanced auto-complete
|
|
||||||
- Result formatting options
|
|
||||||
|
|
||||||
### Cmdproc-6 (Current)
|
|
||||||
- Complete event system
|
|
||||||
- Comprehensive error handling
|
|
||||||
- Full configuration support
|
|
||||||
- Advanced command processing
|
|
||||||
- Integrated dependency management
|
|
||||||
- Enhanced history features
|
|
||||||
- Robust parameter/option handling
|
|
||||||
|
|
Loading…
Reference in New Issue