feat: 移除日志编辑器路径设置项 + 指令列表选中白色高亮#176
Open
Howie-hui wants to merge 12 commits into
Open
Conversation
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 模式 修复: 发送按钮、扩展功能面板、单条指令发送全部支持自动连接
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Commits