public SpansOptionPanel(SpansNode parent) : base(parent) { SetupFromXmlFile(System.IO.Path.Combine(PropertyService.DataDirectory, @"resources\panels\HighlightingEditor\Spans.xfrm")); addBtn = (Button)ControlDictionary["addBtn"]; addBtn.Click += new EventHandler(addClick); removeBtn = (Button)ControlDictionary["removeBtn"]; removeBtn.Click += new EventHandler(removeClick); listView = (ListView)ControlDictionary["listView"]; }
public override void LoadSettings() { SpansNode node = (SpansNode)parentNode; listView.Items.Clear(); foreach (SpanNode rn in node.Nodes) { ListViewItem lv = new ListViewItem(rn.Text); lv.Tag = rn; listView.Items.Add(lv); } }