Example #1
0
 /// <summary>
 /// Initialize a new instance <see cref="ApplicationHandler"/>
 /// </summary>
 public ApplicationHandler(IEventLoop eventLoop,
                           IPseudographicsProvider pseudographicsProvider,
                           ISystemColors systemColors,
                           IEnvironment environment)
 {
     this.eventLoop = eventLoop ?? throw new ArgumentNullException(nameof(eventLoop));
     this.pseudographicsProvider = pseudographicsProvider
                                   ?? throw new ArgumentNullException(nameof(pseudographicsProvider));
     this.systemColors           = systemColors ?? throw new ArgumentNullException(nameof(systemColors));
     this.environment            = environment ?? throw new ArgumentNullException(nameof(environment));
     this.eventLoop.OnLoopEmpty += OnLoopEmptyHandler;
     windows    = new WindowCollection();
     screenRect = new Rect(0, 0, this.environment.WindowWidth, this.environment.WindowHeight);
 }
Example #2
0
 /// <summary>
 /// Initialize a new instance <see cref="DefaultEnvironment"/>
 /// </summary>
 public DefaultEnvironment(IPseudographicsProvider pseudographicsProvider)
 {
     this.pseudographicsProvider = pseudographicsProvider;
     BorderChars = new BorderChars('┌', '─', '┒', '│', '┃',
                                   '┕', '━', '┛');
 }