void DestroyPreviewWindow() { if (previewWindow != null) { previewWindow.Destroy(); previewWindow = null; } }