新增应用程序图标并优化界面与匹配逻辑

- 增加 复制.ico 作为应用图标,并在项目文件中配置 ApplicationIcon。
- 修正 MatchFolderName 数字编号截取索引,保证匹配准确。
- 调整主窗口高度为 645,优化界面体验。
- LogTextBox 允许编辑(去除 IsReadOnly)。
- 处理单个料号时回车后自动聚焦输入框,提升操作流畅度。
- 代码格式优化,提升可读性。
This commit is contained in:
2025-12-29 16:41:44 +08:00
parent 18a2c9b4b2
commit 0a534e7e08
5 changed files with 44 additions and 39 deletions

View File

@@ -8,6 +8,11 @@
<UseWPF>true</UseWPF>
<UseWindowsForms>true</UseWindowsForms>
<Platforms>AnyCPU;x86</Platforms>
<ApplicationIcon>复制.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Content Include="复制.ico" />
</ItemGroup>
</Project>

View File

@@ -23,12 +23,12 @@ namespace CopyRou
return false;
// 从第4个字符开始匹配数字编号索引3
var numInName = folderNameLower.Substring(3, numLength);
var numInName = folderNameLower.Substring(4, numLength);
if (numInName != numPart.ToLower())
return false;
// 检查版本部分
var versionInName = folderNameLower.Substring(3 + numLength);
var versionInName = folderNameLower.Substring(4 + numLength);
return versionInName.StartsWith(versionPart.ToLower());
}

View File

@@ -7,9 +7,9 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="ROU文件复制工具"
Width="586"
Height="631"
Height="645"
MinWidth="586"
MinHeight="631"
MinHeight="645"
mc:Ignorable="d">
<Grid Margin="10">
<Grid.RowDefinitions>
@@ -50,7 +50,6 @@
Height="60"
Margin="5"
AcceptsReturn="True"
IsReadOnly="True"
TextWrapping="Wrap"
VerticalScrollBarVisibility="Auto" />
<Button

View File

@@ -179,6 +179,7 @@ namespace CopyRou
if (e.Key == System.Windows.Input.Key.Enter)
{
ProcessSingleCode();
SingleCodeTextBox.Focus();
}
}

BIN
复制.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB