void rightimageSourceRendered(object sender, imageSourceRenderedResultEventArgs e)
 {
     this.rightImageSourceRendered -= rightimageSourceRendered;
     if (e.imgSource != null)
     {
         this.rightImageSource = e.imgSource;
         isRendering           = false;
     }
 }
 private void rightimageSourceRendered(object sender, imageSourceRenderedResultEventArgs e)
 {
     rightImageSourceRendered -= new EventHandler <imageSourceRenderedResultEventArgs>(rightimageSourceRendered);
     if (e.imgSource != null)
     {
         rightImageSource = e.imgSource;
         isRendering      = false;
     }
 }
        void zoomimageSourceRendered(object sender, imageSourceRenderedResultEventArgs e)
        {
            this.resizeImageSourceRendered -= zoomimageSourceRendered;

            isResizing = false;
            //確定是同一頁, 且為不同倍率才換掉圖片
            if (leftPageIndex.Equals(e.renderPageIndex))
            {
                if (PDFScale.Equals(e.sourceScale))
                {
                    EventHandler <imageSourceRenderedResultEventArgs> SendResizeImage = sendresizeImageSourceRendered;
                    if (SendResizeImage != null)
                    {
                        SendResizeImage(sender, e);
                    }
                    isRendering = false;
                    zoomThread.Clear();
                    zoomStep = 0;
                    PDFScale = 1F;
                }
                else
                {
                    for (int i = zoomThread.Count - 1; i >= 0; i--)
                    {
                        if (PDFScale.Equals(((float)Convert.ToDouble(zoomThread[i].Name))))
                        {
                            try
                            {
                                zoomThread[i].Start();
                                this.resizeImageSourceRendered += zoomimageSourceRendered;
                                isResizing = true;
                                break;
                            }
                            catch
                            {
                                //該Thread執行中, 抓下一個Thread測試
                                continue;
                            }
                        }
                    }
                }
            }
            else
            {
                isResizing = false;
                zoomThread.Clear();
            }
        }
 private void zoomimageSourceRendered(object sender, imageSourceRenderedResultEventArgs e)
 {
     resizeImageSourceRendered -= new EventHandler <imageSourceRenderedResultEventArgs>(zoomimageSourceRendered);
     isResizing = false;
     if (leftPageIndex.Equals(e.renderPageIndex))
     {
         if (PDFScale.Equals(e.sourceScale))
         {
             EventHandler <imageSourceRenderedResultEventArgs> eventHandler = this.sendresizeImageSourceRendered;
             if (eventHandler != null)
             {
                 eventHandler(sender, e);
             }
             isRendering = false;
             zoomThread.Clear();
             zoomStep = 0;
             PDFScale = 1f;
             return;
         }
         for (int num = zoomThread.Count - 1; num >= 0; num--)
         {
             if (PDFScale.Equals((float)Convert.ToDouble(zoomThread[num].Name)))
             {
                 try
                 {
                     zoomThread[num].Start();
                     resizeImageSourceRendered += new EventHandler <imageSourceRenderedResultEventArgs>(zoomimageSourceRendered);
                     isResizing = true;
                     return;
                 }
                 catch
                 {
                 }
             }
         }
     }
     else
     {
         isResizing = false;
         zoomThread.Clear();
     }
 }