private void init() { socketManager = new SocketForm(this); socketManager.Show(); listView1.Columns[0].Width = 50; listView1.Columns[1].Width = 80; listView1.Columns[2].Width = 120; listView1.Columns[3].Width = 120; listView1.Columns[4].Width = 300; //Panel p = panel1; logList = new List <LogModel>(); fLogList = new List <fw_Log>(); foreach (String log in logs) { LogModel model = LogModel.parse(log); this.logList.Add(model); } /* * foreach (String log in logs) * { * LogModel model = LogModel.parse(log); * this.logList.Add(model); * String[] datas = { * "log", * model.logBody.ipHeader.protocol.ToString(), * model.logBody.senderIp, * model.logBody.receiverIp, * model.logHeader.alertSig.alertMsg}; * * ListViewItem item=null; * foreach (String data in datas) * { * if (item == null) * { * item = new ListViewItem(data); * } * else * { * item.SubItems.Add(data); * } * * } * * * * * listView1.Items.Add(item); * * } */ }
private void init() { socketManager = new SocketForm(this); socketManager.Show(); listView1.Columns[0].Width = 50; listView1.Columns[1].Width = 80; listView1.Columns[2].Width = 120; listView1.Columns[3].Width = 120; listView1.Columns[4].Width = 300; //Panel p = panel1; logList = new List<LogModel>(); fLogList = new List<fw_Log>(); foreach (String log in logs) { LogModel model = LogModel.parse(log); this.logList.Add(model); } /* foreach (String log in logs) { LogModel model = LogModel.parse(log); this.logList.Add(model); String[] datas = { "log", model.logBody.ipHeader.protocol.ToString(), model.logBody.senderIp, model.logBody.receiverIp, model.logHeader.alertSig.alertMsg}; ListViewItem item=null; foreach (String data in datas) { if (item == null) { item = new ListViewItem(data); } else { item.SubItems.Add(data); } } listView1.Items.Add(item); } */ }