Main Panel
The Main Panel is the primary window of the HiNC application, providing navigation and access to all major features.
Key Models
- Project Service
- WPF Single-User Desktop Application: Uses self-hosted LocalProjectService
- Web Service Application: Service inherits from IProjectService
- User Service: UserService
Layout Structure
- Top
Navigation MenuProject Menu DropdownProject Path Text FieldNew MenuItemLoad MenuItemSave MenuItemSave As MenuItem
Environment Menu Dropdown- Machine Tool MenuItem Open Machine Tool Page Sole window in WPF app. The page manages MachiningEquipment.MachiningChain.
- Controller MenuItem Open Controller Page
- Tool House MenuItem
- Fixture MenuItem Open Fixture Page
- Workpiece MenuItem Open Workpiece Page
- Mission MenuItem Open Mission Page
- Player MenuItem Link to Player Panel (Not exist on WPF app.)
- Player Belonged Tool Bars. See Player Panel. Shows only if the Main Panel content is Player Panel.
- Preference Menu Dropdown
- Help MenuItem
- HiAPI Version label A label to show the HiNc library version.
- Log MenuItem Open Log Viewer to display application logs for the current day. The Log Viewer provides real-time access to system logs with filtering and download capabilities. It reads log files from the server's log directory and presents them in a formatted, searchable interface. Users can refresh the log content or download the current day's log file for offline analysis.
- Central
Page Panel - Message Section on Main Panel
Project Menu Behavior
The Project Path Text Field displays the current project path when a project is loaded. It is implemented as a pure text field (not a button) that allows users to select and copy the path.
The Project Menu manages MachiningProject with the following operations:
| Operation | Description | Example |
|---|---|---|
| New | Creates a new project | See DemoBuildGeomOnlyMachiningProject |
| Load | Opens an existing project | See DemoUseMachiningProject |
| Save | Saves the current project | See DemoBuildGeomOnlyMachiningProject |
| Save As | Saves the project to a new location | See DemoBuildGeomOnlyMachiningProject |
All operation results (success or exception) are displayed via MessageHost. When a project is loaded, the Player Panel's RenderingCanvas is set to isometric view using SetViewToIsometricView().
Note
The implementation uses static functions of MessageHost for message handling. Async operations ensure smooth user experience during file I/O.
Platform-Specific Differences
WPF Application
- Only a single instance of each sub-window (Mission, Workpiece, Fixture) can exist at a time
- The Player MenuItem does not exist in the WPF version, as the Main Panel itself serves as the Player Panel
Web Application
- The Player Panel is the default panel displayed on the main page
- The page URL and panel state are synchronized (bi-directional navigation)
Source Code Locations
See HiNC GUI Architecture for git repository links.
WPF Application
MainWindow
Web Application
Environments/PreferenceController.csEnvironments/ProjectController.cswwwroot/app.jswwwroot/index.htmlwwwroot/preference/log-viewer.js