internal void Select(Terminal terminalControl) { GrammarEventArgs eventArgs = new GrammarEventArgs(); eventArgs.Action = GrammarActions.Click; eventArgs.Reference = terminalControl.TerminalV; if (TerminalEvent != null) { TerminalEvent(terminalControl, eventArgs); } }
internal void Rename(Terminal terminalControl, string newName) { GrammarEventArgs eventArgs = new GrammarEventArgs(); eventArgs.NewName = newName; eventArgs.Reference = terminalControl.TerminalV; eventArgs.Action = GrammarActions.Rename; if (TerminalEvent != null) { TerminalEvent(terminalControl, eventArgs); } }
private void SelectedTerminal(Terminal control, GrammarEventArgs e) { UnselectAll(); // set the terminal in the view to be selected control.TerminalV.Reference.IsSelected = true; ReDraw(); if (ControlSelected != null) { ControlSelected(control, e); } }
private void Rename(Terminal terminalControl, GrammarEventArgs e) { TerminalV terminalV = e.Reference as TerminalV; if (terminalV == null) throw new Exception("The references visualised item is not of type TerminalV"); // rename in the model model.Functions.Rename(terminalV, e.NewName); // rename in the view //view.Functions.Rename(terminalControl, e.NewName); // the redraw will cause the view to be renamed and updated ReDraw(); }
internal void Listen(Terminal terminal) { terminal.ControlEvent += new Terminal.ControlEventHandler(terminal_ControlEvent); }
public void Select(Terminal terminalControl) { ViewController.ViewEvents.Select(terminalControl); }
public void Rename(Terminal terminalControl, string newName) { ViewController.ViewEvents.Rename(terminalControl, newName); }
private void Init(Terminal terminalControlIn) { terminalControl = terminalControlIn; SetName(terminalControl.TerminalV.Name); }
public TerminalActionBar(Terminal terminalControlIn) { InitializeComponent(); Init(terminalControlIn); }