public ComputerImportWindow(MapImportViewModel importViewModel) { InitializeComponent(); this.ViewModel = importViewModel; this.DataContext = this.ViewModel; }
internal void OpenComputerImportWindow() { if (SessionPath.IsSessionPathValid() == false) { MessageService.Instance.ShowMessage("Cannot import: You must set your path to Session before importing maps."); return; } MapImportViewModel importViewModel = new MapImportViewModel(); ComputerImportWindow importWindow = new ComputerImportWindow(importViewModel); importWindow.ShowDialog(); ViewModel.ReloadAvailableMapsInBackground(); // reload list of available maps as it may have changed }