Skip to content

Commit

Permalink
Add project files.
Browse files Browse the repository at this point in the history
  • Loading branch information
ataberkylmz committed Apr 12, 2018
1 parent 53bdd9f commit 9a929d3
Show file tree
Hide file tree
Showing 15 changed files with 1,910 additions and 0 deletions.
25 changes: 25 additions & 0 deletions NvidiaCleaner.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27130.2024
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NvidiaCleaner", "NvidiaCleaner\NvidiaCleaner.csproj", "{585F40B9-4B50-4032-9E27-5865DFA40409}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{585F40B9-4B50-4032-9E27-5865DFA40409}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{585F40B9-4B50-4032-9E27-5865DFA40409}.Debug|Any CPU.Build.0 = Debug|Any CPU
{585F40B9-4B50-4032-9E27-5865DFA40409}.Release|Any CPU.ActiveCfg = Release|Any CPU
{585F40B9-4B50-4032-9E27-5865DFA40409}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {F01FE2C7-79F0-4DD9-B598-26ADE46D5335}
EndGlobalSection
EndGlobal
6 changes: 6 additions & 0 deletions NvidiaCleaner/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>
</configuration>
42 changes: 42 additions & 0 deletions NvidiaCleaner/Lib/NVC.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
using System;
using System.IO;

namespace NvidiaCleaner.Lib
{
class NVC
{
//Calculates the directory size by checking each and every files' size's in directory and sub-directories.
public static long GetDirectorySize(string path)
{
string[] a = Directory.GetFiles(path, "*.*", SearchOption.AllDirectories);
long b = 0;
foreach (var name in a)
{
FileInfo info = new FileInfo(name);
b += info.Length;
}
return b;
}

//Byte to desired significance converter. KB, MB, GB only.
public static double SizeConvert(long b, string desired)
{
long sizeKB = b / 1024;
int sizeMB = (int)sizeKB / 1024;
double sizeGB = sizeMB / 1024.0;

switch (desired)
{
case "KB":
return sizeKB;
case "MB":
return sizeMB;
case "GB":
return sizeGB;
default:
return 0.0;
}
}

}
}
266 changes: 266 additions & 0 deletions NvidiaCleaner/MainForm.Designer.cs

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

Loading

0 comments on commit 9a929d3

Please sign in to comment.