public void Test6() { var term = CreateWpfTerminalControl(out var w); term.FontFamily = new FontFamily("Lucida console"); term.NumRows = 10; term.NumColumns = 20; ITerminalInterface xxi = new TerminalInterface(term); w.ShowActivated = true; // w.ShowDialog(); _terminal = term; var wClosed = false; w.Closed += (sender, args) => { wClosed = true; }; for (var i = 0; i < 25; i++) { var s = i.ToString("D3"); for (int j = 0; j < s.Length; j++) { xxi.SetCellCharacter(i, j, s[j]); } } w.Show(); }
public void Test9() { var term = CreateWpfTerminalControl(out var w); term.FontFamily = new FontFamily("Lucida console"); term.NumRows = 10; term.NumColumns = 30; ITerminalInterface xxi = new TerminalInterface(term); w.ShowActivated = true; w.Show(); _terminal = term; var wClosed = false; w.Closed += (sender, args) => { wClosed = true; }; var xxiNumRows = xxi.NumRows; var xxiNumColumns = xxi.NumColumns; _testOutputHelper.WriteLine($"Numrows is {xxiNumRows}"); _testOutputHelper.WriteLine($"cols is {xxiNumColumns}"); for (var i = 0; i < xxiNumRows; i++) { var s = i.ToString("D3"); for (int j = 0; j < xxiNumColumns; j++) { try { xxi.SetCellCharacter(i, j, 'a'); } catch (Exception ex) { throw; } DoEvents(); } } Thread.Sleep(10000); }