| | |
| | | { |
| | | public partial class IBoxFormSystemInfo : DocumentPage |
| | | { |
| | | private string startCode = "[&start&]"; |
| | | private string endCode = "[&end&]"; |
| | | private string paramCode = "[¶m&]"; |
| | | private string getstoreCode = "getstore"; |
| | | |
| | | public IBoxFormSystemInfo() |
| | | { |
| | | this.PageTitle.Caption = "设备信息"; |
| | |
| | | private void EboxFormSystemInfo_Load(object sender, EventArgs e) |
| | | { |
| | | Thread.Sleep(500); |
| | | SendText(startCode + getstoreCode + paramCode + endCode); |
| | | SendText(IBoxHelper.startCode + IBoxHelper.getstoreCode + IBoxHelper.paramCode + IBoxHelper.endCode); |
| | | } |
| | | public event EventHandler<string> SendData; |
| | | private void SendText(string content) |
| | |
| | | textEdit2.Text = model.Wlan0IpAddress.Replace("\n", ""); |
| | | textEdit3.Text = model.SystemVersion; |
| | | textEdit4.Text = model.TotalRunTime; |
| | | textEdit10.Text = model.CurrentTime.Replace(";",""); |
| | | textEdit10.Text = model.CurrentTime.Replace(";", ""); |
| | | var dic = GetDuDic(model.Du); |
| | | textEdit5.Text = GetDuString(dic, "/usr/ebox"); |
| | | textEdit6.Text = GetDuString(dic, "/usr/ebox/Data"); |
| | |
| | | |
| | | private Dictionary<string, string> GetDuDic(string du) |
| | | { |
| | | return du.Substring(0,du.Length - 1).Split(';').Select(c => c.Split(':')).ToDictionary(b => b[1], b => b[0]); |
| | | return du.Substring(0, du.Length - 1).Split(';').Select(c => c.Split(':')).ToDictionary(b => b[1], b => b[0]); |
| | | } |
| | | |
| | | private string GetDuString(Dictionary<string, string> du, string type) |