public void setActionBar(NonterminalActionBar tabIn) { Unregister(); NontAb = tabIn; NontAb.ControlEvent += new NonterminalActionBar.ControlEventHandler(NonterminalControlEvent); }
void setActionBar(object sender, GrammarEventArgs e) { if (sender is Terminal) { TerminalActionBar tab = new TerminalActionBar(sender as Terminal); actionBarHolder.Content = tab; controller.setActionBar(tab); } if (sender is NonterminalCollapsed) { NonterminalActionBar tab = new NonterminalActionBar(sender as NonterminalCollapsed); actionBarHolder.Content = tab; controller.setActionBar(tab); } if (sender is NonterminalExpanded) { NonterminalActionBar tab = new NonterminalActionBar(sender as NonterminalExpanded); actionBarHolder.Content = tab; controller.setActionBar(tab); } }