Ingen beskrivning
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

TEST.html 6.0KB

1234567891011121314151617181920212223242526
  1. <!DOCTYPE html>
  2. <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta charset="utf-8" />
  5. <title></title>
  6. </head>
  7. <body>
  8. <!-- 你的 mxGraph 內容 -->
  9. <div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="{&quot;highlight&quot;:&quot;#0000ff&quot;,&quot;lightbox&quot;:false,&quot;nav&quot;:true,&quot;toolbar&quot;:&quot;layers tags&quot;,&quot;edit&quot;:&quot;_blank&quot;,&quot;xml&quot;:&quot;&lt;mxfile host=\&quot;app.diagrams.net\&quot; agent=\&quot;Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36\&quot; version=\&quot;24.7.17\&quot;&gt;\n &lt;diagram id=\&quot;oUtavoNLKrpO5Gr4NNbx\&quot; name=\&quot;第1頁\&quot;&gt;\n &lt;mxGraphModel dx=\&quot;6112\&quot; dy=\&quot;738\&quot; grid=\&quot;1\&quot; gridSize=\&quot;10\&quot; guides=\&quot;1\&quot; tooltips=\&quot;1\&quot; connect=\&quot;1\&quot; arrows=\&quot;1\&quot; fold=\&quot;1\&quot; page=\&quot;1\&quot; pageScale=\&quot;1\&quot; pageWidth=\&quot;2339\&quot; pageHeight=\&quot;3300\&quot; math=\&quot;0\&quot; shadow=\&quot;0\&quot;&gt;\n &lt;root&gt;\n &lt;mxCell id=\&quot;0\&quot; /&gt;\n &lt;mxCell id=\&quot;1\&quot; parent=\&quot;0\&quot; /&gt;\n &lt;mxCell id=\&quot;9wPmYFGd17N9ljJS7hFW-11\&quot; value=\&quot;\&quot; style=\&quot;edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;\&quot; parent=\&quot;1\&quot; source=\&quot;9wPmYFGd17N9ljJS7hFW-1\&quot; target=\&quot;9wPmYFGd17N9ljJS7hFW-2\&quot; edge=\&quot;1\&quot;&gt;\n &lt;mxGeometry relative=\&quot;1\&quot; as=\&quot;geometry\&quot; /&gt;\n &lt;/mxCell&gt;\n &lt;mxCell id=\&quot;9wPmYFGd17N9ljJS7hFW-12\&quot; style=\&quot;edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;\&quot; parent=\&quot;1\&quot; source=\&quot;9wPmYFGd17N9ljJS7hFW-1\&quot; target=\&quot;9wPmYFGd17N9ljJS7hFW-3\&quot; edge=\&quot;1\&quot;&gt;\n &lt;mxGeometry relative=\&quot;1\&quot; as=\&quot;geometry\&quot; /&gt;\n &lt;/mxCell&gt;\n &lt;mxCell id=\&quot;9wPmYFGd17N9ljJS7hFW-13\&quot; style=\&quot;edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;\&quot; parent=\&quot;1\&quot; source=\&quot;9wPmYFGd17N9ljJS7hFW-1\&quot; target=\&quot;9wPmYFGd17N9ljJS7hFW-4\&quot; edge=\&quot;1\&quot;&gt;\n &lt;mxGeometry relative=\&quot;1\&quot; as=\&quot;geometry\&quot; /&gt;\n &lt;/mxCell&gt;\n &lt;object label=\&quot;&amp;lt;font style=&amp;quot;font-size: 14px&amp;quot;&amp;gt;主倉&amp;lt;/font&amp;gt;\&quot; placeholders=\&quot;1\&quot; link=\&quot;TEST.html\&quot; id=\&quot;9wPmYFGd17N9ljJS7hFW-1\&quot;&gt;\n &lt;mxCell style=\&quot;rounded=0;whiteSpace=wrap;html=1;fillColor=#ffe6cc;strokeColor=#d79b00;imageVerticalAlign=bottom;container=0;imageAlign=left;\&quot; parent=\&quot;1\&quot; vertex=\&quot;1\&quot;&gt;\n &lt;mxGeometry x=\&quot;-3830\&quot; y=\&quot;110\&quot; width=\&quot;120\&quot; height=\&quot;50\&quot; as=\&quot;geometry\&quot; /&gt;\n &lt;/mxCell&gt;\n &lt;/object&gt;\n &lt;mxCell id=\&quot;9wPmYFGd17N9ljJS7hFW-2\&quot; value=\&quot;&amp;lt;font style=&amp;quot;font-size: 14px&amp;quot;&amp;gt;區域倉2&amp;lt;/font&amp;gt;\&quot; style=\&quot;rounded=0;whiteSpace=wrap;html=1;fillColor=#ffe6cc;strokeColor=#d79b00;imageVerticalAlign=bottom;\&quot; parent=\&quot;1\&quot; vertex=\&quot;1\&quot;&gt;\n &lt;mxGeometry x=\&quot;-3830\&quot; y=\&quot;200\&quot; width=\&quot;120\&quot; height=\&quot;50\&quot; as=\&quot;geometry\&quot; /&gt;\n &lt;/mxCell&gt;\n &lt;mxCell id=\&quot;9wPmYFGd17N9ljJS7hFW-3\&quot; value=\&quot;&amp;lt;font style=&amp;quot;font-size: 14px&amp;quot;&amp;gt;區域倉1&amp;lt;/font&amp;gt;\&quot; style=\&quot;rounded=0;whiteSpace=wrap;html=1;fillColor=#ffe6cc;strokeColor=#d79b00;imageVerticalAlign=bottom;\&quot; parent=\&quot;1\&quot; vertex=\&quot;1\&quot;&gt;\n &lt;mxGeometry x=\&quot;-4110\&quot; y=\&quot;200\&quot; width=\&quot;120\&quot; height=\&quot;50\&quot; as=\&quot;geometry\&quot; /&gt;\n &lt;/mxCell&gt;\n &lt;mxCell id=\&quot;9wPmYFGd17N9ljJS7hFW-4\&quot; value=\&quot;&amp;lt;font style=&amp;quot;font-size: 14px&amp;quot;&amp;gt;區域倉3&amp;lt;/font&amp;gt;\&quot; style=\&quot;rounded=0;whiteSpace=wrap;html=1;fillColor=#ffe6cc;strokeColor=#d79b00;imageVerticalAlign=bottom;imageWidth=24;imageHeight=24;absoluteArcSize=0;fillOpacity=100;labelPadding=0;\&quot; parent=\&quot;1\&quot; vertex=\&quot;1\&quot;&gt;\n &lt;mxGeometry x=\&quot;-3550\&quot; y=\&quot;200\&quot; width=\&quot;120\&quot; height=\&quot;50\&quot; as=\&quot;geometry\&quot; /&gt;\n &lt;/mxCell&gt;\n &lt;mxCell id=\&quot;-eopDtIoViULOqzQd3KI-1\&quot; value=\&quot;\&quot; style=\&quot;rounded=0;whiteSpace=wrap;html=1;strokeColor=#d79b00;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=12;fontColor=default;fillColor=#ffe6cc;gradientColor=#FF6666;imageVerticalAlign=bottom;\&quot; vertex=\&quot;1\&quot; parent=\&quot;1\&quot;&gt;\n &lt;mxGeometry x=\&quot;-4110\&quot; y=\&quot;102\&quot; width=\&quot;120\&quot; height=\&quot;60\&quot; as=\&quot;geometry\&quot; /&gt;\n &lt;/mxCell&gt;\n &lt;/root&gt;\n &lt;/mxGraphModel&gt;\n &lt;/diagram&gt;\n&lt;/mxfile&gt;\n&quot;}"></div>
  10. <script type="text/javascript" src="https://viewer.diagrams.net/js/viewer-static.min.js"></script>
  11. <script>
  12. document.addEventListener("click", function (event) {
  13. const target = event.target;
  14. // 檢查是否點擊到 mxCell(圖塊)
  15. if (target.closest(".mxCell")) {
  16. const cell = target.closest(".mxCell");
  17. const id = cell.getAttribute("id"); // 獲取圖塊的 ID
  18. // 發送消息到 VB.NET 應用
  19. window.cefSharp.SendMessage(id); // 這裡傳遞 ID
  20. }
  21. });</script>
  22. </body>
  23. </html>