public override byte tick(byte scancode) { RPN_Functions _rpnf = _parent.getFunctions(); if (!_parent._m_backgroundWorker.IsBusy) { return(_rpnf.requestNextReceiver("AUTO_N")); } if (scancode == 8) { _parent._m_backgroundWorker.CancelAsync(); return(0); } TimeSpan ts = DateTime.Now.Subtract(_lastUIUpdate); bool update_required = ts.TotalMilliseconds > KBD_RUNNING_DELAY; if (!update_required) { return(0); } LCD_Manager lm = _parent.getLCD(); lm.updateStatusPC(_rpnf.progMem.getCounter()); lm.updateStatusMC(_rpnf.extMem.getCounter()); lm.updateCalcRegister(0, _rpnf.rpnStack.X.toString()); lm.requestUpdate(); _lastUIUpdate = DateTime.Now; return(0); }
protected override void updateDisplay(string value) { LCD_Manager lm = _parent.getLCD(); lm.updateStatusMC(toString()); lm.requestUpdate(); }
protected virtual void updateDisplay(string value) { LCD_Manager lm = _parent.getLCD(); StringBuilder sb = new StringBuilder(); sb.Append(_parent._m_Program_Memory.toCounterString()); string tmp = toString(); int ln = tmp.Length - LCD_Manager.SCREEN_COLS + 7; if (ln <= 0) { sb.Append(tmp); } else { sb.Append(tmp.Substring(ln)); } lm.updateTerminalLine(10, sb.ToString()); switch (_mode) { case _Text: lm.updateStatusFMODE("TXT"); break; case _Number: lm.updateStatusFMODE("NUM"); break; default: lm.updateStatusFMODE(" "); break; } lm.requestUpdate(); }
public override byte tick(byte scancode) { LCD_Manager lm = _parent._m_Hardware_LCD; Program_Memory pm = _parent._m_Program_Memory; lm.updateStatusPC(pm.getCounter()); lm.updateStatusMC(_parent._m_Extended_Memory.getCounter()); lm.updateStatusDMODE(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.updateTerminalLine((uint)i, s + _displayLines[j]); } lm.requestUpdate(); return(0); }
protected virtual void updateDisplay(string value) { LCD_Manager lm = _parent.getLCD(); lm.updateCalcRegister(0, toString()); lm.requestUpdate(); }
protected virtual void updateDisplay(string value) { LCD_Manager lm = _parent.getLCD(); int ln = value.Length - LCD_Manager.SCREEN_COLS + 1; lm.updateTerminalLine(LCD_Manager.SCREEN_ROWS - 2, (ln <= 0)? value: value.Substring(ln)); switch (_mode) { case _Text: lm.updateStatusFMODE("TXT"); lm.updateTerminalLine(LCD_Manager.SCREEN_ROWS - 3, _Question); break; case _Number: lm.updateStatusFMODE("NUM"); lm.updateTerminalLine(LCD_Manager.SCREEN_ROWS - 3, _Question); break; default: lm.updateStatusFMODE(" "); lm.updateTerminalLine(LCD_Manager.SCREEN_ROWS - 3, _Confirmation); break; } lm.requestUpdate(); }
protected virtual void updateDisplay(string value) { LCD_Manager lm = _parent.getLCD(); StringBuilder sb = new StringBuilder(); sb.Append(_parent._m_Program_Memory.toString()); sb.Append(toTrimmedString()); lm.updateTerminalLine(10, sb.ToString()); lm.requestUpdate(); }
protected override void updateDisplay(string value) { LCD_Manager lm = _parent.getLCD(); Program_Memory pm = _parent._m_Program_Memory; StringBuilder sb = new StringBuilder(); sb.Append(pm.toCounterString()); sb.Append(value.Trim()); lm.updateTerminalLine(LCD_Manager.SCREEN_ROWS - 2, sb.ToString()); lm.requestUpdate(); }
public override byte tick(byte scancode) { LCD_Manager lm = _parent._m_Hardware_LCD; lm.updateStatusPC(_parent._m_Program_Memory.getCounter()); lm.updateStatusMC(_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.updateTerminalLine((uint)i, Lines[i]); } lm.requestUpdate(); return(0); }
public override byte tick(byte scancode) { LCD_Manager lm = _parent._m_Hardware_LCD; Extended_Memory em = _parent._m_Extended_Memory; lm.updateStatusPC(_parent._m_Program_Memory.getCounter()); lm.updateStatusMC(em.getCounter()); //lm.updateStatusDMODE(_parent._m_RPN_Stack.getDModeName()); int cnt = (int)em.getCounter(); for (int i = 10, j = cnt; i >= 0; i--, j--) { string s = em.toString("", j); lm.updateTerminalLine((uint)i, s); } lm.requestUpdate(); return(0); }
public override byte tick(byte scancode) { LCD_Manager lm = _parent.getLCD(); RPN_Stack st = _parent._m_RPN_Stack; lm.updateStatusPC(_parent._m_Program_Memory.getCounter()); lm.updateStatusMC(_parent._m_Extended_Memory.getCounter()); lm.updateStatusDMODE(st.getDModeName()); lm.updateCalcRegister(0, st.X.toString()); lm.updateCalcLabel(0, st.X_Label); lm.updateCalcRegister(1, st.Y.toString()); lm.updateCalcLabel(1, st.Y_Label); lm.updateCalcRegister(2, st.Z.toString()); lm.updateCalcLabel(2, st.Z_Label); lm.updateCalcRegister(3, st.T.toString()); lm.updateCalcLabel(3, st.T_Label); lm.requestUpdate(); return(0); }