wanglei
|
f0d69cd932
|
Rename DI and DQ channels with typed workflow and cylinder references
|
2026-12-05 22:19:50 +08:00 |
|
wanglei
|
cfb25928cb
|
Apply and undo reviewed axis, point and workflow changes across recipes
|
2026-12-05 22:13:44 +08:00 |
|
wanglei
|
d275631836
|
Resolve hardware axis name references across recipe scripts
|
2026-12-05 22:03:21 +08:00 |
|
wanglei
|
2b66063b4d
|
Apply and undo reviewed vision function renames in MCP and WPF
|
2026-12-05 21:57:31 +08:00 |
|
wanglei
|
1efee842d7
|
Resolve recipe-scoped vision function references in workflow scripts
|
2026-12-05 21:55:34 +08:00 |
|
wanglei
|
c8e14cb5af
|
Return standalone configuration objects through the editor pipe
|
2026-12-05 21:54:29 +08:00 |
|
wanglei
|
c4f406e975
|
Review, apply and undo point names with their scoped matrix and script references
|
2026-12-05 21:49:35 +08:00 |
|
wanglei
|
779932f7a2
|
Resolve axis and robot point references in recipe scripts
|
2026-12-05 21:46:39 +08:00 |
|
wanglei
|
ea414f488e
|
Apply and undo reviewed workflow renames through MCP and WPF
|
2026-12-05 21:43:50 +08:00 |
|
wanglei
|
2d4805a777
|
Plan recipe-scoped workflow renames from bound script references
|
2026-12-05 21:40:34 +08:00 |
|
wanglei
|
3bd6a7872e
|
Guard batch commits and verify live editor rename and undo
|
2026-12-05 21:38:38 +08:00 |
|
wanglei
|
058ba4fcae
|
Apply variable renames and guarded inverse drafts across project files
|
2026-12-05 21:34:17 +08:00 |
|
wanglei
|
49fe9d599a
|
Plan recipe variable renames from bound C# references
|
2026-12-05 21:32:39 +08:00 |
|
wanglei
|
559eb230a6
|
Apply reviewed workflow source only after explicit WPF approval
|
2026-12-05 21:26:51 +08:00 |
|
wanglei
|
addac5ba77
|
Preview workflow diffs and compile C# without loading user code
|
2026-12-05 21:25:07 +08:00 |
|
wanglei
|
444953d81a
|
Preview and apply scoped MCP edits with editor approval and conflict checks
|
2026-12-05 21:20:55 +08:00 |
|
wanglei
|
46dc6282fc
|
Locate recipe-scoped variable and workflow references with Roslyn
|
2026-12-05 21:15:24 +08:00 |
|
wanglei
|
6db8425851
|
Expose portable project inspection through a local MCP server
|
2026-12-05 21:14:19 +08:00 |
|
wanglei
|
b972271a14
|
Persist portable PLCSharp project directories and configuration
|
2026-12-05 21:12:52 +08:00 |
|
wanglei
|
5c022bfd26
|
切换配方前等待旧工作流退出
|
2026-12-05 20:01:10 +08:00 |
|
|
|
ec0c476c79
|
修复数据库无迁移能力:用模型对比补表补列,替掉字符串 Split 建表 hack
原做法:构造时 EnsureCreated() + 对每个 DbSet 反射名字试跑 SELECT,抛异常就把 GenerateCreateScript() 按 CREATE TABLE 名字 做 Split、取最后一段拼回去执行。问题:
- 只处理「缺表」,完全不处理「模型加了字段」。给实体新增一个属性后,老库的表里没有该列,EF 的 SELECT 直接 no such column —— 整个模块打不开,只能删库重来;
- Split 取 Last() 会挑错片段(同名字符串在别的表定义/索引里出现时),拼出来的 SQL 可能混进别的表的片段;索引语句被丢掉;
- 表名直接拼进 SQL;用「试跑 SELECT 看是否抛异常」判断存在性,等于靠异常做流程控制。
改法(SchemaMaintenance):
- 期望结构取自 EF 模型本身(GetEntityTypes/GetTableName/GetColumnName/GetColumnType),不再反射 DbSet 属性名;
- 实际结构读 sqlite_master 与 PRAGMA table_info,不再用异常做流程控制;
- 缺表:按 GenerateCreateScript() 自身的依赖顺序,只执行属于该表的 CREATE TABLE / CREATE INDEX 语句(引用关系天然正确);
- 缺列:ALTER TABLE ADD COLUMN,按 CLR 类型给已有行补默认值(数值/枚举 0、字符串空串、Guid 全零、时间 0001-01-01),非空列带 NOT NULL DEFAULT,可空列填 NULL;
- 不自动补的三类:主键列(ALTER 加不了)、影子/判别列(填错值比缺列更危险,宁缺勿错)、计算列;
- 标识符统一加引号并剥掉内嵌双引号。
另外把库路径从相对 CWD 的 ./Config/Datas.db 改成可注入:新增 DatasContext(databasePath),默认路径改为「可执行文件同级 Config/Datas.db」,并且若老安装把库放在启动目录下则继续沿用(升级后不会看不到原数据);同时自动建目录。这样库不再是「谁启动就落在谁的当前目录」。
新增 5 个测试:建库落盘可重读(这条同时兜住上一个提交里「注册/改密/删除不 Save」那类不落盘缺陷的回归)、缺表自动补建、缺列自动 ALTER 并按默认值填充、重复打开幂等不会重复加列、指定路径不会写到默认库。测试 59/59 通过,构建 0 error。
|
2026-11-17 23:30:38 +08:00 |
|
|
|
b97083f556
|
修复异常被静默吞掉:补 UI 线程兜底 + 给 17 个轮询线程装上异常报警
两条异常「消失」的路径:
1) App.RegisterEvents 只挂了 TaskScheduler.UnobservedTaskException 与 AppDomain.UnhandledException,
全项目没有 Application.DispatcherUnhandledException。WPF UI 线程里的异常(视觉 handler 里 33 处
Dispatcher.Invoke 委托内部抛出即属此类)会直接让进程闪退,只留一行日志。
2) 17 个 BackgroundWorker 轮询线程全都只订阅 DoWork。BackgroundWorker 会捕获 DoWork 的异常并放进
RunWorkerCompletedEventArgs.Error,没人订阅就等于吞掉:while(!CancellationPending) 循环直接退出,
轴/IO/通讯/机器人/气缸的扫描从此不再刷新,而界面看起来一切正常 —— 对上位机这是最危险的失败模式。
改法:
- 新增 Core/Prism/WorkerGuard:Watch(worker, 用途名) 给 worker 挂上「因异常结束就必须上报」的兜底,
上报出口由启动时 SetFaultSink 注入(Core 层不依赖 App);正常取消(e.Error==null)不算故障,不上报;
上报通道自身异常被吞掉,兜底逻辑不成为新的崩溃源。
- App.xaml.cs:注册 DispatcherUnhandledException —— 记录日志 + 走统一 errLog 报警通道 + Handled=true
让进程继续存活(设备运行中闪退比界面某处出错危险得多);OutOfMemoryException 不拦截,交回运行时终止;
ReportError 带重入保护,避免「报警通道自己出错」造成无限递归。errLog 通道此前只有 ModelBase 在用。
- 17 个 new BackgroundWorker 构造处统一包成 WorkerGuard.Watch(...),并给每个轮询起了中文名(报警里能看出是谁死了)。
- 顺带删掉 App.xaml.cs 里一处没有配对 disable 的孤立 #pragma warning restore VSTHRD200。
新增 5 个 WorkerGuard 回归测试(异常上报内容 / 正常结束不上报 / 正常取消不上报 / 出口抛异常不外泄 / null 参数)。构建 0 error,测试 54/54 通过。
|
2026-11-17 23:21:05 +08:00 |
|
|
|
6cab601d25
|
气缸
|
2026-08-12 11:49:54 +08:00 |
|
|
|
2070c58fc3
|
改进脚本
|
2026-08-03 14:32:48 +08:00 |
|
|
|
7eaa2edacc
|
自动整理代码格式
|
2026-07-26 19:09:45 +08:00 |
|
|
|
1d2df8e3cf
|
脚本执行异常处理
|
2026-07-26 17:20:04 +08:00 |
|
|
|
9c83b13673
|
删除xFeat
|
2026-07-23 12:25:47 +08:00 |
|
|
|
5087b946ed
|
XFeatMatch
|
2026-07-22 17:50:59 +08:00 |
|
|
|
ff69308edb
|
局部图像列表的导入导出
|
2026-07-21 12:36:19 +08:00 |
|
|
|
15c422d76d
|
修复配方bug
|
2026-07-21 12:26:43 +08:00 |
|
|
|
9a91cdec0a
|
保存复制的配方
|
2026-07-21 12:18:53 +08:00 |
|
|
|
859551b39b
|
增加灰度模板匹配,更改局部图像存储方式
|
2026-07-21 05:46:36 +08:00 |
|
|
|
70c6e47828
|
完善配方导入导出功能
|
2026-07-20 02:17:38 +08:00 |
|
|
|
f923971391
|
拆分GlobalModel
|
2026-07-19 20:14:52 +08:00 |
|
|
|
5fe374eeff
|
robotMatrix
|
2026-07-13 02:30:00 +08:00 |
|
|
|
5e804f7c3c
|
矩阵
|
2026-07-12 16:39:27 +08:00 |
|
|
|
11a4e6da69
|
编写流程示例
|
2026-07-05 04:26:16 +08:00 |
|
|
|
03d3250fa3
|
添加项目文件。
|
2026-07-04 19:27:04 +08:00 |
|