Commit d098c419 刘韬

修改com口显示名称

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