From 36f98cb194a0dd76d3daaef36b507a086deee2e9 Mon Sep 17 00:00:00 2001 From: Michael Gordeev Date: Wed, 26 Jun 2019 12:08:49 +0300 Subject: [PATCH] Add project files. --- NewWinRar.sln | 25 +++++++++++++ NewWinRar/App.config | 6 ++++ NewWinRar/NewWinRar.csproj | 53 ++++++++++++++++++++++++++++ NewWinRar/Program.cs | 53 ++++++++++++++++++++++++++++ NewWinRar/Properties/AssemblyInfo.cs | 36 +++++++++++++++++++ 5 files changed, 173 insertions(+) create mode 100644 NewWinRar.sln create mode 100644 NewWinRar/App.config create mode 100644 NewWinRar/NewWinRar.csproj create mode 100644 NewWinRar/Program.cs create mode 100644 NewWinRar/Properties/AssemblyInfo.cs diff --git a/NewWinRar.sln b/NewWinRar.sln new file mode 100644 index 0000000..c5a70c3 --- /dev/null +++ b/NewWinRar.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29009.5 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NewWinRar", "NewWinRar\NewWinRar.csproj", "{C4BC63BF-C2A8-4057-B746-662F9DCF5A6B}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C4BC63BF-C2A8-4057-B746-662F9DCF5A6B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C4BC63BF-C2A8-4057-B746-662F9DCF5A6B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C4BC63BF-C2A8-4057-B746-662F9DCF5A6B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C4BC63BF-C2A8-4057-B746-662F9DCF5A6B}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {ED3D3F32-26C1-434B-B48B-1EE336E8B1F0} + EndGlobalSection +EndGlobal diff --git a/NewWinRar/App.config b/NewWinRar/App.config new file mode 100644 index 0000000..56efbc7 --- /dev/null +++ b/NewWinRar/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/NewWinRar/NewWinRar.csproj b/NewWinRar/NewWinRar.csproj new file mode 100644 index 0000000..b899b56 --- /dev/null +++ b/NewWinRar/NewWinRar.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + {C4BC63BF-C2A8-4057-B746-662F9DCF5A6B} + Exe + NewWinRar + NewWinRar + v4.7.2 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/NewWinRar/Program.cs b/NewWinRar/Program.cs new file mode 100644 index 0000000..ecb3dcb --- /dev/null +++ b/NewWinRar/Program.cs @@ -0,0 +1,53 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.IO.Compression; +using System.IO; + +namespace NewWinRar +{ + class Program + { + static int Main(string[] args) + { + try + { + if (args.Length != 3) + throw new Exception("Invalid parameters set.\nUsage: NewWinRar.exe [compress|decompress] [source file] [destination file]"); + + for (int i = 0; i < args.Length; i++) + args[i] = args[i].ToLower(); + + switch (args[0]) + { + case "compress": + Compress(args[1], args[2]); + break; + case "decompress": + Decompress(args[1], args[2]); + break; + default: + throw new Exception("Invalid parameter. The first parameter must be 'compress' or 'decompress'"); + } + + return 0; + } + catch (Exception e) + { + Console.WriteLine($"\n\n{e.ToString()}\n"); + return 1; + } + } + + public static void Compress(string source, string result) + { + + } + + public static void Decompress(string source, string result) + { + + } + } +} diff --git a/NewWinRar/Properties/AssemblyInfo.cs b/NewWinRar/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..8880b2f --- /dev/null +++ b/NewWinRar/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("NewWinRar")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("NewWinRar")] +[assembly: AssemblyCopyright("Copyright © 2019")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("c4bc63bf-c2a8-4057-b746-662f9dcf5a6b")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")]