Пример #1
0
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         this.m_Disposed = true;
         if (this.m_WorkThread != null)
         {
             this.m_WorkThread.Abort();
         }
         if (this.m_Convertor != null)
         {
             this.m_Convertor.ConversionDone -= new EventHandler(this.OnConvertor_ConversionDone);
             this.m_Convertor.Dispose();
             this.m_Convertor = null;
         }
         this.DisableEvents();
         if (this.m_ImageDefault != null)
         {
             this.m_ImageDefault.Dispose();
             this.m_ImageDefault = null;
         }
         if (this.m_ImagePressed != null)
         {
             this.m_ImagePressed.Dispose();
             this.m_ImagePressed = null;
         }
         if (this.m_ImageVgaDefault != null)
         {
             this.m_ImageVgaDefault.Dispose();
             this.m_ImageVgaDefault = null;
         }
         if (this.m_ImageVgaPressed != null)
         {
             this.m_ImageVgaPressed.Dispose();
             this.m_ImageVgaPressed = null;
         }
         if (this.m_DimmedImage != null)
         {
             this.m_DimmedImage.Dispose();
             this.m_DimmedImage = null;
         }
         if (this.m_DimmedImageVga != null)
         {
             this.m_DimmedImageVga.Dispose();
             this.m_DimmedImageVga = null;
         }
         if (this.m_bmpOffscreen != null)
         {
             this.m_bmpOffscreen.Dispose();
             this.m_bmpOffscreen = null;
         }
         if (this.m_BmpDest != null)
         {
             this.m_BmpDest.Dispose();
             this.m_BmpDest = null;
         }
         if (this.m_BmpSrc != null)
         {
             this.m_BmpSrc.Dispose();
             this.m_BmpSrc = null;
         }
     }
     if (disposing && (this.components != null))
     {
         this.components.Dispose();
     }
     base.Dispose(disposing);
 }
Пример #2
0
 private void InitConvertor()
 {
     this.m_Convertor = new ConvertToGrayscaleInBackgrnd();
     this.m_Convertor.ConversionDone += new EventHandler(this.OnConvertor_ConversionDone);
 }