Skip to content

Commit cc57d05

Browse files
committed
Merge branch 'copilot/add-profile-file-location-ui' of https://github.com/BornToBeRoot/NETworkManager into copilot/add-profile-file-location-ui
2 parents 2a53696 + 484edb5 commit cc57d05

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

Source/NETworkManager/Views/SettingsProfilesView.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<UserControl.Resources>
1818
<converters:BooleanToVisibilityCollapsedConverter x:Key="BooleanToVisibilityCollapsedConverter" />
1919
<converters:BooleanReverseToVisibilityCollapsedConverter x:Key="BooleanReverseToVisibilityCollapsedConverter" />
20-
<converters:BooleanReverseConverter x:Key="BooleanReverseConverter" />
20+
2121
</UserControl.Resources>
2222
<StackPanel>
2323
<TextBlock Style="{StaticResource ResourceKey=HeaderTextBlock}"

Source/NETworkManager/Views/SettingsProfilesView.xaml.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,15 @@ private void TextBoxLocation_Drop(object sender, DragEventArgs e)
4545

4646
var files = (string[])e.Data.GetData(DataFormats.FileDrop);
4747

48-
if (files != null)
48+
if (files is { Length: > 0 })
4949
_viewModel.SetLocationPathFromDragDrop(files[0]);
5050
}
5151

5252
private void TextBoxLocation_PreviewDragOver(object sender, DragEventArgs e)
5353
{
54-
e.Effects = DragDropEffects.Copy;
54+
e.Effects = e.Data.GetDataPresent(DataFormats.FileDrop)
55+
? DragDropEffects.Copy
56+
: DragDropEffects.None;
5557
e.Handled = true;
5658
}
5759
}

0 commit comments

Comments
 (0)