huyunan 2 years ago
parent e0d2ece833
commit e93fbab44e

@ -343,20 +343,18 @@ Step 2.12: if c == CMD_QUIT then 退出
![](pictures/main_chart.drawio.svg)
#### save_data
Step 1: 输入文件名
Step 2: 打开文件
Step 3: if 打开文件失败 then 提示打开文件失败并结束
Step 4: 将所有库存记录写入文件
Step 5: 关闭文件
![](pictures/data.drawio.svg)
#### make_chart
Step 1: 读取文件
Step 2: 显示图表
![](pictures/make_chart.drawio.svg)
#### confirm
Step 1: 输出 确定要退出吗
Step 2: if 确认 then 退出
![](pictures/confirm.drawio.svg)
![](pictures/make_chart.drawio.svg)

@ -0,0 +1,170 @@
<svg host="65bd71144e" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="351px" height="721px" viewBox="-0.5 -0.5 351 721" content="&lt;mxfile&gt;&lt;diagram id=&quot;upyrMhvOQVLzjFjaz9En&quot; name=&quot;Page-1&quot;&gt;1Vldc5s4FP01ekyHD4PhERzcvuxMZvKw7VNHNQpoKyNWyLHZX19JSAYMbnCDvY4nE0tHFwnde+7RBQN3tT18ZrDM/6IpIsCx0gNwH4HjuK4j/kugbgDPdxsgYzhtILsFnvF/SIOWRnc4RVXPkFNKOC774IYWBdrwHgYZo/u+2Qsl/VVLmKEB8LyBZIj+jVOeN2jgWS3+BeEsNyvblh7ZQmOsgSqHKd13IDcB7opRypvW9rBCRPrO+KW5bn1m9HhjDBV8ygXL5oJXSHZ6b/q+eG02i1Kxd90taCG+4pxviejZollxRn+iFSWUKXPXUh8x8kILPoY3C8hZz96zhiq6Yxttpe+LQ5YhbeUf/SV4hugWcVYLE4YI5Pi1PzvUEc+Odq1TREP7ZdxHzoiPfML1FhXNzC79f3cycnG73w7kZ/K7gq/oewo5NJOI5Zt5mvGh/wkRvJZu3+eYo+cSKp/sRWb1Q/GCCek4fK0+vw2R3hhiHB1+H4yhm00uayLrTPZ1d9+mhW2wvJMSofX+uIQfhbv+kLvBjbjrz8pdkAQgTkDogsQDgQciDyQ+CH0QLEGyAHEMYl8OiegGj1P5zeiuSFGqY3KPHF/0OW4HIyRfjJB8OQPJ7TH1uUuWB0OW22f8OjvNg5lpLhgdaprHKyDiPaT5xeotjvpSghtCd+k1mN5PpBl47/R574zxfnklcbfHlOsueW+bCrRLfO9GxDeL35L50iaQGi8PgQiEa5CspbFoTJX8nG5/7KrrJ0FjZ2r0udLC66WFG96w5rE/TNFjeyNpcauyxyw+khYpfu25y6SA4AN/gARnBXAjYfHPruL4pW6S4zRN9FxVCYvRyX7Azc9MUfFB55+cEheYY0jGp5RZFcm/Noea6ftL6qx+35J/JApaC1ayLdUh0jIRPYIwkJVhlIBYiUIsEE+pg7APx2pFH0Q2iNyzenGEVbTOqIg5UHN0gBkVYYtLxLDgCmIt+mQgZ4raHJB523AnR7Db1xrPmlh6BnNozfJCaUEHzL922t9E2/rk6d6j3JJlOrXu/K9ydKtT2llcV7UNZ5353TZS1TvurVT8zbJ+KINy4KFS/pD6Zzvl4Z3ip9QrFlIn6qKlVLs/fha4/yfd07c59ojceFd60r04J8SeWP1VaUzo+QbQouOEBmh1R/Xqbu+pc2C8rUbXSzPzpDXrw7O6NGIM1h2DkuKCV52ZnyTQYYDdp8DCDU6C2MzYhvR4a9Oi7H0Q5eu8jn+H+wf+Pf4UUJvMOUmdhgL6qtbxF8fxzDqzxdF6S5svrzHX6qFSaOxCVpeTHkU9ZWyrF5MLWWNOlGJTOwoSQEIQoRmD25MKsjfWUYoPWEaeCvvkOnIWYXcnVD/X+5Fj/pr8JLOueEiKbvtbYJOl7Q+qbvIL&lt;/diagram&gt;&lt;/mxfile&gt;">
<defs/>
<g>
<path d="M 90 90 L 90 113.63" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 90 118.88 L 86.5 111.88 L 90 113.63 L 93.5 111.88 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
<ellipse cx="90" cy="45" rx="80" ry="45" fill="#ffffff" stroke="#000000" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 158px; height: 1px; padding-top: 45px; margin-left: 11px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
<font color="#000000">
save_data
</font>
</div>
</div>
</div>
</foreignObject>
<text x="90" y="49" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
save_data
</text>
</switch>
</g>
<path d="M 88.41 190 L 87.33 213.65" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 87.1 218.9 L 83.92 211.74 L 87.33 213.65 L 90.91 212.06 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
<rect x="20" y="120" width="140" height="70" rx="10.5" ry="10.5" fill="#ffffff" stroke="#000000" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 138px; height: 1px; padding-top: 155px; margin-left: 21px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
<font color="#000000">
输入文件名
</font>
</div>
</div>
</div>
</foreignObject>
<text x="90" y="159" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
输入文件名
</text>
</switch>
</g>
<path d="M 85 310 L 85 323.63" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 85 328.88 L 81.5 321.88 L 85 323.63 L 88.5 321.88 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
<path d="M 42.5 242.5 C 8.5 242.5 0 265 27.2 269.5 C 0 279.4 30.6 301 52.7 292 C 68 310 119 310 136 292 C 170 292 170 274 148.75 265 C 170 247 136 229 106.25 238 C 85 224.5 51 224.5 42.5 242.5 Z" fill="#ffffff" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 168px; height: 1px; padding-top: 265px; margin-left: 1px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
<font color="#000000">
打开文件
</font>
</div>
</div>
</div>
</foreignObject>
<text x="85" y="269" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
打开文件
</text>
</switch>
</g>
<path d="M 85 420 L 85 433.63" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 85 438.88 L 81.5 431.88 L 85 433.63 L 88.5 431.88 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
<path d="M 45 352.5 L 76.28 334.9 Q 85 330 93.72 334.9 L 156.28 370.1 Q 165 375 156.28 379.9 L 93.72 415.1 Q 85 420 76.28 415.1 L 13.72 379.9 Q 5 375 13.72 370.1 Z" fill="#ffffff" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 158px; height: 1px; padding-top: 375px; margin-left: 6px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
<font color="#000000">
打开文件成功?
</font>
</div>
</div>
</div>
</foreignObject>
<text x="85" y="379" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
打开文件成功?
</text>
</switch>
</g>
<path d="M 85 520 L 85 543.63" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 85 548.88 L 81.5 541.88 L 85 543.63 L 88.5 541.88 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
<path d="M 25 460 L 30.53 448.94 Q 35 440 45 440 L 125 440 Q 135 440 139.47 448.94 L 150.53 471.06 Q 155 480 150.53 488.94 L 139.47 511.06 Q 135 520 125 520 L 45 520 Q 35 520 30.53 511.06 L 19.47 488.94 Q 15 480 19.47 471.06 Z" fill="#ffffff" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 138px; height: 1px; padding-top: 480px; margin-left: 16px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
<div style="text-align: justify;">
<span style="background-color: initial;">
</span>
<font color="#000000" style="background-color: initial;">
所有库存记录写入文档
</font>
</div>
</div>
</div>
</div>
</foreignObject>
<text x="85" y="484" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
把所有库存记录写入文档
</text>
</switch>
</g>
<path d="M 155 480 L 166.06 474.47 Q 175 470 175 480 L 175 485 Q 175 490 166.32 489.04 L 157.64 488.07" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 152.43 487.49 L 159.77 484.79 L 157.64 488.07 L 159 491.74 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
<path d="M 85 620 L 85 643.63" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 85 648.88 L 81.5 641.88 L 85 643.63 L 88.5 641.88 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
<rect x="10" y="550" width="150" height="70" rx="10.5" ry="10.5" fill="#ffffff" stroke="#000000" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 148px; height: 1px; padding-top: 585px; margin-left: 11px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
<font color="#000000" style="font-size: 12px;">
关闭文件
</font>
</div>
</div>
</div>
</foreignObject>
<text x="85" y="589" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
关闭文件
</text>
</switch>
</g>
<path d="M 283.61 440 L 288.97 387.95 Q 290 378 280 377.97 L 164.33 377.63" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 159.08 377.61 L 166.09 374.13 L 164.33 377.63 L 166.07 381.13 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
<path d="M 280 510 L 280 630 Q 280 640 270 640 L 86.37 640" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 81.12 640 L 88.12 636.5 L 86.37 640 L 88.12 643.5 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
<path d="M 270 510 L 220 510 Q 210 510 212.75 500.38 L 227.25 449.62 Q 230 440 240 440 L 340 440 Q 350 440 347.25 449.62 L 332.75 500.38 Q 330 510 320 510 Z" fill="#ffffff" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 138px; height: 1px; padding-top: 475px; margin-left: 211px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
<font color="#000000">
提示打开文件失败
</font>
</div>
</div>
</div>
</foreignObject>
<text x="280" y="479" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
提示打开文件失败
</text>
</switch>
</g>
<ellipse cx="85" cy="685" rx="75" ry="35" fill="#ffffff" stroke="#000000" pointer-events="all"/>
</g>
<switch>
<g requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"/>
<a transform="translate(0,-5)" xlink:href="https://www.diagrams.net/doc/faq/svg-export-text-problems" target="_blank">
<text text-anchor="middle" font-size="10px" x="50%" y="100%">
Text is not SVG - cannot display
</text>
</a>
</switch>
</svg>

After

Width:  |  Height:  |  Size: 16 KiB

Loading…
Cancel
Save