Наследование: System.Management.Automation.Host.PSHost, IDisposable
Пример #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;
            };
        }
Пример #2
0
        protected override void Dispose(bool disposing)
        {
            _host?.Dispose();
            _host = null;

            Runner?.Dispose();

            base.Dispose(disposing);
        }