refactor: 全窗口统一 Avalonia,移除 Flutter/Dart,新增 Java 实现
PR 审核 / 后端编译 (pull_request) Waiting to run
PR 审核 / 前端检查(Flutter) (pull_request) Waiting to run
PR 审核 / 安全扫描 (pull_request) Waiting to run

- 恢复同代 GC Avalonia 主界面(主页/下载/设置/关于)替换 Flutter
- 模型窗口统一 Avalonia;HTML 课件用 WebView.Avalonia 内嵌渲染
- 新增 CoursewareServer(回环 HTTP + Range)与 CoursewareWindow
- 彻底移除 Flutter/Dart 前端及构建脚本相关逻辑
- 新增 ./build.sh run 开发运行命令
- 项目源码整理到 C#/ 子目录,新增 Java/ 实现
- 工作日志随项目迁移
This commit is contained in:
Morris committed 2026-11-27 10:09:30 +08:00
1 parent 3f1f48f54c
commit cf05e886ac
405 files changed
+18226 -19263

No files matched your search

@@ -0,0 +1,37 @@
{
"schemaVersion": 1,
"id": "scale-calculator",
"name": "Scale Calculator",
"nameI18n": {
"zh-CN": "比例尺计算器",
"en": "Scale Calculator"
},
"author": "Morris GC",
"description": "把比例尺变成可以拖、可以量的可视化标尺",
"descriptionI18n": {
"zh-CN": "三种求解模式、图上/实地双条对比、线段式比例尺自动换挡、比例尺光谱、真实地标实地尺与练习闯关。",
"en": "Three solve modes, dual map/real bars, auto-ranging graphic scale, scale spectrum, real-world landmarks and practice quizzes."
},
"tags": [
"geography",
"map",
"scale",
"calculator"
],
"entry": "scales.json",
"license": "MIT",
"assembly": "ScaleCalculatorModel.dll",
"type": "GC.ScaleCalculator.ScaleCalculatorFactory",
"preview": "preview.png",
"apiVersion": 1,
"version": "1.6",
"chrome": {
"titleBar": "#FFFFFF",
"titleBorder": "#E3E8F3",
"titleText": "#111A2E",
"button": "#5B6A86",
"frame": "#F4F6FB"
},
"build": "105653737d",
"updatedAt": "2026-11-21T10:55:36Z"
}
@@ -0,0 +1,146 @@
{
"zh-CN": {
"title": "如何使用 · 比例尺计算器",
"sections": [
{
"h": "开始使用(跟着做)",
"lines": [
"第 1 步:顶部选「求实地距离」,此时蓝色卡是答案,另外两个是输入。",
"第 2 步:在「图上距离」里填 3,在「比例尺分母」里填 100000。",
"第 3 步:看蓝色卡算出 3 千米 —— 再点「解题步骤」核对每一步。",
"第 4 步:改成「求比例尺」,把实地距离填成 6 千米,看分母怎么翻倍。",
"第 5 步:拖动中间标尺的滑块,观察蓝色条(图上)与绿色条(实地)的长度关系。",
"第 6 步:滚到底部「练习闯关」,自己做一道,答错会自动展开步骤。",
"算不出来?先检查单位:填了 km 就不要再按 cm 算,模型会自动换算。"
]
},
{
"h": "一、核心公式(先记住这一条)",
"lines": [
"比例尺 = 图上距离 ÷ 实地距离,写作 1 : N。",
"N 是分母,含义是「实地距离是图上距离的 N 倍」,两句都必须统一成同一单位。",
"三个变形:实地 = 图上 × N;图上 = 实地 ÷ N;N = 实地 ÷ 图上。",
"单位换算:1 m = 100 cm,1 km = 1000 m = 100000 cm(km 化 cm 加 5 个 0)。"
]
},
{
"h": "二、三种求解模式",
"lines": [
"顶部三个按钮选「求实地距离 / 求图上距离 / 求比例尺」。",
"选中的那一项会变成蓝色结果卡(只读),另外两项留作输入。",
"拖动滑块或直接输入数字,三栏读数与中栏标尺实时联动。",
"「重置」回到 3 cm / 1:100000 / 3 km 的初始例子。"
]
},
{
"h": "三、中栏可视化标尺",
"lines": [
"上条(蓝)是图上距离,按真实厘米画刻度。",
"下条(绿)是同一段实地距离按当前比例尺压缩后的长度,与上方同宽。",
"线段式比例尺会按 1/2/5×10ⁿ 自动换挡,任何比例尺都画得下。",
"比例尺光谱把 1:1千 到 1:10亿 排在对数轴上,当前值用指针标出。",
"若超出图幅,会提示「需要更小的比例尺」——这正是选图幅的教学点。"
]
},
{
"h": "四、三种写法与解题步骤",
"lines": [
"数字式 1 : N;文字式「图上 1 厘米代表实地 …」;线段式(图形刻度)。",
"右栏三者实时联动,可直接抄到作业里。",
"「解题步骤」可展开:① 统一单位 → ② 列公式 → ③ 代入 → ④ 得数 → ⑤ 换算合适单位。",
"「大小判读」卡:大 / 中 / 小比例尺 +「分母越大 → 比例尺越小 → 范围越大 → 越简略」。"
]
},
{
"h": "五、实地尺与练习",
"lines": [
"「实地尺」内置教室 10 m、操场 400 m、马拉松 42.195 km、京沪 1080 km、赤道 4 万 km。",
"改变比例尺,看这段真实距离画到图上是多长(或画不下 / 几乎看不见)。",
"「练习闯关」随机出三类题,填数字后回车或点「检查」,答错展开完整解题步骤。",
"连对计数会一直累计,答错清零。"
]
},
{
"h": "六、易错点",
"lines": [
"忘记统一单位:km 必须 ×100000 变成 cm 才能代入。",
"「放大 2 倍」是分母 ÷ 2(比例尺变大),不是 × 2。",
"图上距离与实地距离别代反了;N 是「实地是图上的几倍」。",
"比例尺是比值,没有单位;说「比例尺越大」指的是比值越大、分母越小。"
]
}
]
},
"en": {
"title": "How to use · Scale Calculator",
"sections": [
{
"h": "Getting started (follow along)",
"lines": [
"Step 1: choose Find real distance at the top — the blue card is the answer, the other two are inputs.",
"Step 2: enter 3 as the map distance and 100000 as the scale denominator.",
"Step 3: the blue card shows 3 km — open Worked steps and check each line.",
"Step 4: switch to Find scale, set the real distance to 6 km, and watch the denominator change.",
"Step 5: drag the ruler slider and compare the blue bar (map) with the green bar (real).",
"Step 6: scroll to Practice and try one; a wrong answer expands the full solution.",
"Stuck? Check your units first — the model converts automatically, so don't mix km and cm."
]
},
{
"h": "1. The core formula",
"lines": [
"Scale = map distance ÷ real distance, written 1 : N.",
"N is the denominator: the real distance is N times the map distance — both must share one unit.",
"Three forms: real = map × N; map = real ÷ N; N = real ÷ map.",
"Unit conversions: 1 m = 100 cm, 1 km = 1000 m = 100000 cm (add five zeros)."
]
},
{
"h": "2. Three solve modes",
"lines": [
"Pick Find real distance / Find map distance / Find scale at the top.",
"The chosen one becomes the blue read-only result card; the other two stay as inputs.",
"Drag a slider or type a number — all three columns and the ruler update live.",
"Reset returns to the default 3 cm / 1:100000 / 3 km example."
]
},
{
"h": "3. The visual ruler",
"lines": [
"The blue bar is the map distance in real centimetres.",
"The green bar is the same real distance compressed by the current scale — same width.",
"The graphic scale auto-ranges over 1/2/5×10ⁿ so it always fits.",
"The spectrum places 1:1k … 1:1B on a log axis with a pointer at the current value.",
"Overflow warns “use a smaller scale” — that IS the lesson on choosing a sheet size."
]
},
{
"h": "4. Three notations & worked steps",
"lines": [
"Numeric 1:N; verbal “1 cm on the map = … on the ground”; graphic bar scale.",
"All three stay in sync and can be copied straight into homework.",
"Expand Worked steps: unify units → formula → substitute → result → convert unit.",
"The grade card: large / medium / small scale and “bigger denominator → smaller scale → larger area → less detail”."
]
},
{
"h": "5. Real-world ruler & practice",
"lines": [
"Built-in distances: classroom 10 m, track 400 m, marathon 42.195 km, Beijing–Shanghai 1080 km, equator 40,000 km.",
"Change the scale to see how long each becomes on paper (or that it won't fit / is invisible).",
"Practice generates three question types; type a number and press Enter or Check; wrong answers reveal full steps.",
"The streak counter accumulates and resets on a wrong answer."
]
},
{
"h": "6. Common mistakes",
"lines": [
"Forgetting to unify units: km ×100000 → cm before substituting.",
"“Zoom 2×” means denominator ÷ 2 (a larger scale), not × 2.",
"Don't swap map and real distance; N means “how many times the map length the real length is”.",
"A scale is a ratio with no unit; “larger scale” means a larger ratio, i.e. a SMALLER denominator."
]
}
]
}
}
@@ -0,0 +1,106 @@
{
"app.title": "Scale Calculator",
"app.subtitle": "Turn map-distance ÷ real-distance into a ruler you can drag and measure",
"mode.real": "Find real distance",
"mode.map": "Find map distance",
"mode.scale": "Find scale",
"mode.hint": "Pick what to solve; the blue card is the answer",
"input.title": "Given",
"input.map": "Map distance",
"input.real": "Real distance",
"input.scale": "Scale denominator N",
"input.nPrefix": "1 :",
"input.unit": "Unit",
"input.reset": "Reset",
"input.presets": "Common scales",
"input.dragHint": "Drag the slider or type a number — everything updates live",
"result.title": "Result",
"result.real": "Real distance",
"result.map": "Map distance",
"result.scale": "Scale",
"result.formula": "Formula",
"forms.title": "Three ways to write a scale",
"forms.digital": "Numeric",
"forms.verbal": "Verbal",
"forms.segment": "Graphic (bar)",
"forms.verbalTpl": "1 cm on the map = {0} on the ground",
"forms.segmentDesc": "Each division {0}, {1} divisions",
"steps.title": "Worked solution",
"steps.show": "Show steps",
"steps.hide": "Hide steps",
"steps.1.unify": "① Unify units: convert the real distance to cm (1 km = 100000 cm)",
"steps.2.formulaReal": "② Real distance = map distance × scale denominator",
"steps.2.formulaMap": "② Map distance = real distance ÷ scale denominator",
"steps.2.formulaScale": "② Scale denominator = real distance ÷ map distance",
"steps.3.substitute": "③ Substitute: {0}",
"steps.4.result": "④ Result: {0}",
"steps.5.convert": "⑤ Convert to a sensible unit (cm → m → km)",
"grade.title": "Large / small scale",
"grade.large": "Large scale",
"grade.medium": "Medium scale",
"grade.small": "Small scale",
"grade.largeNote": "Small area · detailed · e.g. campus plan",
"grade.mediumNote": "Medium area · e.g. city map",
"grade.smallNote": "Large area · simplified · e.g. world map",
"grade.rule": "Bigger denominator → smaller scale → larger area → less detail",
"pit.title": "Common mistakes",
"pit.1": "① Forgetting to unify units: km ×100000 = cm",
"pit.2": "② \"Zoom 2×\" means denominator ÷ 2, not × 2",
"pit.3": "③ Don't swap map distance and real distance",
"field.title": "Real-world ruler · how long on the map",
"field.hint": "Pick a real distance and change the scale to see its map length",
"field.mapLength": "On map {0}",
"field.tooLong": "too long",
"field.tooShort": "barely visible",
"quiz.title": "Practice",
"quiz.promptReal": "Scale 1:{0}, map distance {1} cm — what is the real distance? (enter the number in the shown unit)",
"quiz.promptMap": "Scale 1:{0}, real distance {1} — what is the map distance in cm?",
"quiz.promptScale": "{0} cm on the map = {1} on the ground — what is the scale denominator?",
"quiz.answer": "Your answer",
"quiz.check": "Check",
"quiz.next": "Next",
"quiz.correct": "✓ Correct!",
"quiz.wrong": "✗ Try again — read the steps",
"quiz.streak": "{0} in a row",
"quiz.showSteps": "Show solution",
"quiz.unit": "Unit: {0}",
"ruler.title": "Visual ruler",
"ruler.mapBar": "Map distance (real cm)",
"ruler.realBar": "Real distance (compressed by the same scale)",
"ruler.sameWidth": "same width as above",
"ruler.equals": "equals",
"ruler.segment": "Graphic scale",
"ruler.segmentHint": "auto-ranging ticks",
"ruler.spectrum": "Scale spectrum",
"ruler.scopeUp": "◀ larger area",
"ruler.detailDown": "more detail ▶",
"ruler.hint": "Blue is the real map length; green is the same real distance compressed by the scale",
"ruler.overflowMap": "This map distance overflows the sheet — use a smaller scale",
"ruler.overflowReal": "This real distance won't fit at this scale — use a smaller scale",
"unit.cm": "cm",
"unit.m": "m",
"unit.km": "km",
"unit.none": "(unitless)",
"spec.campus": "Campus",
"spec.city": "City",
"spec.china": "China",
"spec.world": "World",
"preset.campus": "Campus 1:10k",
"preset.campusNote": "Buildings clearly drawn",
"preset.town": "Town 1:50k",
"preset.townNote": "Villages and roads",
"preset.city": "City 1:250k",
"preset.cityNote": "Urban area and arterials",
"preset.province": "Province 1:1M",
"preset.provinceNote": "Cities and rivers",
"preset.china": "China 1:10M",
"preset.chinaNote": "Province outlines",
"preset.world": "World 1:100M",
"preset.worldNote": "Continents & oceans",
"lm.classroom": "Classroom 10 m",
"lm.track": "Running track 400 m",
"lm.marathon": "Marathon 42.195 km",
"lm.beijingShanghai": "Beijing–Shanghai 1080 km",
"lm.equator": "Equator 40,000 km",
"common.footer": "Scale = map distance ÷ real distance · unify units first · bigger denominator = smaller scale"
}
@@ -0,0 +1,106 @@
{
"app.title": "比例尺计算器",
"app.subtitle": "把「图上距离 ÷ 实地距离」变成可以拖、可以量的可视化标尺",
"mode.real": "求实地距离",
"mode.map": "求图上距离",
"mode.scale": "求比例尺",
"mode.hint": "选择要求什么,蓝色结果卡就是答案",
"input.title": "已知量",
"input.map": "图上距离",
"input.real": "实地距离",
"input.scale": "比例尺分母 N",
"input.nPrefix": "1 :",
"input.unit": "单位",
"input.reset": "重置",
"input.presets": "常用比例尺",
"input.dragHint": "拖动滑块或直接输入数字,读数实时联动",
"result.title": "计算结果",
"result.real": "实地距离",
"result.map": "图上距离",
"result.scale": "比例尺",
"result.formula": "计算公式",
"forms.title": "比例尺的三种写法",
"forms.digital": "数字式",
"forms.verbal": "文字式",
"forms.segment": "线段式",
"forms.verbalTpl": "图上 1 厘米代表实地 {0}",
"forms.segmentDesc": "每格 {0},共 {1} 格",
"steps.title": "解题步骤",
"steps.show": "展开步骤",
"steps.hide": "收起步骤",
"steps.1.unify": "① 统一单位:把实地距离化成厘米(1 km = 100000 cm,去掉 5 个 0)",
"steps.2.formulaReal": "② 实地距离 = 图上距离 × 比例尺分母",
"steps.2.formulaMap": "② 图上距离 = 实地距离 ÷ 比例尺分母",
"steps.2.formulaScale": "② 比例尺分母 = 实地距离 ÷ 图上距离",
"steps.3.substitute": "③ 代入数值:{0}",
"steps.4.result": "④ 算出结果:{0}",
"steps.5.convert": "⑤ 换算成合适单位(cm → m → km)",
"grade.title": "大小判读",
"grade.large": "大比例尺",
"grade.medium": "中比例尺",
"grade.small": "小比例尺",
"grade.largeNote": "范围小 · 内容详细 · 如校园平面图",
"grade.mediumNote": "范围中等 · 如城市交通图",
"grade.smallNote": "范围大 · 内容简略 · 如世界地图",
"grade.rule": "分母越大 → 比例尺越小 → 范围越大 → 越简略",
"pit.title": "易错点",
"pit.1": "① 忘记统一单位:km 要 ×100000 才成 cm",
"pit.2": "② 「放大 2 倍」是分母 ÷ 2,不是 × 2",
"pit.3": "③ 图上距离与实地距离别代反了",
"field.title": "实地尺 · 这段距离画到图上多长",
"field.hint": "选一个真实距离,改变比例尺看它在图上的长度",
"field.mapLength": "图上 {0}",
"field.tooLong": "画不下",
"field.tooShort": "几乎看不见",
"quiz.title": "练习闯关",
"quiz.promptReal": "比例尺 1:{0},图上 {1} 厘米,实地距离是多少?(按提示单位填数字)",
"quiz.promptMap": "比例尺 1:{0},实地 {1},图上距离是多少厘米?",
"quiz.promptScale": "图上 {0} 厘米代表实地 {1},比例尺分母是多少?",
"quiz.answer": "输入答案",
"quiz.check": "检查",
"quiz.next": "下一题",
"quiz.correct": "✓ 答对了!",
"quiz.wrong": "✗ 再想想,看看解题步骤",
"quiz.streak": "连对 {0} 题",
"quiz.showSteps": "查看解题步骤",
"quiz.unit": "单位:{0}",
"ruler.title": "可视化标尺",
"ruler.mapBar": "图上距离(真实厘米)",
"ruler.realBar": "实地距离(按同一比例尺压缩)",
"ruler.sameWidth": "与上方同宽",
"ruler.equals": "等于",
"ruler.segment": "线段式比例尺",
"ruler.segmentHint": "刻度自动换挡",
"ruler.spectrum": "比例尺光谱",
"ruler.scopeUp": "◀ 范围越大",
"ruler.detailDown": "内容越详细 ▶",
"ruler.hint": "蓝色是图上真实长度;绿色是同一段实地按比例尺压缩后的长度",
"ruler.overflowMap": "这段图上距离超出图幅,需要更小的比例尺",
"ruler.overflowReal": "这段实地距离在该比例尺下画不下,需要更小的比例尺",
"unit.cm": "厘米",
"unit.m": "米",
"unit.km": "千米",
"unit.none": "(无单位)",
"spec.campus": "校园",
"spec.city": "城市",
"spec.china": "中国",
"spec.world": "世界",
"preset.campus": "校园 1:1万",
"preset.campusNote": "操场、教学楼都画得清",
"preset.town": "乡镇 1:5万",
"preset.townNote": "村镇与道路",
"preset.city": "城市 1:25万",
"preset.cityNote": "城区与主干道",
"preset.province": "省区 1:100万",
"preset.provinceNote": "地级市与河流",
"preset.china": "中国 1:1000万",
"preset.chinaNote": "省级轮廓",
"preset.world": "世界 1:1亿",
"preset.worldNote": "大洲大洋",
"lm.classroom": "教室 10 m",
"lm.track": "操场一圈 400 m",
"lm.marathon": "马拉松 42.195 km",
"lm.beijingShanghai": "北京—上海 1080 km",
"lm.equator": "赤道 4 万 km",
"common.footer": "比例尺 = 图上距离 ÷ 实地距离 · 单位统一是第一步 · 分母越大,比例尺越小"
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

@@ -0,0 +1,23 @@
{
"presets": [
{ "n": 10000, "nameKey": "preset.campus", "noteKey": "preset.campusNote" },
{ "n": 50000, "nameKey": "preset.town", "noteKey": "preset.townNote" },
{ "n": 250000, "nameKey": "preset.city", "noteKey": "preset.cityNote" },
{ "n": 1000000, "nameKey": "preset.province", "noteKey": "preset.provinceNote" },
{ "n": 10000000, "nameKey": "preset.china", "noteKey": "preset.chinaNote" },
{ "n": 100000000, "nameKey": "preset.world", "noteKey": "preset.worldNote" }
],
"spectrum": [
{ "n": 10000, "labelKey": "spec.campus", "scopeKey": "spec.campusScope" },
{ "n": 250000, "labelKey": "spec.city", "scopeKey": "spec.cityScope" },
{ "n": 10000000, "labelKey": "spec.china", "scopeKey": "spec.chinaScope" },
{ "n": 100000000, "labelKey": "spec.world", "scopeKey": "spec.worldScope" }
],
"landmarks": [
{ "nameKey": "lm.classroom", "meters": 10 },
{ "nameKey": "lm.track", "meters": 400 },
{ "nameKey": "lm.marathon", "meters": 42195 },
{ "nameKey": "lm.beijingShanghai", "meters": 1080000 },
{ "nameKey": "lm.equator", "meters": 40000000 }
]
}