Skip to content

feat: 移除日志编辑器路径设置项 + 指令列表选中白色高亮#176

Open
Howie-hui wants to merge 12 commits into
SuperStudio:masterfrom
Howie-hui:master
Open

feat: 移除日志编辑器路径设置项 + 指令列表选中白色高亮#176
Howie-hui wants to merge 12 commits into
SuperStudio:masterfrom
Howie-hui:master

Conversation

@Howie-hui

@Howie-hui Howie-hui commented May 28, 2026

Copy link
Copy Markdown

Changes

  • 增加扩展功能、增加CMD调用工具
  • 移除日志编辑器路径设置项,恢复默认系统打开方式
  • 扩展功能指令列表 DataGrid 选中行改为白色高亮,提升选中可见性
  • 发送队列增加循环控制选项

Commits

  • feat: 移除日志编辑器路径设置项 + 指令列表选中白色高亮
  • feat: 启动时显示欢迎页2秒后自动切换到主界面

SuperCom Dev added 12 commits May 28, 2026 11:21
- WPF .NET Framework 4.8.1 with MVVM architecture
- AvalonEdit output with syntax highlighting
- Multi-serial port support, HEX/STRING modes
- Advanced command queue with loop execution
- Quick command panel (扩展功能)
- CMD terminal tool window
- Virtual port management
- Telnet server/client support
- Variable monitor
- Multi-language: zh-CN, en-US, ja-JP
- Inno Setup installer in setup/
…output not wrapping

Bug 1: Empty command sent to cmd.exe via output area Enter caused process exit
- Added IsNullOrWhiteSpace guard in ExecuteCommandFromOutput()
- Empty Enter now only inserts newline in UI, does not send to process

Bug 2: Bottom input box (TxtExecuteCommand) Enter key not executing commands
- Confirmed event handlers are correctly wired (KeyDown + PreviewKeyDown)
- Added visual feedback: prepends '> command' marker before sending

Bug 3: Output content not wrapping to new line after command execution
- ExecuteFromLegacyInput now prepends \\r\\n> command\\r\\n before sending
- ExecuteCommandFromOutput now prepends \\r\\n before sending command
- Syncs _outputBuilder when truncating TxtOutput to prevent desync
…rking

Root cause fixes:
1. Output Enter kills process: removed unreliable _enterKeyLength truncation
   strategy. Now ReadOutputAsync locks _outputBuilder during writes; new
   ExecuteCommandFromOutput takes a snapshot, truncates _outputBuilder inside
   lock, syncs TxtOutput.Text, then sends command. No race condition.

2. Bottom input not working: PreviewKeyDown now directly calls
   ExecuteFromLegacyInput() (was KeyDown, which fires after PreviewKeyDown
   but KeyDown was getting e.Handled=true which may interfere). Empty guard
   remains: IsNullOrWhiteSpace check prevents sending empty to cmd.exe.
- Add ScriptItem model and ScriptConverters
- Add RelayCommand for MVVM binding
- Modify Window_CMD: TabControl (commands + scripts), import button, Ctrl+I shortcut
- Script execution with delay control and Ctrl+C stop support
- Update SuperCom.csproj with new file includes
- CmdSettings.cs: 新增ScriptsJson属性,SaveScripts/LoadScripts序列化脚本路径列表
- Window_CMD.xaml.cs: 构造函数加载Scripts,窗口关闭时SaveScripts
- Window_CMD.xaml: 移除脚本行内停止按钮,保留顶栏全局停止按钮
- 移除BtnStopScript_Click和StopScript方法(避免多线程竞态导致闪退)
- 移除Window_CMD.xaml中不存在的StaticResource样式引用
- PortTabItem.cs: 串口断开后发送命令的崩溃保护修复
- ScriptItem.cs: CanExecute支持Completed/Stopped/Error状态重新执行
- 修复脚本输入重定向报错(< 不支持,改用 for /f)
- 新增循环脚本检测(IsLoopScript)
- 新增 ScriptStatus.Running 状态
- 简化停止机制:通过 StopProcess() 重置脚本状态
- 修复日志路径绝对路径问题
- 在 mainWindow_ContentRendered 中添加2秒延时后隐藏欢迎页
- 无端口时自动添加默认 COM1 端口Tab以显示完整主界面
- AddDefaultPortTab 方法确保 SerialPort 正确初始化
- 修复发送自动连接功能的 async/await 模式

修复: 发送按钮、扩展功能面板、单条指令发送全部支持自动连接
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant