Inheritance: System.Management.Automation.Host.PSHost, IDisposable
Example #1
0
        protected override void OnInitialized(EventArgs e)
        {
            base.OnInitialized(e);
            CommandBox.IsEnabled = false;
            _host = new Host(this, ProgressPanel, new Options(this));

            Loaded += (sender, ignored) =>
            {
                if (!Runner.IsInitialized)
                {
                    Runner.Initialize();
                }

                Document.PagePadding = Padding;
            };
        }
Example #2
0
        protected override void Dispose(bool disposing)
        {
            _host?.Dispose();
            _host = null;

            Runner?.Dispose();

            base.Dispose(disposing);
        }