コード例 #1
0
        internal void Select(Terminal terminalControl)
        {
            GrammarEventArgs eventArgs = new GrammarEventArgs();
            eventArgs.Action = GrammarActions.Click;
            eventArgs.Reference = terminalControl.TerminalV;

            if (TerminalEvent != null)
            {
                TerminalEvent(terminalControl, eventArgs);
            }
        }
コード例 #2
0
        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);
            }
        }
コード例 #3
0
        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);
            }
        }
コード例 #4
0
        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();
        }
コード例 #5
0
 internal void Listen(Terminal terminal)
 {
     terminal.ControlEvent += new Terminal.ControlEventHandler(terminal_ControlEvent);
 }
コード例 #6
0
 public void Select(Terminal terminalControl)
 {
     ViewController.ViewEvents.Select(terminalControl);
 }
コード例 #7
0
 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);
        }