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) { } } }
public void PopulateEffects() { using (Profiling.UseEnter()) { this.adjustmentsMenu.PopulateEffects(); this.effectsMenu.PopulateEffects(); } }