Skip to content

Commit

Permalink
Merge pull request #7 from lutz/master
Browse files Browse the repository at this point in the history
Some stuff
  • Loading branch information
Belim authored Jun 4, 2020
2 parents 1d5e54b + 9d90b72 commit 28db487
Show file tree
Hide file tree
Showing 22 changed files with 2,136 additions and 1,601 deletions.
186 changes: 93 additions & 93 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,93 +1,93 @@

<h1 align="center">
<br>
<a href="http://www.mirinsoft.com"><img src="https://github.com/mirinsoft/burnbytes/blob/master/src/Burnbytes/icon.ico" alt="Burnbytes" width="200"></a>
<br>
Burnbytes
<br>
</h1>

<h4 align="center">💾🐦🐾 Open-source replica of Microsoft Disk Clean-up with aesthetics of Storage sense</h4>

<p align="center">
<a href="https://github.com/mirinsoft/burnbytes/releases/latest" target="_blank">
<img alt="Latest GitHub release" src="https://img.shields.io/github/release/mirinsoft/burnbytes.svg?style=flat-square" />
</a>

<a href="https://github.com/mirinsoft/burnbytes/releases" target="_blank">
<img alt="Downloads on GitHub" src="https://img.shields.io/github/downloads/mirinsoft/burnbytes/total.svg?style=flat-square" />
</a>

<a href="https://github.com/mirinsoft/burnbytes/commits/master">
<img src="https://img.shields.io/github/last-commit/mirinsoft/burnbytes.svg?style=flat-square&logo=github&logoColor=white"
alt="GitHub last commit">
<a href="https://github.com/mirinsoft/burnbytes/issues">
<img src="https://img.shields.io/github/issues-raw/mirinsoft/burnbytes.svg?style=flat-square&logo=github&logoColor=white"
alt="GitHub issues">

</p>

<p align="center">
<a href="#why">Why</a> •
<a href="#features">Features</a> •
<a href="#download">Download</a> •
<a href="#contribute">Contributors</a> •
<a href="#contribute">Contribute</a> •
<a href="#credits">Credits</a> •
<a href="#license">License</a>
</p>

![screenshot](https://github.com/mirinsoft/burnbytes/blob/master/assets/burnbytes.png)

## Why

In a nutshell, Just for fun ;)
... but here the long version!

Disk Cleanup (Cleanmgr.exe) is a Microsoft software utility first introduced with Windows 98 and included in all subsequent releases of Windows. It allows users to remove files that are no longer needed or that can be safely deleted.

With Windows 10 Microsoft will be retiring Disk Cleanup tool and replace it with Storage Sense.

