private void closeScanner() { if (_switchWindowsScanner != null) { Windows.CloseForm(_switchWindowsScanner); _switchWindowsScanner = null; } }