Ejemplo n.º 1
0
 private void CleanUpDeviceIndependentResources()
 {
     if (this._deviceIndependedResourcesCreated)
     {
         OnCleanUpDeviceIndependentResources();
     }
     if (this._imagingFactory != null)
     {
         this._imagingFactory.Dispose();
         this._imagingFactory = null;
     }
     if (this._directWriteFactory != null)
     {
         this._directWriteFactory.Dispose();
         this._directWriteFactory = null;
     }
     if (this._renderTarget != null)
     {
         this._renderTarget.Dispose();
         this._renderTarget = null;
     }
     if (this._factory != null)
     {
         this._factory.Dispose();
         this._factory = null;
     }
 }
Ejemplo n.º 2
0
 private void CleanUpDeviceIndependentResourcesInternal()
 {
     OnCleanUpDeviceIndependentResources();
     if (_imagingFactory != null)
     {
         _imagingFactory.Dispose();
         _imagingFactory = null;
     }
     if (_directWriteFactory != null)
     {
         _directWriteFactory.Dispose();
         _directWriteFactory = null;
     }
     if (_factory != null)
     {
         _factory.Dispose();
         _factory = null;
     }
     _resourcesCreated = false;
 }
Ejemplo n.º 3
0
 private void CleanUpDeviceIndependentResources()
 {
     if(this._deviceIndependedResourcesCreated)
         OnCleanUpDeviceIndependentResources();
     if (this._imagingFactory != null)
     {
         this._imagingFactory.Dispose();
         this._imagingFactory = null;
     }
     if (this._directWriteFactory != null)
     {
         this._directWriteFactory.Dispose();
         this._directWriteFactory = null;
     }
     if (this._renderTarget != null)
     {
         this._renderTarget.Dispose();
         this._renderTarget = null;
     }
     if (this._factory != null)
     {
         this._factory.Dispose();
         this._factory = null;
     }
 }
Ejemplo n.º 4
0
        public static ComObject <T> CreateFactory <T>() where T : IWICImagingFactory
        {
            var factory = new WicImagingFactory();

            return(new ComObject <T>((T)(object)factory));
        }