Skip to content

Commit

Permalink
Fix blocked input after window is closed #12
Browse files Browse the repository at this point in the history
  • Loading branch information
waldfee committed Nov 9, 2017
1 parent af21f35 commit cf9c8b6
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
Expand Up @@ -145,9 +145,8 @@ public async Task SwitchToProjectReferencesAsync()
}
}
// TODO: Save project
//if (SaveProjects)
// project.Save();
if (SaveProjects)
project.Save();
if (!string.IsNullOrEmpty(nuGetReferenceTransformationsForProject))
{
Expand Down Expand Up @@ -191,9 +190,8 @@ public async Task SwitchToNuGetReferencesAsync()
}
}
// TODO: Save project
//if (SaveProjects)
// project.Save();
if (SaveProjects)
project.Save();
project.DeleteConfigurationFile();
}
Expand Down
8 changes: 5 additions & 3 deletions src/NuGetReferenceSwitcher.Presentation/Views/MainDialog.xaml
@@ -1,9 +1,10 @@
<Window x:Class="NuGetReferenceSwitcher.Presentation.Views.MainDialog"
<PlatformUi:DialogWindow x:Class="NuGetReferenceSwitcher.Presentation.Views.MainDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:converters="clr-namespace:MyToolkit.Converters;assembly=MyToolkit.Extended"
xmlns:viewModels="clr-namespace:NuGetReferenceSwitcher.Presentation.ViewModels"
xmlns:converters1="clr-namespace:NuGetReferenceSwitcher.Presentation.Converters"
xmlns:converters1="clr-namespace:NuGetReferenceSwitcher.Presentation.Converters"
xmlns:PlatformUi="clr-namespace:Microsoft.VisualStudio.PlatformUI;assembly=Microsoft.VisualStudio.Shell.12.0"
Title="Switch NuGet and Project references"
Height="700" Width="800" ResizeMode="CanResizeWithGrip"
WindowStartupLocation="CenterScreen">
Expand Down Expand Up @@ -171,4 +172,5 @@
</TabItem>
</TabControl>
</Grid>
</Window>
</PlatformUi:DialogWindow>

Expand Up @@ -13,6 +13,9 @@
using System.Windows.Forms;
using System.Windows.Input;
using EnvDTE;

using Microsoft.VisualStudio.PlatformUI;

using MyToolkit.Collections;
using MyToolkit.Mvvm;
using NuGetReferenceSwitcher.Presentation.Models;
Expand All @@ -24,7 +27,7 @@
namespace NuGetReferenceSwitcher.Presentation.Views
{
/// <summary>Interaction logic for MainDialog.xaml </summary>
public partial class MainDialog : Window
public partial class MainDialog : DialogWindow
{
private OpenFileDialog _dlg;

Expand Down
Expand Up @@ -63,7 +63,7 @@ private void OnShowDialog(object sender, EventArgs e)
var window = new MainDialog(application, GetType().Assembly);
var helper = new WindowInteropHelper(window);
helper.Owner = (IntPtr)application.MainWindow.HWnd;
window.ShowDialog();
window.ShowModal();
}
}
}
Expand Down

0 comments on commit cf9c8b6

Please sign in to comment.