예제 #1
0
        public override void activate(string prevReceiver)
        {
            base.activate(prevReceiver);
            if (prevReceiver.StartsWith("DATA"))
            {
                tick(0);
                return;
            }
            LCD_Manager     lm = _parent._m_Hardware_LCD;
            Extended_Memory em = _parent._m_Extended_Memory;

            lm.clearScreen();
            lm.outputStatus(
                _parent._m_Program_Memory.getCounter(),
                em.getCounter(),
                "MEM",
                "   ");
            int cnt = (int)em.getCounter();

            for (int i = 10, j = cnt; i >= 0; i--, j--)
            {
                string s = em.toString("", j);
                lm.outputTerminalLine((uint)i, s);
            }
            lm.forcePaint();
        }
예제 #2
0
        public override void activate(string prevReceiver)
        {
            base.activate(prevReceiver);
            if (prevReceiver.StartsWith("PROG"))
            {
                tick(0);
                return;
            }
            LCD_Manager    lm = _parent._m_Hardware_LCD;
            Program_Memory pm = _parent._m_Program_Memory;

            lm.clearScreen();
            lm.outputStatus(
                pm.getCounter(),
                _parent._m_Extended_Memory.getCounter(),
                pm.getEModeName(),
                "   ");
            int display_PC = (int)pm.getCounter();

            string[] _displayLines = pm.getPreviousLines(LCD_Manager.SCREEN_ROWS - 1);
            for (int i = 10, j = 0, k = display_PC; i >= 0; i--, j++, k--)
            {
                if (k < 0)
                {
                    lm.eraseTerminalLine((uint)i);
                    continue;
                }
                string s = k.ToString("0000");
                s += (k == display_PC) ? "> " : "  ";
                lm.outputTerminalLine((uint)i, s + _displayLines[j]);
            }
            lm.forcePaint();
        }
예제 #3
0
        public override void activate(string prevReceiver)
        {
            base.activate(prevReceiver);
            if (prevReceiver.StartsWith("FILE"))
            {
                tick(0);
                return;
            }
            LCD_Manager lm = _parent._m_Hardware_LCD;

            lm.clearScreen();
            lm.outputStatus(
                _parent._m_Program_Memory.getCounter(),
                _parent._m_Extended_Memory.getCounter(),
                "   ",
                "   ");

            string[] Lines = _parent._m_RPN_Functions.getOutputLines();
            _parent._m_Hardware_SD.getFolderListing(Lines, _nLinesShown, LCD_Manager.SCREEN_COLS - 1);
            for (int i = 0; i < _nLinesShown; i++)
            {
                lm.outputTerminalLine((uint)i, Lines[i]);
            }
            lm.forcePaint();
        }
예제 #4
0
        public override void activate(string prevReceiver)
        {
            base.activate(prevReceiver);
            if (prevReceiver.StartsWith("AUTO"))
            {
                tick(0);
                return;
            }
            LCD_Manager lm = _parent.getLCD();
            RPN_Stack   st = _parent._m_RPN_Stack;

            lm.clearScreen();
            lm.outputStatus(
                _parent._m_Program_Memory.getCounter(),
                _parent._m_Extended_Memory.getCounter(),
                _parent._m_RPN_Stack.getDModeName(),
                "   ");
            lm.outputCalcRegister(0, st.X.toString());
            lm.outputCalcLabel(0, st.X_Label);
            lm.outputCalcRegister(1, st.Y.toString());
            lm.outputCalcLabel(1, st.Y_Label);
            lm.outputCalcRegister(2, st.Z.toString());
            lm.outputCalcLabel(2, st.Z_Label);
            lm.outputCalcRegister(3, st.T.toString());
            lm.outputCalcLabel(3, st.T_Label);
            lm.forcePaint();
        }
예제 #5
0
        public override void activate(string prevReceiver)
        {
            base.activate(prevReceiver);
            LCD_Manager lm = _parent._m_Hardware_LCD;

            lm.clearScreen();
            lm.showSplash();
            lm.forcePaint();
            _splashed = DateTime.Now;
        }
예제 #6
0
        public void shutdown()
        {
            // TODO: Simulator dog-and-pony here
            _m_Hardware_LCD.clearScreen();
            _m_Hardware_LCD.showSplash();
            _m_Hardware_LCD.forcePaint();
            string returnReceiver = current_Receiver.Moniker;

            // checks for Simulator only;
            // the actual ESP32 hardware is simply off!
            switch (returnReceiver)
            {
            case "OFF":
            case "CONFIRMATION":
            case "Data_Erase":
            case "Prog_Erase":
                returnReceiver = current_Receiver.getReturnReceiverMoniker();
                break;

            case "ADDRESS":
            case "ADDRESS_AMX":
            case "ADDRESS_AXM":
            case "ADDRESS_MC":
            case "ADDRESS_PC":
            case "NUMBER":
            case "NUMBER_DATA":
            case "NUMBER_PROG":
            case "TEXT":
                current_Receiver.tick(31);
                returnReceiver = current_Receiver.getReturnReceiverMoniker();
                break;

            default:
                break;
            }
            _m_RPN_Functions.saveState(returnReceiver);
            _m_Hardware_LCD.clearScreen();
            _m_Hardware_LCD.forcePaint();
        }
예제 #7
0
        public override void activate(string prevReceiver)
        {
            base.activate(prevReceiver);
            LCD_Manager lm = _parent._m_Hardware_LCD;

            lm.clearScreen();
            for (int i = 0; i < 256; i++)
            {
                int x = (i % 29) * 11;
                int y = (i / 29) * 20;
                lm.outputChar(x, y, (byte)i, System.Drawing.Color.Orange, System.Drawing.Color.Black);
            }
            lm.forcePaint();
        }