private void InstantiateDiscoveryWindow() { // first time cdw is null if ((cdw == null) || (cdw.IsLoaded == false)) { cdw = new DiscoveryWindow(); cdw.Show(); } else { cdw.Activate(); } }
private void InstantiateDiscoveryWindow(string filePath) { // first time cdw is null // from second condition will not be evaluated if ((cdw == null) || (cdw.IsLoaded == false)) { cdw = new DiscoveryWindow(filePath); cdw.Show(); } else { // if entering here, then I'm trying to open 2 DiscoveryWindow (2 servers) MessageBox.Show("To start sending another file, close the open MSFT Windows.", "MSFT", MessageBoxButton.OK, MessageBoxImage.Warning, MessageBoxResult.OK, MessageBoxOptions.DefaultDesktopOnly); } }