Skip to content

Commit

Permalink
- Change minimum to be 32 for BlockSize
Browse files Browse the repository at this point in the history
- Update Nuget Packages
- Update copyright notice(s)
- Update installer to include system dll's
#74
  • Loading branch information
Smurf-IV committed Apr 4, 2021
1 parent d6644f1 commit e6adc37
Show file tree
Hide file tree
Showing 49 changed files with 1,146 additions and 1,107 deletions.
44 changes: 37 additions & 7 deletions Elucidate/Elucidate Windows Installer/Elucidate.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -74,17 +74,12 @@
</Component>

<Component>
<File Source="$(var.MgtSource)\Krypton Docking.dll" KeyPath="yes" >
<netfx:NativeImage Id="ngen.Docking" Platform="all" Priority="2" AppBaseDirectory="ClientDIR" />
</File>
</Component>
<Component>
<File Source="$(var.MgtSource)\Krypton Navigator.dll" KeyPath="yes" >
<File Source="$(var.MgtSource)\Krypton.Navigator.dll" KeyPath="yes" >
<netfx:NativeImage Id="ngen.Navigator" Platform="all" Priority="2" AppBaseDirectory="ClientDIR" />
</File>
</Component>
<Component>
<File Source="$(var.MgtSource)\Krypton Toolkit.dll" KeyPath="yes" >
<File Source="$(var.MgtSource)\Krypton.Toolkit.dll" KeyPath="yes" >
<netfx:NativeImage Id="ngen.Toolkit" Platform="all" Priority="2" AppBaseDirectory="ClientDIR" />
</File>
</Component>
Expand All @@ -93,6 +88,41 @@
<netfx:NativeImage Id="ngen.NLog" Platform="all" Priority="2" AppBaseDirectory="ClientDIR" />
</File>
</Component>
<Component>
<File Source="$(var.MgtSource)\System.Buffers.dll" KeyPath="yes" >
<netfx:NativeImage Id="ngen.System.Buffers" Platform="all" Priority="2" AppBaseDirectory="ClientDIR" />
</File>
</Component>
<Component>
<File Source="$(var.MgtSource)\System.Collections.Immutable.dll" KeyPath="yes" >
<netfx:NativeImage Id="ngen.System.Collections.Immutable" Platform="all" Priority="2" AppBaseDirectory="ClientDIR" />
</File>
</Component>
<Component>
<File Source="$(var.MgtSource)\System.Memory.dll" KeyPath="yes" >
<netfx:NativeImage Id="ngen.System.Memory" Platform="all" Priority="2" AppBaseDirectory="ClientDIR" />
</File>
</Component>
<Component>
<File Source="$(var.MgtSource)\System.Numerics.Vectors.dll" KeyPath="yes" >
<netfx:NativeImage Id="ngen.System.Numerics.Vectors" Platform="all" Priority="2" AppBaseDirectory="ClientDIR" />
</File>
</Component>
<Component>
<File Source="$(var.MgtSource)\System.Reflection.Metadata.dll" KeyPath="yes" >
<netfx:NativeImage Id="ngen.System.Reflection.Metadata" Platform="all" Priority="2" AppBaseDirectory="ClientDIR" />
</File>
</Component>
<Component>
<File Source="$(var.MgtSource)\System.Runtime.CompilerServices.Unsafe.dll" KeyPath="yes" >
<netfx:NativeImage Id="ngen.System.Runtime.CompilerServices.Unsafe" Platform="all" Priority="2" AppBaseDirectory="ClientDIR" />
</File>
</Component>
<Component>
<File Source="$(var.MgtSource)\System.Threading.Tasks.Extensions.dll" KeyPath="yes" >
<netfx:NativeImage Id="ngen.System.Threading.Tasks.Extensions" Platform="all" Priority="2" AppBaseDirectory="ClientDIR" />
</File>
</Component>


<!-- Text and help files-->
Expand Down
2 changes: 1 addition & 1 deletion Elucidate/Elucidate Windows Installer/KryptonLicense.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BSD 3-Clause License

