Beispiel #1
0
        internal ConsoleWindow(DLRHost host)
        {
            InitializeComponent();
            this.host = host;

            Output = new TextBoxWriter(textBox);
            host.RedirectOut(Output as TextBoxWriter);

            Input = new TextBoxReader(textBox);
            Input.LineRead += Input_LineRead;
            WriteStart();
        }
Beispiel #2
0
        public void Load(IServiceProvider serviceProvider)
        {
            ServiceProvider = serviceProvider;
            DLRHost host = new DLRHost(ServiceProvider);

            ConsoleWindowManager manager = new ConsoleWindowManager(serviceProvider, host);

            manager.CreateConsoleWindow();
            manager.AddToolbarItem();
               manager.AddContextMenu();

            AssemblyLoader assembly = new AssemblyLoader((IAssemblyManager)ServiceProvider.GetService(typeof(IAssemblyManager)), host);
            assembly.LoadAssemblies();
        }
 public ConsoleWindowManager(IServiceProvider service, DLRHost host)
 {
     serviceProvider = service;
      Host = host;
      windowManager = (IWindowManager)serviceProvider.GetService(typeof(IWindowManager));
 }