This commit is contained in:
2025-12-23 13:43:09 +08:00
parent 4556281c0a
commit b64c156a59
652 changed files with 993 additions and 1067 deletions
@@ -113,7 +113,7 @@
<li>Pause</li>
</ul>
</li>
<li>Both webservice and win-desktop applications use <a class="xref" href="../../../../api/Hi.MachiningProcs.LocalProjectService.html">LocalProjectService</a> events for monitoring &lt;xref:Hi.MachiningProcs.MachiningProject.PacePlayer&gt; status changes.</li>
<li>Both webservice 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.LocalProjectService.html#Hi_MachiningProcs_LocalProjectService_PacePlayer">PacePlayer</a> status changes.</li>
<li>In webservice 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.
@@ -162,7 +162,7 @@
<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 (&lt;xref:Hi.MachiningProcs.LocalProjectService.PacePlayer_IsRunningChangedEvent&gt;, &lt;xref:Hi.MachiningProcs.LocalProjectService.PacePlayer_IsLockedChangedEvent&gt;, &lt;xref:Hi.MachiningProcs.LocalProjectService.PacePlayer_IsFinishedChangedEvent&gt;, &lt;xref:Hi.MachiningProcs.LocalProjectService.PacePlayer_ResetedEvent&gt;) 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>
<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#Hi_MachiningProcs_LocalProjectService_PacePlayer">PacePlayer</a> events (<a class="xref" href="../../../../api/Hi.Common.PacePlayer.html#Hi_Common_PacePlayer_IsRunningChangedEvent">IsRunningChangedEvent</a>, <a class="xref" href="../../../../api/Hi.Common.PacePlayer.html#Hi_Common_PacePlayer_IsLockedChangedEvent">IsLockedChangedEvent</a>, <a class="xref" href="../../../../api/Hi.Common.PacePlayer.html#Hi_Common_PacePlayer_IsFinishedChangedEvent">IsFinishedChangedEvent</a>, <a class="xref" href="../../../../api/Hi.Common.PacePlayer.html#Hi_Common_PacePlayer_ResetedEvent">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;