Skip to content

Commit 2580a89

Browse files
authored
CodeMaid (#4201)
1 parent 91239a4 commit 2580a89

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+446
-507
lines changed

Files.Launcher/DeviceWatcher.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
using Files.Common;
2-
using Newtonsoft.Json;
32
using System;
4-
using System.Collections.Generic;
53
using System.IO.Pipes;
64
using System.Management;
75
using System.Threading.Tasks;
8-
using Windows.ApplicationModel.AppService;
96
using Windows.Foundation.Collections;
107

118
namespace FilesFullTrust

Files/App.xaml.cs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -342,18 +342,20 @@ protected override async void OnActivated(IActivatedEventArgs args)
342342
if (command.Payload.Equals("."))
343343
{
344344
rootFrame.Navigate(typeof(MainPage), activationPath, new SuppressNavigationTransitionInfo());
345-
} else
345+
}
346+
else
346347
{
347348
var target = Path.GetFullPath(Path.Combine(activationPath, command.Payload));
348-
if(!string.IsNullOrEmpty(command.Payload))
349+
if (!string.IsNullOrEmpty(command.Payload))
349350
{
350351
rootFrame.Navigate(typeof(MainPage), target, new SuppressNavigationTransitionInfo());
351-
} else
352+
}
353+
else
352354
{
353355
rootFrame.Navigate(typeof(MainPage), null, new SuppressNavigationTransitionInfo());
354356
}
355357
}
356-
358+
357359
// Ensure the current window is active.
358360
Window.Current.Activate();
359361
Window.Current.CoreWindow.Activated += CoreWindow_Activated;
@@ -524,4 +526,4 @@ public string Path
524526

525527
public SectionType Section { get; private set; }
526528
}
527-
}
529+
}

Files/BaseLayout.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using Files.Common;
22
using Files.DataModels;
3-
using Files.Enums;
43
using Files.EventArguments;
54
using Files.Extensions;
65
using Files.Filesystem;
@@ -806,7 +805,7 @@ public void RightClickItemContextMenu_Opening(object sender, object e)
806805
}
807806

808807
//Shift key is not held, remove extras here
809-
if(!Window.Current.CoreWindow.GetKeyState(VirtualKey.Shift).HasFlag(CoreVirtualKeyStates.Down))
808+
if (!Window.Current.CoreWindow.GetKeyState(VirtualKey.Shift).HasFlag(CoreVirtualKeyStates.Down))
810809
{
811810
UnloadMenuFlyoutItemByName("PinItemToStart");
812811
UnloadMenuFlyoutItemByName("UnpinItemFromStart");
@@ -1105,6 +1104,7 @@ public async void PinItemToStart_Click(object sender, RoutedEventArgs e)
11051104
await App.SecondaryTileHelper.TryPinFolderAsync(listedItem.ItemPath, listedItem.ItemName);
11061105
}
11071106
}
1107+
11081108
public async void UnpinItemFromStart_Click(object sender, RoutedEventArgs e)
11091109
{
11101110
foreach (ListedItem listedItem in SelectedItems)
@@ -1115,4 +1115,4 @@ public async void UnpinItemFromStart_Click(object sender, RoutedEventArgs e)
11151115

11161116
public abstract void Dispose();
11171117
}
1118-
}
1118+
}

Files/Converters/NavigationViewCompactConverter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ public object ConvertBack(object value, Type targetType, object parameter, strin
1616
throw new NotImplementedException();
1717
}
1818
}
19-
}
19+
}

Files/Dialogs/ConfirmDeleteDialog.xaml.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
using Files.ViewModels;
2-
using Microsoft.Toolkit.Uwp;
1+
using Microsoft.Toolkit.Uwp;
32
using Windows.UI.Xaml;
43
using Windows.UI.Xaml.Controls;
54

Files/Dialogs/ElevateConfirmDialog.xaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88
x:Name="ConfirmElevationDialog"
99
x:Uid="ElevateConfirmDialog"
1010
Title="This action requires adminstrator rights"
11-
Content="Would you like to continue as administrator?"
1211
CloseButtonStyle="{ThemeResource DefaultButtonStyle}"
1312
CloseButtonText="No"
13+
Content="Would you like to continue as administrator?"
1414
CornerRadius="4"
1515
DefaultButton="None"
1616
PrimaryButtonText="Yes"
1717
RequestedTheme="{x:Bind local2:ThemeHelper.RootTheme}"
1818
mc:Ignorable="d">
19-
19+
2020
<ContentDialog.PrimaryButtonStyle>
2121
<Style BasedOn="{StaticResource AccentButtonStyle}" TargetType="Button">
2222
<Setter Property="ContentTemplate">
@@ -31,5 +31,4 @@
3131
</Setter>
3232
</Style>
3333
</ContentDialog.PrimaryButtonStyle>
34-
3534
</ContentDialog>

Files/Dialogs/ElevateConfirmDialog.xaml.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
using Files.ViewModels;
2-
using Files.Views;
3-
using System.Linq;
4-
using Windows.UI.Xaml;
5-
using Windows.UI.Xaml.Controls;
1+
using Windows.UI.Xaml.Controls;
62

73
// The Content Dialog item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238
84

Files/Extensions/EnumExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ public static TEnum GetEnum<TEnum>(string text) where TEnum : struct
1414
return (TEnum)Enum.Parse(typeof(TEnum), text);
1515
}
1616
}
17-
}
17+
}

Files/Filesystem/LibraryManager.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ public async Task RemoveLibrarySideBarItemsUI()
8484

8585
MainPage.SideBarItems.EndBulkOperation();
8686
}
87+
8788
private async Task SyncLibrarySideBarItemsUI()
8889
{
8990
await CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, async () =>
@@ -106,7 +107,7 @@ await CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPrio
106107
SelectsOnInvoked = false,
107108
ChildItems = new ObservableCollection<INavigationControlItem>()
108109
};
109-
110+
110111
MainPage.SideBarItems.Insert(1, librarySection);
111112

112113
libraryItems.Clear();
@@ -152,4 +153,4 @@ await CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPrio
152153
});
153154
}
154155
}
155-
}
156+
}

Files/Helpers/AdaptiveLayoutHelpers.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,4 +132,4 @@ public static bool PredictLayoutMode(FolderSettingsViewModel folderSettings, Ite
132132
return false;
133133
}
134134
}
135-
}
135+
}

0 commit comments

Comments
 (0)