Skip to content

Commit aeb7e1e

Browse files
authored
CodeMaid (#3267)
1 parent 0e93777 commit aeb7e1e

File tree

92 files changed

+673
-635
lines changed

Some content is hidden

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

92 files changed

+673
-635
lines changed

Files.Launcher/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@ await Win32API.StartSTATask(() =>
569569
var ipf = new Url.IUniformResourceLocator();
570570
ipf.SetUrl(targetPath, Url.IURL_SETURL_FLAGS.IURL_SETURL_FL_GUESS_PROTOCOL);
571571
(ipf as System.Runtime.InteropServices.ComTypes.IPersistFile).Save(linkSavePath, false); // Overwrite if exists
572-
return true;
572+
return true;
573573
});
574574
}
575575
break;

Files/App.xaml.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,7 @@ protected override async void OnActivated(IActivatedEventArgs args)
295295
case "tab":
296296
rootFrame.Navigate(typeof(MainPage), TabItemArguments.Deserialize(unescapedValue), new SuppressNavigationTransitionInfo());
297297
break;
298+
298299
case "folder":
299300
rootFrame.Navigate(typeof(MainPage), unescapedValue, new SuppressNavigationTransitionInfo());
300301
break;

Files/BaseLayout.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ protected override async void OnNavigatedTo(NavigationEventArgs eventArgs)
332332
// pathRoot will be empty on recycle bin path
333333
var workingDir = ParentShellPageInstance.FilesystemViewModel.WorkingDirectory;
334334
string pathRoot = Path.GetPathRoot(workingDir);
335-
if (string.IsNullOrEmpty(pathRoot) || workingDir == pathRoot
335+
if (string.IsNullOrEmpty(pathRoot) || workingDir == pathRoot
336336
|| workingDir.StartsWith(AppSettings.RecycleBinPath)) // Can't go up from recycle bin
337337
{
338338
ParentShellPageInstance.NavigationToolbar.CanNavigateToParent = false;

Files/Constants.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public static class LocalSettings
4444
public static class PreviewPane
4545
{
4646
/// <summary>
47-
/// The maximum number of characters that should be loaded into the preview.
47+
/// The maximum number of characters that should be loaded into the preview.
4848
/// Enforcing this limit ensures that attempting to open an absurdly large file will not cause Files to freeze.
4949
/// </summary>
5050
public const int TextCharacterLimit = 50000;

Files/Controllers/SidebarPinnedController.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ public class SidebarPinnedController : IJson
1717

1818
public string JsonFileName { get; } = "PinnedItems.json";
1919

20-
private SidebarPinnedController() { }
20+
private SidebarPinnedController()
21+
{
22+
}
2123

2224
public static Task<SidebarPinnedController> CreateInstance()
2325
{

Files/Controllers/TerminalController.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ public class TerminalController : IJson
2020

2121
public string JsonFileName { get; } = "terminal.json";
2222

23-
private TerminalController() { }
23+
private TerminalController()
24+
{
25+
}
2426

2527
public static Task<TerminalController> CreateInstance()
2628
{

Files/Converters/LayoutModeToBoolConverter.cs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
using Files.Enums;
2-
using Files.UserControls;
32
using Files.ViewModels;
43
using System;
5-
using System.Collections.Generic;
6-
using System.Linq;
7-
using System.Text;
8-
using System.Threading.Tasks;
94
using Windows.UI.Xaml.Data;
105

116
namespace Files.Converters
@@ -14,7 +9,7 @@ public class LayoutModeToBoolConverter : IValueConverter
149
{
1510
public object Convert(object value, Type targetType, object parameter, string language)
1611
{
17-
if ((App.Current.Resources[parameter as string] as FolderLayoutInformation) is FolderLayoutInformation param
12+
if ((App.Current.Resources[parameter as string] as FolderLayoutInformation) is FolderLayoutInformation param
1813
&& value is FolderLayoutInformation layoutModeValue && layoutModeValue.Mode == param.Mode)
1914
{
2015
if (layoutModeValue.Mode != FolderLayoutModes.GridView)
@@ -37,4 +32,4 @@ public object ConvertBack(object value, Type targetType, object parameter, strin
3732
return null;
3833
}
3934
}
40-
}
35+
}

Files/Converters/VisiblityInvertConverter.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/DynamicDialog.xaml

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@
33
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
44
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
55
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
6-
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
7-
xmlns:icore="using:Microsoft.Xaml.Interactions.Core"
86
xmlns:i="using:Microsoft.Xaml.Interactivity"
9-
mc:Ignorable="d"
7+
xmlns:icore="using:Microsoft.Xaml.Interactions.Core"
8+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
109
Title="{Binding TitleText, Mode=OneWay}"
11-
DefaultButton="Primary"
12-
CornerRadius="4"
13-
PrimaryButtonText="{Binding PrimaryButtonText, Mode=OneWay}"
14-
SecondaryButtonText="{Binding SecondaryButtonText, Mode=OneWay}"
10+
CloseButtonStyle="{StaticResource DefaultButtonStyle}"
1511
CloseButtonText="{Binding CloseButtonText, Mode=OneWay}"
12+
CornerRadius="4"
13+
DefaultButton="Primary"
1614
PrimaryButtonStyle="{StaticResource AccentButtonStyle}"
15+
PrimaryButtonText="{Binding PrimaryButtonText, Mode=OneWay}"
1716
SecondaryButtonStyle="{StaticResource DefaultButtonStyle}"
18-
CloseButtonStyle="{StaticResource DefaultButtonStyle}">
17+
SecondaryButtonText="{Binding SecondaryButtonText, Mode=OneWay}"
18+
mc:Ignorable="d">
1919

2020
<i:Interaction.Behaviors>
2121
<!-- No need to specify CommandParameter - `e` is passed by default -->
@@ -38,24 +38,24 @@
3838

3939
<Grid RowSpacing="25">
4040
<Grid.RowDefinitions>
41-
<RowDefinition Height="Auto"/>
42-
<RowDefinition/>
41+
<RowDefinition Height="Auto" />
42+
<RowDefinition />
4343
</Grid.RowDefinitions>
4444

45-
<!-- Subtitle -->
45+
<!-- Subtitle -->
4646
<TextBlock
47-
Text="{Binding SubtitleText, Mode=OneWay}"
47+
Grid.Row="0"
4848
HorizontalAlignment="Left"
4949
VerticalAlignment="Center"
50-
Grid.Row="0" />
50+
Text="{Binding SubtitleText, Mode=OneWay}" />
5151

52-
<!-- The dynamic content control -->
52+
<!-- The dynamic content control -->
5353
<ContentControl
54-
Content="{Binding DisplayControl, Mode=OneWay}"
55-
VerticalAlignment="Stretch"
54+
Grid.Row="1"
5655
HorizontalAlignment="Stretch"
57-
VerticalContentAlignment="Stretch"
56+
VerticalAlignment="Stretch"
5857
HorizontalContentAlignment="Stretch"
59-
Grid.Row="1" />
58+
VerticalContentAlignment="Stretch"
59+
Content="{Binding DisplayControl, Mode=OneWay}" />
6060
</Grid>
61-
</ContentDialog>
61+
</ContentDialog>

Files/Dialogs/DynamicDialog.xaml.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace Files.Dialogs
77
{
88
public sealed partial class DynamicDialog : ContentDialog
99
{
10-
public DynamicDialogViewModel ViewModel
10+
public DynamicDialogViewModel ViewModel
1111
{
1212
get => (DynamicDialogViewModel)DataContext;
1313
private set => DataContext = value;
@@ -21,4 +21,4 @@ public DynamicDialog(DynamicDialogViewModel dynamicDialogViewModel)
2121
this.ViewModel = dynamicDialogViewModel;
2222
}
2323
}
24-
}
24+
}

0 commit comments

Comments
 (0)