Example #1
0
 /// <summary>
 /// Creates a debug string for spamming the display with too much information
 /// </summary>
 /// <returns>A formatted debug string</returns>
 public override string ToString()
 {
     return
         ("CurrentColumn: " + CurrentColumn.ToString() + "\n" +
          "CurrentRow:" + CurrentRow.ToString() + "\n" +
          "ApplicationCursorKeysMode:" + ApplicationCursorKeysMode.ToString() + "\n" +
          "Attribute:\n" + Attributes.ToString() + "\n" +
          "TabStops:" + string.Join(",", TabStops.Select(x => x.ToString()).ToList()) + "\n" +
          "WordWrap:" + WordWrap.ToString() + "\n" +
          "ReverseVideoMode:" + ReverseVideoMode.ToString() + "\n" +
          "OriginMode:" + OriginMode.ToString() + "\n" +
          "InsertMode:" + InsertMode.ToString() + "\n" +
          "ShowCursor:" + ShowCursor.ToString() + "\n" +
          "BlinkingCursor:" + BlinkingCursor.ToString() + "\n" +
          "CursorShape:" + CursorShape.ToString() + "\n" +
          "Utf8:" + Utf8.ToString() + "\n" +
          "CharacterSetMode:" + CharacterSetMode.ToString() + "\n" +
          "G0:" + G0.ToString() + "\n" +
          "G1:" + G1.ToString() + "\n" +
          "G2:" + G2.ToString() + "\n" +
          "G3:" + G3.ToString() + "\n" +
          "Vt300G1:" + Vt300G1.ToString() + "\n" +
          "Vt300G2:" + Vt300G2.ToString() + "\n" +
          "Vt300G3:" + Vt300G3.ToString() + "\n" +
          "Vt52AlternateKeypad: " + Vt52AlternateKeypad.ToString() + "\n" +
          "Vt52GraphicsMode: " + Vt52GraphicsMode.ToString() + "\n" +
          "AutomaticNewLine:" + AutomaticNewLine.ToString() + "\n" +
          "ConfiguredColumns:" + ConfiguredColumns.ToString() + "\n" +
          "National Character Replacement Mode:" + NationalCharacterReplacementMode.ToString() + "\n" +
          "Single shift character mode:" + SingleShiftSelectCharacterMode.ToString() + "\n"
         );
 }
        // TODO - change to events
        public void OnKeyPressed(char key, SysKeys?sysKey)
        {
            if (key == 'q')
            {
                CloseAplication();
            }
            else if (sysKey != null)
            {
                KeyPress.FindAndExecuteCommand(sysKey.Value);
            }
            else
            {
                KeyPress.FindAndExecuteCommand(key);
            }

            BlinkingCursor.AddBlinkKey(key, sysKey);
        }
        // TODO - change to events
        public void OnKeyPressed(char key, SysKeys?sysKey)
        {
            if (!ViewModelContainer.ResultsDbViewModel.IsVisible)
            {
                if (key == 'q')
                {
                    CloseAplication();
                }
                else if (sysKey != null)
                {
                    KeyPress.FindAndExecuteCommand(sysKey.Value);
                }
                else
                {
                    KeyPress.FindAndExecuteCommand(key);
                }

                BlinkingCursor.AddBlinkKey(key, sysKey);
            }
        }