Skip to content

Commit

Permalink
Change Cursor when open connection.
Browse files Browse the repository at this point in the history
  • Loading branch information
igor-tkachev committed Jun 22, 2018
1 parent a00e5e8 commit ad6d777
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Source/ConnectionDialog.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,14 @@ void ChooseType(object sender, RoutedEventArgs e)

try
{
Cursor = Cursors.Wait;
Mouse.OverrideCursor = Cursors.Wait;

_model.CustomAssemblyPath = _model.CustomAssemblyPath.Trim();

var assembly = DataContextDriver.LoadAssemblySafely(_model.CustomAssemblyPath);
var customTypes = assembly.GetExportedTypes().Where(IsDataConnection).Select(t => t.FullName).Cast<object>().ToArray();

Cursor = oldCursor;
Mouse.OverrideCursor = oldCursor;

var result = (string)Dialogs.PickFromList("Choose Custom Type", customTypes);

Expand All @@ -156,7 +156,7 @@ void ChooseType(object sender, RoutedEventArgs e)
}
finally
{
Cursor = oldCursor;
Mouse.OverrideCursor = oldCursor;
}
}
}
Expand Down Expand Up @@ -199,7 +199,7 @@ void ChooseConfiguration(object sender, RoutedEventArgs e)

try
{
Cursor = Cursors.Wait;
Mouse.OverrideCursor = Cursors.Wait;

var config = ConfigurationManager.OpenExeConfiguration(_model.CustomAssemblyPath);

Expand All @@ -210,7 +210,7 @@ void ChooseConfiguration(object sender, RoutedEventArgs e)
configurations.Add(config.ConnectionStrings.ConnectionStrings[i].Name);
}

Cursor = oldCursor;
Mouse.OverrideCursor = oldCursor;

var result = (string)Dialogs.PickFromList("Choose Custom Type", configurations.ToArray());

Expand All @@ -223,7 +223,7 @@ void ChooseConfiguration(object sender, RoutedEventArgs e)
}
finally
{
Cursor = oldCursor;
Mouse.OverrideCursor = oldCursor;
}
}
}
Expand Down

0 comments on commit ad6d777

Please sign in to comment.