tune
This commit is contained in:
+2
-9
@@ -90,8 +90,7 @@
|
||||
<p>This guide provides detailed implementation information for creating your own <code>RenderingCanvas</code> using the <a class="xref" href="../../../../../api/Hi.Disp.DispEngine.html">DispEngine</a>. By understanding these implementation details, you can customize the rendering component for specific application needs or create implementations for other UI frameworks.</p>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p><strong>For Windows Applications</strong>: If you are developing for Windows systems, it is recommended to directly use the existing <code>RenderingCanvas</code> implementations in the <code>Hi.WinForm</code> or <code>Hi.Wpf</code> packages, rather than creating your own. These implementations are fully tested, optimized, and maintained.
|
||||
<strong>For Webapi Applications</strong>: Using <code>Hi.Webapi</code>.</p>
|
||||
<p><strong>For Windows Applications</strong>: If you are developing for Windows systems, it is recommended to directly use the existing <code>RenderingCanvas</code> implementations in the <code>Hi.WinForm</code> or <code>Hi.Wpf</code> packages, rather than creating your own. These implementations are fully tested, optimized, and maintained.</p>
|
||||
<p>The implementation details provided in this document are primarily for educational purposes or for developers who need to port RenderingCanvas to other platforms/frameworks.</p>
|
||||
</div>
|
||||
<h2 id="basic-dispengine-usage">Basic DispEngine Usage</h2>
|
||||
@@ -458,8 +457,7 @@ public RenderingCanvas()
|
||||
Content = DisplayerPane;
|
||||
}
|
||||
</code></pre><h3 id="rendering-pipeline-1">Rendering Pipeline</h3>
|
||||
<pre><code class="lang-csharp" name="RenderingCanvas">private byte[] PreImageBgra { get; set; }
|
||||
/// <summary>
|
||||
<pre><code class="lang-csharp" name="RenderingCanvas">/// <summary>
|
||||
/// Handles the buffer swapped event from DispEngine
|
||||
/// </summary>
|
||||
private unsafe void RenderingCanvas_BufferSwapped(byte* data, int w, int h)
|
||||
@@ -467,12 +465,7 @@ private unsafe void RenderingCanvas_BufferSwapped(byte* data, int w, int h)
|
||||
if (data == null)
|
||||
return;
|
||||
|
||||
//since the treatment is different from Razor version,
|
||||
//the image checking mechanism cannot be set in DispEngine.
|
||||
Span<byte> bgra = new Span<byte>(data, w * h * 4);
|
||||
if (PreImageBgra != null && bgra.SequenceEqual(PreImageBgra))
|
||||
return;
|
||||
PreImageBgra = bgra.ToArray();
|
||||
|
||||
// Copy pixel data from DispEngine
|
||||
int n = w * h * 4;
|
||||
|
||||
@@ -93,7 +93,6 @@
|
||||
<ul>
|
||||
<li><code>Hi.WinForm</code> for Windows Forms applications</li>
|
||||
<li><code>Hi.Wpf</code> for WPF applications</li>
|
||||
<li><code>Hi.Webapi</code> for Webapi applications</li>
|
||||
</ul>
|
||||
<p>All implementations share a common architecture centered around the <a class="xref" href="../../../../../api/Hi.Disp.DispEngine.html">DispEngine</a> class, enabling consistent rendering and interaction across platforms.</p>
|
||||
<h2 id="core-concept-dispengine-and-idisplayee">Core Concept: DispEngine and IDisplayee</h2>
|
||||
@@ -174,8 +173,6 @@ canvas.DispEngine.Displayee = displayee;
|
||||
// Add to a container
|
||||
myGrid.Children.Add(canvas);
|
||||
</code></pre>
|
||||
<h2 id="apply-hiwebapi">Apply Hi.Webapi</h2>
|
||||
<p>See <a href="webapi-rendering-canvas.html">Using Rendering Canvas By Hi.Webapi</a>.</p>
|
||||
<h2 id="switching-displayees-at-runtime">Switching Displayees at Runtime</h2>
|
||||
<p>You can dynamically change what's being displayed:</p>
|
||||
<pre><code class="lang-csharp">// Switch to a different displayee
|
||||
|
||||
@@ -228,6 +228,7 @@ See Rendering Items SubMenu from <a href="../player/player-extended-renderingcan
|
||||
<li>X, Y, Z coordinate values</li>
|
||||
<li>Action buttons to set the entry to program zero or machine zero</li>
|
||||
</ul>
|
||||
<p>Row selection updates <a class="xref" href="../../../../api/Hi.Numerical.IsoCoordinateEntryDisplayee.html#Hi_Numerical_IsoCoordinateEntryDisplayee_IsoCoordinateId">IsoCoordinateId</a> through <xref:HiNC_2025_webapi.Common.ProjectDisplayeeService.MachiningProjectDisplayee>.</p>
|
||||
<h3 id="datum-preset-and-shift-tables-heidenhain">Datum Preset and Shift Tables (Heidenhain)</h3>
|
||||
<p>These tables are specific to <a class="xref" href="../../../../api/Hi.Numerical.CncBrand.html#Hi_Numerical_CncBrand_Heidenhain">Heidenhain</a> controllers and provide interfaces for:</p>
|
||||
<ul>
|
||||
@@ -278,9 +279,23 @@ See Rendering Items SubMenu from <a href="../player/player-extended-renderingcan
|
||||
</ul>
|
||||
<h3 id="web-page-application-source-code-path">Web Page Application Source Code Path</h3>
|
||||
<ul>
|
||||
<li>wwwroot/controller/controller-panel.js</li>
|
||||
<li>wwwroot/controller/controller-extended-toolbar.js</li>
|
||||
<li>Controller/Controller/ControllerController.cs</li>
|
||||
<li>Controller/ControllerController.cs - Backend API controller</li>
|
||||
<li>wwwroot/controller/controller-panel.html - Main HTML structure</li>
|
||||
<li>wwwroot/controller/controller-panel.js - Main Vue.js component</li>
|
||||
<li>wwwroot/controller/controller-panel.css - Main styling</li>
|
||||
<li>wwwroot/controller/controller-extended-toolbar.js - Extended toolbar Vue.js component</li>
|
||||
<li>wwwroot/controller/controller-extended-toolbar.css - Toolbar styling</li>
|
||||
<li>wwwroot/controller/tabs/*.js - Individual tab components:
|
||||
<ul>
|
||||
<li>coordinate-table-tab.js</li>
|
||||
<li>datum-preset-tab.js</li>
|
||||
<li>datum-shift-tab.js</li>
|
||||
<li>offset-table-tab.js</li>
|
||||
<li>machine-tab.js</li>
|
||||
<li>brand-tab.js</li>
|
||||
<li>config-tab.js</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</article>
|
||||
|
||||
+273
@@ -0,0 +1,273 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Controller Page Web Implementation | HiAPI-C# 2025 </title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="title" content="Controller Page Web Implementation | HiAPI-C# 2025 ">
|
||||
|
||||
|
||||
<link rel="icon" href="../../../../img/HiAPI.favicon.ico">
|
||||
<link rel="stylesheet" href="../../../../public/docfx.min.css">
|
||||
<link rel="stylesheet" href="../../../../public/main.css">
|
||||
<meta name="docfx:navrel" content="../../../../toc.html">
|
||||
<meta name="docfx:tocrel" content="../../toc.html">
|
||||
|
||||
<meta name="docfx:rel" content="../../../../">
|
||||
|
||||
|
||||
|
||||
<meta name="loc:inThisArticle" content="In this article">
|
||||
<meta name="loc:searchResultsCount" content="{count} results for "{query}"">
|
||||
<meta name="loc:searchNoResults" content="No results for "{query}"">
|
||||
<meta name="loc:tocFilter" content="Filter by title">
|
||||
<meta name="loc:nextArticle" content="Next">
|
||||
<meta name="loc:prevArticle" content="Previous">
|
||||
<meta name="loc:themeLight" content="Light">
|
||||
<meta name="loc:themeDark" content="Dark">
|
||||
<meta name="loc:themeAuto" content="Auto">
|
||||
<meta name="loc:changeTheme" content="Change theme">
|
||||
<meta name="loc:copy" content="Copy">
|
||||
<meta name="loc:downloadPdf" content="Download PDF">
|
||||
|
||||
<script type="module" src="./../../../../public/docfx.min.js"></script>
|
||||
|
||||
<script>
|
||||
const theme = localStorage.getItem('theme') || 'auto'
|
||||
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="">
|
||||
<header class="bg-body border-bottom">
|
||||
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
|
||||
<div class="container-xxl flex-nowrap">
|
||||
<a class="navbar-brand" href="../../../../index.html">
|
||||
<img id="logo" class="svg" src="../../../../img/HiAPI.logo.png" alt="">
|
||||
|
||||
</a>
|
||||
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<i class="bi bi-three-dots"></i>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navpanel">
|
||||
<div id="navbar">
|
||||
<form class="search" role="search" id="search">
|
||||
<i class="bi bi-search"></i>
|
||||
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<main class="container-xxl">
|
||||
<div class="toc-offcanvas">
|
||||
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
|
||||
<div class="offcanvas-header">
|
||||
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="offcanvas-body">
|
||||
<nav class="toc" id="toc"></nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="content">
|
||||
<div class="actionbar">
|
||||
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
|
||||
<i class="bi bi-list"></i>
|
||||
</button>
|
||||
|
||||
<nav id="breadcrumb"></nav>
|
||||
</div>
|
||||
|
||||
<article data-uid="">
|
||||
<h1 id="controller-page-web-implementation">Controller Page Web Implementation</h1>
|
||||
|
||||
<p>This document describes the web implementation of the Controller Page in the HiNC-2025-webapi project.</p>
|
||||
<h2 id="overview">Overview</h2>
|
||||
<p>The Controller Page web implementation consists of:</p>
|
||||
<ul>
|
||||
<li>Backend API controller (<code>ControllerController.cs</code>)</li>
|
||||
<li>Frontend HTML, JavaScript, and CSS files</li>
|
||||
<li>Integration with the rendering canvas and toolbar components</li>
|
||||
</ul>
|
||||
<h2 id="backend-implementation">Backend Implementation</h2>
|
||||
<h3 id="controllercontrollercs">ControllerController.cs</h3>
|
||||
<p>Located at <code>Controller/ControllerController.cs</code>, this API controller provides endpoints for managing CNC controller settings:</p>
|
||||
<h4 id="endpoints">Endpoints</h4>
|
||||
<ul>
|
||||
<li><code>GET /api/controller/cnc-brand</code> - Gets the current CNC brand</li>
|
||||
<li><code>PUT /api/controller/cnc-brand</code> - Updates the CNC brand</li>
|
||||
<li><code>GET /api/controller/machine-config</code> - Gets machine configuration</li>
|
||||
<li><code>PUT /api/controller/machine-config</code> - Updates machine configuration</li>
|
||||
<li><code>GET /api/controller/general-config</code> - Gets general configuration settings</li>
|
||||
<li><code>PUT /api/controller/general-config</code> - Updates general configuration</li>
|
||||
<li><code>GET /api/controller/iso-coordinate-table</code> - Gets the ISO coordinate table</li>
|
||||
<li><code>PUT /api/controller/iso-coordinate-table/{index}</code> - Updates an ISO coordinate entry</li>
|
||||
<li><code>GET /api/controller/heidenhain-datum-preset-table</code> - Gets the Heidenhain datum preset table</li>
|
||||
<li><code>PUT /api/controller/heidenhain-datum-preset-table/{index}</code> - Updates a Heidenhain datum preset entry</li>
|
||||
<li><code>GET /api/controller/heidenhain-datum-shift-table</code> - Gets the Heidenhain datum shift table</li>
|
||||
<li><code>PUT /api/controller/heidenhain-datum-shift-table/{index}</code> - Updates a Heidenhain datum shift entry</li>
|
||||
<li><code>GET /api/controller/milling-tool-offset-table</code> - Gets the milling tool offset table</li>
|
||||
<li><code>PUT /api/controller/milling-tool-offset-table</code> - Updates the milling tool offset table</li>
|
||||
<li><code>GET /api/controller/ideal-offset-dependent</code> - Gets the ideal offset dependent setting</li>
|
||||
<li><code>PUT /api/controller/ideal-offset-dependent</code> - Updates the ideal offset dependent setting</li>
|
||||
<li><code>POST /api/controller/set-ideal-offset-from-toolhouse</code> - Sets ideal offset based on tool house</li>
|
||||
<li><code>POST /api/controller/initialize-display</code> - Initializes the display engine for rendering</li>
|
||||
</ul>
|
||||
<h2 id="frontend-implementation">Frontend Implementation</h2>
|
||||
<h3 id="html-structure">HTML Structure</h3>
|
||||
<p>The main HTML file (<code>wwwroot/controller/controller-panel.html</code>) contains:</p>
|
||||
<ul>
|
||||
<li>Management panel with tabs for different configuration sections</li>
|
||||
<li>Viewer panel with rendering canvas for 3D visualization</li>
|
||||
<li>Responsive layout with resizable panels</li>
|
||||
</ul>
|
||||
<h3 id="javascript-components">JavaScript Components</h3>
|
||||
<p>The frontend uses Vue.js framework with ES modules for component-based architecture.</p>
|
||||
<h4 id="controller-paneljs">controller-panel.js</h4>
|
||||
<p>Main Vue.js component that orchestrates the controller page:</p>
|
||||
<ul>
|
||||
<li>Imports and registers all sub-components (tabs, toolbars, rendering canvas)</li>
|
||||
<li>Manages global state (CNC brand, rendering connection)</li>
|
||||
<li>Handles tab switching and dynamic component loading</li>
|
||||
<li>Initializes display engine and rendering connections</li>
|
||||
</ul>
|
||||
<p>Key features:</p>
|
||||
<ul>
|
||||
<li>Component-based architecture using Vue.js</li>
|
||||
<li>Dynamic tab components loaded from separate files</li>
|
||||
<li>Brand-specific UI updates (showing/hiding Heidenhain tabs)</li>
|
||||
<li>Integration with rendering canvas and toolbars</li>
|
||||
</ul>
|
||||
<h4 id="tab-components">Tab Components</h4>
|
||||
<p>Each configuration tab is implemented as a separate Vue.js component:</p>
|
||||
<ul>
|
||||
<li><code>coordinate-table-tab.js</code> - ISO coordinate table management</li>
|
||||
<li><code>datum-preset-tab.js</code> - Heidenhain datum preset table (brand-specific)</li>
|
||||
<li><code>datum-shift-tab.js</code> - Heidenhain datum shift table (brand-specific)</li>
|
||||
<li><code>offset-table-tab.js</code> - Tool offset table with ideal offset settings</li>
|
||||
<li><code>machine-tab.js</code> - Machine configuration with axis limits (degrees for rotary axes)</li>
|
||||
<li><code>brand-tab.js</code> - CNC brand selection</li>
|
||||
<li><code>config-tab.js</code> - General configuration settings</li>
|
||||
</ul>
|
||||
<h4 id="controller-extended-toolbarjs">controller-extended-toolbar.js</h4>
|
||||
<p>Vue.js component for the extended toolbar that provides:</p>
|
||||
<ul>
|
||||
<li>Rendering flags dropdown menu (similar to WPF's RenderingFlagSubmenu)</li>
|
||||
<li>Controller-specific rendering options (Machine, Coordinates, ISO, Datum, etc.)</li>
|
||||
<li>Brand-aware rendering flags (Heidenhain-specific options)</li>
|
||||
<li>Integration with display engine for real-time updates</li>
|
||||
</ul>
|
||||
<h3 id="css-styling">CSS Styling</h3>
|
||||
<p>Two CSS files provide styling:</p>
|
||||
<ul>
|
||||
<li><code>controller-panel.css</code> - Main panel layout and component styles
|
||||
<ul>
|
||||
<li>Two-column responsive layout using flexbox</li>
|
||||
<li>Tab navigation and content styling</li>
|
||||
<li>Form controls with special handling for checkboxes</li>
|
||||
<li>Overrides global styles for proper checkbox display</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><code>controller-extended-toolbar.css</code> - Toolbar-specific styles
|
||||
<ul>
|
||||
<li>Dropdown menu styling</li>
|
||||
<li>Button and icon styling</li>
|
||||
<li>Consistent with player toolbar design</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<h2 id="integration-points">Integration Points</h2>
|
||||
<h3 id="with-main-application">With Main Application</h3>
|
||||
<p>The controller page is integrated into the main application through:</p>
|
||||
<ul>
|
||||
<li>Navigation menu in <code>index.html</code></li>
|
||||
<li>Route handling in <code>main.js</code></li>
|
||||
<li>Iframe embedding for isolated functionality</li>
|
||||
</ul>
|
||||
<h3 id="with-project-service">With Project Service</h3>
|
||||
<p>The controller utilizes the <code>IProjectService</code> to:</p>
|
||||
<ul>
|
||||
<li>Access the current <a class="xref" href="../../../../api/Hi.MachiningProcs.MachiningProject.html">MachiningProject</a></li>
|
||||
<li>Retrieve and update <a class="xref" href="../../../../api/Hi.Numerical.NcEnv.html">NcEnv</a> settings</li>
|
||||
<li>Save changes to the project</li>
|
||||
</ul>
|
||||
<h3 id="with-rendering-engine">With Rendering Engine</h3>
|
||||
<p>The controller page integrates with:</p>
|
||||
<ul>
|
||||
<li><a class="xref" href="../../../../api/Hi.Disp.DispEngine.html">DispEngine</a> for 3D visualization</li>
|
||||
<li><a class="xref" href="../../../../api/Hi.MachiningProcs.MachiningProjectDisplayee.html">MachiningProjectDisplayee</a> for rendering project data</li>
|
||||
<li>Custom rendering flags for controller-specific visualizations</li>
|
||||
</ul>
|
||||
<h2 id="key-differences-from-wpf-implementation">Key Differences from WPF Implementation</h2>
|
||||
<ol>
|
||||
<li><strong>Asynchronous Operations</strong>: All data operations are asynchronous using fetch API</li>
|
||||
<li><strong>Component Architecture</strong>: Vue.js components instead of WPF UserControls</li>
|
||||
<li><strong>Web-based Rendering</strong>: Uses WebGL-based rendering canvas instead of WPF controls</li>
|
||||
<li><strong>Responsive Design</strong>: Two-column layout with CSS flexbox for better screen utilization</li>
|
||||
<li><strong>Unit Conversion</strong>: Frontend handles degree/radian conversion for rotary axes</li>
|
||||
<li><strong>Granular API</strong>: Split NcEnv into multiple focused endpoints instead of single large DTO</li>
|
||||
<li><strong>Toolbar Integration</strong>: Reuses rendering flag patterns from player section</li>
|
||||
</ol>
|
||||
<h2 id="implementation-details">Implementation Details</h2>
|
||||
<h3 id="data-transfer-objects-dtos">Data Transfer Objects (DTOs)</h3>
|
||||
<p>The backend uses several DTOs to simplify complex object serialization:</p>
|
||||
<ul>
|
||||
<li><code>IsoCoordinateTableEntry</code> - For ISO coordinate table entries</li>
|
||||
<li><code>DatumTableEntry</code> - For Heidenhain datum tables</li>
|
||||
<li><code>MachineConfigDto</code> - For machine configuration settings</li>
|
||||
<li><code>GeneralConfigDto</code> - For general configuration settings</li>
|
||||
</ul>
|
||||
<h3 id="unit-handling">Unit Handling</h3>
|
||||
<ul>
|
||||
<li>Backend stores rotary axis values in radians (following HiAPI conventions)</li>
|
||||
<li>Frontend displays and accepts input in degrees for user-friendliness</li>
|
||||
<li>Conversion happens in the Vue.js components (<code>radToDeg</code> and <code>degToRad</code> functions)</li>
|
||||
</ul>
|
||||
<h3 id="rendering-flag-management">Rendering Flag Management</h3>
|
||||
<p>The controller uses specific rendering flags for visualization:</p>
|
||||
<ul>
|
||||
<li>Flag indices follow the <code>RenderingFlag</code> enum structure</li>
|
||||
<li>Controller-specific flags include: Coordinate, HeidenhainDatumPreset, HeidenhainDatumShift, Stock, AxisLimits</li>
|
||||
<li>Flags are synchronized between frontend state and display engine</li>
|
||||
</ul>
|
||||
<h2 id="future-enhancements">Future Enhancements</h2>
|
||||
<ul>
|
||||
<li>Implement ObjectManagementMenuButton component for file management</li>
|
||||
<li>Add undo/redo functionality</li>
|
||||
<li>Implement keyboard shortcuts</li>
|
||||
<li>Add client-side validation for numeric inputs</li>
|
||||
<li>Implement batch updates for better performance</li>
|
||||
<li>Add tooltips for configuration options</li>
|
||||
</ul>
|
||||
|
||||
</article>
|
||||
|
||||
<div class="contribution d-print-none">
|
||||
</div>
|
||||
|
||||
<div class="next-article d-print-none border-top" id="nextArticle"></div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="affix">
|
||||
<nav id="affix"></nav>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<div class="container-xxl search-results" id="search-results"></div>
|
||||
|
||||
<footer class="border-top text-secondary">
|
||||
<div class="container-xxl">
|
||||
<div class="flex-fill">
|
||||
<span> Copyright © 2025 <a href='https://superhightech.com.tw'>Tech Coordinate</a>. All rights reserved. <a href='https://superhightech.com.tw'>超級高科技股份有限公司</a> © 2025 版權所有 </span>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -129,6 +129,8 @@ catch (Exception ex)
|
||||
<p>Dispose the <a class="xref" href="../../../api/Hi.Common.LooseRunner.html">LooseRunner</a> on owner disposing to ensure the tryrun action is well-managed.</p>
|
||||
<h2 id="gui-file-path-assignment">GUI File Path Assignment</h2>
|
||||
<p>See <a href="widget/gui-file-path-assignment.html">GUI File Path Assignment</a>.</p>
|
||||
<h2 id="numeric-inputoutput-handling">Numeric Input/Output Handling</h2>
|
||||
<p>For handling floating-point values in web forms, use the utilities in <code>numeric-utils.js</code> which properly manages special values like Infinity, -Infinity, and NaN. This ensures consistent display formatting and parsing across the application, preventing JSON serialization issues. See <a href="widget/numeric-io-utilities.html">Numeric Input/Output Utilities</a> for implementation details.</p>
|
||||
<h2 id="translation-remarks">Translation Remarks</h2>
|
||||
<p>See <a href="translation-remarks.html">Translation Remarks</a>.</p>
|
||||
|
||||
|
||||
@@ -92,6 +92,7 @@
|
||||
<p>The source code of HiNC-2025-win-desktop project is at the git repository:</p>
|
||||
<p><a href="https://superhightech-gitea.webredirect.org/HiNC-Deploy/HiNC-2025-win-desktop.git">https://superhightech-gitea.webredirect.org/HiNC-Deploy/HiNC-2025-win-desktop.git</a></p>
|
||||
<h2 id="web-page-application-source-code">Web Page Application Source Code</h2>
|
||||
<p>HiNC-2025-webapi apply vue.</p>
|
||||
<p>The source code of HiNC-2025-webapi project is at the git repository:</p>
|
||||
<p><a href="https://superhightech-gitea.webredirect.org/HiNC-Deploy/HiNC-2025-webapi.git">https://superhightech-gitea.webredirect.org/HiNC-Deploy/HiNC-2025-webapi.git</a></p>
|
||||
<h2 id="step-by-step-program-construction-check-list">Step by Step Program Construction Check List</h2>
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
<li>Key Model
|
||||
<ul>
|
||||
<li>WPF Single-User Desktop Application: Self-hosted <a class="xref" href="../../../api/Hi.MachiningProcs.LocalProjectService.html">LocalProjectService</a></li>
|
||||
<li>Web Page Application: Service inherits from <a class="xref" href="../../../api/Hi.MachiningProcs.IPathedMachiningProjectHost.html">IPathedMachiningProjectHost</a></li>
|
||||
<li>Web Page Application: Service inherits from <xref:Hi.MachiningProcs.IPathedMachiningProjectHost></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Other Model: <a class="xref" href="../../../api/Hi.HiNcKits.AppService.html">AppService</a></li>
|
||||
@@ -130,7 +130,15 @@ Open <a href="mission/index.html">Mission Page</a></li>
|
||||
Link to <a href="player/index.html">Player Panel</a>
|
||||
(Not exist on WPF app.)</li>
|
||||
<li>Player Belonged Tool Bars. See <a href="player/index.html">Player Panel</a>. Shows only if the Main Panel content is Player Panel.</li>
|
||||
<li><a href="preference/index.html">Preference Menu Dropdown</a></li>
|
||||
<li><a href="preference/index.html">Preference Menu Dropdown</a>
|
||||
<ul>
|
||||
<li>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.</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Central <code>Page Panel</code></li>
|
||||
@@ -170,9 +178,11 @@ Read document of <a class="xref" href="../../../api/Hi.Common.Messages.MessageKi
|
||||
</ul>
|
||||
<h3 id="web-page-application-source-code-path">Web Page Application Source Code Path</h3>
|
||||
<ul>
|
||||
<li>Controllers/PreferenceController.cs</li>
|
||||
<li>wwwroot/main.js</li>
|
||||
<li>Environments/PreferenceController.cs</li>
|
||||
<li>Environments/ProjectController.cs</li>
|
||||
<li>wwwroot/app.js</li>
|
||||
<li>wwwroot/index.html</li>
|
||||
<li>wwwroot/preference/log-viewer.js</li>
|
||||
</ul>
|
||||
<h3 id="web-page-application-specification-1">Web Page Application Specification</h3>
|
||||
<p>The page and URL are bi-directional.</p>
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
<p>The page triggers by <a href="../main-panel.html">Main Panel</a>.</p>
|
||||
<p>The key model is <a class="xref" href="../../../../api/Hi.NcMech.Fixtures.Fixture.html">Fixture</a> and <a class="xref" href="../../../../api/Hi.NcMech.Fixtures.FixtureEditorDisplayeeConfig.html">FixtureEditorDisplayeeConfig</a>.
|
||||
Fixture is assigned from the Main Panel's <a class="xref" href="../../../../api/Hi.MachiningProcs.MachiningProject.html">MachiningProject</a>.<a class="xref" href="../../../../api/Hi.MachiningProcs.MachiningProject.html#Hi_MachiningProcs_MachiningProject_MachiningEquipment">MachiningEquipment</a>.<a class="xref" href="../../../../api/Hi.Machining.MachiningEquipmentUtils.MachiningEquipment.html#Hi_Machining_MachiningEquipmentUtils_MachiningEquipment_Fixture">Fixture</a>.</p>
|
||||
<p><a class="xref" href="../../../../api/Hi.NcMech.Fixtures.FixtureEditorDisplayeeConfig.html">FixtureEditorDisplayeeConfig</a> is from <a class="xref" href="../../../../api/Hi.HiNcKits.UserEnv.html">UserEnv</a>.<a class="xref" href="../../../../api/Hi.HiNcKits.AppConfig.html">AppConfig</a> which assigned from the parent component.</p>
|
||||
<p><a class="xref" href="../../../../api/Hi.NcMech.Fixtures.FixtureEditorDisplayeeConfig.html">FixtureEditorDisplayeeConfig</a> is from <a class="xref" href="../../../../api/Hi.HiNcKits.AppService.html">AppService</a>.<a class="xref" href="../../../../api/Hi.HiNcKits.AppConfig.html">AppConfig</a> which assigned from the parent component.</p>
|
||||
<h2 id="layout">Layout</h2>
|
||||
<ul>
|
||||
<li>Fixture Page
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
<p>The page triggers by <a href="../main-panel.html">Main Panel</a>.</p>
|
||||
<p>The key model is <a class="xref" href="../../../../api/Hi.NcMech.Workpieces.Workpiece.html">Workpiece</a> and <a class="xref" href="../../../../api/Hi.NcMech.Workpieces.WorkpieceEditorDisplayeeConfig.html">WorkpieceEditorDisplayeeConfig</a>.
|
||||
Which is assigned from the Main Panel's <a class="xref" href="../../../../api/Hi.MachiningProcs.MachiningProject.html">MachiningProject</a>.<a class="xref" href="../../../../api/Hi.MachiningProcs.MachiningProject.html#Hi_MachiningProcs_MachiningProject_Workpiece">Workpiece</a>.</p>
|
||||
<p><a class="xref" href="../../../../api/Hi.NcMech.Fixtures.FixtureEditorDisplayeeConfig.html">FixtureEditorDisplayeeConfig</a> is from <a class="xref" href="../../../../api/Hi.HiNcKits.UserEnv.html">UserEnv</a>.<a class="xref" href="../../../../api/Hi.HiNcKits.AppConfig.html">AppConfig</a> which assigned from the parent component.</p>
|
||||
<p><a class="xref" href="../../../../api/Hi.NcMech.Fixtures.FixtureEditorDisplayeeConfig.html">FixtureEditorDisplayeeConfig</a> is from <a class="xref" href="../../../../api/Hi.HiNcKits.AppService.html">AppService</a>.<a class="xref" href="../../../../api/Hi.HiNcKits.AppConfig.html">AppConfig</a> which assigned from the parent component.</p>
|
||||
<h2 id="layout">Layout</h2>
|
||||
<ul>
|
||||
<li>Workpiece Page
|
||||
@@ -165,7 +165,7 @@ Apply <a href="../geom/runtime-geom-panel.html">Runtime Geometry Panel</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Material Tab
|
||||
Visible if <a class="xref" href="../../../../api/Hi.HiNcKits.UserEnv.html">UserEnv</a>.<a class="xref" href="../../../../api/Hi.HiNcKits.UserEnv.html#Hi_HiNcKits_UserEnv_EnablePhysics">EnablePhysics</a> is true.
|
||||
Visible if <a class="xref" href="../../../../api/Hi.HiNcKits.AppService.html">AppService</a>.<a class="xref" href="../../../../api/Hi.HiNcKits.AppService.html#Hi_HiNcKits_AppService_EnablePhysics">EnablePhysics</a> is true.
|
||||
<ul>
|
||||
<li>Workpiece Material File Selector
|
||||
<ul>
|
||||
|
||||
@@ -209,11 +209,19 @@ The boxes are draggable for re-order.
|
||||
</div>
|
||||
<h2 id="features">Features</h2>
|
||||
<p>Update the Title Label if the Command is updated by the Command Content Panel.</p>
|
||||
<h2 id="wpf-application-source-code-path">WPF Application Source Code Path</h2>
|
||||
<h2 id="source-code-path">Source Code Path</h2>
|
||||
<p>See <a href="../index.html">this page</a> for git repository.</p>
|
||||
<h3 id="wpf-application-source-code-path">WPF Application Source Code Path</h3>
|
||||
<ul>
|
||||
<li>Mission/ListCommandPanel</li>
|
||||
</ul>
|
||||
<p>see <a href="../index.html">this page</a> for git repository.</p>
|
||||
<h3 id="web-page-application-source-code-path">Web Page Application Source Code Path</h3>
|
||||
<ul>
|
||||
<li>wwwroot/mission/panels/list-command-panel.html (Component HTML)</li>
|
||||
<li>wwwroot/mission/panels/list-command-panel.css (Component styles)</li>
|
||||
<li>wwwroot/mission/panels/list-command-panel.js (JavaScript component with full ListCommand logic)</li>
|
||||
<li>Controller/MissionController.cs (REST API - ListCommand CRUD operations)</li>
|
||||
</ul>
|
||||
|
||||
</article>
|
||||
|
||||
|
||||
+43
-47
@@ -2,18 +2,18 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Using Rendering Canvas By Hi.Webapi | HiAPI-C# 2025 </title>
|
||||
<title>NcCodeCommand Panel | HiAPI-C# 2025 </title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="title" content="Using Rendering Canvas By Hi.Webapi | HiAPI-C# 2025 ">
|
||||
<meta name="title" content="NcCodeCommand Panel | HiAPI-C# 2025 ">
|
||||
|
||||
|
||||
<link rel="icon" href="../../../../../img/HiAPI.favicon.ico">
|
||||
<link rel="stylesheet" href="../../../../../public/docfx.min.css">
|
||||
<link rel="stylesheet" href="../../../../../public/main.css">
|
||||
<meta name="docfx:navrel" content="../../../../../toc.html">
|
||||
<meta name="docfx:tocrel" content="../../../toc.html">
|
||||
<link rel="icon" href="../../../../img/HiAPI.favicon.ico">
|
||||
<link rel="stylesheet" href="../../../../public/docfx.min.css">
|
||||
<link rel="stylesheet" href="../../../../public/main.css">
|
||||
<meta name="docfx:navrel" content="../../../../toc.html">
|
||||
<meta name="docfx:tocrel" content="../../toc.html">
|
||||
|
||||
<meta name="docfx:rel" content="../../../../../">
|
||||
<meta name="docfx:rel" content="../../../../">
|
||||
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<meta name="loc:copy" content="Copy">
|
||||
<meta name="loc:downloadPdf" content="Download PDF">
|
||||
|
||||
<script type="module" src="./../../../../../public/docfx.min.js"></script>
|
||||
<script type="module" src="./../../../../public/docfx.min.js"></script>
|
||||
|
||||
<script>
|
||||
const theme = localStorage.getItem('theme') || 'auto'
|
||||
@@ -43,8 +43,8 @@
|
||||
<header class="bg-body border-bottom">
|
||||
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
|
||||
<div class="container-xxl flex-nowrap">
|
||||
<a class="navbar-brand" href="../../../../../index.html">
|
||||
<img id="logo" class="svg" src="../../../../../img/HiAPI.logo.png" alt="">
|
||||
<a class="navbar-brand" href="../../../../index.html">
|
||||
<img id="logo" class="svg" src="../../../../img/HiAPI.logo.png" alt="">
|
||||
|
||||
</a>
|
||||
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
|
||||
@@ -85,56 +85,52 @@
|
||||
</div>
|
||||
|
||||
<article data-uid="">
|
||||
<h1 id="using-rendering-canvas-by-hiwebapi">Using Rendering Canvas By Hi.Webapi</h1>
|
||||
<h1 id="nccodecommand-panel">NcCodeCommand Panel</h1>
|
||||
|
||||
<p>Hi.Webapi git repo:</p>
|
||||
<p>The Rendering Canvas implementation is located on the Hi.Webapi project (See<a href="../../../index.html">HiAPI Overview</a> to get git repository):</p>
|
||||
<p>The key model is <a class="xref" href="../../../../api/Hi.ShellCommands.NcCodeCommand.html">NcCodeCommand</a>.</p>
|
||||
<h2 id="layout">Layout</h2>
|
||||
<ul>
|
||||
<li>wwwroot/disp/rendering-canvas.js
|
||||
<li>Head Line
|
||||
<ul>
|
||||
<li>Pure js implementation.</li>
|
||||
<li>NC Code Label</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>wwwroot/disp/rendering-canvas-vue.js
|
||||
<li>NC Code Editor Area
|
||||
<ul>
|
||||
<li>vue implementation.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>wwwroot/disp/rendering-canvas.css</li>
|
||||
</ul>
|
||||
<h2 id="usage-demonstration-by-hisamplewebapi-project">Usage Demonstration by Hi.Sample.Webapi Project</h2>
|
||||
<p>The usage is illustrated by the sample code in Hi.Sample.Webapi project (See<a href="../../../index.html">HiAPI Overview</a> to get git repository).</p>
|
||||
<p>The project applies Hi.Webapi nuget package (See<a href="../../../index.html">HiAPI Overview</a> to get git repository).</p>
|
||||
<p>Following pathes are based on the Hi.Sample.Webapi project.</p>
|
||||
<ul>
|
||||
<li>A sample GUI to controll the rendering view
|
||||
<ul>
|
||||
<li>wwwroot/disp/rendering-canvas-view-dropdown.js</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Set Rendering Content (<a class="xref" href="../../../../../api/Hi.Disp.IDisplayee.html">IDisplayee</a>) to the Rendering Canvas
|
||||
<ul>
|
||||
<li>Controllers/RenderingController.cs</li>
|
||||
<li>The model is <xref:Hi.ShellCommands.NcCodeCommand.NcCode>.</li>
|
||||
<li>Multi-line text editor for NC code input</li>
|
||||
<li>Monospace font for better code readability</li>
|
||||
<li>Line numbers display (optional)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<h2 id="component-usage">Component Usage</h2>
|
||||
<h2 id="features">Features</h2>
|
||||
<ul>
|
||||
<li>wwwroot/demo.html
|
||||
<ul>
|
||||
<li>apply rendering-canvas.js from Hi.Webapi package.</li>
|
||||
<li>Direct NC code input without file</li>
|
||||
<li>Syntax highlighting for NC code (optional)</li>
|
||||
<li>Real-time validation (optional)</li>
|
||||
<li>Code statistics (line count, character count)</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>wwwroot/demo-vue.html
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p>The NC Code editor should expand to fill available space in the panel.</p>
|
||||
</div>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p>Unlike NcFileCommand, this command stores the NC code directly in memory.</p>
|
||||
</div>
|
||||
<h2 id="source-code-path">Source Code Path</h2>
|
||||
<p>See <a href="../index.html">this page</a> for git repository.</p>
|
||||
<h3 id="wpf-application-source-code-path">WPF Application Source Code Path</h3>
|
||||
<ul>
|
||||
<li>apply rendering-canvas-vue.js from Hi.Webapi package.</li>
|
||||
<li>Mission/NcCodeCommandPanel</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>wwwroot/demo-plain-inline.html
|
||||
<h3 id="web-page-application-source-code-path">Web Page Application Source Code Path</h3>
|
||||
<ul>
|
||||
<li>Hard code implementation without re-using js file.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>wwwroot/mission/panels/nccode-command-panel.html (Component HTML)</li>
|
||||
<li>wwwroot/mission/panels/nccode-command-panel.css (Component styles)</li>
|
||||
<li>wwwroot/mission/panels/nccode-command-panel.js (JavaScript component)</li>
|
||||
<li>Controller/MissionController.cs (REST API - NcCode command endpoints)</li>
|
||||
</ul>
|
||||
|
||||
</article>
|
||||
+10
-2
@@ -139,11 +139,19 @@ Auto-Save the file if the content changed.
|
||||
<p>Fix the height of NC Code TextArea to the panel bottom.
|
||||
Set NC Code TextArea height resizable.</p>
|
||||
</div>
|
||||
<h2 id="wpf-application-source-code-path">WPF Application Source Code Path</h2>
|
||||
<h2 id="source-code-path">Source Code Path</h2>
|
||||
<p>See <a href="../index.html">this page</a> for git repository.</p>
|
||||
<h3 id="wpf-application-source-code-path">WPF Application Source Code Path</h3>
|
||||
<ul>
|
||||
<li>Mission/NcFileCommandPanel</li>
|
||||
</ul>
|
||||
<p>see <a href="../index.html">this page</a> for git repository.</p>
|
||||
<h3 id="web-page-application-source-code-path">Web Page Application Source Code Path</h3>
|
||||
<ul>
|
||||
<li>wwwroot/mission/panels/ncfile-command-panel.html (Component HTML)</li>
|
||||
<li>wwwroot/mission/panels/ncfile-command-panel.css (Component styles)</li>
|
||||
<li>wwwroot/mission/panels/ncfile-command-panel.js (JavaScript component)</li>
|
||||
<li>Controller/MissionController.cs (REST API - NcFile command endpoints)</li>
|
||||
</ul>
|
||||
|
||||
</article>
|
||||
|
||||
|
||||
@@ -204,11 +204,19 @@
|
||||
<h5>Tip</h5>
|
||||
<p>Use XmlConvert.ToDouble and FromDouble to parse the <code>double</code> value for dealing with the inf value.</p>
|
||||
</div>
|
||||
<h2 id="wpf-application-source-code-path">WPF Application Source Code Path</h2>
|
||||
<h2 id="source-code-path">Source Code Path</h2>
|
||||
<p>See <a href="../index.html">this page</a> for git repository.</p>
|
||||
<h3 id="wpf-application-source-code-path">WPF Application Source Code Path</h3>
|
||||
<ul>
|
||||
<li>NcOpt/NcOptOptionPanel</li>
|
||||
</ul>
|
||||
<p>see <a href="../index.html">this page</a> for git repository.</p>
|
||||
<h3 id="web-page-application-source-code-path">Web Page Application Source Code Path</h3>
|
||||
<ul>
|
||||
<li>wwwroot/mission/panels/ncoptoption-command-panel.html (Component HTML)</li>
|
||||
<li>wwwroot/mission/panels/ncoptoption-command-panel.css (Component styles)</li>
|
||||
<li>wwwroot/mission/panels/ncoptoption-command-panel.js (JavaScript component)</li>
|
||||
<li>Controller/MissionController.cs (REST API - NcOptOption command endpoints)</li>
|
||||
</ul>
|
||||
|
||||
</article>
|
||||
|
||||
|
||||
+10
-2
@@ -174,11 +174,19 @@ Visible if <a class="xref" href="../../../../api/Hi.HiNcKits.AppService.html">Ap
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<h2 id="wpf-application-source-code-path">WPF Application Source Code Path</h2>
|
||||
<h2 id="source-code-path">Source Code Path</h2>
|
||||
<p>See <a href="../index.html">this page</a> for git repository.</p>
|
||||
<h3 id="wpf-application-source-code-path">WPF Application Source Code Path</h3>
|
||||
<ul>
|
||||
<li>Mission/PostExecutionCommandPanel</li>
|
||||
</ul>
|
||||
<p>see <a href="../index.html">this page</a> for git repository.</p>
|
||||
<h3 id="web-page-application-source-code-path">Web Page Application Source Code Path</h3>
|
||||
<ul>
|
||||
<li>wwwroot/mission/panels/postexecution-command-panel.html (Component HTML)</li>
|
||||
<li>wwwroot/mission/panels/postexecution-command-panel.css (Component styles)</li>
|
||||
<li>wwwroot/mission/panels/postexecution-command-panel.js (JavaScript component)</li>
|
||||
<li>Controller/MissionController.cs (REST API - PostExecution command endpoints)</li>
|
||||
</ul>
|
||||
|
||||
</article>
|
||||
|
||||
|
||||
+10
-2
@@ -172,11 +172,19 @@ If <a class="xref" href="../../../../api/Hi.ShellCommands.PreSettingCommand.html
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<h2 id="wpf-application-source-code-path">WPF Application Source Code Path</h2>
|
||||
<h2 id="source-code-path">Source Code Path</h2>
|
||||
<p>See <a href="../index.html">this page</a> for git repository.</p>
|
||||
<h3 id="wpf-application-source-code-path">WPF Application Source Code Path</h3>
|
||||
<ul>
|
||||
<li>Mission/PreSettingCommandPanel</li>
|
||||
</ul>
|
||||
<p>see <a href="../index.html">this page</a> for git repository.</p>
|
||||
<h3 id="web-page-application-source-code-path">Web Page Application Source Code Path</h3>
|
||||
<ul>
|
||||
<li>wwwroot/mission/panels/presetting-command-panel.html (Component HTML)</li>
|
||||
<li>wwwroot/mission/panels/presetting-command-panel.css (Component styles)</li>
|
||||
<li>wwwroot/mission/panels/presetting-command-panel.js (JavaScript component)</li>
|
||||
<li>Controller/MissionController.cs (REST API - PreSetting command endpoints)</li>
|
||||
</ul>
|
||||
|
||||
</article>
|
||||
|
||||
|
||||
@@ -140,12 +140,20 @@
|
||||
</ol>
|
||||
</li>
|
||||
</ol>
|
||||
<h2 id="wpf-application-source-code-path">WPF Application Source Code Path</h2>
|
||||
<h2 id="source-code-path">Source Code Path</h2>
|
||||
<p>See <a href="../index.html">this page</a> for git repository.</p>
|
||||
<h3 id="wpf-application-source-code-path">WPF Application Source Code Path</h3>
|
||||
<ul>
|
||||
<li>Mission/MissionWindow</li>
|
||||
<li>Mission/MissionPanel</li>
|
||||
</ul>
|
||||
<p>see <a href="../index.html">this page</a> for git repository.</p>
|
||||
<h3 id="web-page-application-source-code-path">Web Page Application Source Code Path</h3>
|
||||
<ul>
|
||||
<li>wwwroot/mission/mission-panel.html (Main panel HTML)</li>
|
||||
<li>wwwroot/mission/mission-panel.css (Styles)</li>
|
||||
<li>wwwroot/mission/mission-panel.js (JavaScript component)</li>
|
||||
<li>Controller/MissionController.cs (REST API endpoints)</li>
|
||||
</ul>
|
||||
|
||||
</article>
|
||||
|
||||
|
||||
+10
-2
@@ -102,11 +102,19 @@
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<h2 id="wpf-application-source-code-path">WPF Application Source Code Path</h2>
|
||||
<h2 id="source-code-path">Source Code Path</h2>
|
||||
<p>See <a href="../index.html">this page</a> for git repository.</p>
|
||||
<h3 id="wpf-application-source-code-path">WPF Application Source Code Path</h3>
|
||||
<ul>
|
||||
<li>Mission/ScriptCommandPanel</li>
|
||||
</ul>
|
||||
<p>see <a href="../index.html">this page</a> for git repository.</p>
|
||||
<h3 id="web-page-application-source-code-path">Web Page Application Source Code Path</h3>
|
||||
<ul>
|
||||
<li>wwwroot/mission/panels/script-command-panel.html (Component HTML)</li>
|
||||
<li>wwwroot/mission/panels/script-command-panel.css (Component styles)</li>
|
||||
<li>wwwroot/mission/panels/script-command-panel.js (JavaScript component with Ace.js integration)</li>
|
||||
<li>Controller/MissionController.cs (REST API - Script command endpoints)</li>
|
||||
</ul>
|
||||
|
||||
</article>
|
||||
|
||||
|
||||
@@ -137,7 +137,14 @@
|
||||
<h3 id="webapi-application-source-code-path">Webapi Application Source Code Path</h3>
|
||||
<ul>
|
||||
<li>wwwroot/player/player-panel.js</li>
|
||||
<li>Controller/Player/PlayerController.cs</li>
|
||||
<li>wwwroot/player/player-panel.html</li>
|
||||
<li>Players/PlayerController.cs</li>
|
||||
<li>Players/PlayerStatusHub.cs</li>
|
||||
<li>Players/PlayerStatusService.cs</li>
|
||||
<li>Players/SessionMessageHub.cs</li>
|
||||
<li>Players/SessionMessageService.cs</li>
|
||||
<li>Players/SelectedStepInfoHub.cs</li>
|
||||
<li>Players/SelectedStepInfoService.cs</li>
|
||||
</ul>
|
||||
|
||||
</article>
|
||||
|
||||
+2
-2
@@ -126,8 +126,8 @@ Create the submenu component class since the other GUI component also use it. Se
|
||||
</ul>
|
||||
<h3 id="web-page-application-source-code-path">Web Page Application Source Code Path</h3>
|
||||
<ul>
|
||||
<li>wwwroot/player-extended-toolbar.js</li>
|
||||
<li>Controller/Player/PlayerController.cs</li>
|
||||
<li>wwwroot/player/player-extended-toolbar.js</li>
|
||||
<li>Players/PlayerController.cs</li>
|
||||
</ul>
|
||||
|
||||
</article>
|
||||
|
||||
@@ -113,7 +113,9 @@
|
||||
<li>Pause</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Add and remove the event to the <a class="xref" href="../../../../api/Hi.MachiningProcs.MachiningProject.html#Hi_MachiningProcs_MachiningProject_PacePlayer">PacePlayer</a> on <code>Player Tool Bar</code> initialization and finalization. The events update the <code>Status Text Field</code>.</li>
|
||||
<li>Both webapi and win-desktop applications use <a class="xref" href="../../../../api/Hi.MachiningProcs.LocalProjectService.html">LocalProjectService</a> events for monitoring <a class="xref" href="../../../../api/Hi.MachiningProcs.MachiningProject.html#Hi_MachiningProcs_MachiningProject_PacePlayer">PacePlayer</a> status changes.</li>
|
||||
<li>In webapi applications, the <code>PlayerStatusService</code> subscribes to these <a class="xref" href="../../../../api/Hi.MachiningProcs.LocalProjectService.html">LocalProjectService</a> events and broadcasts status changes via <code>PlayerStatusHub</code> using SignalR for real-time communication.</li>
|
||||
<li>Win-desktop applications can directly subscribe to <a class="xref" href="../../../../api/Hi.MachiningProcs.LocalProjectService.html">LocalProjectService</a> events for status updates.</li>
|
||||
<li>Alter the background color of the <code>Status Text Field</code> if the status changed.
|
||||
<ul>
|
||||
<li>Warning style color
|
||||
@@ -155,8 +157,12 @@
|
||||
<h3 id="web-page-application-source-code-path">Web Page Application Source Code Path</h3>
|
||||
<ul>
|
||||
<li>wwwroot/player/player-tool-bar.js</li>
|
||||
<li>Controller/Player/PlayerController.cs</li>
|
||||
<li>Players/PlayerController.cs</li>
|
||||
<li>Players/PlayerStatusHub.cs</li>
|
||||
<li>Players/PlayerStatusService.cs</li>
|
||||
</ul>
|
||||
<h4 id="signalr-implementation-webapi-only">SignalR Implementation (Webapi Only)</h4>
|
||||
<p><code>PlayerStatusHub</code> provides real-time player status updates, with methods <code>GetPlayerStatus()</code> and event <code>PlayerStatusUpdated</code>. <code>PlayerStatusService</code> monitors <a class="xref" href="../../../../api/Hi.MachiningProcs.LocalProjectService.html">LocalProjectService</a> events (<a class="xref" href="../../../../api/Hi.MachiningProcs.LocalProjectService.html#Hi_MachiningProcs_LocalProjectService_PacePlayer_IsRunningChangedEvent">PacePlayer_IsRunningChangedEvent</a>, <a class="xref" href="../../../../api/Hi.MachiningProcs.LocalProjectService.html#Hi_MachiningProcs_LocalProjectService_PacePlayer_IsLockedChangedEvent">PacePlayer_IsLockedChangedEvent</a>, <a class="xref" href="../../../../api/Hi.MachiningProcs.LocalProjectService.html#Hi_MachiningProcs_LocalProjectService_PacePlayer_IsFinishedChangedEvent">PacePlayer_IsFinishedChangedEvent</a>, <a class="xref" href="../../../../api/Hi.MachiningProcs.LocalProjectService.html#Hi_MachiningProcs_LocalProjectService_PacePlayer_ResetedEvent">PacePlayer_ResetedEvent</a>) and broadcasts changes via SignalR. The JavaScript component connects to <code>/playerStatusHub</code> and listens for status updates. API endpoints include <code>/api/player/start</code>, <code>/api/player/pause</code>, <code>/api/player/resume</code>, <code>/api/player/run-line</code>, <code>/api/player/run-step</code>, <code>/api/player/stop</code>, and <code>/api/player/reset</code>.</p>
|
||||
<h3 id="razor-page-source-code">Razor Page Source Code</h3>
|
||||
<pre><code class="lang-csharp" name="SampleCode-razor">@using Hi.Common.PathUtils;
|
||||
@using Hi.HiNcKits;
|
||||
|
||||
+8
-5
@@ -105,7 +105,9 @@
|
||||
Console.WriteLine($"{present.ShortName}: {valueText} {present.TailUnitString} ({present.Name} [{entry.Key}])");
|
||||
}
|
||||
}
|
||||
</code></pre><h2 id="source-code-path">Source Code Path</h2>
|
||||
</code></pre><h2 id="signalr-implementation-webapi-only">SignalR Implementation (Webapi Only)</h2>
|
||||
<p><code>SelectedStepInfoHub</code> provides real-time step updates with method <code>GetSelectedStepInfo()</code> and event <code>SelectedStepInfoUpdated</code>. <code>SelectedStepInfoService</code> monitors <a class="xref" href="../../../../api/Hi.MachiningProcs.LocalProjectService.html#Hi_MachiningProcs_LocalProjectService_ClStrip_PosSelected">ClStrip_PosSelected</a> and <a class="xref" href="../../../../api/Hi.MachiningProcs.LocalProjectService.html#Hi_MachiningProcs_LocalProjectService_ClStrip_MachiningStepSelected">ClStrip_MachiningStepSelected</a> events and broadcasts updates. The JavaScript component connects to <code>/selectedStepInfoHub</code> to receive step change notifications and update the UI accordingly.</p>
|
||||
<h2 id="source-code-path">Source Code Path</h2>
|
||||
<p>See <a href="../index.html">this page</a> for git repository.</p>
|
||||
<h3 id="wpf-application-source-code-path">WPF Application Source Code Path</h3>
|
||||
<ul>
|
||||
@@ -113,10 +115,11 @@
|
||||
</ul>
|
||||
<h3 id="web-page-application-source-code-path">Web Page Application Source Code Path</h3>
|
||||
<ul>
|
||||
<li>wwwroot/selected-step-info-panel.js (Vue component)</li>
|
||||
<li>wwwroot/selected-step-info-panel.css (Styles)</li>
|
||||
<li>Controllers/PlayerController.cs (REST API)</li>
|
||||
<li>Hubs/PlayerHub.cs (SignalR Hub for real-time updates)</li>
|
||||
<li>wwwroot/player/selected-step-info-panel.js (Vue component)</li>
|
||||
<li>wwwroot/player/selected-step-info-panel.css (Styles)</li>
|
||||
<li>Players/PlayerController.cs (REST API - GetSelectedStepInfo endpoint)</li>
|
||||
<li>Players/SelectedStepInfoService.cs (Business logic)</li>
|
||||
<li>Players/SelectedStepInfoHub.cs (SignalR Hub for real-time updates)</li>
|
||||
</ul>
|
||||
|
||||
</article>
|
||||
|
||||
+4
-4
@@ -88,7 +88,7 @@
|
||||
<h1 id="graphic-cache-submenu">Graphic-Cache SubMenu</h1>
|
||||
|
||||
<p>The submenu locates on the <a href="index.html">Preference Menu Dropdown</a>.</p>
|
||||
<p>The model <a class="xref" href="../../../../api/Hi.HiNcKits.UserEnv.html">UserEnv</a> is from its parent component.</p>
|
||||
<p>The model <xref:Hi.HiNcKits.UserEnv> is from its parent component.</p>
|
||||
<h2 id="layout">Layout</h2>
|
||||
<ul>
|
||||
<li>Graphic-Cache SubMenu
|
||||
@@ -101,7 +101,7 @@
|
||||
</li>
|
||||
</ul>
|
||||
<h2 id="behavior">Behavior</h2>
|
||||
<p><code>Graphic-Cache Input Text Field</code> and <code>Graphic-Cache Slider</code> bind the <a class="xref" href="../../../../api/Hi.HiNcKits.AppConfig.html">AppConfig</a>.<a class="xref" href="../../../../api/Hi.HiNcKits.AppConfig.html#Hi_HiNcKits_UserConfig_GraphicCacheMb">GraphicCacheMb</a>. The limit text fields also bind to the properties of <a class="xref" href="../../../../api/Hi.HiNcKits.AppConfig.html">AppConfig</a>.</p>
|
||||
<p><code>Graphic-Cache Input Text Field</code> and <code>Graphic-Cache Slider</code> bind the <a class="xref" href="../../../../api/Hi.HiNcKits.AppConfig.html">AppConfig</a>.<a class="xref" href="../../../../api/Hi.HiNcKits.AppConfig.html#Hi_HiNcKits_AppConfig_GraphicCacheMb">GraphicCacheMb</a>. The limit text fields also bind to the properties of <a class="xref" href="../../../../api/Hi.HiNcKits.AppConfig.html">AppConfig</a>.</p>
|
||||
<h2 id="source-code-path">Source Code Path</h2>
|
||||
<p>See <a href="../index.html">this page</a> for git repository.</p>
|
||||
<h3 id="wpf-application-source-code-path">WPF Application Source Code Path</h3>
|
||||
@@ -110,8 +110,8 @@
|
||||
</ul>
|
||||
<h3 id="web-page-application-source-code-path">Web Page Application Source Code Path</h3>
|
||||
<ul>
|
||||
<li>wwwroot/preference/preference-menu.js</li>
|
||||
<li>Controller/Preference/PreferenceController.cs</li>
|
||||
<li>wwwroot/player/player-extended-toolbar.js (includes graphic cache dropdown)</li>
|
||||
<li>Environments/PreferenceController.cs</li>
|
||||
</ul>
|
||||
|
||||
</article>
|
||||
|
||||
@@ -87,8 +87,8 @@
|
||||
<article data-uid="">
|
||||
<h1 id="preference-menu-dropdown">Preference Menu Dropdown</h1>
|
||||
|
||||
<p>The model of the UI is <a class="xref" href="../../../../api/Hi.HiNcKits.UserEnv.html">UserEnv</a>.
|
||||
<a class="xref" href="../../../../api/Hi.HiNcKits.UserEnv.html">UserEnv</a> contains <a class="xref" href="../../../../api/Hi.HiNcKits.AppConfig.html">AppConfig</a>, which is rapidly used in the GUI.</p>
|
||||
<p>The model of the UI is <a class="xref" href="../../../../api/Hi.HiNcKits.AppService.html">AppService</a>.
|
||||
<a class="xref" href="../../../../api/Hi.HiNcKits.AppService.html">AppService</a> contains <a class="xref" href="../../../../api/Hi.HiNcKits.AppConfig.html">AppConfig</a>, which is rapidly used in the GUI.</p>
|
||||
<p>The dropdown is on the <a href="../main-panel.html">Main Panel</a>.</p>
|
||||
<h2 id="layout">Layout</h2>
|
||||
<ul>
|
||||
@@ -99,8 +99,8 @@
|
||||
<li><a href="language-selection-submenu.html">Language Selection SubMenu</a></li>
|
||||
<li>Show Physics Options CheckBox
|
||||
<ul>
|
||||
<li>The model is <a class="xref" href="../../../../api/Hi.HiNcKits.AppConfig.html#Hi_HiNcKits_UserConfig_ShowPhysicsOptions">ShowPhysicsOptions</a>.</li>
|
||||
<li>The checkbox is disabled and unchecked if <a class="xref" href="../../../../api/Hi.HiNcKits.UserEnv.html#Hi_HiNcKits_UserEnv_IsPhysicsLicensed">IsPhysicsLicensed</a> is false.</li>
|
||||
<li>The model is <a class="xref" href="../../../../api/Hi.HiNcKits.AppConfig.html#Hi_HiNcKits_AppConfig_ShowPhysicsOptions">ShowPhysicsOptions</a>.</li>
|
||||
<li>The checkbox is disabled and unchecked if <a class="xref" href="../../../../api/Hi.HiNcKits.AppService.html#Hi_HiNcKits_AppService_IsPhysicsLicensed">IsPhysicsLicensed</a> is false.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Show Log Button
|
||||
@@ -109,9 +109,6 @@ The button does not exist on WPF application.</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<h2 id="single-user-application">Single User Application</h2>
|
||||
<p>In single user application, access global <a class="xref" href="../../../../api/Hi.HiNcKits.UserEnv.html">UserEnv</a> and <a class="xref" href="../../../../api/Hi.HiNcKits.AppConfig.html">AppConfig</a> by the <a class="xref" href="../../../../api/Hi.HiNcKits.LocalApp.html">LocalApp</a>.</p>
|
||||
<p>Apply <a class="xref" href="../../../../api/Hi.HiNcKits.LocalApp.html">LocalApp</a>.<a class="xref" href="../../../../api/Hi.HiNcKits.LocalApp.html#Hi_HiNcKits_LocalApp_SaveUserConfig">SaveUserConfig()</a> or <a class="xref" href="../../../../api/Hi.HiNcKits.LocalApp.html">LocalApp</a>.<a class="xref" href="../../../../api/Hi.HiNcKits.LocalApp.html#Hi_HiNcKits_LocalApp_LooseSaveUserConfig">LooseSaveUserConfig()</a> (save config in <a href="../general-rules.html">Loose Manner</a>) if config changed.</p>
|
||||
<h2 id="source-code-path">Source Code Path</h2>
|
||||
<p>See <a href="../index.html">this page</a> for git repository.</p>
|
||||
<h3 id="wpf-application-source-code-path">WPF Application Source Code Path</h3>
|
||||
@@ -121,7 +118,7 @@ The button does not exist on WPF application.</li>
|
||||
<h3 id="web-page-application-source-code-path">Web Page Application Source Code Path</h3>
|
||||
<ul>
|
||||
<li>wwwroot/preference/preference-menu.js</li>
|
||||
<li>Controller/Preference/PreferenceController.cs</li>
|
||||
<li>Environments/PreferenceController.cs</li>
|
||||
</ul>
|
||||
|
||||
</article>
|
||||
|
||||
+7
-7
@@ -87,9 +87,9 @@
|
||||
<article data-uid="">
|
||||
<h1 id="step-present-preference-page">Step Present Preference Page</h1>
|
||||
|
||||
<p>The model <a class="xref" href="../../../../api/Hi.HiNcKits.UserEnv.html">UserEnv</a> is from its parent component. The <a class="xref" href="../../../../api/Hi.HiNcKits.UserEnv.html">UserEnv</a>.<a class="xref" href="../../../../api/Hi.HiNcKits.UserEnv.html#Hi_HiNcKits_UserEnv_UserConfig">AppConfig</a> is rapidly used.</p>
|
||||
<p>The model of Candidate Keys Panel is <a class="xref" href="../../../../api/Hi.HiNcKits.UserEnv.html#Hi_HiNcKits_UserEnv_CandidateStepPresentKeyList">CandidateStepPresentKeyList</a>.
|
||||
The model of Displayed Keys Panel is <a class="xref" href="../../../../api/Hi.HiNcKits.AppConfig.html#Hi_HiNcKits_UserConfig_DisplayedStepPresentKeyList">DisplayedStepPresentKeyList</a>.</p>
|
||||
<p>The model <a class="xref" href="../../../../api/Hi.HiNcKits.AppService.html">AppService</a> is from its parent component. The <a class="xref" href="../../../../api/Hi.HiNcKits.AppService.html">AppService</a>.<a class="xref" href="../../../../api/Hi.HiNcKits.AppService.html#Hi_HiNcKits_AppService_AppConfig">AppConfig</a> is rapidly used.</p>
|
||||
<p>The model of Candidate Keys Panel is <a class="xref" href="../../../../api/Hi.HiNcKits.AppService.html#Hi_HiNcKits_AppService_CandidateStepPresentKeyList">CandidateStepPresentKeyList</a>.
|
||||
The model of Displayed Keys Panel is <a class="xref" href="../../../../api/Hi.HiNcKits.AppConfig.html#Hi_HiNcKits_AppConfig_DisplayedStepPresentKeyList">DisplayedStepPresentKeyList</a>.</p>
|
||||
<h2 id="layout">Layout</h2>
|
||||
<ul>
|
||||
<li>Step Present Preference Page (or window)
|
||||
@@ -124,9 +124,9 @@ The model of Displayed Keys Panel is <a class="xref" href="../../../../api/Hi.Hi
|
||||
</ul>
|
||||
<p>The categories are not defined for programming logic but only for user experience. So decide and define the categories in the GUI here only.</p>
|
||||
<p>Since the Keys are not all come from the properties of <a class="xref" href="../../../../api/Hi.MachiningSteps.MachiningStep.html">MachiningStep</a>, a category panel (Category Other Panel) for the uncategoried keys is required.</p>
|
||||
<p>The keys in the Displayed Keys Panel is in sequence of <a class="xref" href="../../../../api/Hi.HiNcKits.AppConfig.html#Hi_HiNcKits_UserConfig_DisplayedStepPresentKeyList">DisplayedStepPresentKeyList</a>. User tune the sequence and remove key by the Displayed Keys Panel. User add and remove the key from the ToggleButtons in Candidate Keys Panel. Those UI control items are required.</p>
|
||||
<p>The keys in the Displayed Keys Panel is in sequence of <a class="xref" href="../../../../api/Hi.HiNcKits.AppConfig.html#Hi_HiNcKits_AppConfig_DisplayedStepPresentKeyList">DisplayedStepPresentKeyList</a>. User tune the sequence and remove key by the Displayed Keys Panel. User add and remove the key from the ToggleButtons in Candidate Keys Panel. Those UI control items are required.</p>
|
||||
<p>To both Candidate Keys Panel and Displayed Keys Panel:
|
||||
Apply <a class="xref" href="../../../../api/Hi.MachiningSteps.PresentAttribute.html">PresentAttribute</a>.<a class="xref" href="../../../../api/Hi.MachiningSteps.PresentAttribute.html#Hi_MachiningSteps_PresentAttribute_Name">Name</a> as Key label by <a class="xref" href="../../../../api/Hi.HiNcKits.UserEnv.html#Hi_HiNcKits_UserEnv_StepPresentAccessDictionary">StepPresentAccessDictionary</a>. Apply the key to the button tooltip.</p>
|
||||
Apply <a class="xref" href="../../../../api/Hi.MachiningSteps.PresentAttribute.html">PresentAttribute</a>.<a class="xref" href="../../../../api/Hi.MachiningSteps.PresentAttribute.html#Hi_MachiningSteps_PresentAttribute_Name">Name</a> as Key label by <a class="xref" href="../../../../api/Hi.HiNcKits.AppService.html#Hi_HiNcKits_AppService_StepPresentAccessDictionary">StepPresentAccessDictionary</a>. Apply the key to the button tooltip.</p>
|
||||
<p>The resx of <a class="xref" href="../../../../api/Hi.MachiningSteps.MachiningStep.html">MachiningStep</a> contains the translation of <a class="xref" href="../../../../api/Hi.MachiningSteps.PresentAttribute.html">PresentAttribute</a>.<a class="xref" href="../../../../api/Hi.MachiningSteps.PresentAttribute.html#Hi_MachiningSteps_PresentAttribute_Name">Name</a>, apply the translation to the GUI. If the translation not existed, use the original value.</p>
|
||||
<h3 id="categories">Categories</h3>
|
||||
<p>Refer the code to design Categories:</p>
|
||||
@@ -441,7 +441,7 @@ Apply <a class="xref" href="../../../../api/Hi.MachiningSteps.PresentAttribute.h
|
||||
</code></pre>
|
||||
<p>Refer the code to apply <a class="xref" href="../../../../api/Hi.MachiningSteps.PresentAttribute.html">PresentAttribute</a>.</p>
|
||||
<pre><code class="lang-csharp" name="SampleCode-ShowStepPresent">internal static void ShowStepPresent(
|
||||
UserEnv userEnv, MachiningStep machiningStep)
|
||||
AppService userEnv, MachiningStep machiningStep)
|
||||
{
|
||||
foreach (var entry in userEnv.DisplayedStepPresentAccessList)
|
||||
{
|
||||
@@ -459,7 +459,7 @@ Apply <a class="xref" href="../../../../api/Hi.MachiningSteps.PresentAttribute.h
|
||||
<h3 id="web-page-application-source-code-path">Web Page Application Source Code Path</h3>
|
||||
<ul>
|
||||
<li>wwwroot/preference/step-present-preference.js</li>
|
||||
<li>Controller/Preference/PreferenceController.cs</li>
|
||||
<li>Environments/PreferenceController.cs</li>
|
||||
</ul>
|
||||
|
||||
</article>
|
||||
|
||||
@@ -119,11 +119,15 @@ DispEngine.TurnBackView();
|
||||
<li>Disp/RenderingCanvasToolBar</li>
|
||||
</ul>
|
||||
<h3 id="webapi-application-source-code-path">Webapi Application Source Code Path</h3>
|
||||
<p>Frontend:</p>
|
||||
<ul>
|
||||
<li>wwwroot/disp/rendering-canvas-tool-bar.js</li>
|
||||
<li>wwwroot/disp/rendering-canvas-tool-bar.css</li>
|
||||
</ul>
|
||||
<p>To build it, you can refer <a href="https://superhightech-gitea.webredirect.org/HiNC-Deploy/Hi.Sample.Webapi/raw/branch/master/wwwroot/disp/rendering-canvas-view-dropdown.js">Hi.Sample.Webapi/wwwroot/disp/rendering-canvas-view-dropdown.js</a>.</p>
|
||||
<p>Backend (C#):</p>
|
||||
<ul>
|
||||
<li>Disp/RenderingHub.cs - Contains the <code>SetView</code> method that handles view changes from the toolbar</li>
|
||||
<li>Disp/RenderingService.cs - Manages DispEngine instances</li>
|
||||
</ul>
|
||||
|
||||
</article>
|
||||
|
||||
|
||||
@@ -161,6 +161,8 @@
|
||||
</div>
|
||||
<h2 id="behavior-of-export-button">Behavior of Export Button</h2>
|
||||
<p>Export ALL filtered elements in the <a class="xref" href="../../../../api/Hi.MachiningProcs.SessionMessageHost.html#Hi_MachiningProcs_SessionMessageHost_MessageCollection">MessageCollection</a> by <a class="xref" href="../../../../api/Hi.MachiningProcs.SessionMessageHost.html#Hi_MachiningProcs_SessionMessageHost_GetFliteredList_Hi_MachiningProcs_SessionMessageHost_FilterFlag_System_String_">GetFliteredList(FilterFlag, string)</a>.</p>
|
||||
<h2 id="signalr-implementation-webapi-only">SignalR Implementation (Webapi Only)</h2>
|
||||
<p><code>SessionMessageHub</code> provides real-time message updates with method <code>GetSessionMessages(string filterFlags, string filterText, int limit)</code> and event <code>SessionMessagesUpdated</code>. <code>SessionMessageService</code> monitors <a class="xref" href="../../../../api/Hi.MachiningProcs.LocalProjectService.html#Hi_MachiningProcs_LocalProjectService_SessionMessageHost_CollectionItemChanged">SessionMessageHost_CollectionItemChanged</a> and broadcasts updates. The service uses <xref:Hi.MachiningProcs.LooseRunner> for non-blocking async operations. The JavaScript component connects to <code>/sessionMessageHub</code> to receive real-time message updates.</p>
|
||||
<h2 id="source-code-path">Source Code Path</h2>
|
||||
<p>See <a href="../index.html">this page</a> for git repository.</p>
|
||||
<h3 id="wpf-application-source-code-path">WPF Application Source Code Path</h3>
|
||||
@@ -169,8 +171,10 @@
|
||||
</ul>
|
||||
<h3 id="web-page-application-source-code-path">Web Page Application Source Code Path</h3>
|
||||
<ul>
|
||||
<li>wwwroot/player-panel.js (include in Player Panel)</li>
|
||||
<li>Controller/Player/PlayerController.cs</li>
|
||||
<li>wwwroot/player/session-message-panel.js (Vue component)</li>
|
||||
<li>Players/PlayerController.cs (REST API - GetSessionMessages endpoint)</li>
|
||||
<li>Players/SessionMessageService.cs (Business logic)</li>
|
||||
<li>Players/SessionMessageHub.cs (SignalR Hub for real-time updates)</li>
|
||||
</ul>
|
||||
|
||||
</article>
|
||||
|
||||
@@ -0,0 +1,126 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Numeric Input/Output Utilities | HiAPI-C# 2025 </title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="title" content="Numeric Input/Output Utilities | HiAPI-C# 2025 ">
|
||||
|
||||
|
||||
<link rel="icon" href="../../../../img/HiAPI.favicon.ico">
|
||||
<link rel="stylesheet" href="../../../../public/docfx.min.css">
|
||||
<link rel="stylesheet" href="../../../../public/main.css">
|
||||
<meta name="docfx:navrel" content="../../../../toc.html">
|
||||
<meta name="docfx:tocrel" content="../../toc.html">
|
||||
|
||||
<meta name="docfx:rel" content="../../../../">
|
||||
|
||||
|
||||
|
||||
<meta name="loc:inThisArticle" content="In this article">
|
||||
<meta name="loc:searchResultsCount" content="{count} results for "{query}"">
|
||||
<meta name="loc:searchNoResults" content="No results for "{query}"">
|
||||
<meta name="loc:tocFilter" content="Filter by title">
|
||||
<meta name="loc:nextArticle" content="Next">
|
||||
<meta name="loc:prevArticle" content="Previous">
|
||||
<meta name="loc:themeLight" content="Light">
|
||||
<meta name="loc:themeDark" content="Dark">
|
||||
<meta name="loc:themeAuto" content="Auto">
|
||||
<meta name="loc:changeTheme" content="Change theme">
|
||||
<meta name="loc:copy" content="Copy">
|
||||
<meta name="loc:downloadPdf" content="Download PDF">
|
||||
|
||||
<script type="module" src="./../../../../public/docfx.min.js"></script>
|
||||
|
||||
<script>
|
||||
const theme = localStorage.getItem('theme') || 'auto'
|
||||
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="">
|
||||
<header class="bg-body border-bottom">
|
||||
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
|
||||
<div class="container-xxl flex-nowrap">
|
||||
<a class="navbar-brand" href="../../../../index.html">
|
||||
<img id="logo" class="svg" src="../../../../img/HiAPI.logo.png" alt="">
|
||||
|
||||
</a>
|
||||
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<i class="bi bi-three-dots"></i>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navpanel">
|
||||
<div id="navbar">
|
||||
<form class="search" role="search" id="search">
|
||||
<i class="bi bi-search"></i>
|
||||
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<main class="container-xxl">
|
||||
<div class="toc-offcanvas">
|
||||
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
|
||||
<div class="offcanvas-header">
|
||||
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="offcanvas-body">
|
||||
<nav class="toc" id="toc"></nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="content">
|
||||
<div class="actionbar">
|
||||
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
|
||||
<i class="bi bi-list"></i>
|
||||
</button>
|
||||
|
||||
<nav id="breadcrumb"></nav>
|
||||
</div>
|
||||
|
||||
<article data-uid="">
|
||||
<h1 id="numeric-inputoutput-utilities">Numeric Input/Output Utilities</h1>
|
||||
|
||||
<p>The <code>numeric-utils.js</code> module provides essential utilities for handling numeric input/output in web forms, especially for floating-point values with special cases.</p>
|
||||
<h2 id="purpose">Purpose</h2>
|
||||
<p>The utilities solve the common problem of handling special numeric values (Infinity, -Infinity, NaN) in JSON serialization and user interfaces. JavaScript's JSON.stringify converts these special values to null or strings, which can cause issues when communicating with C# backend APIs. This module provides consistent conversion between numeric values and display strings, ensuring proper handling across the full stack. It also formats regular numbers with appropriate precision for display while avoiding unnecessary trailing zeros.</p>
|
||||
<h2 id="key-features">Key Features</h2>
|
||||
<ul>
|
||||
<li>Converts Infinity to “INF”, -Infinity to “-INF”, and NaN to “NaN” for display</li>
|
||||
<li>Parses these special strings back to their numeric equivalents</li>
|
||||
<li>Formats regular numbers with appropriate precision (4 significant digits)</li>
|
||||
<li>Provides a Vue mixin for easy integration in components</li>
|
||||
<li>Handles both numeric and string inputs from JSON responses</li>
|
||||
</ul>
|
||||
|
||||
</article>
|
||||
|
||||
<div class="contribution d-print-none">
|
||||
</div>
|
||||
|
||||
<div class="next-article d-print-none border-top" id="nextArticle"></div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="affix">
|
||||
<nav id="affix"></nav>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<div class="container-xxl search-results" id="search-results"></div>
|
||||
|
||||
<footer class="border-top text-secondary">
|
||||
<div class="container-xxl">
|
||||
<div class="flex-fill">
|
||||
<span> Copyright © 2025 <a href='https://superhightech.com.tw'>Tech Coordinate</a>. All rights reserved. <a href='https://superhightech.com.tw'>超級高科技股份有限公司</a> © 2025 版權所有 </span>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -110,7 +110,6 @@
|
||||
|
||||
HiDisp --> Hi.WinForm
|
||||
HiDisp --> Hi.Wpf
|
||||
HiDisp --> Hi.Webapi
|
||||
|
||||
style HiNc fill:#d3d,stroke:#333,stroke-width:2px
|
||||
</code></pre>
|
||||
@@ -119,7 +118,6 @@
|
||||
<ul>
|
||||
<li>For Windows Forms applications, use the <code>Hi.WinForm</code> package.</li>
|
||||
<li>For WPF applications, use the <code>Hi.Wpf</code> package.</li>
|
||||
<li>For Webapi applications, use <code>Hi.Webapi</code> package.</li>
|
||||
</ul>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
@@ -137,11 +135,6 @@
|
||||
<li><a href="https://superhightech-gitea.webredirect.org/HiNC-Deploy/Hi.Wpf.git">https://superhightech-gitea.webredirect.org/HiNC-Deploy/Hi.WinForm.git</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Hi.Webapi
|
||||
<ul>
|
||||
<li><a href="https://superhightech-gitea.webredirect.org/HiNC-Deploy/Hi.Webapi.git">https://superhightech-gitea.webredirect.org/HiNC-Deploy/Hi.Webapi.git</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<h2 id="hiapi-sample-code">HiAPI Sample Code</h2>
|
||||
<p>See <a href="../sample/Sample.Machining.html">Sample Code</a> or download the repositories to get more samples. The following sample repository demonstrate various aspects of using HiAPI for machining simulation:</p>
|
||||
@@ -158,12 +151,6 @@
|
||||
<li>The repository generally contains the sample code that requires rendering canvas.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Hi.Sample.Webapi
|
||||
<ul>
|
||||
<li><a href="https://superhightech-gitea.webredirect.org/HiNC-Deploy/Hi.Sample.Webapi.git">https://superhightech-gitea.webredirect.org/HiNC-Deploy/Hi.Sample.Webapi.git</a></li>
|
||||
<li>The repository shows how to use Hi.Webapi nuget package.</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</article>
|
||||
|
||||
@@ -80,7 +80,26 @@
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="build-hinc/widget/vec3d/index.html" name="" title="Vec3d Control">Vec3d Control</a>
|
||||
<span class="expand-stub"></span>
|
||||
<a href="build-hinc/index.html" name="" title="Widget">Widget</a>
|
||||
|
||||
<ul class="nav level3">
|
||||
<li>
|
||||
<a href="build-hinc/widget/vec3d/index.html" name="" title="Vec3d Control">Vec3d Control</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="build-hinc/widget/object-management-menu-button.html" name="" title="Object Management Menu Button">Object Management Menu Button</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="build-hinc/widget/gui-file-path-assignment.html" name="" title="GUI File Path Assignment">GUI File Path Assignment</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="build-hinc/widget/polar-resolution-2d-panel.html" name="" title="Polar Resolution 2D Panel">Polar Resolution 2D Panel</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="build-hinc/widget/numeric-io-utilities.html" name="" title="Numeric Input/Output Utilities">Numeric Input/Output Utilities</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<span class="expand-stub"></span>
|
||||
@@ -129,6 +148,34 @@
|
||||
<li>
|
||||
<a href="build-hinc/controller/index.html" name="" title="Controller Page">Controller Page</a>
|
||||
</li>
|
||||
<li>
|
||||
<span class="expand-stub"></span>
|
||||
<a href="build-hinc/mission/index.html" name="" title="Mission Page">Mission Page</a>
|
||||
|
||||
<ul class="nav level3">
|
||||
<li>
|
||||
<a href="build-hinc/mission/script-command-panel.html" name="" title="Script Command Panel">Script Command Panel</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="build-hinc/mission/ListCommand-panel.html" name="" title="List Command Panel">List Command Panel</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="build-hinc/mission/PreSettingCommand-panel.html" name="" title="PreSetting Command Panel">PreSetting Command Panel</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="build-hinc/mission/NcOptOption-panel.html" name="" title="NcOptOption Panel">NcOptOption Panel</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="build-hinc/mission/NcFileCommand-panel.html" name="" title="NcFile Command Panel">NcFile Command Panel</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="build-hinc/mission/NcCodeCommand-panel.html" name="" title="NcCode Command Panel">NcCode Command Panel</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="build-hinc/mission/PostExecutionCommand-panel.html" name="" title="PostExecution Command Panel">PostExecution Command Panel</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user