Exemplo n.º 1
0
 private void OnClearCacheTimerTick(object sender, EventArgs e)
 {
     try
     {
         if (!base.IsDisposed && (this.fontPreviewRenderCache != null))
         {
             using (Profiling.UseEnter("Clearing the font preview cache"))
             {
                 Dictionary <TupleStruct <string, float, PaintDotNet.UI.Media.Brush>, PlacedBitmap> fontPreviewRenderCache = this.fontPreviewRenderCache;
                 lock (fontPreviewRenderCache)
                 {
                     this.fontPreviewRenderCache.Clear();
                 }
             }
         }
     }
     catch (Exception)
     {
     }
     finally
     {
         try
         {
             DisposableUtil.Free <System.Windows.Forms.Timer>(ref this.clearCacheTimer);
         }
         catch (Exception)
         {
         }
     }
 }
Exemplo n.º 2
0
 public void PopulateEffects()
 {
     using (Profiling.UseEnter())
     {
         this.adjustmentsMenu.PopulateEffects();
         this.effectsMenu.PopulateEffects();
     }
 }