//读取富文本框中的内容
private void ReadRichText()
{
m_RegAddrList.Clear();
m_RegValueList.Clear();
for (int i = 0; i < RegrichTextBox.Lines.Length; i++)
{
string Text = RegrichTextBox.Lines[i]; //获取文本框内容的行数
if (Text == “”)
{
break;
}
string[] data = Text.Split(‘,’);
string strAddr = “0”;
string strValue = “0”;
if (data.Length >= 1)
{
strAddr = data[0].Split(‘x’)[1];
}
if (data.Length >= 2)
{
strValue = data[1].Split(‘x’)[1];
}
m_RegAddrList.Add(Convert.ToUInt16(strAddr, 16));
m_RegValueList.Add(Convert.ToUInt16(strValue, 16));
}
m_RegAddrArray = new ushort[m_RegAddrList.Count];
m_RegValueArray = new ushort[m_RegValueList.Count];
for (int i = 0; i < m_RegAddrList.Count; i++)
{
m_RegAddrArray[i] = m_RegAddrList[i];
m_RegValueArray[i] = m_RegValueList[i];
}
}
读取文本框中的内容
最新推荐文章于 2024-07-10 10:02:20 发布