private void EndGetRecentPostsAsync() { Debug.Assert(_pendingRecentPostsOperation != null); // unhook from events _pendingRecentPostsOperation.Completed -= new EventHandler(_pendingRecentPostsOperation_Completed); _pendingRecentPostsOperation.Failed -= new ThreadExceptionEventHandler(_pendingRecentPostsOperation_Failed); _pendingRecentPostsOperation = null; // cancel progress UI GetRecentPostsProgressControl.Stop(); }
private void BeginGetRecentPostsAsync() { Debug.Assert(_pendingRecentPostsOperation == null); // padded wait cursor to provide tactile feedback that a fetch is starting PaddedWaitCursor waitCursor = new PaddedWaitCursor(250); waitCursor.Dispose(); // show progress UI GetRecentPostsProgressControl.Start(ShowPages); _pendingRecentPostsOperation = new GetRecentPostsAsyncOperation(new BlogClientUIContextImpl(_parentForm), PostSource, RecentPostRequest, ShowPages); _pendingRecentPostsOperation.Completed += new EventHandler(_pendingRecentPostsOperation_Completed); _pendingRecentPostsOperation.Failed += new ThreadExceptionEventHandler(_pendingRecentPostsOperation_Failed); _pendingRecentPostsOperation.Start(); }
private void EndGetRecentPostsAsync() { Debug.Assert(_pendingRecentPostsOperation != null); // unhook from events _pendingRecentPostsOperation.Completed -= new EventHandler(_pendingRecentPostsOperation_Completed); _pendingRecentPostsOperation.Failed -= new ThreadExceptionEventHandler(_pendingRecentPostsOperation_Failed); _pendingRecentPostsOperation = null; // cancel progress UI GetRecentPostsProgressControl.Stop(); }
private void BeginGetRecentPostsAsync() { Debug.Assert(_pendingRecentPostsOperation == null); // padded wait cursor to provide tactile feedback that a fetch is starting PaddedWaitCursor waitCursor = new PaddedWaitCursor(250); waitCursor.Dispose(); // show progress UI GetRecentPostsProgressControl.Start(ShowPages); _pendingRecentPostsOperation = new GetRecentPostsAsyncOperation(new BlogClientUIContextImpl(_parentForm), PostSource, RecentPostRequest, ShowPages); _pendingRecentPostsOperation.Completed += new EventHandler(_pendingRecentPostsOperation_Completed); _pendingRecentPostsOperation.Failed += new ThreadExceptionEventHandler(_pendingRecentPostsOperation_Failed); _pendingRecentPostsOperation.Start(); }