Skip to content

Commit 9abcd4b

Browse files
committed
在下拉框里加上没有匹配上的com口
1 parent 945e054 commit 9abcd4b

4 files changed

Lines changed: 28 additions & 5 deletions

File tree

changlog/autoUpdate.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<item>
3-
<version>1.0.2.8</version>
4-
<url>https://llcom.papapoi.com/update/1.0.2.8.zip</url>
5-
<changelog>https://llcom.papapoi.com/changelog/1.0.2.8.html</changelog>
3+
<version>1.0.2.9</version>
4+
<url>https://llcom.papapoi.com/update/1.0.2.9.zip</url>
5+
<changelog>https://llcom.papapoi.com/changelog/1.0.2.9.html</changelog>
66
<mandatory mode="1">true</mandatory>
77
</item>

changlog/index.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@
88

99
> 欢迎加入交流群:`906307487`
1010

11+
## LLCOM 1.0.2.9
12+
13+
- 更正当打开COM口编号识别错误的问题
14+
15+
---
16+
1117
## LLCOM 1.0.2.8
1218

1319
- 优化日志输出的逻辑,解决高速输出数据时,选中文本后软件完全卡死的问题

llcom/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
5252
//通过使用 "*",如下所示:
5353
// [assembly: AssemblyVersion("1.0.*")]
54-
[assembly: AssemblyVersion("1.0.2.8")]
55-
[assembly: AssemblyFileVersion("1.0.2.8")]
54+
[assembly: AssemblyVersion("1.0.2.9")]
55+
[assembly: AssemblyFileVersion("1.0.2.9")]
5656
[assembly: NeutralResourcesLanguage("zh-CN")]
5757

llcom/View/MainWindow.xaml.cs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,24 @@ private void refreshPortList()
178178
System.Threading.Thread.Sleep(500);
179179
}
180180
//MessageBox.Show("fail了");
181+
}
182+
183+
184+
foreach (string p in SerialPort.GetPortNames())//加上缺少的com口
185+
{
186+
bool notMatch = true;
187+
foreach(string n in strs)
188+
{
189+
if (n.Contains($"({p})"))//如果和选中项目匹配
190+
{
191+
notMatch = false;
192+
break;
193+
}
194+
}
195+
if(notMatch)
196+
strs.Add($"Serial Port {p} ({p})");//如果列表中没有,就自己加上
181197
}
198+
182199
this.Dispatcher.Invoke(new Action(delegate {
183200
foreach (string i in strs)
184201
serialPortsListComboBox.Items.Add(i);

0 commit comments

Comments
 (0)