tune
This commit is contained in:
@@ -0,0 +1,196 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Player Panel | HiAPI-C# 2025 </title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="title" content="Player 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">
|
||||
|
||||
<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="player-panel">Player Panel</h1>
|
||||
|
||||
<p>The Player Panel is the primary visualization component for machining simulation playback.</p>
|
||||
<h2 id="key-models">Key Models</h2>
|
||||
<ul>
|
||||
<li><a class="xref" href="../../../api/Hi.MachiningProcs.LocalProjectService.html">LocalProjectService</a> - Project data service</li>
|
||||
<li><a class="xref" href="../../../api/Hi.HiNcKits.UserService.html">UserService</a> - User service</li>
|
||||
</ul>
|
||||
<h2 id="associated-tool-bars">Associated Tool Bars</h2>
|
||||
<ul>
|
||||
<li><a href="player-tool-bar.html">Player Tool Bar</a></li>
|
||||
<li><a href="../renderingcanvas-tool-bar.html">RenderingCanvas Tool Bar</a></li>
|
||||
<li><a href="player-extended-renderingcanvas-tool-bar.html">Player extended RenderingCanvas Tool Bar</a></li>
|
||||
</ul>
|
||||
<h2 id="layout-structure">Layout Structure</h2>
|
||||
<p>The Player Panel consists of:</p>
|
||||
<ul>
|
||||
<li><strong>Central Area</strong>: <a href="../../basic/rendering/rendering-canvas/index.html">RenderingCanvas</a> for 3D visualization</li>
|
||||
<li><strong>Vertical Splitter</strong>: Draggable bar to resize widths</li>
|
||||
<li><strong>Side Panel</strong>:
|
||||
<ul>
|
||||
<li>Upper: <a href="selected-step-info-panel.html">Selected-Step Info Panel</a></li>
|
||||
<li>Horizontal Splitter: Draggable bar to resize heights</li>
|
||||
<li>Lower: <a href="../session-message-panel/index.html">Session Message Panel</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<h2 id="default-panel-configuration">Default Panel Configuration</h2>
|
||||
<p>The Player Panel is set as the default panel on the <code>Page Panel</code> when the main window opens. The associated toolbars (Player Tool Bar, RenderingCanvas Tool Bar, Player Extended RenderingCanvas Tool Bar) are also configured accordingly.</p>
|
||||
<h2 id="player-extended-renderingcanvas-tool-bar-behavior">Player Extended RenderingCanvas Tool Bar Behavior</h2>
|
||||
<p>The <a href="player-extended-renderingcanvas-tool-bar.html">Player Extended RenderingCanvas Tool Bar</a> provides additional controls:</p>
|
||||
<ul>
|
||||
<li><a href="player-extended-renderingcanvas-tool-bar.html#behavior-of-cl-strip-buttons-and-fit-view-button">CL Strip Buttons and Fit View Button</a> - Controls for CL strip display and view fitting</li>
|
||||
<li><a href="player-extended-renderingcanvas-tool-bar.html#behavior-of-project-rendering-items-dropdown">Project Rendering Items DropDown</a> - Selection of rendering items</li>
|
||||
</ul>
|
||||
<p>The toolbar receives notifications when the project is changed from <a href="../main-panel.html">Main Panel</a>.</p>
|
||||
<h2 id="related-preference">Related Preference</h2>
|
||||
<ul>
|
||||
<li><a href="../preference/step-present-preference-page.html">Step Present Preference Page</a> - Controls step presentation settings</li>
|
||||
</ul>
|
||||
<h2 id="renderingcanvas-behavior">RenderingCanvas Behavior</h2>
|
||||
<p>The RenderingCanvas displays the machining project visualization:</p>
|
||||
<ol>
|
||||
<li>On initialization, a <a class="xref" href="../../../api/Hi.MachiningProcs.MachiningProjectDisplayee.html">MachiningProjectDisplayee</a> is created and assigned to <code>RenderingCanvas</code>.<a class="xref" href="../../../api/Hi.Disp.DispEngine.html">DispEngine</a>.<a class="xref" href="../../../api/Hi.Disp.DispEngine.html#Hi_Disp_DispEngine_Displayee">Displayee</a></li>
|
||||
<li>The displayee receives project data from <a class="xref" href="../../../api/Hi.MachiningProcs.LocalProjectService.html">LocalProjectService</a></li>
|
||||
<li>The RenderingCanvas is disposed when the Player Panel is disposed</li>
|
||||
</ol>
|
||||
<h2 id="source-code-locations">Source Code Locations</h2>
|
||||
<p>See <a href="../index.html">HiNC GUI Architecture</a> for git repository links.</p>
|
||||
<h3 id="wpf-application">WPF Application</h3>
|
||||
<ul>
|
||||
<li><code>Play/PlayerPanel</code></li>
|
||||
</ul>
|
||||
<h3 id="web-application">Web Application</h3>
|
||||
<p><strong>Frontend:</strong></p>
|
||||
<ul>
|
||||
<li><code>wwwroot/player/player-panel.js</code></li>
|
||||
<li><code>wwwroot/player/player-panel.html</code></li>
|
||||
</ul>
|
||||
<p><strong>Backend:</strong></p>
|
||||
<ul>
|
||||
<li><code>Players/PlayerController.cs</code></li>
|
||||
<li><code>Players/PlayerStatusHub.cs</code></li>
|
||||
<li><code>Players/PlayerStatusService.cs</code></li>
|
||||
<li><code>Players/SessionMessageHub.cs</code></li>
|
||||
<li><code>Players/SessionMessageService.cs</code></li>
|
||||
<li><code>Players/SelectedStepInfoHub.cs</code></li>
|
||||
<li><code>Players/SelectedStepInfoService.cs</code></li>
|
||||
</ul>
|
||||
<h2 id="implementation-checklist">Implementation Checklist</h2>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p>When building a new Player Panel implementation:</p>
|
||||
<ol>
|
||||
<li>Create the layout with RenderingCanvas</li>
|
||||
<li>Set up RenderingCanvas behavior</li>
|
||||
<li>Create <a href="player-tool-bar.html">Player Tool Bar</a></li>
|
||||
<li>Create <a href="player-extended-renderingcanvas-tool-bar.html">Player Extended RenderingCanvas Tool Bar</a> with CL Strip, Fit View, and Rendering Items behaviors</li>
|
||||
<li>Connect to Navigation Menu on <a href="../main-panel.html">Main Panel</a></li>
|
||||
<li>Set Player Panel as default panel with associated toolbars</li>
|
||||
<li>Build <a href="../session-message-panel/index.html">Session Message Panel</a>, <a href="selected-step-info-panel.html">Selected-Step Info Panel</a>, and <a href="../preference/step-present-preference-page.html">Step Present Preference Page</a></li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
</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>
|
||||
+157
@@ -0,0 +1,157 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Player extended RenderingCanvas Tool Bar | HiAPI-C# 2025 </title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="title" content="Player extended RenderingCanvas Tool Bar | 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="player-extended-renderingcanvas-tool-bar">Player extended RenderingCanvas Tool Bar</h1>
|
||||
|
||||
<p>The model of the tool bar is <a class="xref" href="../../../api/Hi.Disp.DispEngine.html">DispEngine</a> which is assigned from the RenderingCanvas of <a href="index.html">Player Panel</a>.</p>
|
||||
<p>The content of DispEngine.<a class="xref" href="../../../api/Hi.Disp.DispEngine.html#Hi_Disp_DispEngine_Displayee">Displayee</a> here is <a class="xref" href="../../../api/Hi.MachiningProcs.MachiningProjectDisplayee.html">MachiningProjectDisplayee</a>. the key content of the <a class="xref" href="../../../api/Hi.MachiningProcs.MachiningProjectDisplayee.html">MachiningProjectDisplayee</a> is <a class="xref" href="../../../api/Hi.MachiningProcs.MachiningProject.html">MachiningProject</a>.</p>
|
||||
<p>The sub-model is <a class="xref" href="../../../api/Hi.MachiningProcs.MachiningProjectDisplayee.html">MachiningProjectDisplayee</a> and <a class="xref" href="../../../api/Hi.MachiningProcs.MachiningProject.html">MachiningProject</a>.</p>
|
||||
<h2 id="layout">Layout</h2>
|
||||
<ul>
|
||||
<li><code>Player extended RenderingCanvas Tool Bar</code>
|
||||
<ul>
|
||||
<li><code>Show CL Strip Button</code></li>
|
||||
<li><code>Show CL Strip Dots Button</code>
|
||||
Only editable if the <a class="xref" href="../../../api/Hi.MachiningProcs.RenderingFlag.html#Hi_MachiningProcs_RenderingFlag_ClStrip">ClStrip</a> in <a class="xref" href="../../../api/Hi.MachiningProcs.MachiningProjectDisplayee.html#Hi_MachiningProcs_MachiningProjectDisplayee_RenderingFlagBitArray">RenderingFlagBitArray</a> is true.</li>
|
||||
<li><code>Fit View Button</code></li>
|
||||
<li><code>Rendering Items SubMenu</code>
|
||||
<a class="xref" href="../../../api/Hi.MachiningProcs.RenderingFlag.html">RenderingFlag</a>-based checkboxes that deal the boolean value in <a class="xref" href="../../../api/Hi.MachiningProcs.MachiningProjectDisplayee.html#Hi_MachiningProcs_MachiningProjectDisplayee_RenderingFlagBitArray">RenderingFlagBitArray</a>, such as “Show Machine”, “Show Workpiece”, etc..
|
||||
Except the ClStrip option since there has already be managed by the Show CL Strip Button.
|
||||
Show HeidenhainCoordinate checkbox only if <a class="xref" href="../../../api/Hi.MachiningProcs.MachiningProject.html">MachiningProject</a>.<a class="xref" href="../../../api/Hi.MachiningProcs.MachiningProject.html#Hi_MachiningProcs_MachiningProject_NcEnv">NcEnv</a>.<a class="xref" href="../../../api/Hi.Numerical.NcEnv.html#Hi_Numerical_NcEnv_CncBrand">CncBrand</a> is <a class="xref" href="../../../api/Hi.Numerical.CncBrand.html#Hi_Numerical_CncBrand_Heidenhain">Heidenhain</a>.
|
||||
Create the submenu component class since the other GUI component also use it. See <a href="../controller/index.html">controller page</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p>checkboxs in Project Rendering Items SubMenu can be classified by the category of <a class="xref" href="../../../api/Hi.MachiningProcs.RenderingFlag.html">RenderingFlag</a> (see the hyperlink for the categories).</p>
|
||||
</div>
|
||||
<h2 id="behavior-of-cl-strip-buttons-and-fit-view-button">Behavior of CL Strip Buttons and Fit View Button</h2>
|
||||
<p>Apply <a class="xref" href="../../../api/Hi.MachiningProcs.MachiningProjectDisplayee.html#Hi_MachiningProcs_MachiningProjectDisplayee_RenderingFlagBitArray">RenderingFlagBitArray</a> to set the Project Rendering Items.</p>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p>Extract the <a class="xref" href="../../../api/Hi.MachiningProcs.MachiningProject.html">MachiningProject</a> From the <a class="xref" href="../../../api/Hi.MachiningProcs.MachiningProjectDisplayee.html">MachiningProjectDisplayee</a> and use it to set the behaviors.</p>
|
||||
</div>
|
||||
<h2 id="behavior-of-project-rendering-items-dropdown">Behavior of <code>Project Rendering Items DropDown</code></h2>
|
||||
<p>See <a class="xref" href="../../../sample/Sample.Machining.DemoRenderingMachiningProcessAndStripPosSelection.html">DemoRenderingMachiningProcessAndStripPosSelection</a> for the sample code to complete the behavior of the buttons.</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>
|
||||
<li>Play/PlayerExtendedRenderingCanvasToolBar</li>
|
||||
</ul>
|
||||
<h3 id="web-page-application-source-code-path">Web Page Application Source Code Path</h3>
|
||||
<ul>
|
||||
<li>wwwroot/player/player-extended-toolbar.js</li>
|
||||
<li>Players/PlayerController.cs</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>
|
||||
@@ -0,0 +1,404 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Player Tool Bar | HiAPI-C# 2025 </title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="title" content="Player Tool Bar | 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="player-tool-bar">Player Tool Bar</h1>
|
||||
|
||||
<h2 id="layout">Layout</h2>
|
||||
<ul>
|
||||
<li><code>Player Tool Bar</code>
|
||||
<ul>
|
||||
<li><code>Status Text Field</code></li>
|
||||
<li><code>Start Button</code></li>
|
||||
<li><code>Pause Button</code></li>
|
||||
<li><code>Run-One-Line Button</code></li>
|
||||
<li><code>Run-One-Step Button</code></li>
|
||||
<li><code>Stop Button</code></li>
|
||||
<li><code>Reset Button</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<h2 id="behavior-of-player-tool-bar">Behavior of <code>Player Tool Bar</code></h2>
|
||||
<p>See the example code to:</p>
|
||||
<ul>
|
||||
<li>complete the behavior of the buttons and <code>Status Text Field</code>.</li>
|
||||
<li>The rapidly used buttons should has hotkey. At least the following buttons:
|
||||
<ul>
|
||||
<li>Run One Line Button</li>
|
||||
<li>Run One Step Button</li>
|
||||
<li>Start/Continue</li>
|
||||
<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 <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.
|
||||
<ul>
|
||||
<li>Warning style color
|
||||
<ul>
|
||||
<li>Running</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Secondary style color
|
||||
<ul>
|
||||
<li>Paused</li>
|
||||
<li>No Project</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Success style color
|
||||
<ul>
|
||||
<li>Finished</li>
|
||||
<li>Ready</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<p>The action of <code>Reset Button</code> should be async for user experience.</p>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p>Use icon instead of text to the tool bar button. Run One Line Button and Run One Step Button use the same icon, use the different color to resolve them.</p>
|
||||
<ul>
|
||||
<li>Run One Line Button > default color with green seasoned</li>
|
||||
<li>Run One Step Button > default color with blue seasoned</li>
|
||||
</ul>
|
||||
<p>The other button use the default color is enough.</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>Play/PlayerToolBar</li>
|
||||
</ul>
|
||||
<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>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#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;
|
||||
@using Hi.MachiningProcs
|
||||
@using Hi.MillingProcs;
|
||||
@using Hi.Numerical.FilePlayers;
|
||||
@inject HiNcHost hiNcHost
|
||||
|
||||
@{
|
||||
MachiningProject machiningProject = hiNcHost.MachiningProject;
|
||||
var localProjectService = hiNcHost.LocalProjectService;
|
||||
bool disabledByMachiningProject = machiningProject == null;
|
||||
}
|
||||
|
||||
<div class="btn-group" role="group">
|
||||
<div class=" btn-group"
|
||||
data-bs-toggle="collapse" data-bs-target="#player-@Tid">
|
||||
<button class="btn btn-outline-info text-nowrap "
|
||||
disabled="@disabledByMachiningProject"
|
||||
data-bs-toggle="button">
|
||||
<span class="me-1">@Loc["Player"]</span>
|
||||
<div class="d-inline-block" style="width: 4rem">
|
||||
@{
|
||||
if (machiningProject == null) { }
|
||||
else if (localProjectService.PacePlayer.IsRunning)
|
||||
{
|
||||
<span class="badge text-bg-warning">@Loc["Running"]</span>
|
||||
}
|
||||
else if (localProjectService.PacePlayer.IsLocked)
|
||||
{
|
||||
<span class="badge text-bg-secondary">@Loc["Pause"]</span>
|
||||
}
|
||||
else if (localProjectService.PacePlayer.IsFinished)
|
||||
{
|
||||
<span class="badge text-bg-success">@Loc["Finish"]</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="badge text-bg-primary">@Loc["Unlocked"]</span>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div id="player-@Tid" class="btn-group collapse collapse-horizontal show" role="group">
|
||||
|
||||
@if (machiningProject == null) { }
|
||||
else if (!localProjectService.PacePlayer.IsLocked)
|
||||
{
|
||||
<button class="btn btn-primary text-nowrap" title="@Loc["Start"] (S)"
|
||||
accesskey="s"
|
||||
disabled="@(disabledByMachiningProject||localProjectService.PacePlayer.IsFinished)"
|
||||
@onclick="StartOrContinue">
|
||||
<span class="oi oi-media-play me-1"></span>
|
||||
</button>
|
||||
}
|
||||
else
|
||||
{
|
||||
<button class="btn btn-primary text-nowrap" title="@Loc["Continue"] (S)"
|
||||
accesskey="s"
|
||||
@onclick="StartOrContinue"
|
||||
disabled="@(disabledByMachiningProject||localProjectService.PacePlayer.IsFinished||localProjectService.PacePlayer.IsRunning)">
|
||||
<span class="oi oi-media-play me-1"></span>
|
||||
</button>
|
||||
}
|
||||
<button class="btn btn-primary text-nowrap" title="@Loc["Pause"] (P)"
|
||||
accesskey="p"
|
||||
@onclick="Pause"
|
||||
disabled="@(disabledByMachiningProject||!localProjectService.PacePlayer.IsRunning)">
|
||||
<span class="oi oi-media-pause me-1"></span>
|
||||
</button>
|
||||
<button class="btn btn-primary text-nowrap" title="@Loc["Run One Line"] (L)"
|
||||
accesskey="l"
|
||||
@onclick="RunToLineEnd"
|
||||
disabled="@(disabledByMachiningProject||localProjectService.PacePlayer.IsFinished)">
|
||||
<span class="oi oi-media-step-forward me-1"></span>
|
||||
</button>
|
||||
|
||||
<button class="btn btn-primary text-nowrap" title="@Loc["Run One Step"] (K)"
|
||||
accesskey="k"
|
||||
@onclick="RunToNextPace"
|
||||
disabled="@(disabledByMachiningProject||localProjectService.PacePlayer.IsFinished)">
|
||||
<CommonRcl.Shared.CombinedIcon>
|
||||
<IconA>
|
||||
<span class="oi oi-media-step-forward me-1"></span>
|
||||
</IconA>
|
||||
<IconB>
|
||||
<span class="badge rounded-pill bg-primary-subtle text-primary-emphasis">
|
||||
step
|
||||
</span>
|
||||
</IconB>
|
||||
</CommonRcl.Shared.CombinedIcon>
|
||||
</button>
|
||||
|
||||
<button class="btn btn-primary text-nowrap" title="@Loc["Break"]"
|
||||
@onclick="@Break"
|
||||
disabled="@(disabledByMachiningProject||!(localProjectService.PacePlayer.IsLocked||localProjectService.PacePlayer.IsFinished))">
|
||||
<span class="oi oi-media-stop me-1"></span>
|
||||
</button>
|
||||
|
||||
<button class="btn btn-primary text-nowrap" title="@Loc["Reset"]"
|
||||
disabled="@disabledByMachiningProject"
|
||||
@onclick="Reset">
|
||||
<span class="bi bi-backspace"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</code></pre><pre><code class="lang-csharp" name="SampleCode-razor.cs">using Hi.Common;
|
||||
using Hi.MachiningProcs;
|
||||
using Hi.Parallels;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
|
||||
namespace HiNcRcl.Areas.Player
|
||||
{
|
||||
public partial class PlayerButtonGroup : IAsyncDisposable
|
||||
{
|
||||
[Parameter]
|
||||
public string Tid { set; get; } = System.Guid.NewGuid().ToString();
|
||||
StringLocalizer Loc { get; } = new StringLocalizer(typeof(PlayerDiv));
|
||||
SemaphoreSlim DisposeSemaphore { get; } = new SemaphoreSlim(1);
|
||||
MachiningProject MachiningProject => hiNcHost.MachiningProject;
|
||||
LocalProjectService LocalProjectService => hiNcHost.LocalProjectService;
|
||||
bool disposedValue = false;
|
||||
/// <inheritdoc/>
|
||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||
{
|
||||
base.OnAfterRender(firstRender);
|
||||
if (firstRender)
|
||||
{
|
||||
using var _ = await DisposeSemaphore.EmbraceAsync();
|
||||
if (disposedValue) return;
|
||||
LocalProjectService.PacePlayer.IsLockedChangedEvent
|
||||
+= EnumerablePlayer_IsLockedEventHandler;
|
||||
LocalProjectService.PacePlayer.IsRunningChangedEvent
|
||||
+= EnumerablePlayer_IsLockedEventHandler;
|
||||
LocalProjectService.PacePlayer.IsFinishedChangedEvent
|
||||
+= EnumerablePlayer_IsLockedEventHandler;
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public async ValueTask DisposeAsync()
|
||||
{
|
||||
using var _ = await DisposeSemaphore.EmbraceAsync();
|
||||
LocalProjectService.PacePlayer.IsLockedChangedEvent
|
||||
-= EnumerablePlayer_IsLockedEventHandler;
|
||||
LocalProjectService.PacePlayer.IsRunningChangedEvent
|
||||
-= EnumerablePlayer_IsLockedEventHandler;
|
||||
LocalProjectService.PacePlayer.IsFinishedChangedEvent
|
||||
-= EnumerablePlayer_IsLockedEventHandler;
|
||||
disposedValue = true;
|
||||
await ValueTask.CompletedTask;
|
||||
}
|
||||
|
||||
private void EnumerablePlayer_IsLockedEventHandler(bool obj)
|
||||
{
|
||||
InvokeAsync(StateHasChanged).ConfigureAwait(false);
|
||||
}
|
||||
public async Task StartOrContinue()
|
||||
{
|
||||
await Task.Run(() =>
|
||||
{
|
||||
var pacePlayer = LocalProjectService.PacePlayer;
|
||||
if (!pacePlayer.IsLocked)
|
||||
{
|
||||
pacePlayer.Start();
|
||||
}
|
||||
else if (!pacePlayer.IsRunning
|
||||
&& !pacePlayer.IsFinished)
|
||||
{
|
||||
pacePlayer.Resume();
|
||||
}
|
||||
}).ShowIfCatched(this);
|
||||
}
|
||||
public async Task Pause()
|
||||
{
|
||||
await Task.Run(() =>
|
||||
{
|
||||
LocalProjectService.PacePlayer.Pause();
|
||||
}).ShowIfCatched(this);
|
||||
}
|
||||
public async Task RunToLineEnd()
|
||||
{
|
||||
await Task.Run(() =>
|
||||
{
|
||||
LocalProjectService.NcRunner.RunToLineEnd();
|
||||
}).ShowIfCatched(this);
|
||||
}
|
||||
public async Task RunToNextPace()
|
||||
{
|
||||
await Task.Run(() =>
|
||||
{
|
||||
LocalProjectService.PacePlayer.RunToNextPace();
|
||||
}).ShowIfCatched(this);
|
||||
}
|
||||
public async Task Break()
|
||||
{
|
||||
await Task.Run(() =>
|
||||
{
|
||||
LocalProjectService.PacePlayer.Terminate();
|
||||
}).ShowIfCatched(this);
|
||||
}
|
||||
public async Task Reset()
|
||||
{
|
||||
await Task.Run(() =>
|
||||
{
|
||||
LocalProjectService.PacePlayer.Reset();
|
||||
}).ShowIfCatched(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
</code></pre>
|
||||
</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>
|
||||
@@ -0,0 +1,149 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Selected-Step Info Panel | HiAPI-C# 2025 </title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="title" content="Selected-Step Info 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">
|
||||
|
||||
<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="selected-step-info-panel">Selected-Step Info Panel</h1>
|
||||
|
||||
<p>The panel locates on the <a href="index.html">Player Panel</a>.</p>
|
||||
<p>The model is <a class="xref" href="../../../api/Hi.MachiningSteps.MachiningStep.html">MachiningStep</a> and <a class="xref" href="../../../api/Hi.HiNcKits.UserService.html">UserService</a>.</p>
|
||||
<p>The <a class="xref" href="../../../api/Hi.MachiningSteps.MachiningStep.html">MachiningStep</a> is assigned by <a class="xref" href="../../../api/Hi.MachiningProcs.LocalProjectService.html#Hi_MachiningProcs_LocalProjectService_ClStrip">ClStrip</a>.<a class="xref" href="../../../api/Hi.CutterLocations.ClStrips.ClStrip.html#Hi_CutterLocations_ClStrips_ClStrip_PosSelected">PosSelected</a>.</p>
|
||||
<p>Show step infomation from <a class="xref" href="../../../api/Hi.HiNcKits.UserService.html#Hi_HiNcKits_UserService_DisplayedStepPresentAccessList">DisplayedStepPresentAccessList</a>.</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>
|
||||
<p>See Also <a href="../preference/step-present-preference-page.html">Step Present Preference Page</a>.</p>
|
||||
<h2 id="sample-code">Sample Code</h2>
|
||||
<p>Refer the code to show step infomation.</p>
|
||||
<pre><code class="lang-csharp" name="SampleCode-ShowStepPresent">internal static void ShowStepPresent(
|
||||
UserService userEnv, MachiningStep machiningStep)
|
||||
{
|
||||
foreach (var entry in userEnv.DisplayedStepPresentAccessList)
|
||||
{
|
||||
var present = entry.Value.Present;
|
||||
var valueText = string.Format("{0:" + present.DataFormatString + "}", entry.Value.GetValueFunc.Invoke(machiningStep));
|
||||
Console.WriteLine($"{present.ShortName}: {valueText} {present.TailUnitString} ({present.Name} [{entry.Key}])");
|
||||
}
|
||||
}
|
||||
</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.CutterLocations.ClStrips.ClStrip.html#Hi_CutterLocations_ClStrips_ClStrip_PosSelected">PosSelected</a> and <a class="xref" href="../../../api/Hi.CutterLocations.ClStrips.ClStrip.html#Hi_CutterLocations_ClStrips_ClStrip_MachiningStepSelected">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>
|
||||
<li>Play/SelectedStepInfoPanel</li>
|
||||
</ul>
|
||||
<h3 id="web-page-application-source-code-path">Web Page Application Source Code Path</h3>
|
||||
<ul>
|
||||
<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>
|
||||
|
||||
<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>
|
||||
Reference in New Issue
Block a user