private void Window_Closed(object sender, EventArgs e) { liveViewTimer?.Stop(); if (camCon != null && camCon.IsConnected) { camCon.SetLiveView(false); } camCon?.Close(); }