private void BindFirstView() { FirstView.GridLines = true; FirstView.View = View.Details; FirstView.Clear(); FirstView.Columns.Add("终结符", 60); FirstView.Columns.Add("First集", 200); int c = Analysis.FirstSets.Count, i = 0; ListViewItem[] p = new ListViewItem[c]; foreach (char ch in Analysis.FirstSets.Keys) { string[] a = new string[2]; a[0] = ch.ToString(); //a[1] = Analysis.FirstSets[ch].Count.ToString(); HashSet <char> set = Analysis.FirstSets[ch]; foreach (char cr in set) { a[1] += cr.ToString() + ","; } a[1] = a[1].Substring(0, a[1].Length - 1); p[i] = new ListViewItem(a); ++i; } FirstView.Items.AddRange(p); }
private void Init() { ProductionView.Clear(); FirstView.Clear(); VnBox.Text = ""; VtBox.Text = ""; ItemSetView.Clear(); TableView.Clear(); InBox.Text = ""; ProcessView.Clear(); }