I have never been a fan of Storage sense and a year ago i took a new path and created [Cleanmgr+](https://github.com/mirinsoft/CleanmgrPlus). I saw some days ago the 1:1 replica of [Albacore's Managed Disk Cleanup](https://github.com/thebookisclosed/Comet). It looks exactly like the classic cleanmgr.exe and uses identical technical terms and descriptions and does exactly the same thing that the classic Windows Disk Clean-up utility does.

It's sunday and i was a little bored and thought to show Microsoft how i would have done it. The technology was already there (thanks to Albacore) so it only needed a fresh, modern Windows 10 touch. The result you see now is Burnbytes!

More infos here http://www.mirinsoft.com/blog/19-apps/31-revival-of-microsoft-disk-cleanup-with-burnbytes

## Features
- 1:1 technical replacement for Microsoft Disk Cleanup with the modern touch of Storage sense [NOT available in Microsoft Disk Clean-up]
- Clean up shows a percentage progress indicator [NOT available in Microsoft Disk Clean-up]
- 64bit

## Download

- (Latest release) [Download](https://github.com/mirinsoft/burnbytes/releases)
- (Source Code) [Download](https://github.com/mirinsoft/burnbytes/releases)

## Contribute

Everybody who is interested in this project is welcome to help. I myself will not have much time and neither does albacore at the moment. I could imagine for the roadmap an integration of the community cleaner "winapp2.ini". Just quickly thought.

My main goal would be a community cleaner like it has never existed before. Albacore has done a great preparatory job but there is still a lot to do. Comment, commit to the C# code and share this work.

## ️💚️ Contributors 💚

<!-- CONTRIBUTORS-LIST:START-->

[<img src="https://avatars2.githubusercontent.com/u/26437097?v=3" width="100px;"/><br /><sub><b>Daniel Lutz</b></sub>](https://github.com/lutz)<br />
>
<!-- CONTRIBUTORS-LIST:END -->
## Credits

This project is based upon Albacore's Managed Disk Cleanup
- (Original repo) https://github.com/thebookisclosed/Comet

This software uses the following packages:

- [Icon by EatosDesign](https://www.deviantart.com/eatosdesign/art/Windows-9-Icons-359505915)

## License

The licence conditions will soon be provided by the original author
- https://github.com/thebookisclosed/Comet

<h1 align="center">
<br>
<a href="http://www.mirinsoft.com"><img src="https://github.com/mirinsoft/burnbytes/blob/master/src/Burnbytes/icon.ico" alt="Burnbytes" width="200"></a>
<br>
Burnbytes
<br>
</h1>

<h4 align="center">💾🐦🐾 Open-source replica of Microsoft Disk Clean-up with aesthetics of Storage sense</h4>

<p align="center">
<a href="https://github.com/mirinsoft/burnbytes/releases/latest" target="_blank">
<img alt="Latest GitHub release" src="https://img.shields.io/github/release/mirinsoft/burnbytes.svg?style=flat-square" />
</a>

<a href="https://github.com/mirinsoft/burnbytes/releases" target="_blank">
<img alt="Downloads on GitHub" src="https://img.shields.io/github/downloads/mirinsoft/burnbytes/total.svg?style=flat-square" />
</a>

<a href="https://github.com/mirinsoft/burnbytes/commits/master">
<img src="https://img.shields.io/github/last-commit/mirinsoft/burnbytes.svg?style=flat-square&logo=github&logoColor=white"
alt="GitHub last commit">
<a href="https://github.com/mirinsoft/burnbytes/issues">
<img src="https://img.shields.io/github/issues-raw/mirinsoft/burnbytes.svg?style=flat-square&logo=github&logoColor=white"
alt="GitHub issues">

</p>

<p align="center">
<a href="#why">Why</a> •
<a href="#features">Features</a> •
<a href="#download">Download</a> •
<a href="#contribute">Contributors</a> •
<a href="#contribute">Contribute</a> •
<a href="#credits">Credits</a> •
<a href="#license">License</a>
</p>

![screenshot](https://github.com/mirinsoft/burnbytes/blob/master/assets/burnbytes.png)

## Why

In a nutshell, Just for fun ;)
... but here the long version!

Disk Cleanup (Cleanmgr.exe) is a Microsoft software utility first introduced with Windows 98 and included in all subsequent releases of Windows. It allows users to remove files that are no longer needed or that can be safely deleted.

With Windows 10 Microsoft will be retiring Disk Cleanup tool and replace it with Storage Sense.

I have never been a fan of Storage sense and a year ago i took a new path and created [Cleanmgr+](https://github.com/mirinsoft/CleanmgrPlus). I saw some days ago the 1:1 replica of [Albacore's Managed Disk Cleanup](https://github.com/thebookisclosed/Comet). It looks exactly like the classic cleanmgr.exe and uses identical technical terms and descriptions and does exactly the same thing that the classic Windows Disk Clean-up utility does.

It's sunday and i was a little bored and thought to show Microsoft how i would have done it. The technology was already there (thanks to Albacore) so it only needed a fresh, modern Windows 10 touch. The result you see now is Burnbytes!

More infos here http://www.mirinsoft.com/blog/19-apps/31-revival-of-microsoft-disk-cleanup-with-burnbytes

## Features
- 1:1 technical replacement for Microsoft Disk Cleanup with the modern touch of Storage sense [NOT available in Microsoft Disk Clean-up]
- Clean up shows a percentage progress indicator [NOT available in Microsoft Disk Clean-up]
- 64bit

## Download

- (Latest release) [Download](https://github.com/mirinsoft/burnbytes/releases)
- (Source Code) [Download](https://github.com/mirinsoft/burnbytes/releases)

## Contribute

Everybody who is interested in this project is welcome to help. I myself will not have much time and neither does albacore at the moment. I could imagine for the roadmap an integration of the community cleaner "winapp2.ini". Just quickly thought.

My main goal would be a community cleaner like it has never existed before. Albacore has done a great preparatory job but there is still a lot to do. Comment, commit to the C# code and share this work.

## ️💚️ Contributors 💚

<!-- CONTRIBUTORS-LIST:START-->

[<img src="https://avatars2.githubusercontent.com/u/26437097?v=3" width="100px;"/><br /><sub><b>Daniel Lutz</b></sub>](https://github.com/lutz)<br />
>
<!-- CONTRIBUTORS-LIST:END -->
## Credits

This project is based upon Albacore's Managed Disk Cleanup
- (Original repo) https://github.com/thebookisclosed/Comet

This software uses the following packages:

- [Icon by EatosDesign](https://www.deviantart.com/eatosdesign/art/Windows-9-Icons-359505915)

## License

The licence conditions will soon be provided by the original author
- https://github.com/thebookisclosed/Comet
9 changes: 7 additions & 2 deletions src/Burnbytes/Burnbytes.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
<Compile Include="Core\CallbackFlags.cs" />
<Compile Include="Core\CleanupHandler.cs" />
<Compile Include="Core\CleanupApi.cs" />
<Compile Include="Core\Extensions\IconExt.cs" />
<Compile Include="Core\Native\NativeMethods.cs" />
<Compile Include="Core\Preferences.cs" />
<Compile Include="Core\Native\IEmptyVolumeCache.cs" />
Expand All @@ -69,6 +68,13 @@
<Compile Include="Core\EmptyVolumeCacheCallBacks.cs" />
<Compile Include="Core\DDCFlags.cs" />
<Compile Include="Core\HandlerFlags.cs" />
<Compile Include="Core\Extensions.cs" />
<Compile Include="Forms\FormBase.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\FormBase.Designer.cs">
<DependentUpon>FormBase.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\Resources.de.Designer.cs">
Expand Down Expand Up @@ -108,7 +114,6 @@
<Compile Include="Core\Native\SHFILEINFO.cs" />
<Compile Include="Core\ScanProgressChangedEventArgs.cs" />
<Compile Include="Core\PurgeProgressChangedEventArgs.cs" />
<Compile Include="Core\Extensions\StringExt.cs" />
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<SubType>Designer</SubType>
Expand Down
68 changes: 68 additions & 0 deletions src/Burnbytes/Core/Extensions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Reflection;
using System.Resources;
using System.Windows.Forms;

namespace Burnbytes
{
internal static class Extensions
{
public static void ForEach<T>(this IEnumerable<T> enumarable, Action<T> action)
{
foreach (var item in enumarable)
{
action.Invoke(item);
}
}

public static Icon AsDisposableIcon(this Icon icon)
{
// System.Drawing.Icon does not expose a method to declare
// ownership of its wrapped handle so we have to use reflection
// here.

// See also: https://referencesource.microsoft.com/#System.Drawing/commonui/System/Drawing/Icon.cs,71

icon.GetType().GetField("ownHandle", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(icon, true);
return icon;
}

public static string ToReadableString(this long bytes)
{
var norm = new string[] { "bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB" };
var count = norm.Length - 1;
decimal size = bytes;
int x = 0;

while (size >= 1000 && x < count)
{
size /= 1024;
x++;
}

return string.Format($"{Math.Round(size, 2)} {norm[x]}", MidpointRounding.AwayFromZero);
}

public static string Format(this string @string, params object[] args) => string.Format(@string, args);


public static void Localize<T>(this ResourceManager resourceManager, params Control[] controls)
{
foreach (var control in controls)
{
try
{
control.Text = resourceManager.GetString($"{typeof(T).Name}_{control.Name}");
}
catch (Exception)
{
control.Text = "Localization failed!";
}

}

}
}
}
20 changes: 0 additions & 20 deletions src/Burnbytes/Core/Extensions/IconExt.cs

This file was deleted.

7 changes: 0 additions & 7 deletions src/Burnbytes/Core/Extensions/StringExt.cs

This file was deleted.

Loading

0 comments on commit 28db487

Please sign in to comment.