Inheritance: System.ComponentModel.AsyncCompletedEventArgs
Esempio n. 1
0
 private void getBitmapManager_GetBitmapCompleted(object sender, GetBitmapCompletedEventArgs e)
 {
     if (e.Error == null)
     {
         bitmapPreviewCache[getBitmapManagerUserStateToInput[e.UserState]] = e.Bitmap;
         if (listViewImageList.SelectedItems.Count > 0)
         {
             string key = listViewImageList.SelectedItems[0].Text;
             if (bitmapPreviewCache.ContainsKey(key))
             {
                 pictureBoxImagePreview.Image = bitmapPreviewCache[key];
             }
         }
     }
 }
Esempio n. 2
0
 protected virtual void OnProcessCompleted(GetBitmapCompletedEventArgs e)
 {
     if (ProcessCompleted != null)
     {
         ProcessCompleted(this, e);
     }
 }
Esempio n. 3
0
 protected virtual void OnGetBitmapCompleted(GetBitmapCompletedEventArgs e)
 {
     if (GetBitmapCompleted != null)
     {
         GetBitmapCompleted(this, e);
     }
 }
Esempio n. 4
0
 private void DoProcessAsyncCompleted(AsyncOperation asyncOp, GetBitmapCompletedEventArgs e)
 {
     asyncOp.PostOperationCompleted(processAsyncCompletedDelegate, e);
 }
Esempio n. 5
0
        // GetBitmapManager 完成以及处理插件处理完成。
        private void getBitmapCompleted(object sender, GetBitmapCompletedEventArgs e)
        {
            object userState = taskUserStateToUserState[e.UserState];
            ImageProcessorTaskContext imageProcessorTaskContext = userStateToTaskContext[userState];

            if (!e.Cancelled && e.Error == null)
            {
                imageProcessorTaskContext.Bitmap = e.Bitmap;
                userStateToLifetime[userState].Post(processAsyncProgressChangedDelegate, new ProgressChangedEventArgs(Utilities.IntRound(100.0 * (imageProcessorTaskContext.TotalProcedureCount - imageProcessorTaskContext.ProcessingPluginQueue.Count - 1) / imageProcessorTaskContext.TotalProcedureCount), userState));
            }
            else
            {
                if (e.Error != null)
                {
                    imageProcessorTaskContext.Error = e.Error;
                }
            }

            imageProcessorTaskContext.AutoResetEvent.Set();
        }