public TeminalWindow() { InitializeComponent(); pendingCmds = new Queue <string> (); pendingTextForConsole = new Queue <string> (); userHistory = new List <string>(userHistoryMaxSize); currentFont = TerminalScreen.Font; terminalScreenDC = TerminalScreen.CreateGraphics(); backGroundColor = Color.FromArgb(255, 255, 255); backGroundBrush = new SolidBrush(backGroundColor); backGroundPen = new Pen(backGroundBrush); foreGroundColor = Color.FromArgb(0, 0, 0); foreGroundBrush = new SolidBrush(foreGroundColor); foreGroundPen = new Pen(foreGroundBrush); UpdateBufferForPanelSize(); terminalWindowDoneConstructing = true; ComputeParameters(); blinkingCursorLoc = new Point(marginLeft, marginTop); blinkingCursorRec = new Rectangle(Point.Round(blinkingCursorLoc), new Size(1, lineHeight)); RefreshTimer.Enabled = true; }
public Terminal3270(String modelNumber, String address, int portNumber, bool visible = true, int scriptPort = 17938) { this.Address = address; this.ModelNumber = modelNumber; this.PortNumber = portNumber; this.ScriptPort = scriptPort; this.Visible = visible; this.Emulator = new Process(); this.Wrapper = new Process(); this.Screen = new TerminalScreen(); this.Status = new TerminalStatus(); }
private void BeginInteraction(GameObject terminalScreen) { if (playerState != PlayerState.Alive) { return; } PlayClip(terminalSound); // pause game Time.timeScale = 0f; terminalScreen.SetActive(true); TerminalScreen terminal = terminalScreen.GetComponent <TerminalScreen>(); Cursor.visible = true; Cursor.lockState = CursorLockMode.None; hud.SetActive(false); playerState = PlayerState.Interacting; terminal.StartTerminal(hud); }