Commit d098c419 刘韬

修改com口显示名称

1 个父辈 8c8e54be
......@@ -138,11 +138,15 @@
//
this.portComboBox.ItemHeight = 21;
this.portComboBox.Items.AddRange(new object[] {
"端口1",
"端口2",
"端口3",
"端口4",
"端口5"});
"COM1",
"COM2",
"COM3",
"COM4",
"COM5",
"COM6",
"COM7",
"COM8",
"COM9"});
this.portComboBox.Location = new System.Drawing.Point(71, 72);
this.portComboBox.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.portComboBox.Name = "portComboBox";
......
......@@ -48,13 +48,13 @@ namespace App
this.chooseLanguageComboBox.Items.Add(getMsg("FrmMDItsmi_en"));
this.chooseLanguageComboBox.Items.Add(getMsg("FrmMDItsmi_jp"));
this.portComboBox.Items.Clear();
this.portComboBox.Items.Add(getMsg("FrmMDItsmi_Port1"));
this.portComboBox.Items.Add(getMsg("FrmMDItsmi_Port2"));
this.portComboBox.Items.Add(getMsg("FrmMDItsmi_Port3"));
this.portComboBox.Items.Add(getMsg("FrmMDItsmi_Port4"));
this.portComboBox.Items.Add(getMsg("FrmMDItsmi_Port5"));
this.portComboBox.Items.Add(getMsg("FrmMDItsmi_Port6"));
//this.portComboBox.Items.Clear();
//this.portComboBox.Items.Add(getMsg("FrmMDItsmi_Port1"));
//this.portComboBox.Items.Add(getMsg("FrmMDItsmi_Port2"));
//this.portComboBox.Items.Add(getMsg("FrmMDItsmi_Port3"));
//this.portComboBox.Items.Add(getMsg("FrmMDItsmi_Port4"));
//this.portComboBox.Items.Add(getMsg("FrmMDItsmi_Port5"));
//this.portComboBox.Items.Add(getMsg("FrmMDItsmi_Port6"));
this.cmUint.Text = getMsg("FrmMDItsmi_cm");
this.inUint.Text = getMsg("FrmMDItsmi_in");
......@@ -150,30 +150,32 @@ namespace App
this.minUnit.Checked = false;
this.secondUnit.Checked = true;
}
this.portComboBox.SelectedItem = fuction.GetParameterByParaName(Const.PARA_PORT, "currency");
//显示端口
switch (fuction.GetParameterByParaName(Const.PARA_PORT, "currency"))
{
case Const.PORT_1:
this.portComboBox.SelectedIndex = 0;
break;
case Const.PORT_2:
this.portComboBox.SelectedIndex = 1;
break;
case Const.PORT_3:
this.portComboBox.SelectedIndex = 2;
break;
case Const.PORT_4:
this.portComboBox.SelectedIndex = 3;
break;
case Const.PORT_5:
this.portComboBox.SelectedIndex = 4;
break;
case Const.PORT_6:
this.portComboBox.SelectedIndex = 5;
break;
default:
break;
}
//switch (fuction.GetParameterByParaName(Const.PARA_PORT, "currency"))
//{
// case Const.PORT_1:
// this.portComboBox.SelectedIndex = 0;
// break;
// case Const.PORT_2:
// this.portComboBox.SelectedIndex = 1;
// break;
// case Const.PORT_3:
// this.portComboBox.SelectedIndex = 2;
// break;
// case Const.PORT_4:
// this.portComboBox.SelectedIndex = 3;
// break;
// case Const.PORT_5:
// this.portComboBox.SelectedIndex = 4;
// break;
// case Const.PORT_6:
// this.portComboBox.SelectedIndex = 5;
// break;
// default:
// break;
//}
}
/**
* 点击测试端口按钮
......@@ -207,30 +209,30 @@ namespace App
private void saveButton_Click(object sender, EventArgs e)
{
//判断端口
string m_port = "";
switch (this.portComboBox.SelectedIndex)
{
case 0:
m_port = Const.PORT_1;
break;
case 1:
m_port = Const.PORT_2;
break;
case 2:
m_port = Const.PORT_3;
break;
case 3:
m_port = Const.PORT_4;
break;
case 4:
m_port = Const.PORT_5;
break;
case 5:
m_port = Const.PORT_6;
break;
default:
break;
}
string m_port = this.portComboBox.SelectedItem.ToString();
//switch (this.portComboBox.SelectedIndex)
//{
// case 0:
// m_port = Const.PORT_1;
// break;
// case 1:
// m_port = Const.PORT_2;
// break;
// case 2:
// m_port = Const.PORT_3;
// break;
// case 3:
// m_port = Const.PORT_4;
// break;
// case 4:
// m_port = Const.PORT_5;
// break;
// case 5:
// m_port = Const.PORT_6;
// break;
// default:
// break;
//}
//判断长度
if (this.cmUint.Checked)
{
......
......@@ -165,7 +165,7 @@
RudN65tdA8sHzg46DF645Xrr8m2v29fvrLwzMBQydHc4cnjkLvvu5L2key/vZ9yff7DpIfph4SOpR+WP
lR7X/aj3Y+uI5ciZUdfRvidBTx6Mscae/5T+04fx/Kfkp+UTqhONk2aTp6fcp24+W/1s/Hnq8/npgp+l
f65+ofviu18cf+mbWTUz/pL/cuHX4lfyr468Xva6e9Z/9vGb5Dfzc4Vv5d8efcd41/s+7P3EfOYH7IeK
j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALEwAACxMBAJqcGAAACOtJREFUWEe1lwlQVtcV
j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALEgAACxIB0t1+/AAACOtJREFUWEe1lwlQVtcV
xy+IJMGq1VYsJhEarUNTFQXZNKmTpjUE7dSgsoNfWZQ4QYwR42hSGxHIaK2oLPKJVEQRNVhlFIqgohWK
BlQ2F4ggCohsArLJ9u85Lz58D4lilzvzn/vOvfe9+3vnLudeAaBfbm5uwtPTc+L69esTgoODEzZv3pwQ
FBT0XIWEhBzSaDRaV1fXEfz+0OUu3FzVUrKwVAa/RJ0YhYaGppCN9vZ21NfX9+vhw4doaGjof25ubkZP
......
此文件类型无法预览
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!