using System;\r
using System.Collections.Generic;\r
using System.Globalization;\r
+ using System.Windows;\r
using System.Windows.Media.Imaging;\r
\r
using Caliburn.Micro;\r
{\r
if (!string.IsNullOrEmpty(this.Task.Source))\r
{\r
+ this.StaticPreviewViewModel.IsOpen = true;\r
this.StaticPreviewViewModel.UpdatePreviewFrame(this.Task);\r
this.WindowManager.ShowWindow(this.StaticPreviewViewModel);\r
}\r
/// </summary>\r
private void UpdatePreviewImage()\r
{\r
- if (delayedPreviewprocessor != null && this.Task != null)\r
+ if (delayedPreviewprocessor != null && this.Task != null && this.StaticPreviewViewModel != null && this.StaticPreviewViewModel.IsOpen)\r
{\r
delayedPreviewprocessor.PerformTask(() => this.StaticPreviewViewModel.UpdatePreviewFrame(this.Task), 800);\r
}\r
this.Title = Properties.Resources.Preview;\r
}\r
\r
+ /// <summary>\r
+ /// Gets or sets a value indicating whether is open.\r
+ /// </summary>\r
+ public bool IsOpen { get; set; }\r
+\r
/// <summary>\r
/// The update preview frame.\r
/// </summary>\r