public BladeManager(int maxDepth = 10, bool showDebugButton = false, string cssPath = null, bool cssHotReloading = false) { Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US"); Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-US"); CultureInfo.DefaultThreadCurrentCulture = new CultureInfo("en-US"); CultureInfo.DefaultThreadCurrentUICulture = new CultureInfo("en-US"); AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler((_, e) => ShowUnhandledException((Exception)e.ExceptionObject)); LINQPad.Controls.Control.UnhandledException += new ThreadExceptionEventHandler((_, e) => ShowUnhandledException(e.Exception)); TaskScheduler.UnobservedTaskException += new EventHandler <UnobservedTaskExceptionEventArgs>((_, e) => ShowUnhandledException(e.Exception)); _maxDepth = maxDepth; _cssPath = cssPath; _cssHotReloading = cssHotReloading; ShowDebugButton = showDebugButton; _stack = new Stack <Blade>(); _panels = Enumerable.Range(0, _maxDepth).Select((e, i) => new DumpContainer()).ToArray(); _sideBladeContainer = new DumpContainer(); _styleManager = new StyleManager(); _overlay = new Overlay(); _popover = new Popover(); _toaster = new Toaster(); _progressDisplay = new ProgressDisplay(_overlay); _containers = _panels.Select(Blade).ToArray(); Util.KeepRunning(); }
public ProgressInstance(ProgressDisplay progressDisplay, string title, IProgress <int> progress, CancellationTokenSource cancellationTokenSource) { _progressDisplay = progressDisplay; Title = title; Progress = progress; CancellationTokenSource = cancellationTokenSource; }