Copyright (c) 2018 - 2019, Peter Wagner & Simon Coghlan
Copyright (c) 2018 - 2021, Peter Wagner & Simon Coghlan
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion Elucidate/Elucidate/CmdLine/DupVerb.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
namespace Elucidate.CmdLine
{
[Verb("dup", HelpText = "Lists all the duplicate files. Two files are assumed equal if their hashes are matching. ")]
internal class DupVerb : StdOptions
internal class DupVerb : StdOptions
{
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.ComponentModel;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;

Expand Down Expand Up @@ -48,7 +47,7 @@ protected override void Paint(System.Drawing.Graphics g, System.Drawing.Rectangl
{
try
{
string s = ((string) value);
string s = ((string)value);
if (string.IsNullOrWhiteSpace(s))
{
return;
Expand Down
40 changes: 20 additions & 20 deletions Elucidate/Elucidate/Controls/ListBoxLog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ private void MeasureItem(object sender, MeasureItemEventArgs e)
}

Size sizeF = TextRenderer.MeasureText(e.Graphics, logEvent.Message, listBoxInt.Font);

e.ItemHeight = sizeF.Height + 2;
if (listBoxInt.HorizontalExtent < sizeF.Width)
{
Expand Down Expand Up @@ -233,30 +233,30 @@ private void timer1_Tick(object sender, EventArgs e)
// Now lock in case the timer is overlapping !
alreadyDequing = true;

listBoxInt.BeginInvoke((MethodInvoker) delegate
{
listBoxInt.BeginInvoke((MethodInvoker)delegate
{
//some stuffs for best performance
listBoxInt.BeginUpdate();

// find the style to use
while (pendingLogMessages.TryDequeue(out LogString log))
{
listBoxInt.Items.Add(log);
}

if (listBoxInt.Items.Count > maxEntriesInListBox)
{
listBoxInt.Items.RemoveAt(0);
}

if (!Paused)
{
listBoxInt.TopIndex = listBoxInt.Items.Count - 1;
}

listBoxInt.EndUpdate();
alreadyDequing = false;
}
{
listBoxInt.Items.Add(log);
}

if (listBoxInt.Items.Count > maxEntriesInListBox)
{
listBoxInt.Items.RemoveAt(0);
}

if (!Paused)
{
listBoxInt.TopIndex = listBoxInt.Items.Count - 1;
}

listBoxInt.EndUpdate();
alreadyDequing = false;
}
);
}
catch (Exception ex)
Expand Down
2 changes: 1 addition & 1 deletion Elucidate/Elucidate/Controls/LogsViewerControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// ---------------------------------------------------------------------------------------------------------------
// <copyright file="LogsViewerControl.cs" company="Smurf-IV">
//
// Copyright (C) 2018-2020 Simon Coghlan (Aka Smurf-IV) & BlueBlock 2018
// Copyright (C) 2018-2021 Simon Coghlan (Aka Smurf-IV) & BlueBlock 2018
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
Expand Down
16 changes: 8 additions & 8 deletions Elucidate/Elucidate/Controls/ProtectedDrivesDisplay.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 16 additions & 16 deletions Elucidate/Elucidate/Controls/ProtectedDrivesDisplay.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#region Copyright (C)
// <copyright file="ProtectedDrivesDisplay.cs" company="Smurf-IV">
//
// Copyright (C) 2019-2020 Smurf-IV
// Copyright (C) 2019-2021 Smurf-IV
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -62,15 +62,15 @@ private void IncrementWaitCursor()
{
if (Interlocked.Increment(ref useWaitCursor) == 1)
{
BeginInvoke((MethodInvoker) (() => UseWaitCursor = true));
BeginInvoke((MethodInvoker)(() => UseWaitCursor = true));
}
}

private void DecrementWaitCursor()
{
if (Interlocked.Decrement(ref useWaitCursor) <= 0)
{
BeginInvoke((MethodInvoker) (() => UseWaitCursor = false));
BeginInvoke((MethodInvoker)(() => UseWaitCursor = false));
}
}

Expand Down Expand Up @@ -118,7 +118,7 @@ private void driveGrid_RowsAdded(object sender, DataGridViewRowsAddedEventArgs e
{
if (!cancelTokenSrc.IsCancellationRequested)
{
for (int index = e.RowIndex; index < e.RowIndex+ e.RowCount; index++)
for (int index = e.RowIndex; index < e.RowIndex + e.RowCount; index++)
{
// Get data to perform drive usage display
DataGridViewRow row = driveGrid.Rows[index];
Expand Down Expand Up @@ -158,20 +158,20 @@ private void ProcessProtectedSpace(DataGridViewRow row, DriveInfo driveInfo,
ulong protectedUse = DirSize(dirInfo, token);
if (!token.IsCancellationRequested)
{
BeginInvoke((MethodInvoker) delegate
{
try
{
row.Cells[2].Value = $@"{protectedUse}:{totalUsed}:{driveInfo.TotalSize}";
row.Cells[3].Value =
$@"{new ByteSize(protectedUse)} : {new ByteSize(totalUsed)} : {new ByteSize(driveInfo.TotalSize)}";
}
catch
{
BeginInvoke((MethodInvoker)delegate
{
try
{
row.Cells[2].Value = $@"{protectedUse}:{totalUsed}:{driveInfo.TotalSize}";
row.Cells[3].Value =
$@"{new ByteSize(protectedUse)} : {new ByteSize(totalUsed)} : {new ByteSize(driveInfo.TotalSize)}";
}
catch
{
// Do nothing
// Might be caused by fast closure
}
});
});
}

DecrementWaitCursor();
Expand All @@ -192,7 +192,7 @@ private static ulong DirSize(DirectoryInfo dir, CancellationToken token)
return 0UL;
}

return dir.EnumerateFiles().AsParallel().Sum(fi => (ulong)fi.Length)
return dir.EnumerateFiles().AsParallel().Sum(fi => (ulong)fi.Length)
+ dir.EnumerateDirectories()
.Where(d => (d.Attributes & System.IO.FileAttributes.System) == 0 && (d.Attributes & System.IO.FileAttributes.Hidden) == 0)
.AsParallel()
Expand Down
Loading

0 comments on commit e6adc37

Please sign in to comment.