Skip to content

Commit

Permalink
Bug Fix- Sorting was reversed
Browse files Browse the repository at this point in the history
  • Loading branch information
karusb committed Jan 23, 2021
1 parent fdf29a2 commit 777011d
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 9 deletions.
18 changes: 12 additions & 6 deletions FindLargestFolders/FindLargestFolders.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,14 @@
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>9</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<SupportUrl>https://github.com/karusb/FLF-FindLargeFolders</SupportUrl>
<ErrorReportUrl>https://github.com/karusb/FLF-FindLargeFolders</ErrorReportUrl>
<ProductName>Find Large Folders</ProductName>
<PublisherName>BazWare</PublisherName>
<ApplicationRevision>1</ApplicationRevision>
<ApplicationVersion>2.0.1.%2a</ApplicationVersion>
<UseApplicationTrust>true</UseApplicationTrust>
<CreateDesktopShortcut>true</CreateDesktopShortcut>
<PublishWizardCompleted>true</PublishWizardCompleted>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
Expand All @@ -53,7 +58,8 @@
<ManifestCertificateThumbprint>1FE631B04F6089ADFBBEA6FF2DC114C58B672ECA</ManifestCertificateThumbprint>
</PropertyGroup>
<PropertyGroup>
<ManifestKeyFile>signature.pfx</ManifestKeyFile>
<ManifestKeyFile>
</ManifestKeyFile>
</PropertyGroup>
<PropertyGroup>
<GenerateManifests>true</GenerateManifests>
Expand All @@ -65,7 +71,7 @@
<SignAssembly>true</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile>signature.pfx</AssemblyOriginatorKeyFile>
<AssemblyOriginatorKeyFile>signature2.pfx</AssemblyOriginatorKeyFile>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>flfico_Lrk_icon.ico</ApplicationIcon>
Expand Down Expand Up @@ -136,7 +142,7 @@
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<None Include="signature.pfx" />
<None Include="signature2.pfx" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
Expand Down
8 changes: 7 additions & 1 deletion FindLargestFolders/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ namespace FindLargestFolders

public partial class Form1 : Form
{
/*TODO: Cop kutusu = delete icon
*/
Dictionary<string, DirectoryItemUI> directoryUI = new Dictionary<string, DirectoryItemUI>();
Dictionary<string, string> parentSizeMap = new Dictionary<string, string>();
Dictionary<string, Tuple<string, long>[]> childSizeMap = new Dictionary<string, Tuple<string, long>[]>();
Expand Down Expand Up @@ -447,7 +450,10 @@ private void backgroundWorker1_ProgressChanged(object sender, ProgressChangedEve
progressUI.SetOperationName("Preparing large folders...");
progressUI.SetProgress(e.ProgressPercentage - 200);
progressUI.SetItemName(lastWorkingItem.Name);
directoryUI[lastWorkingItem.FullName].Enabled = true;
if (directoryUI.ContainsKey(lastWorkingItem.FullName))
{
directoryUI[lastWorkingItem.FullName].Enabled = true;
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion FindLargestFolders/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("BazWare FLF - Find Large Folders")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyDescription("Find Large Folders")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("BazWare")]
[assembly: AssemblyProduct("BazWare FLF - Find Large Folders")]
Expand Down
1 change: 0 additions & 1 deletion FindLargestFolders/Utilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ public static List<Tuple<string, long>> CreateSizeMap(string path)
sizeList.Add(new Tuple<string, long>(depth2[j].FullName, Utilities.GetDirSize(depth2[j])));
}
sizeList.Sort((x, y) => y.Item2.CompareTo(x.Item2));
sizeList.Reverse();
return sizeList;
}
public static List<Tuple<string, long>> GetFoldersMatchingSizePercentage(long folderSize,int matchPercentage, List<Tuple<string,long>> sizeMap)
Expand Down

0 comments on commit 777011d

Please sign in to comment.