Ejemplo n.º 1
0
        public static bool onTerminalWriteLine(Terminal self, ref string input)
        {
            if (!calledFromSingle)
            {
                var terminalWriteEvent = new Event.TerminalWriteEvent(self, input);
                terminalWriteEvent.CallEvent();
                if (terminalWriteEvent.IsCancelled)
                {
                    return(true);
                }
                input = terminalWriteEvent.Text;
            }
            var terminalWriteLineEvent = new Event.TerminalWriteLineEvent(self, input);

            terminalWriteLineEvent.CallEvent();
            if (terminalWriteLineEvent.IsCancelled)
            {
                return(true);
            }
            input = terminalWriteLineEvent.Text;
            return(false);
        }
Ejemplo n.º 2
0
        public static bool onTerminalWriteAppend(Terminal self, ref string input)
        {
            calledFromSingle = true;
            var terminalWriteEvent = new Event.TerminalWriteEvent(self, input);

            terminalWriteEvent.CallEvent();
            if (terminalWriteEvent.IsCancelled)
            {
                calledFromSingle = false;
                return(true);
            }
            input = terminalWriteEvent.Text;
            var terminalWriteAppendEvent = new Event.TerminalWriteAppendEvent(self, input);

            terminalWriteAppendEvent.CallEvent();
            if (terminalWriteAppendEvent.IsCancelled)
            {
                return(true);
            }
            input = terminalWriteAppendEvent.Text;
            return(false);
        }