1.3.5:更名 EDC|易得设计,空白启动首页 + 可扩展图元库识别,架构图大版本
- 品牌:更名 EDC|易得设计(exe/安卓/仓库 EasyDesignCollection;旧地址 301 兼容老客户端更新) - 首页:空白启动 + 六模块「新建文档」选择 + 最近打开;品牌菜单重做 - 架构图:手绘识别统一图形;Visio 式可扩展图元库(导入 / 存为图元 / 分类折叠 / 手绘匹配 / 多笔回溯组合);识别后图形尺寸编辑(宽高长径 + 画布标注 + 双击改值); IT 系统图元;mm 标尺(右轴数值 / 实线游标 / A0 默认画布);图层、F8 正交 / F10 极轴、 对齐均布;连线端点换绑重吸附;DXF / SVG / PNG 导出;缩小时画布溢出到侧栏的裁剪修复 - 时序图:分文件保存(*.seq.json / *.arch.json;旧 .edc.json 兼容) - 路径:运行时目录迁移 %APPDATA%/EDC;素材库 library/;安卓 Documents/EDC - 清理:参数化草图入口冻结;Windows Ink 原生桥移除;dist/ 退役 - 构建:exe + APK 双端同步(1.3.5+26);发布脚本切换 release/ 新目录结构
This commit is contained in:
+467
-20
@@ -4,7 +4,7 @@
|
||||
// 向下通过 AppController 读写项目状态、通过 dart:io 访问文件系统。
|
||||
// 包含:
|
||||
// · 通用消息提示(showMessage);
|
||||
// · .seq.json 文件浏览/保存对话框(FileBrowserDialog / pickFile);
|
||||
// · .edc.json 文件浏览/保存对话框(FileBrowserDialog / pickFile);
|
||||
// · 动作编辑、依赖编辑、文档设置、帮助中心等业务对话框。
|
||||
import 'dart:io';
|
||||
import 'dart:math' as math;
|
||||
@@ -14,12 +14,15 @@ import 'package:flutter/material.dart' hide Action;
|
||||
import '../license/license_service.dart';
|
||||
import '../model/models.dart';
|
||||
import '../model/units.dart';
|
||||
import '../modules/module_registry.dart';
|
||||
import '../persistence/android_docs.dart';
|
||||
import '../persistence/storage.dart';
|
||||
import '../state/app_controller.dart';
|
||||
import '../theme/tokens.dart';
|
||||
import '../update/update_service.dart';
|
||||
import '../version.dart';
|
||||
import 'app_logo.dart';
|
||||
import 'update_dialog.dart';
|
||||
|
||||
// ===================== 对话框等比缩放 =====================
|
||||
|
||||
@@ -70,7 +73,7 @@ Future<void> showMessage(BuildContext context, String title, String message) {
|
||||
|
||||
// ===================== 文件浏览 / 保存对话框 =====================
|
||||
|
||||
/// 文件浏览对话框:用于打开或另存为文件(工程 `.seq.json`、导出 `.svg` / `.png`)。
|
||||
/// 文件浏览对话框:用于打开或另存为文件(设计文档 `.seq.json` / `.arch.json`、导出 `.svg` / `.png` / `.dxf`)。
|
||||
///
|
||||
/// [saveMode] 为 true 时进入保存流程,否则为打开流程;[suffix] 决定文件过滤
|
||||
/// 与保存时自动补全的后缀;[defaultName] 为保存模式的默认文件名。
|
||||
@@ -80,7 +83,7 @@ class FileBrowserDialog extends StatefulWidget {
|
||||
required this.saveMode,
|
||||
this.initialPath,
|
||||
this.defaultName,
|
||||
this.suffix = '.seq.json',
|
||||
this.suffix = '.edc.json',
|
||||
});
|
||||
|
||||
/// 是否为保存模式(true = 另存为,false = 打开)。
|
||||
@@ -89,7 +92,7 @@ class FileBrowserDialog extends StatefulWidget {
|
||||
final String? initialPath;
|
||||
/// 保存模式的默认文件名(如 `装配线节拍.svg`)。
|
||||
final String? defaultName;
|
||||
/// 文件后缀:过滤目录列表并自动补全用户输入(如 `.svg` / `.png` / `.seq.json`)。
|
||||
/// 文件后缀:过滤目录列表并自动补全用户输入(如 `.svg` / `.png` / `.edc.json`)。
|
||||
final String suffix;
|
||||
|
||||
/// 创建文件浏览对话框对应的状态对象。
|
||||
@@ -115,7 +118,7 @@ class _FileBrowserDialogState extends State<FileBrowserDialog> {
|
||||
final String base = widget.defaultName ??
|
||||
(widget.initialPath != null && widget.initialPath!.isNotEmpty
|
||||
? widget.initialPath!.split(RegExp(r'[\\/]')).last
|
||||
: '节拍方案${widget.suffix}');
|
||||
: '未命名设计${widget.suffix}');
|
||||
_name = TextEditingController(text: base);
|
||||
_bootstrap();
|
||||
}
|
||||
@@ -175,7 +178,7 @@ class _FileBrowserDialogState extends State<FileBrowserDialog> {
|
||||
String _ensureSuffix(String raw) {
|
||||
String n = raw.trim();
|
||||
if (n.isEmpty) return n;
|
||||
const List<String> known = <String>['.seq.json', '.json', '.svg', '.png'];
|
||||
const List<String> known = <String>['.arch.json', '.edc.json', '.seq.json', '.json', '.svg', '.png', '.dxf'];
|
||||
for (final String k in known) {
|
||||
if (n.toLowerCase().endsWith(k)) {
|
||||
if (k == widget.suffix) return n;
|
||||
@@ -193,7 +196,15 @@ class _FileBrowserDialogState extends State<FileBrowserDialog> {
|
||||
final List<FileSystemEntity> all = _dir.listSync();
|
||||
_entries = all.where((FileSystemEntity e) {
|
||||
if (e is Directory) return true;
|
||||
return e.path.toLowerCase().endsWith(widget.suffix.toLowerCase());
|
||||
final String p = e.path.toLowerCase();
|
||||
// 设计文档同时兼容旧的 .edc.json / .seq.json;其它后缀按后缀精确过滤。
|
||||
if (widget.suffix.toLowerCase().contains('json')) {
|
||||
return p.endsWith('.edc.json') ||
|
||||
p.endsWith('.seq.json') ||
|
||||
p.endsWith('.arch.json') ||
|
||||
p.endsWith('.json');
|
||||
}
|
||||
return p.endsWith(widget.suffix.toLowerCase());
|
||||
}).toList()
|
||||
..sort((FileSystemEntity a, FileSystemEntity b) {
|
||||
final bool ad = a is Directory;
|
||||
@@ -403,13 +414,13 @@ class _FileBrowserDialogState extends State<FileBrowserDialog> {
|
||||
/// 打开文件选择对话框并返回所选路径。
|
||||
///
|
||||
/// [save] 决定保存或打开模式;[suffix] 决定文件过滤与自动补全的后缀
|
||||
/// (`.seq.json` / `.svg` / `.png`);[defaultName] 为保存模式的默认文件名。
|
||||
/// (`.edc.json` / `.svg` / `.png`);[defaultName] 为保存模式的默认文件名。
|
||||
Future<String?> pickFile(
|
||||
BuildContext context, {
|
||||
required bool save,
|
||||
String? initialPath,
|
||||
String? defaultName,
|
||||
String suffix = '.seq.json',
|
||||
String suffix = '.edc.json',
|
||||
}) {
|
||||
return showDialog<String>(
|
||||
context: context,
|
||||
@@ -447,7 +458,7 @@ class _SaveLocationDialogState extends State<SaveLocationDialog> {
|
||||
super.initState();
|
||||
final Map<String, String> s = AndroidDocs.settings();
|
||||
_base = s['base'] ?? 'documents';
|
||||
_folder = TextEditingController(text: s['folder'] ?? 'SequenceDiagram');
|
||||
_folder = TextEditingController(text: s['folder'] ?? AndroidDocs.defaultFolder);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -513,7 +524,7 @@ class _SaveLocationDialogState extends State<SaveLocationDialog> {
|
||||
}
|
||||
}
|
||||
|
||||
/// 安卓版文件对话框:保存到 / 打开自配置的公共目录(默认 Documents/SequenceDiagram)。
|
||||
/// 安卓版文件对话框:保存到 / 打开自配置的公共目录(默认 Documents/EDC,兼容旧目录 SequenceDiagram)。
|
||||
///
|
||||
/// - 保存模式:显示当前保存位置(可点「更改位置」修改),输入文件名自动补全后缀;
|
||||
/// - 打开模式:列出目录中匹配后缀的文件,点选返回文件名。
|
||||
@@ -580,7 +591,7 @@ class _AndroidFileDialogState extends State<AndroidFileDialog> {
|
||||
String _ensureSuffix(String raw) {
|
||||
String n = raw.trim();
|
||||
if (n.isEmpty) return n;
|
||||
const List<String> known = <String>['.seq.json', '.json', '.svg', '.png'];
|
||||
const List<String> known = <String>['.arch.json', '.edc.json', '.seq.json', '.json', '.svg', '.png', '.dxf'];
|
||||
for (final String k in known) {
|
||||
if (n.toLowerCase().endsWith(k)) {
|
||||
if (k == widget.suffix) return n;
|
||||
@@ -2036,6 +2047,442 @@ class _StationRowState extends State<_StationRow> {
|
||||
|
||||
/// 帮助中心对话框:以四个标签页展示快速开始、快捷键、
|
||||
/// 双视图说明以及单位与导出等信息。
|
||||
/// 软件设置:集中设置入口(外观 / 文档默认 / 架构图网格 / 更新)。
|
||||
///
|
||||
/// 从左上角「EDC|易得设计」菜单底部的「软件设置」打开;文档级的完整设置
|
||||
/// (单位 / 循环 / 相位等)仍在「文档设置」(F2 / 左侧栏)里。
|
||||
class SoftwareSettingsDialog extends StatefulWidget {
|
||||
/// 构造软件设置对话框。
|
||||
const SoftwareSettingsDialog({super.key, required this.controller});
|
||||
|
||||
/// 全局应用控制器。
|
||||
final AppController controller;
|
||||
|
||||
/// 创建状态对象。
|
||||
@override
|
||||
State<SoftwareSettingsDialog> createState() => _SoftwareSettingsDialogState();
|
||||
}
|
||||
|
||||
/// 软件设置对话框状态。
|
||||
class _SoftwareSettingsDialogState extends State<SoftwareSettingsDialog> {
|
||||
/// 控制器快捷访问。
|
||||
AppController get c => widget.controller;
|
||||
|
||||
/// 检查更新:发现新版本直接弹更新对话框。
|
||||
Future<void> _checkUpdate() async {
|
||||
c.setStatus('正在检查更新…');
|
||||
try {
|
||||
final UpdateInfo? info = await UpdateService.check();
|
||||
if (!mounted) return;
|
||||
if (info == null) {
|
||||
c.setStatus('已是最新版本(v$kAppVersion)');
|
||||
await showMessage(context, '检查更新', '当前已是最新版本(v$kAppVersion)。');
|
||||
return;
|
||||
}
|
||||
await showDialog<void>(
|
||||
context: context,
|
||||
builder: (_) => UpdateDialog(controller: c, info: info),
|
||||
);
|
||||
} catch (e) {
|
||||
if (mounted) await showMessage(context, '检查更新失败', '$e');
|
||||
}
|
||||
}
|
||||
|
||||
/// 渲染设置表单。
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final Tokens t = context.tok;
|
||||
return Dialog(
|
||||
backgroundColor: t.dialog,
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(14)),
|
||||
child: scaledDialogBox(
|
||||
context,
|
||||
680,
|
||||
600,
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(20),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Row(
|
||||
children: <Widget>[
|
||||
Text('软件设置',
|
||||
style: TextStyle(
|
||||
fontSize: 17, fontWeight: FontWeight.w700, color: t.text)),
|
||||
const SizedBox(width: 14),
|
||||
Text('外观 / 文档默认 / 架构图网格 / 更新',
|
||||
style: TextStyle(fontSize: 11, color: t.dim)),
|
||||
const Spacer(),
|
||||
Text('v$kAppVersion', style: TextStyle(fontSize: 11, color: t.dim)),
|
||||
],
|
||||
),
|
||||
const Divider(height: 24),
|
||||
Expanded(
|
||||
child: ListView(
|
||||
children: <Widget>[
|
||||
_section(t, '外观'),
|
||||
Row(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: _optCard(
|
||||
t,
|
||||
active: c.brightness == Brightness.light,
|
||||
title: '浅色主题',
|
||||
subtitle: '白底 · 打印 / 工艺卡友好',
|
||||
onTap: () => c.setTheme(Brightness.light),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
Expanded(
|
||||
child: _optCard(
|
||||
t,
|
||||
active: c.brightness == Brightness.dark,
|
||||
title: '深色主题',
|
||||
subtitle: '暗光环境护眼',
|
||||
onTap: () => c.setTheme(Brightness.dark),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 18),
|
||||
_section(t, '文档默认'),
|
||||
_rowSwitch(
|
||||
t,
|
||||
'保留空泳道',
|
||||
'动作全部移走的泳道保留(序号不变;关闭则自动移除)',
|
||||
c.project.keepEmptyLanes,
|
||||
(bool v) => c.setKeepEmptyLanes(v),
|
||||
),
|
||||
_rowSwitch(
|
||||
t,
|
||||
'自动保存',
|
||||
'保存过一次路径后按间隔写回文件(同步 .bak 备份)',
|
||||
c.project.autoSaveEnabled,
|
||||
(bool v) => c.setAutoSave(enabled: v),
|
||||
),
|
||||
if (c.project.autoSaveEnabled)
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(bottom: 8),
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
Text('间隔', style: TextStyle(color: t.sub, fontSize: 11)),
|
||||
const SizedBox(width: 10),
|
||||
for (final int m in <int>[1, 5, 10, 30])
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(right: 6),
|
||||
child: _chip(
|
||||
t,
|
||||
'$m 分钟',
|
||||
c.project.autoSaveMinutes == m,
|
||||
() => c.setAutoSave(minutes: m),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
_section(t, '架构图网格'),
|
||||
_rowSwitch(
|
||||
t,
|
||||
'吸附网格',
|
||||
'识别 / 移动 / 缩放优先对位到网格',
|
||||
c.arch.gridSnap,
|
||||
(bool v) => c.setArchGrid(snap: v),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(bottom: 8),
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
Text('粒度', style: TextStyle(color: t.sub, fontSize: 11)),
|
||||
const SizedBox(width: 10),
|
||||
for (final double g in <double>[10, 20, 40, 80])
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(right: 6),
|
||||
child: _chip(
|
||||
t,
|
||||
'${g.round()} px',
|
||||
c.arch.gridSize == g,
|
||||
() => c.setArchGrid(size: g),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 18),
|
||||
_section(t, '更新'),
|
||||
Row(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: Text('当前版本 v$kAppVersion;检查到新版本可直接升级。',
|
||||
style: TextStyle(color: t.dim, fontSize: 11)),
|
||||
),
|
||||
OutlinedButton(
|
||||
onPressed: _checkUpdate,
|
||||
child: const Text('检查更新'),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
const Divider(height: 24),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: <Widget>[
|
||||
FilledButton(
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
child: const Text('完成'),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/// 小节标题。
|
||||
Widget _section(Tokens t, String s) => Padding(
|
||||
padding: const EdgeInsets.only(bottom: 8),
|
||||
child: Text(
|
||||
s,
|
||||
style: TextStyle(
|
||||
color: t.text2,
|
||||
fontSize: 12.5,
|
||||
fontWeight: FontWeight.w700,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
/// 选项卡片(主题等二选一)。
|
||||
Widget _optCard(
|
||||
Tokens t, {
|
||||
required bool active,
|
||||
required String title,
|
||||
required String subtitle,
|
||||
required VoidCallback onTap,
|
||||
}) {
|
||||
return InkWell(
|
||||
onTap: onTap,
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
child: Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 10),
|
||||
decoration: BoxDecoration(
|
||||
color: active ? t.accent.withValues(alpha: 0.14) : t.panel2,
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
border: Border.all(
|
||||
color: active ? t.accent : t.line,
|
||||
width: active ? 1.3 : 1,
|
||||
),
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Text(
|
||||
title,
|
||||
style: TextStyle(
|
||||
color: active ? t.accent : t.text,
|
||||
fontSize: 12.5,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 2),
|
||||
Text(subtitle, style: TextStyle(color: t.dim, fontSize: 10.5)),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/// 开关行。
|
||||
Widget _rowSwitch(
|
||||
Tokens t,
|
||||
String title,
|
||||
String desc,
|
||||
bool value,
|
||||
ValueChanged<bool> onChanged,
|
||||
) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.only(bottom: 4),
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Text(title,
|
||||
style: TextStyle(
|
||||
color: t.text, fontSize: 12, fontWeight: FontWeight.w600)),
|
||||
Text(desc,
|
||||
style: TextStyle(color: t.dim, fontSize: 10.5, height: 1.4)),
|
||||
],
|
||||
),
|
||||
),
|
||||
Switch(
|
||||
value: value,
|
||||
onChanged: onChanged,
|
||||
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/// 粒度 / 间隔小圆片。
|
||||
Widget _chip(Tokens t, String label, bool active, VoidCallback onTap) {
|
||||
return InkWell(
|
||||
onTap: onTap,
|
||||
borderRadius: BorderRadius.circular(7),
|
||||
child: Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 9, vertical: 4),
|
||||
decoration: BoxDecoration(
|
||||
color: active ? t.accent.withValues(alpha: 0.16) : t.panel2,
|
||||
borderRadius: BorderRadius.circular(7),
|
||||
border: Border.all(color: active ? t.accent : t.line),
|
||||
),
|
||||
child: Text(
|
||||
label,
|
||||
style: TextStyle(
|
||||
color: active ? t.accent : t.sub,
|
||||
fontSize: 10.5,
|
||||
fontWeight: active ? FontWeight.w700 : FontWeight.w500,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// 通用文本编辑对话框(图形文字 / 连线标签共用)。
|
||||
///
|
||||
/// 返回新文本;取消返回 null。
|
||||
/// 「打开文档…」的文档类型选择:列出全部模块(未开放灰显不可选)。
|
||||
///
|
||||
/// 返回所选模块;用户取消返回 null。
|
||||
Future<EdcModule?> showDocumentTypeDialog(BuildContext context) async {
|
||||
return showDialog<EdcModule>(
|
||||
context: context,
|
||||
builder: (BuildContext ctx) {
|
||||
final Tokens t = ctx.tok;
|
||||
return AlertDialog(
|
||||
backgroundColor: t.dialog,
|
||||
title: Text('打开文档',
|
||||
style: TextStyle(
|
||||
color: t.text, fontSize: 15, fontWeight: FontWeight.w700)),
|
||||
content: SizedBox(
|
||||
width: 400,
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: <Widget>[
|
||||
for (final EdcModule m in kModules)
|
||||
InkWell(
|
||||
onTap: m.available ? () => Navigator.pop(ctx, m) : null,
|
||||
borderRadius: BorderRadius.circular(9),
|
||||
child: Opacity(
|
||||
opacity: m.available ? 1 : 0.5,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 8, vertical: 8),
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
Container(
|
||||
width: 30,
|
||||
height: 30,
|
||||
alignment: Alignment.center,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(m.accent).withValues(alpha: 0.14),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
child:
|
||||
Icon(m.icon, size: 17, color: Color(m.accent)),
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Text(m.name,
|
||||
style: TextStyle(
|
||||
color: t.text,
|
||||
fontSize: 12.5,
|
||||
fontWeight: FontWeight.w600,
|
||||
)),
|
||||
Text(
|
||||
'文档后缀 ${m.suffix}'
|
||||
'${m.available ? '' : ' · 未开放'}',
|
||||
style: TextStyle(
|
||||
color: t.dim, fontSize: 10.5),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
actions: <Widget>[
|
||||
TextButton(
|
||||
onPressed: () => Navigator.pop(ctx), child: const Text('取消')),
|
||||
],
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Future<String?> showTextEditDialog(
|
||||
BuildContext context, {
|
||||
required String title,
|
||||
required String initial,
|
||||
}) async {
|
||||
final TextEditingController ctrl = TextEditingController(text: initial);
|
||||
final String? result = await showDialog<String>(
|
||||
context: context,
|
||||
builder: (BuildContext ctx) {
|
||||
final Tokens t = ctx.tok;
|
||||
return AlertDialog(
|
||||
backgroundColor: t.dialog,
|
||||
title: Text(title,
|
||||
style: TextStyle(
|
||||
color: t.text, fontSize: 15, fontWeight: FontWeight.w700)),
|
||||
content: SizedBox(
|
||||
width: 380,
|
||||
child: TextField(
|
||||
controller: ctrl,
|
||||
autofocus: true,
|
||||
minLines: 1,
|
||||
maxLines: 4,
|
||||
style: TextStyle(color: t.text, fontSize: 13),
|
||||
decoration: InputDecoration(
|
||||
hintText: '输入文字(可多行)',
|
||||
hintStyle: TextStyle(color: t.dim, fontSize: 12),
|
||||
filled: true,
|
||||
fillColor: t.panel2,
|
||||
border:
|
||||
OutlineInputBorder(borderRadius: BorderRadius.circular(8)),
|
||||
),
|
||||
onSubmitted: (String v) => Navigator.of(ctx).pop(v),
|
||||
),
|
||||
),
|
||||
actions: <Widget>[
|
||||
TextButton(
|
||||
onPressed: () => Navigator.of(ctx).pop(), child: const Text('取消')),
|
||||
FilledButton(
|
||||
onPressed: () => Navigator.of(ctx).pop(ctrl.text),
|
||||
child: const Text('确定')),
|
||||
],
|
||||
);
|
||||
},
|
||||
);
|
||||
ctrl.dispose();
|
||||
return result;
|
||||
}
|
||||
|
||||
class HelpDialog extends StatelessWidget {
|
||||
const HelpDialog({super.key});
|
||||
|
||||
@@ -2084,7 +2531,7 @@ class HelpDialog extends StatelessWidget {
|
||||
children: <Widget>[
|
||||
// 目标:完成方案的搭建与动作的增删改。
|
||||
_section(t, <List<String>>[
|
||||
<String>['我要新建方案', '顶部「新建」创建空白节拍;「打开」载入 .seq.json。'],
|
||||
<String>['我要新建方案', '顶部「新建」创建空白设计;「打开」按时序 / 架构模块分别载入 .seq.json / .arch.json(兼容旧版 .edc.json)。'],
|
||||
<String>['我要先看看示例', '首次启动载入 5 个动作的示例节拍(装配线节拍),可直接修改。'],
|
||||
<String>['我要新增动作', '双击画布空白处在点击相位新增;或左侧「新建」在 0° 新增(默认最外层)。'],
|
||||
<String>['我要删除动作', '选中后:左侧「删除」/ 行内删除图标 / Delete 键 / 右键菜单;至少保留一个动作 / 泳道。'],
|
||||
@@ -2129,7 +2576,7 @@ class HelpDialog extends StatelessWidget {
|
||||
<String>['我要导出 SVG', '顶部「导出」下拉菜单 →「导出 SVG」:矢量、分层、带语义 id 与 data-*,可直接进工艺卡 / MES。'],
|
||||
<String>['我要导出 PNG', '顶部「导出」下拉菜单 →「导出 PNG」:按 2 倍像素比导出当前视图为位图。'],
|
||||
<String>['我要导出 drawio', '流程图视图专用:顶部「导出」→「导出 drawio」,输出 diagrams.net(draw.io)可继续编辑的工程文件。'],
|
||||
<String>['我要保存 / 恢复', '「保存」写入 .seq.json 并生成 .bak;每 5 秒自动快照(异常退出可恢复);F2 文档设置中可开启「自动保存」(默认每 10 分钟一次,需先手动保存过一次路径)。'],
|
||||
<String>['我要保存 / 恢复', '「保存」按时序 / 架构模块分别写入 .seq.json / .arch.json 并生成 .bak;每 5 秒自动快照(异常退出可恢复);「软件设置」中可开启「自动保存」(默认每 10 分钟一次,需先手动保存过一次路径)。'],
|
||||
]),
|
||||
// 目标:调整界面与使用快捷键。
|
||||
_section(t, <List<String>>[
|
||||
@@ -2222,10 +2669,10 @@ class HelpDialog extends StatelessWidget {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Text('时序图设计 · Sequence Diagram Studio',
|
||||
Text('EDC|易得设计 · Easy Design Collection',
|
||||
style: TextStyle(color: t.text, fontSize: 15, fontWeight: FontWeight.w700)),
|
||||
const SizedBox(height: 4),
|
||||
Text('V1.3.4(${android ? '安卓版' : 'Windows 版'})',
|
||||
Text('V$kAppVersion(${android ? '安卓版' : 'Windows 版'})',
|
||||
style: TextStyle(color: t.dim, fontSize: 12)),
|
||||
],
|
||||
),
|
||||
@@ -2243,9 +2690,9 @@ class HelpDialog extends StatelessWidget {
|
||||
// 注意:绝不能展示「期望授权串」——它等同于 .lic 内容,公开即可被绕过授权。
|
||||
row('本机 MAC', info.mac ?? '读取失败'),
|
||||
row('版权声明', 'Copyright © 2026 EDC(Easy Design Collection)呆头鹅。保留所有权利。'),
|
||||
row('产品简介', '面向 PLC 流程节拍 / 相位角设计的设计工具:条形 / 圆周 / 流程图三视图、'
|
||||
'FS / SS 依赖与关键路径、泳道加宽(多槽位)与空泳道策略、依赖走线可调、'
|
||||
'支持导出 SVG / PNG / drawio,成果可直接进工艺卡与 MES。'),
|
||||
row('产品简介', '设计合集(Easy Design Collection):时序图设计面向 PLC 流程节拍 / '
|
||||
'相位角设计(条形 / 圆周 / 流程图三视图、FS / SS 依赖与关键路径、泳道加宽);'
|
||||
'架构图设计支持手绘识别标准图形、正交连线与标签;支持导出 SVG / PNG / drawio。'),
|
||||
const SizedBox(height: 6),
|
||||
// 官网入口(点击导航到 sincos.cc)。
|
||||
Row(
|
||||
@@ -2316,7 +2763,7 @@ class HelpDialog extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
guideLine('本版面向应用商店分发,无需授权,全部功能可用。'),
|
||||
guideLine('保存 / 导出文件位于「文件管理」可见的公共目录(默认 Documents/SequenceDiagram,'
|
||||
guideLine('保存 / 导出文件位于「文件管理」可见的公共目录(默认 Documents/EDC,'
|
||||
'可在保存对话框中更改位置)。'),
|
||||
],
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user