Skip to content

Commit

Permalink
微调串口监听页面
Browse files Browse the repository at this point in the history
  • Loading branch information
chenxuuu committed Jun 24, 2021
1 parent b127dad commit 14f115b
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 5 deletions.
2 changes: 1 addition & 1 deletion changlog/autoUpdate.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>1.0.6.2</version>
<version>1.0.6.3</version>
<url>https://llcom.papapoi.com/llcom.zip</url>
<changelog>https://llcom.papapoi.com/changelog.html</changelog>
<mandatory mode="1">true</mandatory>
Expand Down
6 changes: 6 additions & 0 deletions changlog/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@

> 欢迎加入交流群:`931546484`

## LLCOM 1.0.6.3

- 微调串口监听页面

---

## LLCOM 1.0.6.1

- 增加:串口监听功能
Expand Down
Binary file added llcom/DefaultFiles/core_script/serial_monitor.dll
Binary file not shown.
16 changes: 14 additions & 2 deletions llcom/Pages/SerialMonitorPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ private void MonitorButton_Click(object sender, RoutedEventArgs e)

private void Refresh()
{
string lastP = PidComboBox.Text;
PidComboBox.Items.Clear();
var sl = new List<string>();
foreach (var p in Process.GetProcesses())
Expand All @@ -154,16 +155,27 @@ private void Refresh()
foreach(var i in sl)
PidComboBox.Items.Add(i);
if (PidComboBox.Items.Count > 0)
PidComboBox.SelectedIndex = 0;
{
if (!string.IsNullOrWhiteSpace(lastP) && sl.Contains(lastP))
PidComboBox.Text = lastP;
else
PidComboBox.SelectedIndex = 0;
}

lastP = SerialPortComboBox.Text;
SerialPortComboBox.Items.Clear();
foreach(var p in SerialPort.GetPortNames())
{
if(p.IndexOf("COM") == 0)
SerialPortComboBox.Items.Add(p);
}
if (SerialPortComboBox.Items.Count > 0)
SerialPortComboBox.SelectedIndex = 0;
{
if (!string.IsNullOrWhiteSpace(lastP) && SerialPortComboBox.Items.Contains(lastP))
SerialPortComboBox.Text = lastP;
else
SerialPortComboBox.SelectedIndex = 0;
}
}
}
}
4 changes: 2 additions & 2 deletions llcom/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.6.2")]
[assembly: AssemblyFileVersion("1.0.6.2")]
[assembly: AssemblyVersion("1.0.6.3")]
[assembly: AssemblyFileVersion("1.0.6.3")]
[assembly: NeutralResourcesLanguage("zh-CN")]

0 comments on commit 14f115b

Please sign in to comment.