internal Authorize(DesktopConsumer consumer, FetchUri fetchUriCallback) { this.InitializeComponent(); this.consumer = consumer; Cursor original = this.Cursor; this.Cursor = Cursors.Wait; ThreadPool.QueueUserWorkItem(delegate(object state) { Uri browserAuthorizationLocation = fetchUriCallback(this.consumer, out this.requestToken); System.Diagnostics.Process.Start(browserAuthorizationLocation.AbsoluteUri); this.Dispatcher.BeginInvoke(new Action(() => { this.Cursor = original; finishButton.IsEnabled = true; })); }); }