This commit is contained in:
2025-12-22 23:35:40 +08:00
parent 32ff8b45e3
commit 4556281c0a
77 changed files with 9248 additions and 3996 deletions
@@ -87,7 +87,7 @@
<article data-uid="">
<h1 id="session-message-panel">Session Message Panel</h1>
<p>The model is <a class="xref" href="../../../../api/Hi.MachiningProcs.MachiningProject.html">MachiningProject</a>.<a class="xref" href="../../../../api/Hi.MachiningProcs.MachiningProject.html#Hi_MachiningProcs_MachiningProject_SessionMessageHost">SessionMessageHost</a>.</p>
<p>The model is <a class="xref" href="../../../../api/Hi.MachiningProcs.MachiningProject.html">MachiningProject</a>.&lt;xref:Hi.MachiningProcs.MachiningProject.SessionMessageHost&gt;.</p>
<p><a class="xref" href="../../../../api/Hi.MachiningProcs.MachiningProject.html">MachiningProject</a> is assigned from the <a href="../player/index.html">Player Panel</a>.</p>
<h2 id="layout">Layout</h2>
<ul>
@@ -114,9 +114,9 @@
<h2 id="central-message-table">Central Message Table</h2>
<p>The model of Central Message Table is <a class="xref" href="../../../../api/Hi.MachiningProcs.SessionMessageHost.html">SessionMessageHost</a>.<a class="xref" href="../../../../api/Hi.MachiningProcs.SessionMessageHost.html#Hi_MachiningProcs_SessionMessageHost_MessageCollection">MessageCollection</a>.</p>
<p>Only take last 1000 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> to show for user experience. Find the usage example in the code:</p>
<pre><code class="lang-csharp" name="Demo_UseSessionMessageHost">internal static void DemoUseSessionMessageHost(MachiningProject project)
<pre><code class="lang-csharp" name="Demo_UseSessionMessageHost">internal static void DemoUseSessionMessageHost(LocalProjectService localProjectService)
{
SessionMessageHost sessionMessageHost = project.SessionMessageHost;
SessionMessageHost sessionMessageHost = localProjectService.SessionMessageHost;
SessionMessageHost.FilterFlag filterFlags =
SessionMessageHost.FilterFlag.NC |
@@ -162,7 +162,7 @@
<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 <a class="xref" href="../../../../api/Hi.Common.LooseRunner.html">LooseRunner</a> for non-blocking async operations. The JavaScript component connects to <code>/sessionMessageHub</code> to receive real-time message updates.</p>
<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 &lt;xref:Hi.MachiningProcs.LocalProjectService.SessionMessageHost_CollectionItemChanged&gt; and broadcasts updates. The service uses <a class="xref" href="../../../../api/Hi.Common.LooseRunner.html">LooseRunner</a> 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>