/// <summary> /// 初始化单一实例应用程序对象。这是执行的创作代码的第一行, /// 已执行,逻辑上等同于 main() 或 WinMain()。 /// </summary> public App() { this.InitializeComponent(); this.Suspending += OnSuspending; ImageCache.Clear(TimeSpan.FromDays(3)); }
/// <summary> /// Clears the cache to ensure the images are released from memory correctly. /// </summary> public static void Clear() { ImageCache.Clear(); }