diff --git a/Golovko/Task_1/.vs/Task_1_Basics/v14/.suo b/Golovko/Task_1/.vs/Task_1_Basics/v14/.suo new file mode 100644 index 0000000..c9a569b Binary files /dev/null and b/Golovko/Task_1/.vs/Task_1_Basics/v14/.suo differ diff --git a/Golovko/Task_1/1_Strings/1_Console.csproj b/Golovko/Task_1/1_Strings/1_Console.csproj new file mode 100644 index 0000000..0b8982b --- /dev/null +++ b/Golovko/Task_1/1_Strings/1_Console.csproj @@ -0,0 +1,62 @@ + + + + + Debug + AnyCPU + {0B845B55-E717-4D70-98E8-C856AFEA69BC} + Exe + Properties + _1_Strings + 1_Strings + v4.5.2 + 512 + 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/Golovko/Task_1/1_Strings/App.config b/Golovko/Task_1/1_Strings/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_1/1_Strings/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_1/1_Strings/FIO.cs b/Golovko/Task_1/1_Strings/FIO.cs new file mode 100644 index 0000000..3a3b162 --- /dev/null +++ b/Golovko/Task_1/1_Strings/FIO.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _1_Console +{ + sealed class FIO : IFIO + { + private readonly string surname; + private readonly string name; + private readonly string patronimic; + public FIO(string surname, string name, string patronimic) + { + this.surname = surname; + this.name = name; + this.patronimic = patronimic; + } + public void Introduce() + { + string fio = surname + " " + name + " " + patronimic; + int length = fio.Length; + Console.WriteLine("+{0}+", new string('-', length)); + Console.WriteLine("|{0}|", fio); + Console.WriteLine("+{0}+", new string('-', length)); + } + } +} diff --git a/Golovko/Task_1/1_Strings/IFIO.cs b/Golovko/Task_1/1_Strings/IFIO.cs new file mode 100644 index 0000000..7c17b63 --- /dev/null +++ b/Golovko/Task_1/1_Strings/IFIO.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _1_Console +{ + interface IFIO + { + void Introduce(); + } +} diff --git a/Golovko/Task_1/1_Strings/Program.cs b/Golovko/Task_1/1_Strings/Program.cs new file mode 100644 index 0000000..55365eb --- /dev/null +++ b/Golovko/Task_1/1_Strings/Program.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _1_Console +{ + class Program + { + static void Main(string[] args) + { + IFIO fio = new FIO("Golovko", "Gregory", "Nickolaevich"); + fio.Introduce(); + Console.ReadKey(); + } + } +} diff --git a/Golovko/Task_1/1_Strings/Properties/AssemblyInfo.cs b/Golovko/Task_1/1_Strings/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..725c51e --- /dev/null +++ b/Golovko/Task_1/1_Strings/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Управление общими сведениями о сборке осуществляется с помощью +// набора атрибутов. Измените значения этих атрибутов, чтобы изменить сведения, +// связанные со сборкой. +[assembly: AssemblyTitle("1_Strings")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("1_Strings")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Параметр ComVisible со значением FALSE делает типы в сборке невидимыми +// для COM-компонентов. Если требуется обратиться к типу в этой сборке через +// COM, задайте атрибуту ComVisible значение TRUE для этого типа. +[assembly: ComVisible(false)] + +// Следующий GUID служит для идентификации библиотеки типов, если этот проект будет видимым для COM +[assembly: Guid("0b845b55-e717-4d70-98e8-c856afea69bc")] + +// Сведения о версии сборки состоят из следующих четырех значений: +// +// Основной номер версии +// Дополнительный номер версии +// Номер сборки +// Редакция +// +// Можно задать все значения или принять номера сборки и редакции по умолчанию +// используя "*", как показано ниже: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Golovko/Task_1/1_Strings/bin/Debug/1_Strings.exe b/Golovko/Task_1/1_Strings/bin/Debug/1_Strings.exe new file mode 100644 index 0000000..52122da Binary files /dev/null and b/Golovko/Task_1/1_Strings/bin/Debug/1_Strings.exe differ diff --git a/Golovko/Task_1/1_Strings/bin/Debug/1_Strings.exe.config b/Golovko/Task_1/1_Strings/bin/Debug/1_Strings.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_1/1_Strings/bin/Debug/1_Strings.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_1/1_Strings/bin/Debug/1_Strings.pdb b/Golovko/Task_1/1_Strings/bin/Debug/1_Strings.pdb new file mode 100644 index 0000000..f2d8db3 Binary files /dev/null and b/Golovko/Task_1/1_Strings/bin/Debug/1_Strings.pdb differ diff --git a/Golovko/Task_1/1_Strings/bin/Debug/1_Strings.vshost.exe b/Golovko/Task_1/1_Strings/bin/Debug/1_Strings.vshost.exe new file mode 100644 index 0000000..681ab77 Binary files /dev/null and b/Golovko/Task_1/1_Strings/bin/Debug/1_Strings.vshost.exe differ diff --git a/Golovko/Task_1/1_Strings/bin/Debug/1_Strings.vshost.exe.config b/Golovko/Task_1/1_Strings/bin/Debug/1_Strings.vshost.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_1/1_Strings/bin/Debug/1_Strings.vshost.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_1/1_Strings/bin/Release/1_Strings.exe b/Golovko/Task_1/1_Strings/bin/Release/1_Strings.exe new file mode 100644 index 0000000..171ba5c Binary files /dev/null and b/Golovko/Task_1/1_Strings/bin/Release/1_Strings.exe differ diff --git a/Golovko/Task_1/1_Strings/bin/Release/1_Strings.exe.config b/Golovko/Task_1/1_Strings/bin/Release/1_Strings.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_1/1_Strings/bin/Release/1_Strings.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_1/1_Strings/bin/Release/1_Strings.pdb b/Golovko/Task_1/1_Strings/bin/Release/1_Strings.pdb new file mode 100644 index 0000000..4ea5250 Binary files /dev/null and b/Golovko/Task_1/1_Strings/bin/Release/1_Strings.pdb differ diff --git a/Golovko/Task_1/1_Strings/bin/Release/1_Strings.vshost.exe b/Golovko/Task_1/1_Strings/bin/Release/1_Strings.vshost.exe new file mode 100644 index 0000000..681ab77 Binary files /dev/null and b/Golovko/Task_1/1_Strings/bin/Release/1_Strings.vshost.exe differ diff --git a/Golovko/Task_1/1_Strings/bin/Release/1_Strings.vshost.exe.config b/Golovko/Task_1/1_Strings/bin/Release/1_Strings.vshost.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_1/1_Strings/bin/Release/1_Strings.vshost.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_1/1_Strings/bin/Release/1_Strings.vshost.exe.manifest b/Golovko/Task_1/1_Strings/bin/Release/1_Strings.vshost.exe.manifest new file mode 100644 index 0000000..061c9ca --- /dev/null +++ b/Golovko/Task_1/1_Strings/bin/Release/1_Strings.vshost.exe.manifest @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/Golovko/Task_1/1_Strings/obj/Debug/1_Console.csproj.FileListAbsolute.txt b/Golovko/Task_1/1_Strings/obj/Debug/1_Console.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..80c386a --- /dev/null +++ b/Golovko/Task_1/1_Strings/obj/Debug/1_Console.csproj.FileListAbsolute.txt @@ -0,0 +1,16 @@ +c:\users\головко\documents\visual studio 2015\Projects\Task_1_Basics\1_Strings\bin\Debug\1_Strings.exe.config +c:\users\головко\documents\visual studio 2015\Projects\Task_1_Basics\1_Strings\bin\Debug\1_Strings.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_1_Basics\1_Strings\bin\Debug\1_Strings.pdb +c:\users\головко\documents\visual studio 2015\Projects\Task_1_Basics\1_Strings\obj\Debug\1_Console.csprojResolveAssemblyReference.cache +c:\users\головко\documents\visual studio 2015\Projects\Task_1_Basics\1_Strings\obj\Debug\1_Strings.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_1_Basics\1_Strings\obj\Debug\1_Strings.pdb +C:\Users\Головко\Desktop\Task_1_Basics\1_Strings\bin\Debug\1_Strings.exe.config +C:\Users\Головко\Desktop\Task_1_Basics\1_Strings\bin\Debug\1_Strings.exe +C:\Users\Головко\Desktop\Task_1_Basics\1_Strings\bin\Debug\1_Strings.pdb +C:\Users\Головко\Desktop\Task_1_Basics\1_Strings\obj\Debug\1_Strings.exe +C:\Users\Головко\Desktop\Task_1_Basics\1_Strings\obj\Debug\1_Strings.pdb +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\1_Strings\bin\Debug\1_Strings.exe.config +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\1_Strings\bin\Debug\1_Strings.exe +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\1_Strings\bin\Debug\1_Strings.pdb +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\1_Strings\obj\Debug\1_Strings.exe +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\1_Strings\obj\Debug\1_Strings.pdb diff --git a/Golovko/Task_1/1_Strings/obj/Debug/1_Strings.csproj.FileListAbsolute.txt b/Golovko/Task_1/1_Strings/obj/Debug/1_Strings.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..ccfaf49 --- /dev/null +++ b/Golovko/Task_1/1_Strings/obj/Debug/1_Strings.csproj.FileListAbsolute.txt @@ -0,0 +1 @@ +c:\users\головко\documents\visual studio 2015\Projects\Task_1_Basics\1_Strings\bin\Debug\1_Strings.exe.config diff --git a/Golovko/Task_1/1_Strings/obj/Debug/1_Strings.exe b/Golovko/Task_1/1_Strings/obj/Debug/1_Strings.exe new file mode 100644 index 0000000..52122da Binary files /dev/null and b/Golovko/Task_1/1_Strings/obj/Debug/1_Strings.exe differ diff --git a/Golovko/Task_1/1_Strings/obj/Debug/1_Strings.pdb b/Golovko/Task_1/1_Strings/obj/Debug/1_Strings.pdb new file mode 100644 index 0000000..f2d8db3 Binary files /dev/null and b/Golovko/Task_1/1_Strings/obj/Debug/1_Strings.pdb differ diff --git a/Golovko/Task_1/1_Strings/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Golovko/Task_1/1_Strings/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..cdf6a88 Binary files /dev/null and b/Golovko/Task_1/1_Strings/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Golovko/Task_1/1_Strings/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Golovko/Task_1/1_Strings/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_1/1_Strings/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Golovko/Task_1/1_Strings/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_1/1_Strings/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Golovko/Task_1/1_Strings/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_1/1_Strings/obj/Release/1_Console.csproj.FileListAbsolute.txt b/Golovko/Task_1/1_Strings/obj/Release/1_Console.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..a882eb8 --- /dev/null +++ b/Golovko/Task_1/1_Strings/obj/Release/1_Console.csproj.FileListAbsolute.txt @@ -0,0 +1,5 @@ +c:\users\головко\documents\visual studio 2015\Projects\Task_1_Basics\1_Strings\bin\Release\1_Strings.exe.config +c:\users\головко\documents\visual studio 2015\Projects\Task_1_Basics\1_Strings\bin\Release\1_Strings.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_1_Basics\1_Strings\bin\Release\1_Strings.pdb +c:\users\головко\documents\visual studio 2015\Projects\Task_1_Basics\1_Strings\obj\Release\1_Strings.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_1_Basics\1_Strings\obj\Release\1_Strings.pdb diff --git a/Golovko/Task_1/1_Strings/obj/Release/1_Strings.exe b/Golovko/Task_1/1_Strings/obj/Release/1_Strings.exe new file mode 100644 index 0000000..171ba5c Binary files /dev/null and b/Golovko/Task_1/1_Strings/obj/Release/1_Strings.exe differ diff --git a/Golovko/Task_1/1_Strings/obj/Release/1_Strings.pdb b/Golovko/Task_1/1_Strings/obj/Release/1_Strings.pdb new file mode 100644 index 0000000..4ea5250 Binary files /dev/null and b/Golovko/Task_1/1_Strings/obj/Release/1_Strings.pdb differ diff --git a/Golovko/Task_1/1_Strings/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache b/Golovko/Task_1/1_Strings/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..45b0e98 Binary files /dev/null and b/Golovko/Task_1/1_Strings/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Golovko/Task_1/1_Strings/obj/Release/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Golovko/Task_1/1_Strings/obj/Release/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_1/1_Strings/obj/Release/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Golovko/Task_1/1_Strings/obj/Release/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_1/1_Strings/obj/Release/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Golovko/Task_1/1_Strings/obj/Release/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_1/2_1_Comparation/2_1_Comparation.csproj b/Golovko/Task_1/2_1_Comparation/2_1_Comparation.csproj new file mode 100644 index 0000000..c370e16 --- /dev/null +++ b/Golovko/Task_1/2_1_Comparation/2_1_Comparation.csproj @@ -0,0 +1,62 @@ + + + + + Debug + AnyCPU + {82D8CACC-C707-4772-A6B3-F4DDFFB0E404} + Exe + Properties + _2_1_Comparation + 2_1_Comparation + v4.5.2 + 512 + 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/Golovko/Task_1/2_1_Comparation/App.config b/Golovko/Task_1/2_1_Comparation/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_1/2_1_Comparation/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_1/2_1_Comparation/Comparer.cs b/Golovko/Task_1/2_1_Comparation/Comparer.cs new file mode 100644 index 0000000..1ff4722 --- /dev/null +++ b/Golovko/Task_1/2_1_Comparation/Comparer.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_1_Comparation +{ + struct Comparer: IComparer + { + private readonly double a; + private readonly double b; + public double Max + { + get { return a > b ? a : b; } + } + public Comparer(double a, double b) + { + this.a = a; + this.b = b; + } + } +} diff --git a/Golovko/Task_1/2_1_Comparation/IComparer.cs b/Golovko/Task_1/2_1_Comparation/IComparer.cs new file mode 100644 index 0000000..a639ff6 --- /dev/null +++ b/Golovko/Task_1/2_1_Comparation/IComparer.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_1_Comparation +{ + interface IComparer + { + double Max { get; } + } +} diff --git a/Golovko/Task_1/2_1_Comparation/Program.cs b/Golovko/Task_1/2_1_Comparation/Program.cs new file mode 100644 index 0000000..1e6ccf0 --- /dev/null +++ b/Golovko/Task_1/2_1_Comparation/Program.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_1_Comparation +{ + class Program + { + static void Main(string[] args) + { + IComparer comp = new Comparer(96, 84); + Console.WriteLine("The max value is {0}", comp.Max); + Console.ReadKey(); + } + } +} diff --git a/Golovko/Task_1/2_1_Comparation/Properties/AssemblyInfo.cs b/Golovko/Task_1/2_1_Comparation/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..f08777c --- /dev/null +++ b/Golovko/Task_1/2_1_Comparation/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Управление общими сведениями о сборке осуществляется с помощью +// набора атрибутов. Измените значения этих атрибутов, чтобы изменить сведения, +// связанные со сборкой. +[assembly: AssemblyTitle("2_1_Comparation")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("2_1_Comparation")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Параметр ComVisible со значением FALSE делает типы в сборке невидимыми +// для COM-компонентов. Если требуется обратиться к типу в этой сборке через +// COM, задайте атрибуту ComVisible значение TRUE для этого типа. +[assembly: ComVisible(false)] + +// Следующий GUID служит для идентификации библиотеки типов, если этот проект будет видимым для COM +[assembly: Guid("82d8cacc-c707-4772-a6b3-f4ddffb0e404")] + +// Сведения о версии сборки состоят из следующих четырех значений: +// +// Основной номер версии +// Дополнительный номер версии +// Номер сборки +// Редакция +// +// Можно задать все значения или принять номера сборки и редакции по умолчанию +// используя "*", как показано ниже: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Golovko/Task_1/2_1_Comparation/bin/Debug/2_1_Comparation.exe b/Golovko/Task_1/2_1_Comparation/bin/Debug/2_1_Comparation.exe new file mode 100644 index 0000000..fc8f9d6 Binary files /dev/null and b/Golovko/Task_1/2_1_Comparation/bin/Debug/2_1_Comparation.exe differ diff --git a/Golovko/Task_1/2_1_Comparation/bin/Debug/2_1_Comparation.exe.config b/Golovko/Task_1/2_1_Comparation/bin/Debug/2_1_Comparation.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_1/2_1_Comparation/bin/Debug/2_1_Comparation.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_1/2_1_Comparation/bin/Debug/2_1_Comparation.pdb b/Golovko/Task_1/2_1_Comparation/bin/Debug/2_1_Comparation.pdb new file mode 100644 index 0000000..1c4c8cb Binary files /dev/null and b/Golovko/Task_1/2_1_Comparation/bin/Debug/2_1_Comparation.pdb differ diff --git a/Golovko/Task_1/2_1_Comparation/bin/Debug/2_1_Comparation.vshost.exe b/Golovko/Task_1/2_1_Comparation/bin/Debug/2_1_Comparation.vshost.exe new file mode 100644 index 0000000..681ab77 Binary files /dev/null and b/Golovko/Task_1/2_1_Comparation/bin/Debug/2_1_Comparation.vshost.exe differ diff --git a/Golovko/Task_1/2_1_Comparation/bin/Debug/2_1_Comparation.vshost.exe.config b/Golovko/Task_1/2_1_Comparation/bin/Debug/2_1_Comparation.vshost.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_1/2_1_Comparation/bin/Debug/2_1_Comparation.vshost.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_1/2_1_Comparation/obj/Debug/2_1_Comparation.csproj.FileListAbsolute.txt b/Golovko/Task_1/2_1_Comparation/obj/Debug/2_1_Comparation.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..d0e88cf --- /dev/null +++ b/Golovko/Task_1/2_1_Comparation/obj/Debug/2_1_Comparation.csproj.FileListAbsolute.txt @@ -0,0 +1,16 @@ +c:\users\головко\documents\visual studio 2015\Projects\Task_1_Basics\2_1_Comparation\bin\Debug\2_1_Comparation.exe.config +c:\users\головко\documents\visual studio 2015\Projects\Task_1_Basics\2_1_Comparation\bin\Debug\2_1_Comparation.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_1_Basics\2_1_Comparation\bin\Debug\2_1_Comparation.pdb +c:\users\головко\documents\visual studio 2015\Projects\Task_1_Basics\2_1_Comparation\obj\Debug\2_1_Comparation.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_1_Basics\2_1_Comparation\obj\Debug\2_1_Comparation.pdb +C:\Users\Головко\Desktop\Task_1_Basics\2_1_Comparation\bin\Debug\2_1_Comparation.exe.config +C:\Users\Головко\Desktop\Task_1_Basics\2_1_Comparation\bin\Debug\2_1_Comparation.exe +C:\Users\Головко\Desktop\Task_1_Basics\2_1_Comparation\bin\Debug\2_1_Comparation.pdb +C:\Users\Головко\Desktop\Task_1_Basics\2_1_Comparation\obj\Debug\2_1_Comparation.exe +C:\Users\Головко\Desktop\Task_1_Basics\2_1_Comparation\obj\Debug\2_1_Comparation.pdb +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\2_1_Comparation\bin\Debug\2_1_Comparation.exe.config +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\2_1_Comparation\bin\Debug\2_1_Comparation.exe +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\2_1_Comparation\bin\Debug\2_1_Comparation.pdb +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\2_1_Comparation\obj\Debug\2_1_Comparation.csprojResolveAssemblyReference.cache +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\2_1_Comparation\obj\Debug\2_1_Comparation.exe +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\2_1_Comparation\obj\Debug\2_1_Comparation.pdb diff --git a/Golovko/Task_1/2_1_Comparation/obj/Debug/2_1_Comparation.csprojResolveAssemblyReference.cache b/Golovko/Task_1/2_1_Comparation/obj/Debug/2_1_Comparation.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..8b357ed Binary files /dev/null and b/Golovko/Task_1/2_1_Comparation/obj/Debug/2_1_Comparation.csprojResolveAssemblyReference.cache differ diff --git a/Golovko/Task_1/2_1_Comparation/obj/Debug/2_1_Comparation.exe b/Golovko/Task_1/2_1_Comparation/obj/Debug/2_1_Comparation.exe new file mode 100644 index 0000000..fc8f9d6 Binary files /dev/null and b/Golovko/Task_1/2_1_Comparation/obj/Debug/2_1_Comparation.exe differ diff --git a/Golovko/Task_1/2_1_Comparation/obj/Debug/2_1_Comparation.pdb b/Golovko/Task_1/2_1_Comparation/obj/Debug/2_1_Comparation.pdb new file mode 100644 index 0000000..1c4c8cb Binary files /dev/null and b/Golovko/Task_1/2_1_Comparation/obj/Debug/2_1_Comparation.pdb differ diff --git a/Golovko/Task_1/2_1_Comparation/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Golovko/Task_1/2_1_Comparation/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..df7b1dd Binary files /dev/null and b/Golovko/Task_1/2_1_Comparation/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Golovko/Task_1/2_1_Comparation/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Golovko/Task_1/2_1_Comparation/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_1/2_1_Comparation/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Golovko/Task_1/2_1_Comparation/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_1/2_1_Comparation/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Golovko/Task_1/2_1_Comparation/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_1/2_2_MauGau/2_2_MauGau.csproj b/Golovko/Task_1/2_2_MauGau/2_2_MauGau.csproj new file mode 100644 index 0000000..6cac4d2 --- /dev/null +++ b/Golovko/Task_1/2_2_MauGau/2_2_MauGau.csproj @@ -0,0 +1,62 @@ + + + + + Debug + AnyCPU + {E0D35179-5819-4A8E-9ABB-8CF445923351} + Exe + Properties + _2_2_MauGau + 2_2_MauGau + v4.5.2 + 512 + 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/Golovko/Task_1/2_2_MauGau/Act.cs b/Golovko/Task_1/2_2_MauGau/Act.cs new file mode 100644 index 0000000..fcdc82d --- /dev/null +++ b/Golovko/Task_1/2_2_MauGau/Act.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_2_MauGau +{ + class Act : IAct + { + public string MakeAct(string cmd) + { + string result; + if (cmd == "Gau") result = "Lets walk with the dog"; + else if (cmd == "Mau") result = "Lets feed the cat"; + else result = "Unknown command"; + return result; + } + } +} diff --git a/Golovko/Task_1/2_2_MauGau/App.config b/Golovko/Task_1/2_2_MauGau/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_1/2_2_MauGau/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_1/2_2_MauGau/IAct.cs b/Golovko/Task_1/2_2_MauGau/IAct.cs new file mode 100644 index 0000000..c29b711 --- /dev/null +++ b/Golovko/Task_1/2_2_MauGau/IAct.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_2_MauGau +{ + interface IAct + { + string MakeAct(string cmd); + } +} diff --git a/Golovko/Task_1/2_2_MauGau/Program.cs b/Golovko/Task_1/2_2_MauGau/Program.cs new file mode 100644 index 0000000..b4aed52 --- /dev/null +++ b/Golovko/Task_1/2_2_MauGau/Program.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_2_MauGau +{ + class Program + { + static void Main(string[] args) + { + IAct act = new Act(); + Console.WriteLine("Enter the command, please (Gau/Mau):"); + Console.Write("- "); + Console.WriteLine("- {0}", act.MakeAct(Console.ReadLine())); + Console.ReadKey(); + } + } +} diff --git a/Golovko/Task_1/2_2_MauGau/Properties/AssemblyInfo.cs b/Golovko/Task_1/2_2_MauGau/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..4a59410 --- /dev/null +++ b/Golovko/Task_1/2_2_MauGau/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Управление общими сведениями о сборке осуществляется с помощью +// набора атрибутов. Измените значения этих атрибутов, чтобы изменить сведения, +// связанные со сборкой. +[assembly: AssemblyTitle("2_2_MauGau")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("2_2_MauGau")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Параметр ComVisible со значением FALSE делает типы в сборке невидимыми +// для COM-компонентов. Если требуется обратиться к типу в этой сборке через +// COM, задайте атрибуту ComVisible значение TRUE для этого типа. +[assembly: ComVisible(false)] + +// Следующий GUID служит для идентификации библиотеки типов, если этот проект будет видимым для COM +[assembly: Guid("e0d35179-5819-4a8e-9abb-8cf445923351")] + +// Сведения о версии сборки состоят из следующих четырех значений: +// +// Основной номер версии +// Дополнительный номер версии +// Номер сборки +// Редакция +// +// Можно задать все значения или принять номера сборки и редакции по умолчанию +// используя "*", как показано ниже: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Golovko/Task_1/2_2_MauGau/bin/Debug/2_2_MauGau.exe b/Golovko/Task_1/2_2_MauGau/bin/Debug/2_2_MauGau.exe new file mode 100644 index 0000000..9135466 Binary files /dev/null and b/Golovko/Task_1/2_2_MauGau/bin/Debug/2_2_MauGau.exe differ diff --git a/Golovko/Task_1/2_2_MauGau/bin/Debug/2_2_MauGau.exe.config b/Golovko/Task_1/2_2_MauGau/bin/Debug/2_2_MauGau.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_1/2_2_MauGau/bin/Debug/2_2_MauGau.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_1/2_2_MauGau/bin/Debug/2_2_MauGau.pdb b/Golovko/Task_1/2_2_MauGau/bin/Debug/2_2_MauGau.pdb new file mode 100644 index 0000000..0ab3529 Binary files /dev/null and b/Golovko/Task_1/2_2_MauGau/bin/Debug/2_2_MauGau.pdb differ diff --git a/Golovko/Task_1/2_2_MauGau/bin/Debug/2_2_MauGau.vshost.exe b/Golovko/Task_1/2_2_MauGau/bin/Debug/2_2_MauGau.vshost.exe new file mode 100644 index 0000000..681ab77 Binary files /dev/null and b/Golovko/Task_1/2_2_MauGau/bin/Debug/2_2_MauGau.vshost.exe differ diff --git a/Golovko/Task_1/2_2_MauGau/bin/Debug/2_2_MauGau.vshost.exe.config b/Golovko/Task_1/2_2_MauGau/bin/Debug/2_2_MauGau.vshost.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_1/2_2_MauGau/bin/Debug/2_2_MauGau.vshost.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_1/2_2_MauGau/obj/Debug/2_2_MauGau.csproj.FileListAbsolute.txt b/Golovko/Task_1/2_2_MauGau/obj/Debug/2_2_MauGau.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..218d500 --- /dev/null +++ b/Golovko/Task_1/2_2_MauGau/obj/Debug/2_2_MauGau.csproj.FileListAbsolute.txt @@ -0,0 +1,17 @@ +c:\users\головко\documents\visual studio 2015\Projects\Task_1_Basics\2_2_MauGau\bin\Debug\2_2_MauGau.exe.config +c:\users\головко\documents\visual studio 2015\Projects\Task_1_Basics\2_2_MauGau\bin\Debug\2_2_MauGau.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_1_Basics\2_2_MauGau\bin\Debug\2_2_MauGau.pdb +c:\users\головко\documents\visual studio 2015\Projects\Task_1_Basics\2_2_MauGau\obj\Debug\2_2_MauGau.csprojResolveAssemblyReference.cache +c:\users\головко\documents\visual studio 2015\Projects\Task_1_Basics\2_2_MauGau\obj\Debug\2_2_MauGau.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_1_Basics\2_2_MauGau\obj\Debug\2_2_MauGau.pdb +C:\Users\Головко\Desktop\Task_1_Basics\2_2_MauGau\bin\Debug\2_2_MauGau.exe.config +C:\Users\Головко\Desktop\Task_1_Basics\2_2_MauGau\bin\Debug\2_2_MauGau.exe +C:\Users\Головко\Desktop\Task_1_Basics\2_2_MauGau\bin\Debug\2_2_MauGau.pdb +C:\Users\Головко\Desktop\Task_1_Basics\2_2_MauGau\obj\Debug\2_2_MauGau.exe +C:\Users\Головко\Desktop\Task_1_Basics\2_2_MauGau\obj\Debug\2_2_MauGau.pdb +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\2_2_MauGau\bin\Debug\2_2_MauGau.exe.config +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\2_2_MauGau\bin\Debug\2_2_MauGau.exe +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\2_2_MauGau\bin\Debug\2_2_MauGau.pdb +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\2_2_MauGau\obj\Debug\2_2_MauGau.csprojResolveAssemblyReference.cache +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\2_2_MauGau\obj\Debug\2_2_MauGau.exe +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\2_2_MauGau\obj\Debug\2_2_MauGau.pdb diff --git a/Golovko/Task_1/2_2_MauGau/obj/Debug/2_2_MauGau.csprojResolveAssemblyReference.cache b/Golovko/Task_1/2_2_MauGau/obj/Debug/2_2_MauGau.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..8b357ed Binary files /dev/null and b/Golovko/Task_1/2_2_MauGau/obj/Debug/2_2_MauGau.csprojResolveAssemblyReference.cache differ diff --git a/Golovko/Task_1/2_2_MauGau/obj/Debug/2_2_MauGau.exe b/Golovko/Task_1/2_2_MauGau/obj/Debug/2_2_MauGau.exe new file mode 100644 index 0000000..9135466 Binary files /dev/null and b/Golovko/Task_1/2_2_MauGau/obj/Debug/2_2_MauGau.exe differ diff --git a/Golovko/Task_1/2_2_MauGau/obj/Debug/2_2_MauGau.pdb b/Golovko/Task_1/2_2_MauGau/obj/Debug/2_2_MauGau.pdb new file mode 100644 index 0000000..0ab3529 Binary files /dev/null and b/Golovko/Task_1/2_2_MauGau/obj/Debug/2_2_MauGau.pdb differ diff --git a/Golovko/Task_1/2_2_MauGau/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Golovko/Task_1/2_2_MauGau/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..68f07e6 Binary files /dev/null and b/Golovko/Task_1/2_2_MauGau/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Golovko/Task_1/2_2_MauGau/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Golovko/Task_1/2_2_MauGau/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_1/2_2_MauGau/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Golovko/Task_1/2_2_MauGau/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_1/2_2_MauGau/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Golovko/Task_1/2_2_MauGau/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_1/2_3_Season/2_3_Season.csproj b/Golovko/Task_1/2_3_Season/2_3_Season.csproj new file mode 100644 index 0000000..7551565 --- /dev/null +++ b/Golovko/Task_1/2_3_Season/2_3_Season.csproj @@ -0,0 +1,63 @@ + + + + + Debug + AnyCPU + {A701592F-747C-4671-9DDF-73F502E35924} + Exe + Properties + _2_3_Season + 2_3_Season + v4.5.2 + 512 + 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/Golovko/Task_1/2_3_Season/App.config b/Golovko/Task_1/2_3_Season/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_1/2_3_Season/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_1/2_3_Season/ISeason.cs b/Golovko/Task_1/2_3_Season/ISeason.cs new file mode 100644 index 0000000..ba7f75c --- /dev/null +++ b/Golovko/Task_1/2_3_Season/ISeason.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_3_Season +{ + interface ISeason + { + string GetSeason(Month month); + } +} diff --git a/Golovko/Task_1/2_3_Season/Month.cs b/Golovko/Task_1/2_3_Season/Month.cs new file mode 100644 index 0000000..2f2661f --- /dev/null +++ b/Golovko/Task_1/2_3_Season/Month.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_3_Season +{ + enum Month : byte + { + Jenuary = 1, + February, + March, + April, + May, + June, + July, + August, + September, + October, + November, + December + } +} diff --git a/Golovko/Task_1/2_3_Season/Program.cs b/Golovko/Task_1/2_3_Season/Program.cs new file mode 100644 index 0000000..4eae345 --- /dev/null +++ b/Golovko/Task_1/2_3_Season/Program.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_3_Season +{ + class Program + { + static void Main(string[] args) + { + ISeason season = new Season(); + Console.WriteLine("Enter the month number, please:"); + Console.WriteLine(season.GetSeason((Month)Convert.ToByte(Console.ReadLine()))); + Console.ReadKey(); + } + } +} diff --git a/Golovko/Task_1/2_3_Season/Properties/AssemblyInfo.cs b/Golovko/Task_1/2_3_Season/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..2895bca --- /dev/null +++ b/Golovko/Task_1/2_3_Season/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Управление общими сведениями о сборке осуществляется с помощью +// набора атрибутов. Измените значения этих атрибутов, чтобы изменить сведения, +// связанные со сборкой. +[assembly: AssemblyTitle("2_3_Season")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("2_3_Season")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Параметр ComVisible со значением FALSE делает типы в сборке невидимыми +// для COM-компонентов. Если требуется обратиться к типу в этой сборке через +// COM, задайте атрибуту ComVisible значение TRUE для этого типа. +[assembly: ComVisible(false)] + +// Следующий GUID служит для идентификации библиотеки типов, если этот проект будет видимым для COM +[assembly: Guid("a701592f-747c-4671-9ddf-73f502e35924")] + +// Сведения о версии сборки состоят из следующих четырех значений: +// +// Основной номер версии +// Дополнительный номер версии +// Номер сборки +// Редакция +// +// Можно задать все значения или принять номера сборки и редакции по умолчанию +// используя "*", как показано ниже: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Golovko/Task_1/2_3_Season/Season.cs b/Golovko/Task_1/2_3_Season/Season.cs new file mode 100644 index 0000000..2e598f2 --- /dev/null +++ b/Golovko/Task_1/2_3_Season/Season.cs @@ -0,0 +1,43 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_3_Season +{ + class Season : ISeason + { + public string GetSeason(Month month) + { + string result; + switch (month) + { + case Month.December: + case Month.Jenuary: + case Month.February: + result = "Winter"; + break; + case Month.March: + case Month.April: + case Month.May: + result = "Spring"; + break; + case Month.June: + case Month.July: + case Month.August: + result = "Summer"; + break; + case Month.September: + case Month.October: + case Month.November: + result = "Autumn"; + break; + default: + result = "This month doesn't exist in our planet"; + break; + } + return result; + } + } +} diff --git a/Golovko/Task_1/2_3_Season/bin/Debug/2_3_Season.exe b/Golovko/Task_1/2_3_Season/bin/Debug/2_3_Season.exe new file mode 100644 index 0000000..47ed886 Binary files /dev/null and b/Golovko/Task_1/2_3_Season/bin/Debug/2_3_Season.exe differ diff --git a/Golovko/Task_1/2_3_Season/bin/Debug/2_3_Season.exe.config b/Golovko/Task_1/2_3_Season/bin/Debug/2_3_Season.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_1/2_3_Season/bin/Debug/2_3_Season.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_1/2_3_Season/bin/Debug/2_3_Season.pdb b/Golovko/Task_1/2_3_Season/bin/Debug/2_3_Season.pdb new file mode 100644 index 0000000..df10f34 Binary files /dev/null and b/Golovko/Task_1/2_3_Season/bin/Debug/2_3_Season.pdb differ diff --git a/Golovko/Task_1/2_3_Season/bin/Debug/2_3_Season.vshost.exe b/Golovko/Task_1/2_3_Season/bin/Debug/2_3_Season.vshost.exe new file mode 100644 index 0000000..681ab77 Binary files /dev/null and b/Golovko/Task_1/2_3_Season/bin/Debug/2_3_Season.vshost.exe differ diff --git a/Golovko/Task_1/2_3_Season/bin/Debug/2_3_Season.vshost.exe.config b/Golovko/Task_1/2_3_Season/bin/Debug/2_3_Season.vshost.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_1/2_3_Season/bin/Debug/2_3_Season.vshost.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_1/2_3_Season/obj/Debug/2_3_Season.csproj.FileListAbsolute.txt b/Golovko/Task_1/2_3_Season/obj/Debug/2_3_Season.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..692c086 --- /dev/null +++ b/Golovko/Task_1/2_3_Season/obj/Debug/2_3_Season.csproj.FileListAbsolute.txt @@ -0,0 +1,16 @@ +c:\users\головко\documents\visual studio 2015\Projects\Task_1_Basics\2_3_Season\bin\Debug\2_3_Season.exe.config +c:\users\головко\documents\visual studio 2015\Projects\Task_1_Basics\2_3_Season\bin\Debug\2_3_Season.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_1_Basics\2_3_Season\bin\Debug\2_3_Season.pdb +c:\users\головко\documents\visual studio 2015\Projects\Task_1_Basics\2_3_Season\obj\Debug\2_3_Season.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_1_Basics\2_3_Season\obj\Debug\2_3_Season.pdb +C:\Users\Головко\Desktop\Task_1_Basics\2_3_Season\bin\Debug\2_3_Season.exe.config +C:\Users\Головко\Desktop\Task_1_Basics\2_3_Season\bin\Debug\2_3_Season.exe +C:\Users\Головко\Desktop\Task_1_Basics\2_3_Season\bin\Debug\2_3_Season.pdb +C:\Users\Головко\Desktop\Task_1_Basics\2_3_Season\obj\Debug\2_3_Season.exe +C:\Users\Головко\Desktop\Task_1_Basics\2_3_Season\obj\Debug\2_3_Season.pdb +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\2_3_Season\bin\Debug\2_3_Season.exe.config +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\2_3_Season\bin\Debug\2_3_Season.exe +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\2_3_Season\bin\Debug\2_3_Season.pdb +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\2_3_Season\obj\Debug\2_3_Season.csprojResolveAssemblyReference.cache +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\2_3_Season\obj\Debug\2_3_Season.exe +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\2_3_Season\obj\Debug\2_3_Season.pdb diff --git a/Golovko/Task_1/2_3_Season/obj/Debug/2_3_Season.csprojResolveAssemblyReference.cache b/Golovko/Task_1/2_3_Season/obj/Debug/2_3_Season.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..8b357ed Binary files /dev/null and b/Golovko/Task_1/2_3_Season/obj/Debug/2_3_Season.csprojResolveAssemblyReference.cache differ diff --git a/Golovko/Task_1/2_3_Season/obj/Debug/2_3_Season.exe b/Golovko/Task_1/2_3_Season/obj/Debug/2_3_Season.exe new file mode 100644 index 0000000..47ed886 Binary files /dev/null and b/Golovko/Task_1/2_3_Season/obj/Debug/2_3_Season.exe differ diff --git a/Golovko/Task_1/2_3_Season/obj/Debug/2_3_Season.pdb b/Golovko/Task_1/2_3_Season/obj/Debug/2_3_Season.pdb new file mode 100644 index 0000000..df10f34 Binary files /dev/null and b/Golovko/Task_1/2_3_Season/obj/Debug/2_3_Season.pdb differ diff --git a/Golovko/Task_1/2_3_Season/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Golovko/Task_1/2_3_Season/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..5e1ccab Binary files /dev/null and b/Golovko/Task_1/2_3_Season/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Golovko/Task_1/2_3_Season/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Golovko/Task_1/2_3_Season/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_1/2_3_Season/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Golovko/Task_1/2_3_Season/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_1/2_3_Season/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Golovko/Task_1/2_3_Season/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_1/2_4_GoodVsBad/2_4_GoodVsBad.csproj b/Golovko/Task_1/2_4_GoodVsBad/2_4_GoodVsBad.csproj new file mode 100644 index 0000000..3f8779c --- /dev/null +++ b/Golovko/Task_1/2_4_GoodVsBad/2_4_GoodVsBad.csproj @@ -0,0 +1,60 @@ + + + + + Debug + AnyCPU + {3C2F7651-8F57-42B0-A50B-1CF6ABB15360} + Exe + Properties + _2_4_GoodVsBad + 2_4_GoodVsBad + v4.5.2 + 512 + 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/Golovko/Task_1/2_4_GoodVsBad/App.config b/Golovko/Task_1/2_4_GoodVsBad/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_1/2_4_GoodVsBad/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_1/2_4_GoodVsBad/Program.cs b/Golovko/Task_1/2_4_GoodVsBad/Program.cs new file mode 100644 index 0000000..a606fc5 --- /dev/null +++ b/Golovko/Task_1/2_4_GoodVsBad/Program.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_4_GoodVsBad +{ + class Program + { + static void Main(string[] args) + { + Console.WriteLine("Enter 1 - Good or 0 - Bad:"); + Console.WriteLine(Convert.ToByte(Console.ReadLine()) == 1 ? "Good" : "Bad"); + Console.ReadKey(); + } + } +} diff --git a/Golovko/Task_1/2_4_GoodVsBad/Properties/AssemblyInfo.cs b/Golovko/Task_1/2_4_GoodVsBad/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..3084825 --- /dev/null +++ b/Golovko/Task_1/2_4_GoodVsBad/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Управление общими сведениями о сборке осуществляется с помощью +// набора атрибутов. Измените значения этих атрибутов, чтобы изменить сведения, +// связанные со сборкой. +[assembly: AssemblyTitle("2_4_GoodVsBad")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("2_4_GoodVsBad")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Параметр ComVisible со значением FALSE делает типы в сборке невидимыми +// для COM-компонентов. Если требуется обратиться к типу в этой сборке через +// COM, задайте атрибуту ComVisible значение TRUE для этого типа. +[assembly: ComVisible(false)] + +// Следующий GUID служит для идентификации библиотеки типов, если этот проект будет видимым для COM +[assembly: Guid("3c2f7651-8f57-42b0-a50b-1cf6abb15360")] + +// Сведения о версии сборки состоят из следующих четырех значений: +// +// Основной номер версии +// Дополнительный номер версии +// Номер сборки +// Редакция +// +// Можно задать все значения или принять номера сборки и редакции по умолчанию +// используя "*", как показано ниже: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Golovko/Task_1/2_4_GoodVsBad/bin/Debug/2_4_GoodVsBad.exe b/Golovko/Task_1/2_4_GoodVsBad/bin/Debug/2_4_GoodVsBad.exe new file mode 100644 index 0000000..cd0d7bb Binary files /dev/null and b/Golovko/Task_1/2_4_GoodVsBad/bin/Debug/2_4_GoodVsBad.exe differ diff --git a/Golovko/Task_1/2_4_GoodVsBad/bin/Debug/2_4_GoodVsBad.exe.config b/Golovko/Task_1/2_4_GoodVsBad/bin/Debug/2_4_GoodVsBad.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_1/2_4_GoodVsBad/bin/Debug/2_4_GoodVsBad.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_1/2_4_GoodVsBad/bin/Debug/2_4_GoodVsBad.pdb b/Golovko/Task_1/2_4_GoodVsBad/bin/Debug/2_4_GoodVsBad.pdb new file mode 100644 index 0000000..e6efabf Binary files /dev/null and b/Golovko/Task_1/2_4_GoodVsBad/bin/Debug/2_4_GoodVsBad.pdb differ diff --git a/Golovko/Task_1/2_4_GoodVsBad/bin/Debug/2_4_GoodVsBad.vshost.exe b/Golovko/Task_1/2_4_GoodVsBad/bin/Debug/2_4_GoodVsBad.vshost.exe new file mode 100644 index 0000000..681ab77 Binary files /dev/null and b/Golovko/Task_1/2_4_GoodVsBad/bin/Debug/2_4_GoodVsBad.vshost.exe differ diff --git a/Golovko/Task_1/2_4_GoodVsBad/bin/Debug/2_4_GoodVsBad.vshost.exe.config b/Golovko/Task_1/2_4_GoodVsBad/bin/Debug/2_4_GoodVsBad.vshost.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_1/2_4_GoodVsBad/bin/Debug/2_4_GoodVsBad.vshost.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_1/2_4_GoodVsBad/obj/Debug/2_4_GoodVsBad.csproj.FileListAbsolute.txt b/Golovko/Task_1/2_4_GoodVsBad/obj/Debug/2_4_GoodVsBad.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..b785545 --- /dev/null +++ b/Golovko/Task_1/2_4_GoodVsBad/obj/Debug/2_4_GoodVsBad.csproj.FileListAbsolute.txt @@ -0,0 +1,16 @@ +c:\users\головко\documents\visual studio 2015\Projects\Task_1_Basics\2_4_GoodVsBad\bin\Debug\2_4_GoodVsBad.exe.config +c:\users\головко\documents\visual studio 2015\Projects\Task_1_Basics\2_4_GoodVsBad\bin\Debug\2_4_GoodVsBad.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_1_Basics\2_4_GoodVsBad\bin\Debug\2_4_GoodVsBad.pdb +c:\users\головко\documents\visual studio 2015\Projects\Task_1_Basics\2_4_GoodVsBad\obj\Debug\2_4_GoodVsBad.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_1_Basics\2_4_GoodVsBad\obj\Debug\2_4_GoodVsBad.pdb +C:\Users\Головко\Desktop\Task_1_Basics\2_4_GoodVsBad\bin\Debug\2_4_GoodVsBad.exe.config +C:\Users\Головко\Desktop\Task_1_Basics\2_4_GoodVsBad\bin\Debug\2_4_GoodVsBad.exe +C:\Users\Головко\Desktop\Task_1_Basics\2_4_GoodVsBad\bin\Debug\2_4_GoodVsBad.pdb +C:\Users\Головко\Desktop\Task_1_Basics\2_4_GoodVsBad\obj\Debug\2_4_GoodVsBad.exe +C:\Users\Головко\Desktop\Task_1_Basics\2_4_GoodVsBad\obj\Debug\2_4_GoodVsBad.pdb +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\2_4_GoodVsBad\bin\Debug\2_4_GoodVsBad.exe.config +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\2_4_GoodVsBad\bin\Debug\2_4_GoodVsBad.exe +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\2_4_GoodVsBad\bin\Debug\2_4_GoodVsBad.pdb +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\2_4_GoodVsBad\obj\Debug\2_4_GoodVsBad.csprojResolveAssemblyReference.cache +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\2_4_GoodVsBad\obj\Debug\2_4_GoodVsBad.exe +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\2_4_GoodVsBad\obj\Debug\2_4_GoodVsBad.pdb diff --git a/Golovko/Task_1/2_4_GoodVsBad/obj/Debug/2_4_GoodVsBad.csprojResolveAssemblyReference.cache b/Golovko/Task_1/2_4_GoodVsBad/obj/Debug/2_4_GoodVsBad.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..8b357ed Binary files /dev/null and b/Golovko/Task_1/2_4_GoodVsBad/obj/Debug/2_4_GoodVsBad.csprojResolveAssemblyReference.cache differ diff --git a/Golovko/Task_1/2_4_GoodVsBad/obj/Debug/2_4_GoodVsBad.exe b/Golovko/Task_1/2_4_GoodVsBad/obj/Debug/2_4_GoodVsBad.exe new file mode 100644 index 0000000..cd0d7bb Binary files /dev/null and b/Golovko/Task_1/2_4_GoodVsBad/obj/Debug/2_4_GoodVsBad.exe differ diff --git a/Golovko/Task_1/2_4_GoodVsBad/obj/Debug/2_4_GoodVsBad.pdb b/Golovko/Task_1/2_4_GoodVsBad/obj/Debug/2_4_GoodVsBad.pdb new file mode 100644 index 0000000..e6efabf Binary files /dev/null and b/Golovko/Task_1/2_4_GoodVsBad/obj/Debug/2_4_GoodVsBad.pdb differ diff --git a/Golovko/Task_1/2_4_GoodVsBad/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Golovko/Task_1/2_4_GoodVsBad/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..fbb7e2d Binary files /dev/null and b/Golovko/Task_1/2_4_GoodVsBad/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Golovko/Task_1/2_4_GoodVsBad/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Golovko/Task_1/2_4_GoodVsBad/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_1/2_4_GoodVsBad/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Golovko/Task_1/2_4_GoodVsBad/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_1/2_4_GoodVsBad/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Golovko/Task_1/2_4_GoodVsBad/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_1/2_5_DayOfWeek/2_5_DayOfWeek.csproj b/Golovko/Task_1/2_5_DayOfWeek/2_5_DayOfWeek.csproj new file mode 100644 index 0000000..b93ffb8 --- /dev/null +++ b/Golovko/Task_1/2_5_DayOfWeek/2_5_DayOfWeek.csproj @@ -0,0 +1,63 @@ + + + + + Debug + AnyCPU + {2989914B-6552-40E8-AE52-6C2E61117EE8} + Exe + Properties + _2_5_DayOfWeek + 2_5_DayOfWeek + v4.5.2 + 512 + 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/Golovko/Task_1/2_5_DayOfWeek/App.config b/Golovko/Task_1/2_5_DayOfWeek/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_1/2_5_DayOfWeek/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_1/2_5_DayOfWeek/Day.cs b/Golovko/Task_1/2_5_DayOfWeek/Day.cs new file mode 100644 index 0000000..cff15d9 --- /dev/null +++ b/Golovko/Task_1/2_5_DayOfWeek/Day.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_5_DayOfWeek +{ + class Day : IDay + { + public string GetName(DayName day) + { + if ((byte)day < 1 || (byte)day > 7 ) return "This day name doesn't exist"; + return day.ToString(); + } + } +} diff --git a/Golovko/Task_1/2_5_DayOfWeek/DayName.cs b/Golovko/Task_1/2_5_DayOfWeek/DayName.cs new file mode 100644 index 0000000..bd42880 --- /dev/null +++ b/Golovko/Task_1/2_5_DayOfWeek/DayName.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_5_DayOfWeek +{ + enum DayName : byte + { + Monday = 1, + Tuesday, + Wednesday, + Thursday, + Friday, + Seturday, + Sunday + } +} diff --git a/Golovko/Task_1/2_5_DayOfWeek/IDay.cs b/Golovko/Task_1/2_5_DayOfWeek/IDay.cs new file mode 100644 index 0000000..6ee7181 --- /dev/null +++ b/Golovko/Task_1/2_5_DayOfWeek/IDay.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_5_DayOfWeek +{ + interface IDay + { + string GetName(DayName day); + } +} diff --git a/Golovko/Task_1/2_5_DayOfWeek/Program.cs b/Golovko/Task_1/2_5_DayOfWeek/Program.cs new file mode 100644 index 0000000..d5c38db --- /dev/null +++ b/Golovko/Task_1/2_5_DayOfWeek/Program.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_5_DayOfWeek +{ + class Program + { + static void Main(string[] args) + { + IDay day = new Day(); + Console.WriteLine("Enter the week's day number:"); + Console.WriteLine("This is {0}", day.GetName((DayName)Convert.ToByte(Console.ReadLine()))); + Console.ReadKey(); + } + } +} diff --git a/Golovko/Task_1/2_5_DayOfWeek/Properties/AssemblyInfo.cs b/Golovko/Task_1/2_5_DayOfWeek/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..7bb04ae --- /dev/null +++ b/Golovko/Task_1/2_5_DayOfWeek/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Управление общими сведениями о сборке осуществляется с помощью +// набора атрибутов. Измените значения этих атрибутов, чтобы изменить сведения, +// связанные со сборкой. +[assembly: AssemblyTitle("2_5_DayOfWeek")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("2_5_DayOfWeek")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Параметр ComVisible со значением FALSE делает типы в сборке невидимыми +// для COM-компонентов. Если требуется обратиться к типу в этой сборке через +// COM, задайте атрибуту ComVisible значение TRUE для этого типа. +[assembly: ComVisible(false)] + +// Следующий GUID служит для идентификации библиотеки типов, если этот проект будет видимым для COM +[assembly: Guid("2989914b-6552-40e8-ae52-6c2e61117ee8")] + +// Сведения о версии сборки состоят из следующих четырех значений: +// +// Основной номер версии +// Дополнительный номер версии +// Номер сборки +// Редакция +// +// Можно задать все значения или принять номера сборки и редакции по умолчанию +// используя "*", как показано ниже: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Golovko/Task_1/2_5_DayOfWeek/bin/Debug/2_5_DayOfWeek.exe b/Golovko/Task_1/2_5_DayOfWeek/bin/Debug/2_5_DayOfWeek.exe new file mode 100644 index 0000000..a8ae86f Binary files /dev/null and b/Golovko/Task_1/2_5_DayOfWeek/bin/Debug/2_5_DayOfWeek.exe differ diff --git a/Golovko/Task_1/2_5_DayOfWeek/bin/Debug/2_5_DayOfWeek.exe.config b/Golovko/Task_1/2_5_DayOfWeek/bin/Debug/2_5_DayOfWeek.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_1/2_5_DayOfWeek/bin/Debug/2_5_DayOfWeek.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_1/2_5_DayOfWeek/bin/Debug/2_5_DayOfWeek.pdb b/Golovko/Task_1/2_5_DayOfWeek/bin/Debug/2_5_DayOfWeek.pdb new file mode 100644 index 0000000..3218745 Binary files /dev/null and b/Golovko/Task_1/2_5_DayOfWeek/bin/Debug/2_5_DayOfWeek.pdb differ diff --git a/Golovko/Task_1/2_5_DayOfWeek/bin/Debug/2_5_DayOfWeek.vshost.exe b/Golovko/Task_1/2_5_DayOfWeek/bin/Debug/2_5_DayOfWeek.vshost.exe new file mode 100644 index 0000000..681ab77 Binary files /dev/null and b/Golovko/Task_1/2_5_DayOfWeek/bin/Debug/2_5_DayOfWeek.vshost.exe differ diff --git a/Golovko/Task_1/2_5_DayOfWeek/bin/Debug/2_5_DayOfWeek.vshost.exe.config b/Golovko/Task_1/2_5_DayOfWeek/bin/Debug/2_5_DayOfWeek.vshost.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_1/2_5_DayOfWeek/bin/Debug/2_5_DayOfWeek.vshost.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_1/2_5_DayOfWeek/bin/Debug/2_5_DayOfWeek.vshost.exe.manifest b/Golovko/Task_1/2_5_DayOfWeek/bin/Debug/2_5_DayOfWeek.vshost.exe.manifest new file mode 100644 index 0000000..061c9ca --- /dev/null +++ b/Golovko/Task_1/2_5_DayOfWeek/bin/Debug/2_5_DayOfWeek.vshost.exe.manifest @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/Golovko/Task_1/2_5_DayOfWeek/obj/Debug/2_5_DayOfWeek.csproj.FileListAbsolute.txt b/Golovko/Task_1/2_5_DayOfWeek/obj/Debug/2_5_DayOfWeek.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..d3bdbab --- /dev/null +++ b/Golovko/Task_1/2_5_DayOfWeek/obj/Debug/2_5_DayOfWeek.csproj.FileListAbsolute.txt @@ -0,0 +1,15 @@ +c:\users\головко\documents\visual studio 2015\Projects\Task_1_Basics\2_5_DayOfWeek\bin\Debug\2_5_DayOfWeek.exe.config +c:\users\головко\documents\visual studio 2015\Projects\Task_1_Basics\2_5_DayOfWeek\bin\Debug\2_5_DayOfWeek.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_1_Basics\2_5_DayOfWeek\bin\Debug\2_5_DayOfWeek.pdb +c:\users\головко\documents\visual studio 2015\Projects\Task_1_Basics\2_5_DayOfWeek\obj\Debug\2_5_DayOfWeek.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_1_Basics\2_5_DayOfWeek\obj\Debug\2_5_DayOfWeek.pdb +C:\Users\Головко\Desktop\Task_1_Basics\2_5_DayOfWeek\bin\Debug\2_5_DayOfWeek.exe.config +C:\Users\Головко\Desktop\Task_1_Basics\2_5_DayOfWeek\obj\Debug\2_5_DayOfWeek.exe +C:\Users\Головко\Desktop\Task_1_Basics\2_5_DayOfWeek\obj\Debug\2_5_DayOfWeek.pdb +C:\Users\Головко\Desktop\Task_1_Basics\2_5_DayOfWeek\bin\Debug\2_5_DayOfWeek.exe +C:\Users\Головко\Desktop\Task_1_Basics\2_5_DayOfWeek\bin\Debug\2_5_DayOfWeek.pdb +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\2_5_DayOfWeek\bin\Debug\2_5_DayOfWeek.exe.config +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\2_5_DayOfWeek\bin\Debug\2_5_DayOfWeek.exe +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\2_5_DayOfWeek\bin\Debug\2_5_DayOfWeek.pdb +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\2_5_DayOfWeek\obj\Debug\2_5_DayOfWeek.exe +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\2_5_DayOfWeek\obj\Debug\2_5_DayOfWeek.pdb diff --git a/Golovko/Task_1/2_5_DayOfWeek/obj/Debug/2_5_DayOfWeek.exe b/Golovko/Task_1/2_5_DayOfWeek/obj/Debug/2_5_DayOfWeek.exe new file mode 100644 index 0000000..a8ae86f Binary files /dev/null and b/Golovko/Task_1/2_5_DayOfWeek/obj/Debug/2_5_DayOfWeek.exe differ diff --git a/Golovko/Task_1/2_5_DayOfWeek/obj/Debug/2_5_DayOfWeek.pdb b/Golovko/Task_1/2_5_DayOfWeek/obj/Debug/2_5_DayOfWeek.pdb new file mode 100644 index 0000000..3218745 Binary files /dev/null and b/Golovko/Task_1/2_5_DayOfWeek/obj/Debug/2_5_DayOfWeek.pdb differ diff --git a/Golovko/Task_1/2_5_DayOfWeek/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Golovko/Task_1/2_5_DayOfWeek/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..803bc8b Binary files /dev/null and b/Golovko/Task_1/2_5_DayOfWeek/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Golovko/Task_1/2_5_DayOfWeek/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Golovko/Task_1/2_5_DayOfWeek/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_1/2_5_DayOfWeek/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Golovko/Task_1/2_5_DayOfWeek/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_1/2_5_DayOfWeek/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Golovko/Task_1/2_5_DayOfWeek/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_1/2_6_Taxi/2_6_Taxi.csproj b/Golovko/Task_1/2_6_Taxi/2_6_Taxi.csproj new file mode 100644 index 0000000..cd652c2 --- /dev/null +++ b/Golovko/Task_1/2_6_Taxi/2_6_Taxi.csproj @@ -0,0 +1,64 @@ + + + + + Debug + AnyCPU + {722B5DF2-2531-44FD-B8D2-D535CB8F9137} + Exe + Properties + _2_6_Taxi + 2_6_Taxi + v4.5.2 + 512 + 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/Golovko/Task_1/2_6_Taxi/App.config b/Golovko/Task_1/2_6_Taxi/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_1/2_6_Taxi/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_1/2_6_Taxi/ITarif.cs b/Golovko/Task_1/2_6_Taxi/ITarif.cs new file mode 100644 index 0000000..d071f11 --- /dev/null +++ b/Golovko/Task_1/2_6_Taxi/ITarif.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_6_Taxi +{ + interface ITarif + { + double MaxPaidDistance { get; set; } + double MaxPaidTarif { get; set; } + double PaidTarif { get; set; } + double DelayTarif { get; set; } + } +} diff --git a/Golovko/Task_1/2_6_Taxi/ITaxi.cs b/Golovko/Task_1/2_6_Taxi/ITaxi.cs new file mode 100644 index 0000000..f9dffbc --- /dev/null +++ b/Golovko/Task_1/2_6_Taxi/ITaxi.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_6_Taxi +{ + interface ITaxi + { + double Distance { get; set; } + double Delay { get; set; } + Tarif Tarif { get; } + double Payment { get; } + } +} diff --git a/Golovko/Task_1/2_6_Taxi/Program.cs b/Golovko/Task_1/2_6_Taxi/Program.cs new file mode 100644 index 0000000..d00f751 --- /dev/null +++ b/Golovko/Task_1/2_6_Taxi/Program.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_6_Taxi +{ + class Program + { + static void Main(string[] args) + { + ITarif tarif = new Tarif(5, 20, 3, 1); + Console.WriteLine("Enter the distance, please:"); + double distance = double.Parse(Console.ReadLine()); + Console.WriteLine("Enter the delay, please:"); + double delay = double.Parse(Console.ReadLine()); + ITaxi taxi = new Taxi(distance, delay, (Tarif)tarif); + Console.WriteLine("Your payment for taxi using is {0} uah", taxi.Payment); + Console.ReadKey(); + } + } +} diff --git a/Golovko/Task_1/2_6_Taxi/Properties/AssemblyInfo.cs b/Golovko/Task_1/2_6_Taxi/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..9ade4c4 --- /dev/null +++ b/Golovko/Task_1/2_6_Taxi/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("2_6_Taxi")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("2_6_Taxi")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[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("722b5df2-2531-44fd-b8d2-d535cb8f9137")] + +// 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")] diff --git a/Golovko/Task_1/2_6_Taxi/Tarif.cs b/Golovko/Task_1/2_6_Taxi/Tarif.cs new file mode 100644 index 0000000..4c4000a --- /dev/null +++ b/Golovko/Task_1/2_6_Taxi/Tarif.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_6_Taxi +{ + struct Tarif : ITarif + { + public double MaxPaidDistance { get; set; } + public double MaxPaidTarif { get; set; } + public double PaidTarif { get; set; } + public double DelayTarif { get; set; } + public Tarif(double maxPaidDistance, double maxPaidTarif, double paidTarif, double delayTarif) + { + this.MaxPaidDistance = maxPaidDistance; + this.MaxPaidTarif = maxPaidTarif; + this.PaidTarif = paidTarif; + this.DelayTarif = delayTarif; + } + } +} diff --git a/Golovko/Task_1/2_6_Taxi/Taxi.cs b/Golovko/Task_1/2_6_Taxi/Taxi.cs new file mode 100644 index 0000000..e6add56 --- /dev/null +++ b/Golovko/Task_1/2_6_Taxi/Taxi.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_6_Taxi +{ + class Taxi : ITaxi + { + public double Distance { get; set; } + public double Delay { get; set; } + public Tarif Tarif { get; } + public double Payment + { + get + { + return Distance > Tarif.MaxPaidDistance ? + Tarif.MaxPaidDistance * Tarif.MaxPaidTarif + (Distance - Tarif.MaxPaidDistance) * Tarif.PaidTarif + Delay * Tarif.DelayTarif : + Distance * Tarif.MaxPaidTarif + Delay * Tarif.DelayTarif; + } + } + public Taxi(double distance, double delay, Tarif tarif) + { + this.Distance = distance; + this.Delay = delay; + this.Tarif = tarif; + } + } +} diff --git a/Golovko/Task_1/2_6_Taxi/bin/Debug/2_6_Taxi.exe b/Golovko/Task_1/2_6_Taxi/bin/Debug/2_6_Taxi.exe new file mode 100644 index 0000000..2275ea7 Binary files /dev/null and b/Golovko/Task_1/2_6_Taxi/bin/Debug/2_6_Taxi.exe differ diff --git a/Golovko/Task_1/2_6_Taxi/bin/Debug/2_6_Taxi.exe.config b/Golovko/Task_1/2_6_Taxi/bin/Debug/2_6_Taxi.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_1/2_6_Taxi/bin/Debug/2_6_Taxi.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_1/2_6_Taxi/bin/Debug/2_6_Taxi.pdb b/Golovko/Task_1/2_6_Taxi/bin/Debug/2_6_Taxi.pdb new file mode 100644 index 0000000..3562585 Binary files /dev/null and b/Golovko/Task_1/2_6_Taxi/bin/Debug/2_6_Taxi.pdb differ diff --git a/Golovko/Task_1/2_6_Taxi/bin/Debug/2_6_Taxi.vshost.exe b/Golovko/Task_1/2_6_Taxi/bin/Debug/2_6_Taxi.vshost.exe new file mode 100644 index 0000000..681ab77 Binary files /dev/null and b/Golovko/Task_1/2_6_Taxi/bin/Debug/2_6_Taxi.vshost.exe differ diff --git a/Golovko/Task_1/2_6_Taxi/bin/Debug/2_6_Taxi.vshost.exe.config b/Golovko/Task_1/2_6_Taxi/bin/Debug/2_6_Taxi.vshost.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_1/2_6_Taxi/bin/Debug/2_6_Taxi.vshost.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_1/2_6_Taxi/obj/Debug/2_6_Taxi.csproj.FileListAbsolute.txt b/Golovko/Task_1/2_6_Taxi/obj/Debug/2_6_Taxi.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..fb567a0 --- /dev/null +++ b/Golovko/Task_1/2_6_Taxi/obj/Debug/2_6_Taxi.csproj.FileListAbsolute.txt @@ -0,0 +1,11 @@ +C:\Users\Головко\Desktop\Task_1_Basics\2_6_Taxi\bin\Debug\2_6_Taxi.exe.config +C:\Users\Головко\Desktop\Task_1_Basics\2_6_Taxi\bin\Debug\2_6_Taxi.exe +C:\Users\Головко\Desktop\Task_1_Basics\2_6_Taxi\bin\Debug\2_6_Taxi.pdb +C:\Users\Головко\Desktop\Task_1_Basics\2_6_Taxi\obj\Debug\2_6_Taxi.exe +C:\Users\Головко\Desktop\Task_1_Basics\2_6_Taxi\obj\Debug\2_6_Taxi.pdb +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\2_6_Taxi\bin\Debug\2_6_Taxi.exe.config +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\2_6_Taxi\bin\Debug\2_6_Taxi.exe +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\2_6_Taxi\bin\Debug\2_6_Taxi.pdb +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\2_6_Taxi\obj\Debug\2_6_Taxi.csprojResolveAssemblyReference.cache +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\2_6_Taxi\obj\Debug\2_6_Taxi.exe +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\2_6_Taxi\obj\Debug\2_6_Taxi.pdb diff --git a/Golovko/Task_1/2_6_Taxi/obj/Debug/2_6_Taxi.csprojResolveAssemblyReference.cache b/Golovko/Task_1/2_6_Taxi/obj/Debug/2_6_Taxi.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..8b357ed Binary files /dev/null and b/Golovko/Task_1/2_6_Taxi/obj/Debug/2_6_Taxi.csprojResolveAssemblyReference.cache differ diff --git a/Golovko/Task_1/2_6_Taxi/obj/Debug/2_6_Taxi.exe b/Golovko/Task_1/2_6_Taxi/obj/Debug/2_6_Taxi.exe new file mode 100644 index 0000000..2275ea7 Binary files /dev/null and b/Golovko/Task_1/2_6_Taxi/obj/Debug/2_6_Taxi.exe differ diff --git a/Golovko/Task_1/2_6_Taxi/obj/Debug/2_6_Taxi.pdb b/Golovko/Task_1/2_6_Taxi/obj/Debug/2_6_Taxi.pdb new file mode 100644 index 0000000..3562585 Binary files /dev/null and b/Golovko/Task_1/2_6_Taxi/obj/Debug/2_6_Taxi.pdb differ diff --git a/Golovko/Task_1/2_6_Taxi/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Golovko/Task_1/2_6_Taxi/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..09c58a8 Binary files /dev/null and b/Golovko/Task_1/2_6_Taxi/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Golovko/Task_1/2_6_Taxi/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Golovko/Task_1/2_6_Taxi/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_1/2_6_Taxi/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Golovko/Task_1/2_6_Taxi/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_1/2_6_Taxi/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Golovko/Task_1/2_6_Taxi/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_1/2_7_SimpleNumber/2_7_SimpleNumber.csproj b/Golovko/Task_1/2_7_SimpleNumber/2_7_SimpleNumber.csproj new file mode 100644 index 0000000..10fced0 --- /dev/null +++ b/Golovko/Task_1/2_7_SimpleNumber/2_7_SimpleNumber.csproj @@ -0,0 +1,62 @@ + + + + + Debug + AnyCPU + {40F4F834-264B-48D1-BAB5-F3877771B9FA} + Exe + Properties + _2_7_SimpleNumber + 2_7_SimpleNumber + v4.5.2 + 512 + 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/Golovko/Task_1/2_7_SimpleNumber/App.config b/Golovko/Task_1/2_7_SimpleNumber/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_1/2_7_SimpleNumber/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_1/2_7_SimpleNumber/INaturalNumber.cs b/Golovko/Task_1/2_7_SimpleNumber/INaturalNumber.cs new file mode 100644 index 0000000..6c34865 --- /dev/null +++ b/Golovko/Task_1/2_7_SimpleNumber/INaturalNumber.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_7_SimpleNumber +{ + interface INaturalNumber + { + int Number { get; set; } + bool IsSimple(); + } +} diff --git a/Golovko/Task_1/2_7_SimpleNumber/NaturalNumber.cs b/Golovko/Task_1/2_7_SimpleNumber/NaturalNumber.cs new file mode 100644 index 0000000..fd0f8bf --- /dev/null +++ b/Golovko/Task_1/2_7_SimpleNumber/NaturalNumber.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_7_SimpleNumber +{ + class NaturalNumber : INaturalNumber + { + public int Number {get; set;} + public NaturalNumber(int number) + { + this.Number = number; + } + public bool IsSimple() + { + bool isSimple = true; + for (int i = 2; i < Number / 2; i++) + { + if (Number % i == 0) + { + isSimple = false; + break; + } + } + return isSimple; + } + } +} diff --git a/Golovko/Task_1/2_7_SimpleNumber/Program.cs b/Golovko/Task_1/2_7_SimpleNumber/Program.cs new file mode 100644 index 0000000..09d9429 --- /dev/null +++ b/Golovko/Task_1/2_7_SimpleNumber/Program.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_7_SimpleNumber +{ + class Program + { + static void Main(string[] args) + { + Console.WriteLine("Enter natural number, please:"); + int number = int.Parse(Console.ReadLine()); + INaturalNumber natNumber = new NaturalNumber(number); + Console.WriteLine(natNumber.IsSimple() ? "The number is simple" : "The number isn't simple"); + Console.ReadLine(); + } + } +} diff --git a/Golovko/Task_1/2_7_SimpleNumber/Properties/AssemblyInfo.cs b/Golovko/Task_1/2_7_SimpleNumber/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..55b811a --- /dev/null +++ b/Golovko/Task_1/2_7_SimpleNumber/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("2_7_SimpleNumber")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("2_7_SimpleNumber")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[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("40f4f834-264b-48d1-bab5-f3877771b9fa")] + +// 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")] diff --git a/Golovko/Task_1/2_7_SimpleNumber/bin/Debug/2_7_SimpleNumber.exe b/Golovko/Task_1/2_7_SimpleNumber/bin/Debug/2_7_SimpleNumber.exe new file mode 100644 index 0000000..8448f70 Binary files /dev/null and b/Golovko/Task_1/2_7_SimpleNumber/bin/Debug/2_7_SimpleNumber.exe differ diff --git a/Golovko/Task_1/2_7_SimpleNumber/bin/Debug/2_7_SimpleNumber.exe.config b/Golovko/Task_1/2_7_SimpleNumber/bin/Debug/2_7_SimpleNumber.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_1/2_7_SimpleNumber/bin/Debug/2_7_SimpleNumber.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_1/2_7_SimpleNumber/bin/Debug/2_7_SimpleNumber.pdb b/Golovko/Task_1/2_7_SimpleNumber/bin/Debug/2_7_SimpleNumber.pdb new file mode 100644 index 0000000..4303e23 Binary files /dev/null and b/Golovko/Task_1/2_7_SimpleNumber/bin/Debug/2_7_SimpleNumber.pdb differ diff --git a/Golovko/Task_1/2_7_SimpleNumber/bin/Debug/2_7_SimpleNumber.vshost.exe b/Golovko/Task_1/2_7_SimpleNumber/bin/Debug/2_7_SimpleNumber.vshost.exe new file mode 100644 index 0000000..681ab77 Binary files /dev/null and b/Golovko/Task_1/2_7_SimpleNumber/bin/Debug/2_7_SimpleNumber.vshost.exe differ diff --git a/Golovko/Task_1/2_7_SimpleNumber/bin/Debug/2_7_SimpleNumber.vshost.exe.config b/Golovko/Task_1/2_7_SimpleNumber/bin/Debug/2_7_SimpleNumber.vshost.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_1/2_7_SimpleNumber/bin/Debug/2_7_SimpleNumber.vshost.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_1/2_7_SimpleNumber/obj/Debug/2_7_SimpleNumber.csproj.FileListAbsolute.txt b/Golovko/Task_1/2_7_SimpleNumber/obj/Debug/2_7_SimpleNumber.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..93b92de --- /dev/null +++ b/Golovko/Task_1/2_7_SimpleNumber/obj/Debug/2_7_SimpleNumber.csproj.FileListAbsolute.txt @@ -0,0 +1,11 @@ +C:\Users\Головко\Desktop\Task_1_Basics\2_7_SimpleNumber\bin\Debug\2_7_SimpleNumber.exe.config +C:\Users\Головко\Desktop\Task_1_Basics\2_7_SimpleNumber\bin\Debug\2_7_SimpleNumber.exe +C:\Users\Головко\Desktop\Task_1_Basics\2_7_SimpleNumber\bin\Debug\2_7_SimpleNumber.pdb +C:\Users\Головко\Desktop\Task_1_Basics\2_7_SimpleNumber\obj\Debug\2_7_SimpleNumber.exe +C:\Users\Головко\Desktop\Task_1_Basics\2_7_SimpleNumber\obj\Debug\2_7_SimpleNumber.pdb +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\2_7_SimpleNumber\bin\Debug\2_7_SimpleNumber.exe.config +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\2_7_SimpleNumber\bin\Debug\2_7_SimpleNumber.exe +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\2_7_SimpleNumber\bin\Debug\2_7_SimpleNumber.pdb +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\2_7_SimpleNumber\obj\Debug\2_7_SimpleNumber.csprojResolveAssemblyReference.cache +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\2_7_SimpleNumber\obj\Debug\2_7_SimpleNumber.exe +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\2_7_SimpleNumber\obj\Debug\2_7_SimpleNumber.pdb diff --git a/Golovko/Task_1/2_7_SimpleNumber/obj/Debug/2_7_SimpleNumber.csprojResolveAssemblyReference.cache b/Golovko/Task_1/2_7_SimpleNumber/obj/Debug/2_7_SimpleNumber.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..8b357ed Binary files /dev/null and b/Golovko/Task_1/2_7_SimpleNumber/obj/Debug/2_7_SimpleNumber.csprojResolveAssemblyReference.cache differ diff --git a/Golovko/Task_1/2_7_SimpleNumber/obj/Debug/2_7_SimpleNumber.exe b/Golovko/Task_1/2_7_SimpleNumber/obj/Debug/2_7_SimpleNumber.exe new file mode 100644 index 0000000..8448f70 Binary files /dev/null and b/Golovko/Task_1/2_7_SimpleNumber/obj/Debug/2_7_SimpleNumber.exe differ diff --git a/Golovko/Task_1/2_7_SimpleNumber/obj/Debug/2_7_SimpleNumber.pdb b/Golovko/Task_1/2_7_SimpleNumber/obj/Debug/2_7_SimpleNumber.pdb new file mode 100644 index 0000000..4303e23 Binary files /dev/null and b/Golovko/Task_1/2_7_SimpleNumber/obj/Debug/2_7_SimpleNumber.pdb differ diff --git a/Golovko/Task_1/2_7_SimpleNumber/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Golovko/Task_1/2_7_SimpleNumber/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..98f5f58 Binary files /dev/null and b/Golovko/Task_1/2_7_SimpleNumber/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Golovko/Task_1/2_7_SimpleNumber/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Golovko/Task_1/2_7_SimpleNumber/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_1/2_7_SimpleNumber/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Golovko/Task_1/2_7_SimpleNumber/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_1/2_7_SimpleNumber/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Golovko/Task_1/2_7_SimpleNumber/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_1/2_8_Lottery/2_8_Lottery.csproj b/Golovko/Task_1/2_8_Lottery/2_8_Lottery.csproj new file mode 100644 index 0000000..819b52f --- /dev/null +++ b/Golovko/Task_1/2_8_Lottery/2_8_Lottery.csproj @@ -0,0 +1,65 @@ + + + + + Debug + AnyCPU + {A068AC42-233C-4473-A202-7C0AEB185AC8} + Exe + Properties + _2_8_Lottery + 2_8_Lottery + v4.5.2 + 512 + 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/Golovko/Task_1/2_8_Lottery/App.config b/Golovko/Task_1/2_8_Lottery/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_1/2_8_Lottery/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_1/2_8_Lottery/Cube.cs b/Golovko/Task_1/2_8_Lottery/Cube.cs new file mode 100644 index 0000000..a4e123f --- /dev/null +++ b/Golovko/Task_1/2_8_Lottery/Cube.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_8_Lottery +{ + class Cube : ICube + { + private readonly int grainsCount; + public Cube(int grainsCount) + { + this.grainsCount = grainsCount; + } + public int Throw() + { + return Generator.Generate(1, grainsCount); + } + } +} diff --git a/Golovko/Task_1/2_8_Lottery/Game.cs b/Golovko/Task_1/2_8_Lottery/Game.cs new file mode 100644 index 0000000..6a73bfa --- /dev/null +++ b/Golovko/Task_1/2_8_Lottery/Game.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_8_Lottery +{ + class Game : IGame + { + private const int grains = 12; + private readonly ICube cube; + public int Rate { get; } + public Game(int rate) + { + this.Rate = rate; + cube = new Cube(grains); + } + public string Play() + { + string result; + int points = cube.Throw(); + if (points < 6) result = points + " points. You won 0 uah. Game over."; + else if (points < 9) result = points + " points. You won " + Rate + " uah"; + else if (points < 12) result = points + " points. You won " + 2 * Rate + " uah"; + else result = points + " points. You won " + 10 * Rate + " uah"; + return result; + } + } +} diff --git a/Golovko/Task_1/2_8_Lottery/Generator.cs b/Golovko/Task_1/2_8_Lottery/Generator.cs new file mode 100644 index 0000000..a65fd92 --- /dev/null +++ b/Golovko/Task_1/2_8_Lottery/Generator.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_8_Lottery +{ + static class Generator + { + private static readonly Random rnd; + private static readonly object syncLocker; + static Generator() + { + rnd = new Random(DateTime.Now.Millisecond); + syncLocker = new object(); + } + public static int Generate(int min, int max) + { + lock(syncLocker) + { + return rnd.Next(min, max + 1); + } + } + } +} diff --git a/Golovko/Task_1/2_8_Lottery/ICube.cs b/Golovko/Task_1/2_8_Lottery/ICube.cs new file mode 100644 index 0000000..7c56a25 --- /dev/null +++ b/Golovko/Task_1/2_8_Lottery/ICube.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_8_Lottery +{ + interface ICube + { + int Throw(); + } +} diff --git a/Golovko/Task_1/2_8_Lottery/IGame.cs b/Golovko/Task_1/2_8_Lottery/IGame.cs new file mode 100644 index 0000000..07187cb --- /dev/null +++ b/Golovko/Task_1/2_8_Lottery/IGame.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_8_Lottery +{ + interface IGame + { + int Rate { get; } + string Play(); + } +} diff --git a/Golovko/Task_1/2_8_Lottery/Program.cs b/Golovko/Task_1/2_8_Lottery/Program.cs new file mode 100644 index 0000000..85f5720 --- /dev/null +++ b/Golovko/Task_1/2_8_Lottery/Program.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_8_Lottery +{ + class Program + { + static void Main(string[] args) + { + Console.WriteLine("Make your RATE:"); + int rate = int.Parse(Console.ReadLine()); + IGame game = new Game(rate); + Console.WriteLine(game.Play()); + Console.ReadKey(); + } + } +} diff --git a/Golovko/Task_1/2_8_Lottery/Properties/AssemblyInfo.cs b/Golovko/Task_1/2_8_Lottery/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..1efbd26 --- /dev/null +++ b/Golovko/Task_1/2_8_Lottery/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("2_8_Lottery")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("2_8_Lottery")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[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("a068ac42-233c-4473-a202-7c0aeb185ac8")] + +// 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")] diff --git a/Golovko/Task_1/2_8_Lottery/bin/Debug/2_8_Lottery.exe b/Golovko/Task_1/2_8_Lottery/bin/Debug/2_8_Lottery.exe new file mode 100644 index 0000000..d670ca4 Binary files /dev/null and b/Golovko/Task_1/2_8_Lottery/bin/Debug/2_8_Lottery.exe differ diff --git a/Golovko/Task_1/2_8_Lottery/bin/Debug/2_8_Lottery.exe.config b/Golovko/Task_1/2_8_Lottery/bin/Debug/2_8_Lottery.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_1/2_8_Lottery/bin/Debug/2_8_Lottery.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_1/2_8_Lottery/bin/Debug/2_8_Lottery.pdb b/Golovko/Task_1/2_8_Lottery/bin/Debug/2_8_Lottery.pdb new file mode 100644 index 0000000..8e53bb2 Binary files /dev/null and b/Golovko/Task_1/2_8_Lottery/bin/Debug/2_8_Lottery.pdb differ diff --git a/Golovko/Task_1/2_8_Lottery/bin/Debug/2_8_Lottery.vshost.exe b/Golovko/Task_1/2_8_Lottery/bin/Debug/2_8_Lottery.vshost.exe new file mode 100644 index 0000000..681ab77 Binary files /dev/null and b/Golovko/Task_1/2_8_Lottery/bin/Debug/2_8_Lottery.vshost.exe differ diff --git a/Golovko/Task_1/2_8_Lottery/bin/Debug/2_8_Lottery.vshost.exe.config b/Golovko/Task_1/2_8_Lottery/bin/Debug/2_8_Lottery.vshost.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_1/2_8_Lottery/bin/Debug/2_8_Lottery.vshost.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_1/2_8_Lottery/obj/Debug/2_8_Lottery.csproj.FileListAbsolute.txt b/Golovko/Task_1/2_8_Lottery/obj/Debug/2_8_Lottery.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..5327740 --- /dev/null +++ b/Golovko/Task_1/2_8_Lottery/obj/Debug/2_8_Lottery.csproj.FileListAbsolute.txt @@ -0,0 +1,10 @@ +C:\Users\Головко\Desktop\Task_1_Basics\2_8_Lottery\bin\Debug\2_8_Lottery.exe.config +C:\Users\Головко\Desktop\Task_1_Basics\2_8_Lottery\bin\Debug\2_8_Lottery.exe +C:\Users\Головко\Desktop\Task_1_Basics\2_8_Lottery\bin\Debug\2_8_Lottery.pdb +C:\Users\Головко\Desktop\Task_1_Basics\2_8_Lottery\obj\Debug\2_8_Lottery.exe +C:\Users\Головко\Desktop\Task_1_Basics\2_8_Lottery\obj\Debug\2_8_Lottery.pdb +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\2_8_Lottery\bin\Debug\2_8_Lottery.exe.config +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\2_8_Lottery\bin\Debug\2_8_Lottery.exe +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\2_8_Lottery\bin\Debug\2_8_Lottery.pdb +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\2_8_Lottery\obj\Debug\2_8_Lottery.exe +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\2_8_Lottery\obj\Debug\2_8_Lottery.pdb diff --git a/Golovko/Task_1/2_8_Lottery/obj/Debug/2_8_Lottery.exe b/Golovko/Task_1/2_8_Lottery/obj/Debug/2_8_Lottery.exe new file mode 100644 index 0000000..d670ca4 Binary files /dev/null and b/Golovko/Task_1/2_8_Lottery/obj/Debug/2_8_Lottery.exe differ diff --git a/Golovko/Task_1/2_8_Lottery/obj/Debug/2_8_Lottery.pdb b/Golovko/Task_1/2_8_Lottery/obj/Debug/2_8_Lottery.pdb new file mode 100644 index 0000000..8e53bb2 Binary files /dev/null and b/Golovko/Task_1/2_8_Lottery/obj/Debug/2_8_Lottery.pdb differ diff --git a/Golovko/Task_1/2_8_Lottery/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Golovko/Task_1/2_8_Lottery/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..36256d0 Binary files /dev/null and b/Golovko/Task_1/2_8_Lottery/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Golovko/Task_1/2_8_Lottery/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Golovko/Task_1/2_8_Lottery/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_1/2_8_Lottery/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Golovko/Task_1/2_8_Lottery/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_1/2_8_Lottery/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Golovko/Task_1/2_8_Lottery/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_1/2_9_CurrencyExchanger/2_9_CurrencyExchanger.csproj b/Golovko/Task_1/2_9_CurrencyExchanger/2_9_CurrencyExchanger.csproj new file mode 100644 index 0000000..8540493 --- /dev/null +++ b/Golovko/Task_1/2_9_CurrencyExchanger/2_9_CurrencyExchanger.csproj @@ -0,0 +1,66 @@ + + + + + Debug + AnyCPU + {04D1A851-6A61-414B-965E-6D83B9C020BA} + Exe + Properties + _2_9_CurrencyExchanger + 2_9_CurrencyExchanger + v4.5.2 + 512 + 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/Golovko/Task_1/2_9_CurrencyExchanger/App.config b/Golovko/Task_1/2_9_CurrencyExchanger/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_1/2_9_CurrencyExchanger/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_1/2_9_CurrencyExchanger/Currency.cs b/Golovko/Task_1/2_9_CurrencyExchanger/Currency.cs new file mode 100644 index 0000000..e461932 --- /dev/null +++ b/Golovko/Task_1/2_9_CurrencyExchanger/Currency.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_9_CurrencyExchanger +{ + class Currency : ICurrency + { + public string Name { get; } + public double Buy { get; } + public double Sell { get; } + public Currency(string name, double buy, double sell) + { + this.Name = name; + this.Buy = buy; + this.Sell = sell; + } + } +} diff --git a/Golovko/Task_1/2_9_CurrencyExchanger/Exchanger.cs b/Golovko/Task_1/2_9_CurrencyExchanger/Exchanger.cs new file mode 100644 index 0000000..074c5df --- /dev/null +++ b/Golovko/Task_1/2_9_CurrencyExchanger/Exchanger.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_9_CurrencyExchanger +{ + static class Exchanger + { + public static double Exchange(Currency currencyFrom, Currency currencyTo, double volume, Type type) + { + return type > 0 ? volume * currencyFrom.Buy / currencyTo.Buy : volume * currencyFrom.Sell / currencyTo.Sell; + } + } +} diff --git a/Golovko/Task_1/2_9_CurrencyExchanger/ICurrency.cs b/Golovko/Task_1/2_9_CurrencyExchanger/ICurrency.cs new file mode 100644 index 0000000..9e351a3 --- /dev/null +++ b/Golovko/Task_1/2_9_CurrencyExchanger/ICurrency.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_9_CurrencyExchanger +{ + interface ICurrency + { + string Name { get; } + double Sell { get; } + double Buy { get; } + } +} diff --git a/Golovko/Task_1/2_9_CurrencyExchanger/IMoneyExchanger.cs b/Golovko/Task_1/2_9_CurrencyExchanger/IMoneyExchanger.cs new file mode 100644 index 0000000..5e9911c --- /dev/null +++ b/Golovko/Task_1/2_9_CurrencyExchanger/IMoneyExchanger.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_9_CurrencyExchanger +{ + interface IMoneyExchanger + { + void Add(Currency currency); + void Exchange(Currency currency, double volume, Type type); + Currency GetCurrencyByName(string name); + } +} diff --git a/Golovko/Task_1/2_9_CurrencyExchanger/MoneyExchanger.cs b/Golovko/Task_1/2_9_CurrencyExchanger/MoneyExchanger.cs new file mode 100644 index 0000000..8ee3274 --- /dev/null +++ b/Golovko/Task_1/2_9_CurrencyExchanger/MoneyExchanger.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_9_CurrencyExchanger +{ + class MoneyExchanger : IMoneyExchanger + { + private readonly List currencies; + public MoneyExchanger() + { + currencies = new List(); + } + public void Add(Currency currency) + { + currencies.Add(currency); + } + public void Exchange(Currency currency, double volume, Type type) + { + foreach (Currency curr in currencies) + { + if (currency.Name == curr.Name) continue; + Console.WriteLine("{0} -> {1} = {2}", currency.Name, curr.Name, Exchanger.Exchange(currency, curr, volume, type)); + } + } + public Currency GetCurrencyByName(string name) + { + Currency resCurrency = null; + foreach (Currency currency in currencies) + { + if (currency.Name == name) resCurrency = currency; + } + return resCurrency; + } + + + } +} diff --git a/Golovko/Task_1/2_9_CurrencyExchanger/Program.cs b/Golovko/Task_1/2_9_CurrencyExchanger/Program.cs new file mode 100644 index 0000000..1d41129 --- /dev/null +++ b/Golovko/Task_1/2_9_CurrencyExchanger/Program.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_9_CurrencyExchanger +{ + class Program + { + static void Main(string[] args) + { + IMoneyExchanger exchanger = new MoneyExchanger(); + exchanger.Add(new Currency("UAH", 1, 1)); + exchanger.Add(new Currency("USD", 26.11, 26.38)); + exchanger.Add(new Currency("EUR", 29.25, 29.52)); + Console.WriteLine("Enter the currency (UAH, USD, EUR):"); + Currency baseCurrency = exchanger.GetCurrencyByName(Console.ReadLine()); + if (baseCurrency == null) + Console.WriteLine("Currency isn't exist"); + else + { + Console.WriteLine("Enter the volume:"); + double volume = double.Parse(Console.ReadLine()); + exchanger.Exchange(baseCurrency, volume, Type.Sell); + } + Console.ReadKey(); + } + } +} diff --git a/Golovko/Task_1/2_9_CurrencyExchanger/Properties/AssemblyInfo.cs b/Golovko/Task_1/2_9_CurrencyExchanger/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..18cca54 --- /dev/null +++ b/Golovko/Task_1/2_9_CurrencyExchanger/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("2_9_CurrencyExchanger")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("2_9_CurrencyExchanger")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[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("04d1a851-6a61-414b-965e-6d83b9c020ba")] + +// 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")] diff --git a/Golovko/Task_1/2_9_CurrencyExchanger/Type.cs b/Golovko/Task_1/2_9_CurrencyExchanger/Type.cs new file mode 100644 index 0000000..88f59d2 --- /dev/null +++ b/Golovko/Task_1/2_9_CurrencyExchanger/Type.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_9_CurrencyExchanger +{ + enum Type : byte + { + Sell, + Buy + } +} diff --git a/Golovko/Task_1/2_9_CurrencyExchanger/bin/Debug/2_9_CurrencyExchanger.exe b/Golovko/Task_1/2_9_CurrencyExchanger/bin/Debug/2_9_CurrencyExchanger.exe new file mode 100644 index 0000000..b2142be Binary files /dev/null and b/Golovko/Task_1/2_9_CurrencyExchanger/bin/Debug/2_9_CurrencyExchanger.exe differ diff --git a/Golovko/Task_1/2_9_CurrencyExchanger/bin/Debug/2_9_CurrencyExchanger.exe.config b/Golovko/Task_1/2_9_CurrencyExchanger/bin/Debug/2_9_CurrencyExchanger.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_1/2_9_CurrencyExchanger/bin/Debug/2_9_CurrencyExchanger.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_1/2_9_CurrencyExchanger/bin/Debug/2_9_CurrencyExchanger.pdb b/Golovko/Task_1/2_9_CurrencyExchanger/bin/Debug/2_9_CurrencyExchanger.pdb new file mode 100644 index 0000000..fcd74e0 Binary files /dev/null and b/Golovko/Task_1/2_9_CurrencyExchanger/bin/Debug/2_9_CurrencyExchanger.pdb differ diff --git a/Golovko/Task_1/2_9_CurrencyExchanger/bin/Debug/2_9_CurrencyExchanger.vshost.exe b/Golovko/Task_1/2_9_CurrencyExchanger/bin/Debug/2_9_CurrencyExchanger.vshost.exe new file mode 100644 index 0000000..681ab77 Binary files /dev/null and b/Golovko/Task_1/2_9_CurrencyExchanger/bin/Debug/2_9_CurrencyExchanger.vshost.exe differ diff --git a/Golovko/Task_1/2_9_CurrencyExchanger/bin/Debug/2_9_CurrencyExchanger.vshost.exe.config b/Golovko/Task_1/2_9_CurrencyExchanger/bin/Debug/2_9_CurrencyExchanger.vshost.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_1/2_9_CurrencyExchanger/bin/Debug/2_9_CurrencyExchanger.vshost.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_1/2_9_CurrencyExchanger/obj/Debug/2_9_CurrencyExchanger.csproj.FileListAbsolute.txt b/Golovko/Task_1/2_9_CurrencyExchanger/obj/Debug/2_9_CurrencyExchanger.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..3660ec8 --- /dev/null +++ b/Golovko/Task_1/2_9_CurrencyExchanger/obj/Debug/2_9_CurrencyExchanger.csproj.FileListAbsolute.txt @@ -0,0 +1,10 @@ +C:\Users\Головко\Desktop\Task_1_Basics\2_9_CurrencyExchanger\bin\Debug\2_9_CurrencyExchanger.exe.config +C:\Users\Головко\Desktop\Task_1_Basics\2_9_CurrencyExchanger\bin\Debug\2_9_CurrencyExchanger.exe +C:\Users\Головко\Desktop\Task_1_Basics\2_9_CurrencyExchanger\bin\Debug\2_9_CurrencyExchanger.pdb +C:\Users\Головко\Desktop\Task_1_Basics\2_9_CurrencyExchanger\obj\Debug\2_9_CurrencyExchanger.exe +C:\Users\Головко\Desktop\Task_1_Basics\2_9_CurrencyExchanger\obj\Debug\2_9_CurrencyExchanger.pdb +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\2_9_CurrencyExchanger\bin\Debug\2_9_CurrencyExchanger.exe.config +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\2_9_CurrencyExchanger\bin\Debug\2_9_CurrencyExchanger.exe +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\2_9_CurrencyExchanger\bin\Debug\2_9_CurrencyExchanger.pdb +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\2_9_CurrencyExchanger\obj\Debug\2_9_CurrencyExchanger.exe +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\2_9_CurrencyExchanger\obj\Debug\2_9_CurrencyExchanger.pdb diff --git a/Golovko/Task_1/2_9_CurrencyExchanger/obj/Debug/2_9_CurrencyExchanger.exe b/Golovko/Task_1/2_9_CurrencyExchanger/obj/Debug/2_9_CurrencyExchanger.exe new file mode 100644 index 0000000..b2142be Binary files /dev/null and b/Golovko/Task_1/2_9_CurrencyExchanger/obj/Debug/2_9_CurrencyExchanger.exe differ diff --git a/Golovko/Task_1/2_9_CurrencyExchanger/obj/Debug/2_9_CurrencyExchanger.pdb b/Golovko/Task_1/2_9_CurrencyExchanger/obj/Debug/2_9_CurrencyExchanger.pdb new file mode 100644 index 0000000..fcd74e0 Binary files /dev/null and b/Golovko/Task_1/2_9_CurrencyExchanger/obj/Debug/2_9_CurrencyExchanger.pdb differ diff --git a/Golovko/Task_1/2_9_CurrencyExchanger/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Golovko/Task_1/2_9_CurrencyExchanger/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..d5c679e Binary files /dev/null and b/Golovko/Task_1/2_9_CurrencyExchanger/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Golovko/Task_1/2_9_CurrencyExchanger/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Golovko/Task_1/2_9_CurrencyExchanger/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_1/2_9_CurrencyExchanger/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Golovko/Task_1/2_9_CurrencyExchanger/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_1/2_9_CurrencyExchanger/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Golovko/Task_1/2_9_CurrencyExchanger/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_1/3_1_MultiplyTable/3_1_MultiplyTable.csproj b/Golovko/Task_1/3_1_MultiplyTable/3_1_MultiplyTable.csproj new file mode 100644 index 0000000..8a05190 --- /dev/null +++ b/Golovko/Task_1/3_1_MultiplyTable/3_1_MultiplyTable.csproj @@ -0,0 +1,62 @@ + + + + + Debug + AnyCPU + {00CF51DD-5B4D-4F72-9A74-A8067F8D6B98} + Exe + Properties + _3_1_MultiplyTable + 3_1_MultiplyTable + v4.5.2 + 512 + 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/Golovko/Task_1/3_1_MultiplyTable/App.config b/Golovko/Task_1/3_1_MultiplyTable/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_1/3_1_MultiplyTable/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_1/3_1_MultiplyTable/IMultiplyTable.cs b/Golovko/Task_1/3_1_MultiplyTable/IMultiplyTable.cs new file mode 100644 index 0000000..59d90c8 --- /dev/null +++ b/Golovko/Task_1/3_1_MultiplyTable/IMultiplyTable.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _3_1_MultiplyTable +{ + interface IMultiplyTable + { + void ToBuild(int multiplier); + } +} diff --git a/Golovko/Task_1/3_1_MultiplyTable/MultiplyTable.cs b/Golovko/Task_1/3_1_MultiplyTable/MultiplyTable.cs new file mode 100644 index 0000000..d31cbb6 --- /dev/null +++ b/Golovko/Task_1/3_1_MultiplyTable/MultiplyTable.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _3_1_MultiplyTable +{ + class MultiplyTable : IMultiplyTable + { + private readonly int range; + public MultiplyTable(int range) + { + this.range = range; + } + public void ToBuild(int multiplier) + { + for (int i = 1; i <= range; i++) + { + Console.WriteLine("{0} x {1} = {2}", i, multiplier, i * multiplier); + } + } + } +} diff --git a/Golovko/Task_1/3_1_MultiplyTable/Program.cs b/Golovko/Task_1/3_1_MultiplyTable/Program.cs new file mode 100644 index 0000000..1b94500 --- /dev/null +++ b/Golovko/Task_1/3_1_MultiplyTable/Program.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _3_1_MultiplyTable +{ + class Program + { + static void Main(string[] args) + { + IMultiplyTable table = new MultiplyTable(20); + Console.WriteLine("Enter the number for multiplying:"); + int multilier = int.Parse(Console.ReadLine()); + table.ToBuild(multilier); + Console.ReadKey(); + } + } +} diff --git a/Golovko/Task_1/3_1_MultiplyTable/Properties/AssemblyInfo.cs b/Golovko/Task_1/3_1_MultiplyTable/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..1d3ca2f --- /dev/null +++ b/Golovko/Task_1/3_1_MultiplyTable/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("3_1_MultiplyTable")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("3_1_MultiplyTable")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[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("00cf51dd-5b4d-4f72-9a74-a8067f8d6b98")] + +// 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")] diff --git a/Golovko/Task_1/3_1_MultiplyTable/bin/Debug/3_1_MultiplyTable.exe b/Golovko/Task_1/3_1_MultiplyTable/bin/Debug/3_1_MultiplyTable.exe new file mode 100644 index 0000000..01a82d2 Binary files /dev/null and b/Golovko/Task_1/3_1_MultiplyTable/bin/Debug/3_1_MultiplyTable.exe differ diff --git a/Golovko/Task_1/3_1_MultiplyTable/bin/Debug/3_1_MultiplyTable.exe.config b/Golovko/Task_1/3_1_MultiplyTable/bin/Debug/3_1_MultiplyTable.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_1/3_1_MultiplyTable/bin/Debug/3_1_MultiplyTable.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_1/3_1_MultiplyTable/bin/Debug/3_1_MultiplyTable.pdb b/Golovko/Task_1/3_1_MultiplyTable/bin/Debug/3_1_MultiplyTable.pdb new file mode 100644 index 0000000..827296c Binary files /dev/null and b/Golovko/Task_1/3_1_MultiplyTable/bin/Debug/3_1_MultiplyTable.pdb differ diff --git a/Golovko/Task_1/3_1_MultiplyTable/bin/Debug/3_1_MultiplyTable.vshost.exe b/Golovko/Task_1/3_1_MultiplyTable/bin/Debug/3_1_MultiplyTable.vshost.exe new file mode 100644 index 0000000..681ab77 Binary files /dev/null and b/Golovko/Task_1/3_1_MultiplyTable/bin/Debug/3_1_MultiplyTable.vshost.exe differ diff --git a/Golovko/Task_1/3_1_MultiplyTable/bin/Debug/3_1_MultiplyTable.vshost.exe.config b/Golovko/Task_1/3_1_MultiplyTable/bin/Debug/3_1_MultiplyTable.vshost.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_1/3_1_MultiplyTable/bin/Debug/3_1_MultiplyTable.vshost.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_1/3_1_MultiplyTable/obj/Debug/3_1_MultiplyTable.csproj.FileListAbsolute.txt b/Golovko/Task_1/3_1_MultiplyTable/obj/Debug/3_1_MultiplyTable.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..0cad16d --- /dev/null +++ b/Golovko/Task_1/3_1_MultiplyTable/obj/Debug/3_1_MultiplyTable.csproj.FileListAbsolute.txt @@ -0,0 +1,10 @@ +C:\Users\Головко\Desktop\Task_1_Basics\3_1_MultiplyTable\bin\Debug\3_1_MultiplyTable.exe.config +C:\Users\Головко\Desktop\Task_1_Basics\3_1_MultiplyTable\bin\Debug\3_1_MultiplyTable.exe +C:\Users\Головко\Desktop\Task_1_Basics\3_1_MultiplyTable\bin\Debug\3_1_MultiplyTable.pdb +C:\Users\Головко\Desktop\Task_1_Basics\3_1_MultiplyTable\obj\Debug\3_1_MultiplyTable.exe +C:\Users\Головко\Desktop\Task_1_Basics\3_1_MultiplyTable\obj\Debug\3_1_MultiplyTable.pdb +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\3_1_MultiplyTable\bin\Debug\3_1_MultiplyTable.exe.config +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\3_1_MultiplyTable\bin\Debug\3_1_MultiplyTable.exe +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\3_1_MultiplyTable\bin\Debug\3_1_MultiplyTable.pdb +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\3_1_MultiplyTable\obj\Debug\3_1_MultiplyTable.exe +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\3_1_MultiplyTable\obj\Debug\3_1_MultiplyTable.pdb diff --git a/Golovko/Task_1/3_1_MultiplyTable/obj/Debug/3_1_MultiplyTable.exe b/Golovko/Task_1/3_1_MultiplyTable/obj/Debug/3_1_MultiplyTable.exe new file mode 100644 index 0000000..01a82d2 Binary files /dev/null and b/Golovko/Task_1/3_1_MultiplyTable/obj/Debug/3_1_MultiplyTable.exe differ diff --git a/Golovko/Task_1/3_1_MultiplyTable/obj/Debug/3_1_MultiplyTable.pdb b/Golovko/Task_1/3_1_MultiplyTable/obj/Debug/3_1_MultiplyTable.pdb new file mode 100644 index 0000000..827296c Binary files /dev/null and b/Golovko/Task_1/3_1_MultiplyTable/obj/Debug/3_1_MultiplyTable.pdb differ diff --git a/Golovko/Task_1/3_1_MultiplyTable/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Golovko/Task_1/3_1_MultiplyTable/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..46d0514 Binary files /dev/null and b/Golovko/Task_1/3_1_MultiplyTable/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Golovko/Task_1/3_1_MultiplyTable/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Golovko/Task_1/3_1_MultiplyTable/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_1/3_1_MultiplyTable/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Golovko/Task_1/3_1_MultiplyTable/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_1/3_1_MultiplyTable/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Golovko/Task_1/3_1_MultiplyTable/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_1/3_2_NumberRange/3_2_NumberRange.csproj b/Golovko/Task_1/3_2_NumberRange/3_2_NumberRange.csproj new file mode 100644 index 0000000..a7f590e --- /dev/null +++ b/Golovko/Task_1/3_2_NumberRange/3_2_NumberRange.csproj @@ -0,0 +1,62 @@ + + + + + Debug + AnyCPU + {79DF1B8F-1A1F-4EF8-BE3C-5CD1BBFC9DDF} + Exe + Properties + _3_2_NumberRange + 3_2_NumberRange + v4.5.2 + 512 + 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/Golovko/Task_1/3_2_NumberRange/App.config b/Golovko/Task_1/3_2_NumberRange/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_1/3_2_NumberRange/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_1/3_2_NumberRange/INumber.cs b/Golovko/Task_1/3_2_NumberRange/INumber.cs new file mode 100644 index 0000000..5449d47 --- /dev/null +++ b/Golovko/Task_1/3_2_NumberRange/INumber.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _3_2_NumberRange +{ + interface INumber + { + int GetRange(int number); + } +} diff --git a/Golovko/Task_1/3_2_NumberRange/Number.cs b/Golovko/Task_1/3_2_NumberRange/Number.cs new file mode 100644 index 0000000..2f55d71 --- /dev/null +++ b/Golovko/Task_1/3_2_NumberRange/Number.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _3_2_NumberRange +{ + class Number : INumber + { + public int GetRange(int number) + { + int range = 0; + while (Math.Truncate((decimal)(number / Math.Pow(10, ++range))) > 0) ; + return range; + } + } +} diff --git a/Golovko/Task_1/3_2_NumberRange/Program.cs b/Golovko/Task_1/3_2_NumberRange/Program.cs new file mode 100644 index 0000000..c3a7fb8 --- /dev/null +++ b/Golovko/Task_1/3_2_NumberRange/Program.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _3_2_NumberRange +{ + class Program + { + static void Main(string[] args) + { + INumber number = new Number(); + Console.WriteLine("Enter the number, please:"); + int n = int.Parse(Console.ReadLine()); + Console.WriteLine("The number has {0} ranges", number.GetRange(n)); + Console.ReadKey(); + } + } +} diff --git a/Golovko/Task_1/3_2_NumberRange/Properties/AssemblyInfo.cs b/Golovko/Task_1/3_2_NumberRange/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..1333bb4 --- /dev/null +++ b/Golovko/Task_1/3_2_NumberRange/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("3_2_NumberRange")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("3_2_NumberRange")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[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("79df1b8f-1a1f-4ef8-be3c-5cd1bbfc9ddf")] + +// 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")] diff --git a/Golovko/Task_1/3_2_NumberRange/bin/Debug/3_2_NumberRange.exe b/Golovko/Task_1/3_2_NumberRange/bin/Debug/3_2_NumberRange.exe new file mode 100644 index 0000000..4f7989e Binary files /dev/null and b/Golovko/Task_1/3_2_NumberRange/bin/Debug/3_2_NumberRange.exe differ diff --git a/Golovko/Task_1/3_2_NumberRange/bin/Debug/3_2_NumberRange.exe.config b/Golovko/Task_1/3_2_NumberRange/bin/Debug/3_2_NumberRange.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_1/3_2_NumberRange/bin/Debug/3_2_NumberRange.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_1/3_2_NumberRange/bin/Debug/3_2_NumberRange.pdb b/Golovko/Task_1/3_2_NumberRange/bin/Debug/3_2_NumberRange.pdb new file mode 100644 index 0000000..bb61edc Binary files /dev/null and b/Golovko/Task_1/3_2_NumberRange/bin/Debug/3_2_NumberRange.pdb differ diff --git a/Golovko/Task_1/3_2_NumberRange/bin/Debug/3_2_NumberRange.vshost.exe b/Golovko/Task_1/3_2_NumberRange/bin/Debug/3_2_NumberRange.vshost.exe new file mode 100644 index 0000000..681ab77 Binary files /dev/null and b/Golovko/Task_1/3_2_NumberRange/bin/Debug/3_2_NumberRange.vshost.exe differ diff --git a/Golovko/Task_1/3_2_NumberRange/bin/Debug/3_2_NumberRange.vshost.exe.config b/Golovko/Task_1/3_2_NumberRange/bin/Debug/3_2_NumberRange.vshost.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_1/3_2_NumberRange/bin/Debug/3_2_NumberRange.vshost.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_1/3_2_NumberRange/obj/Debug/3_2_NumberRange.csproj.FileListAbsolute.txt b/Golovko/Task_1/3_2_NumberRange/obj/Debug/3_2_NumberRange.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..fdcae49 --- /dev/null +++ b/Golovko/Task_1/3_2_NumberRange/obj/Debug/3_2_NumberRange.csproj.FileListAbsolute.txt @@ -0,0 +1,10 @@ +C:\Users\Головко\Desktop\Task_1_Basics\3_2_NumberRange\bin\Debug\3_2_NumberRange.exe.config +C:\Users\Головко\Desktop\Task_1_Basics\3_2_NumberRange\bin\Debug\3_2_NumberRange.exe +C:\Users\Головко\Desktop\Task_1_Basics\3_2_NumberRange\bin\Debug\3_2_NumberRange.pdb +C:\Users\Головко\Desktop\Task_1_Basics\3_2_NumberRange\obj\Debug\3_2_NumberRange.exe +C:\Users\Головко\Desktop\Task_1_Basics\3_2_NumberRange\obj\Debug\3_2_NumberRange.pdb +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\3_2_NumberRange\bin\Debug\3_2_NumberRange.exe.config +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\3_2_NumberRange\bin\Debug\3_2_NumberRange.exe +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\3_2_NumberRange\bin\Debug\3_2_NumberRange.pdb +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\3_2_NumberRange\obj\Debug\3_2_NumberRange.exe +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\3_2_NumberRange\obj\Debug\3_2_NumberRange.pdb diff --git a/Golovko/Task_1/3_2_NumberRange/obj/Debug/3_2_NumberRange.exe b/Golovko/Task_1/3_2_NumberRange/obj/Debug/3_2_NumberRange.exe new file mode 100644 index 0000000..4f7989e Binary files /dev/null and b/Golovko/Task_1/3_2_NumberRange/obj/Debug/3_2_NumberRange.exe differ diff --git a/Golovko/Task_1/3_2_NumberRange/obj/Debug/3_2_NumberRange.pdb b/Golovko/Task_1/3_2_NumberRange/obj/Debug/3_2_NumberRange.pdb new file mode 100644 index 0000000..bb61edc Binary files /dev/null and b/Golovko/Task_1/3_2_NumberRange/obj/Debug/3_2_NumberRange.pdb differ diff --git a/Golovko/Task_1/3_2_NumberRange/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Golovko/Task_1/3_2_NumberRange/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..fb165cc Binary files /dev/null and b/Golovko/Task_1/3_2_NumberRange/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Golovko/Task_1/3_2_NumberRange/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Golovko/Task_1/3_2_NumberRange/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_1/3_2_NumberRange/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Golovko/Task_1/3_2_NumberRange/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_1/3_2_NumberRange/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Golovko/Task_1/3_2_NumberRange/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_1/3_3_WhatNumber/3_3_WhatNumber.csproj b/Golovko/Task_1/3_3_WhatNumber/3_3_WhatNumber.csproj new file mode 100644 index 0000000..35045c9 --- /dev/null +++ b/Golovko/Task_1/3_3_WhatNumber/3_3_WhatNumber.csproj @@ -0,0 +1,63 @@ + + + + + Debug + AnyCPU + {28A30B0E-6195-474D-BAB8-00E08F1A5BE2} + Exe + Properties + _3_3_WhatNumber + 3_3_WhatNumber + v4.5.2 + 512 + 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/Golovko/Task_1/3_3_WhatNumber/App.config b/Golovko/Task_1/3_3_WhatNumber/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_1/3_3_WhatNumber/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_1/3_3_WhatNumber/Game.cs b/Golovko/Task_1/3_3_WhatNumber/Game.cs new file mode 100644 index 0000000..f1eaa8e --- /dev/null +++ b/Golovko/Task_1/3_3_WhatNumber/Game.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _3_3_WhatNumber +{ + class Game : IGame + { + private readonly int numberMin; + private readonly int numberMax; + public Game(int numberMin, int numberMax) + { + this.numberMin = numberMin; + this.numberMax = numberMax; + } + public void Play() + { + int number = Generator.Generate(numberMin, numberMax); + int result; + int count = 1; + do + { + Console.WriteLine("Try number {0}. Let's guess the number:", count++); + result = int.Parse(Console.ReadLine()); + Console.WriteLine(result > number ? "less <" : "more >"); + } + while (number != result); + Console.WriteLine("Try number {0}. You guess!!!", count); + } + } +} diff --git a/Golovko/Task_1/3_3_WhatNumber/Generator.cs b/Golovko/Task_1/3_3_WhatNumber/Generator.cs new file mode 100644 index 0000000..c89b71d --- /dev/null +++ b/Golovko/Task_1/3_3_WhatNumber/Generator.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _3_3_WhatNumber +{ + static class Generator + { + private static readonly Random rnd; + private static readonly object syncLocker; + static Generator() + { + rnd = new Random(DateTime.Now.Millisecond); + syncLocker = new object(); + } + public static int Generate(int min, int max) + { + lock(syncLocker) + { + return rnd.Next(min, max + 1); + } + } + } +} diff --git a/Golovko/Task_1/3_3_WhatNumber/IGame.cs b/Golovko/Task_1/3_3_WhatNumber/IGame.cs new file mode 100644 index 0000000..79a34c0 --- /dev/null +++ b/Golovko/Task_1/3_3_WhatNumber/IGame.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _3_3_WhatNumber +{ + interface IGame + { + void Play(); + } +} diff --git a/Golovko/Task_1/3_3_WhatNumber/Program.cs b/Golovko/Task_1/3_3_WhatNumber/Program.cs new file mode 100644 index 0000000..748215c --- /dev/null +++ b/Golovko/Task_1/3_3_WhatNumber/Program.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _3_3_WhatNumber +{ + class Program + { + static void Main(string[] args) + { + IGame game = new Game(1, 146); + game.Play(); + Console.ReadKey(); + } + } +} diff --git a/Golovko/Task_1/3_3_WhatNumber/Properties/AssemblyInfo.cs b/Golovko/Task_1/3_3_WhatNumber/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..5518bd5 --- /dev/null +++ b/Golovko/Task_1/3_3_WhatNumber/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("3_3_WhatNumber")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("3_3_WhatNumber")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[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("28a30b0e-6195-474d-bab8-00e08f1a5be2")] + +// 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")] diff --git a/Golovko/Task_1/3_3_WhatNumber/bin/Debug/3_3_WhatNumber.exe b/Golovko/Task_1/3_3_WhatNumber/bin/Debug/3_3_WhatNumber.exe new file mode 100644 index 0000000..5e8a51e Binary files /dev/null and b/Golovko/Task_1/3_3_WhatNumber/bin/Debug/3_3_WhatNumber.exe differ diff --git a/Golovko/Task_1/3_3_WhatNumber/bin/Debug/3_3_WhatNumber.exe.config b/Golovko/Task_1/3_3_WhatNumber/bin/Debug/3_3_WhatNumber.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_1/3_3_WhatNumber/bin/Debug/3_3_WhatNumber.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_1/3_3_WhatNumber/bin/Debug/3_3_WhatNumber.pdb b/Golovko/Task_1/3_3_WhatNumber/bin/Debug/3_3_WhatNumber.pdb new file mode 100644 index 0000000..c9a4d8a Binary files /dev/null and b/Golovko/Task_1/3_3_WhatNumber/bin/Debug/3_3_WhatNumber.pdb differ diff --git a/Golovko/Task_1/3_3_WhatNumber/bin/Debug/3_3_WhatNumber.vshost.exe b/Golovko/Task_1/3_3_WhatNumber/bin/Debug/3_3_WhatNumber.vshost.exe new file mode 100644 index 0000000..681ab77 Binary files /dev/null and b/Golovko/Task_1/3_3_WhatNumber/bin/Debug/3_3_WhatNumber.vshost.exe differ diff --git a/Golovko/Task_1/3_3_WhatNumber/bin/Debug/3_3_WhatNumber.vshost.exe.config b/Golovko/Task_1/3_3_WhatNumber/bin/Debug/3_3_WhatNumber.vshost.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_1/3_3_WhatNumber/bin/Debug/3_3_WhatNumber.vshost.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_1/3_3_WhatNumber/obj/Debug/3_3_WhatNumber.csproj.FileListAbsolute.txt b/Golovko/Task_1/3_3_WhatNumber/obj/Debug/3_3_WhatNumber.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..381db94 --- /dev/null +++ b/Golovko/Task_1/3_3_WhatNumber/obj/Debug/3_3_WhatNumber.csproj.FileListAbsolute.txt @@ -0,0 +1,10 @@ +C:\Users\Головко\Desktop\Task_1_Basics\3_3_WhatNumber\bin\Debug\3_3_WhatNumber.exe.config +C:\Users\Головко\Desktop\Task_1_Basics\3_3_WhatNumber\bin\Debug\3_3_WhatNumber.exe +C:\Users\Головко\Desktop\Task_1_Basics\3_3_WhatNumber\bin\Debug\3_3_WhatNumber.pdb +C:\Users\Головко\Desktop\Task_1_Basics\3_3_WhatNumber\obj\Debug\3_3_WhatNumber.exe +C:\Users\Головко\Desktop\Task_1_Basics\3_3_WhatNumber\obj\Debug\3_3_WhatNumber.pdb +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\3_3_WhatNumber\bin\Debug\3_3_WhatNumber.exe.config +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\3_3_WhatNumber\bin\Debug\3_3_WhatNumber.exe +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\3_3_WhatNumber\bin\Debug\3_3_WhatNumber.pdb +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\3_3_WhatNumber\obj\Debug\3_3_WhatNumber.exe +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\3_3_WhatNumber\obj\Debug\3_3_WhatNumber.pdb diff --git a/Golovko/Task_1/3_3_WhatNumber/obj/Debug/3_3_WhatNumber.exe b/Golovko/Task_1/3_3_WhatNumber/obj/Debug/3_3_WhatNumber.exe new file mode 100644 index 0000000..5e8a51e Binary files /dev/null and b/Golovko/Task_1/3_3_WhatNumber/obj/Debug/3_3_WhatNumber.exe differ diff --git a/Golovko/Task_1/3_3_WhatNumber/obj/Debug/3_3_WhatNumber.pdb b/Golovko/Task_1/3_3_WhatNumber/obj/Debug/3_3_WhatNumber.pdb new file mode 100644 index 0000000..c9a4d8a Binary files /dev/null and b/Golovko/Task_1/3_3_WhatNumber/obj/Debug/3_3_WhatNumber.pdb differ diff --git a/Golovko/Task_1/3_3_WhatNumber/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Golovko/Task_1/3_3_WhatNumber/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..93e01d0 Binary files /dev/null and b/Golovko/Task_1/3_3_WhatNumber/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Golovko/Task_1/3_3_WhatNumber/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Golovko/Task_1/3_3_WhatNumber/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_1/3_3_WhatNumber/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Golovko/Task_1/3_3_WhatNumber/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_1/3_3_WhatNumber/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Golovko/Task_1/3_3_WhatNumber/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_1/3_4_SquareNumbers/3_4_SquareNumbers.csproj b/Golovko/Task_1/3_4_SquareNumbers/3_4_SquareNumbers.csproj new file mode 100644 index 0000000..9c96d9b --- /dev/null +++ b/Golovko/Task_1/3_4_SquareNumbers/3_4_SquareNumbers.csproj @@ -0,0 +1,62 @@ + + + + + Debug + AnyCPU + {8C82D2FF-4A44-4B24-8785-423CC503EC13} + Exe + Properties + _3_4_SquareNumbers + 3_4_SquareNumbers + v4.5.2 + 512 + 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/Golovko/Task_1/3_4_SquareNumbers/App.config b/Golovko/Task_1/3_4_SquareNumbers/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_1/3_4_SquareNumbers/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_1/3_4_SquareNumbers/ISquareNumber.cs b/Golovko/Task_1/3_4_SquareNumbers/ISquareNumber.cs new file mode 100644 index 0000000..35c9ab2 --- /dev/null +++ b/Golovko/Task_1/3_4_SquareNumbers/ISquareNumber.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _3_4_SquareNumbers +{ + interface ISquareNumber + { + void GetSquares(); + } +} diff --git a/Golovko/Task_1/3_4_SquareNumbers/Program.cs b/Golovko/Task_1/3_4_SquareNumbers/Program.cs new file mode 100644 index 0000000..7b42e93 --- /dev/null +++ b/Golovko/Task_1/3_4_SquareNumbers/Program.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _3_4_SquareNumbers +{ + class Program + { + static void Main(string[] args) + { + Console.WriteLine("Enter the limit of square numbers:"); + int limit = int.Parse(Console.ReadLine()); + ISquareNumber squares = new SquareNumber(limit); + squares.GetSquares(); + Console.ReadKey(); + } + } +} diff --git a/Golovko/Task_1/3_4_SquareNumbers/Properties/AssemblyInfo.cs b/Golovko/Task_1/3_4_SquareNumbers/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..5e73325 --- /dev/null +++ b/Golovko/Task_1/3_4_SquareNumbers/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("3_4_SquareNumbers")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("3_4_SquareNumbers")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[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("8c82d2ff-4a44-4b24-8785-423cc503ec13")] + +// 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")] diff --git a/Golovko/Task_1/3_4_SquareNumbers/SquareNumber.cs b/Golovko/Task_1/3_4_SquareNumbers/SquareNumber.cs new file mode 100644 index 0000000..4d2146d --- /dev/null +++ b/Golovko/Task_1/3_4_SquareNumbers/SquareNumber.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _3_4_SquareNumbers +{ + class SquareNumber : ISquareNumber + { + private readonly int limit; + public SquareNumber(int limit) + { + this.limit = limit; + } + public void GetSquares() + { + int number = 1; + int square; + while ((square = (int)Math.Pow(++number, 2)) < limit) + { + Console.WriteLine("{0}^2 = {1}", number, square); + } + } + } +} diff --git a/Golovko/Task_1/3_4_SquareNumbers/bin/Debug/3_4_SquareNumbers.exe b/Golovko/Task_1/3_4_SquareNumbers/bin/Debug/3_4_SquareNumbers.exe new file mode 100644 index 0000000..d1390bc Binary files /dev/null and b/Golovko/Task_1/3_4_SquareNumbers/bin/Debug/3_4_SquareNumbers.exe differ diff --git a/Golovko/Task_1/3_4_SquareNumbers/bin/Debug/3_4_SquareNumbers.exe.config b/Golovko/Task_1/3_4_SquareNumbers/bin/Debug/3_4_SquareNumbers.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_1/3_4_SquareNumbers/bin/Debug/3_4_SquareNumbers.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_1/3_4_SquareNumbers/bin/Debug/3_4_SquareNumbers.pdb b/Golovko/Task_1/3_4_SquareNumbers/bin/Debug/3_4_SquareNumbers.pdb new file mode 100644 index 0000000..fb4abdb Binary files /dev/null and b/Golovko/Task_1/3_4_SquareNumbers/bin/Debug/3_4_SquareNumbers.pdb differ diff --git a/Golovko/Task_1/3_4_SquareNumbers/bin/Debug/3_4_SquareNumbers.vshost.exe b/Golovko/Task_1/3_4_SquareNumbers/bin/Debug/3_4_SquareNumbers.vshost.exe new file mode 100644 index 0000000..681ab77 Binary files /dev/null and b/Golovko/Task_1/3_4_SquareNumbers/bin/Debug/3_4_SquareNumbers.vshost.exe differ diff --git a/Golovko/Task_1/3_4_SquareNumbers/bin/Debug/3_4_SquareNumbers.vshost.exe.config b/Golovko/Task_1/3_4_SquareNumbers/bin/Debug/3_4_SquareNumbers.vshost.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_1/3_4_SquareNumbers/bin/Debug/3_4_SquareNumbers.vshost.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_1/3_4_SquareNumbers/obj/Debug/3_4_SquareNumbers.csproj.FileListAbsolute.txt b/Golovko/Task_1/3_4_SquareNumbers/obj/Debug/3_4_SquareNumbers.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..d2e0fbe --- /dev/null +++ b/Golovko/Task_1/3_4_SquareNumbers/obj/Debug/3_4_SquareNumbers.csproj.FileListAbsolute.txt @@ -0,0 +1,10 @@ +C:\Users\Головко\Desktop\Task_1_Basics\3_4_SquareNumbers\bin\Debug\3_4_SquareNumbers.exe.config +C:\Users\Головко\Desktop\Task_1_Basics\3_4_SquareNumbers\bin\Debug\3_4_SquareNumbers.exe +C:\Users\Головко\Desktop\Task_1_Basics\3_4_SquareNumbers\bin\Debug\3_4_SquareNumbers.pdb +C:\Users\Головко\Desktop\Task_1_Basics\3_4_SquareNumbers\obj\Debug\3_4_SquareNumbers.exe +C:\Users\Головко\Desktop\Task_1_Basics\3_4_SquareNumbers\obj\Debug\3_4_SquareNumbers.pdb +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\3_4_SquareNumbers\bin\Debug\3_4_SquareNumbers.exe.config +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\3_4_SquareNumbers\bin\Debug\3_4_SquareNumbers.exe +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\3_4_SquareNumbers\bin\Debug\3_4_SquareNumbers.pdb +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\3_4_SquareNumbers\obj\Debug\3_4_SquareNumbers.exe +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\3_4_SquareNumbers\obj\Debug\3_4_SquareNumbers.pdb diff --git a/Golovko/Task_1/3_4_SquareNumbers/obj/Debug/3_4_SquareNumbers.exe b/Golovko/Task_1/3_4_SquareNumbers/obj/Debug/3_4_SquareNumbers.exe new file mode 100644 index 0000000..d1390bc Binary files /dev/null and b/Golovko/Task_1/3_4_SquareNumbers/obj/Debug/3_4_SquareNumbers.exe differ diff --git a/Golovko/Task_1/3_4_SquareNumbers/obj/Debug/3_4_SquareNumbers.pdb b/Golovko/Task_1/3_4_SquareNumbers/obj/Debug/3_4_SquareNumbers.pdb new file mode 100644 index 0000000..fb4abdb Binary files /dev/null and b/Golovko/Task_1/3_4_SquareNumbers/obj/Debug/3_4_SquareNumbers.pdb differ diff --git a/Golovko/Task_1/3_4_SquareNumbers/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Golovko/Task_1/3_4_SquareNumbers/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..46db3bf Binary files /dev/null and b/Golovko/Task_1/3_4_SquareNumbers/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Golovko/Task_1/3_4_SquareNumbers/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Golovko/Task_1/3_4_SquareNumbers/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_1/3_4_SquareNumbers/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Golovko/Task_1/3_4_SquareNumbers/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_1/3_4_SquareNumbers/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Golovko/Task_1/3_4_SquareNumbers/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_1/3_5_MiddleArifmeticInput/3_5_MiddleArifmeticInput.csproj b/Golovko/Task_1/3_5_MiddleArifmeticInput/3_5_MiddleArifmeticInput.csproj new file mode 100644 index 0000000..274eedc --- /dev/null +++ b/Golovko/Task_1/3_5_MiddleArifmeticInput/3_5_MiddleArifmeticInput.csproj @@ -0,0 +1,62 @@ + + + + + Debug + AnyCPU + {3AEA8C2A-0348-4F7D-A8E9-902DDA3F2314} + Exe + Properties + _3_5_MiddleArifmeticInput + 3_5_MiddleArifmeticInput + v4.5.2 + 512 + 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/Golovko/Task_1/3_5_MiddleArifmeticInput/App.config b/Golovko/Task_1/3_5_MiddleArifmeticInput/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_1/3_5_MiddleArifmeticInput/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_1/3_5_MiddleArifmeticInput/INumber.cs b/Golovko/Task_1/3_5_MiddleArifmeticInput/INumber.cs new file mode 100644 index 0000000..f15bcb8 --- /dev/null +++ b/Golovko/Task_1/3_5_MiddleArifmeticInput/INumber.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _3_5_MiddleArifmeticInput +{ + interface INumber + { + decimal GetMiddleArifmetic(); + } +} diff --git a/Golovko/Task_1/3_5_MiddleArifmeticInput/Number.cs b/Golovko/Task_1/3_5_MiddleArifmeticInput/Number.cs new file mode 100644 index 0000000..9390a9b --- /dev/null +++ b/Golovko/Task_1/3_5_MiddleArifmeticInput/Number.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _3_5_MiddleArifmeticInput +{ + class Number : INumber + { + private readonly int[] numbers; + public Number(int[] numbers) + { + this.numbers = numbers; + } + public decimal GetMiddleArifmetic() + { + int sum = 0; + for (int i = 0; i < numbers.Length; i++) + { + sum += numbers[i]; + } + return Math.Round((decimal)sum / numbers.Length, 2); + } + } +} diff --git a/Golovko/Task_1/3_5_MiddleArifmeticInput/Program.cs b/Golovko/Task_1/3_5_MiddleArifmeticInput/Program.cs new file mode 100644 index 0000000..ceb3885 --- /dev/null +++ b/Golovko/Task_1/3_5_MiddleArifmeticInput/Program.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _3_5_MiddleArifmeticInput +{ + class Program + { + static void Main(string[] args) + { + Console.WriteLine("Enter the count of numbers:"); + int count = int.Parse(Console.ReadLine()); + int[] numbers = new int[count]; + for (int i = 0; i < count; i++) + numbers[i] = int.Parse(Console.ReadLine()); + INumber number = new Number(numbers); + Console.WriteLine("Middle arifmetic is {0}", number.GetMiddleArifmetic()); + Console.ReadKey(); + } + } +} diff --git a/Golovko/Task_1/3_5_MiddleArifmeticInput/Properties/AssemblyInfo.cs b/Golovko/Task_1/3_5_MiddleArifmeticInput/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..ece8de9 --- /dev/null +++ b/Golovko/Task_1/3_5_MiddleArifmeticInput/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("3_5_MiddleArifmeticInput")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("3_5_MiddleArifmeticInput")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[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("3aea8c2a-0348-4f7d-a8e9-902dda3f2314")] + +// 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")] diff --git a/Golovko/Task_1/3_5_MiddleArifmeticInput/bin/Debug/3_5_MiddleArifmeticInput.exe b/Golovko/Task_1/3_5_MiddleArifmeticInput/bin/Debug/3_5_MiddleArifmeticInput.exe new file mode 100644 index 0000000..5b998a3 Binary files /dev/null and b/Golovko/Task_1/3_5_MiddleArifmeticInput/bin/Debug/3_5_MiddleArifmeticInput.exe differ diff --git a/Golovko/Task_1/3_5_MiddleArifmeticInput/bin/Debug/3_5_MiddleArifmeticInput.exe.config b/Golovko/Task_1/3_5_MiddleArifmeticInput/bin/Debug/3_5_MiddleArifmeticInput.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_1/3_5_MiddleArifmeticInput/bin/Debug/3_5_MiddleArifmeticInput.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_1/3_5_MiddleArifmeticInput/bin/Debug/3_5_MiddleArifmeticInput.pdb b/Golovko/Task_1/3_5_MiddleArifmeticInput/bin/Debug/3_5_MiddleArifmeticInput.pdb new file mode 100644 index 0000000..67557b2 Binary files /dev/null and b/Golovko/Task_1/3_5_MiddleArifmeticInput/bin/Debug/3_5_MiddleArifmeticInput.pdb differ diff --git a/Golovko/Task_1/3_5_MiddleArifmeticInput/bin/Debug/3_5_MiddleArifmeticInput.vshost.exe b/Golovko/Task_1/3_5_MiddleArifmeticInput/bin/Debug/3_5_MiddleArifmeticInput.vshost.exe new file mode 100644 index 0000000..681ab77 Binary files /dev/null and b/Golovko/Task_1/3_5_MiddleArifmeticInput/bin/Debug/3_5_MiddleArifmeticInput.vshost.exe differ diff --git a/Golovko/Task_1/3_5_MiddleArifmeticInput/bin/Debug/3_5_MiddleArifmeticInput.vshost.exe.config b/Golovko/Task_1/3_5_MiddleArifmeticInput/bin/Debug/3_5_MiddleArifmeticInput.vshost.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_1/3_5_MiddleArifmeticInput/bin/Debug/3_5_MiddleArifmeticInput.vshost.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_1/3_5_MiddleArifmeticInput/obj/Debug/3_5_MiddleArifmeticInput.csproj.FileListAbsolute.txt b/Golovko/Task_1/3_5_MiddleArifmeticInput/obj/Debug/3_5_MiddleArifmeticInput.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..920fc6d --- /dev/null +++ b/Golovko/Task_1/3_5_MiddleArifmeticInput/obj/Debug/3_5_MiddleArifmeticInput.csproj.FileListAbsolute.txt @@ -0,0 +1,10 @@ +C:\Users\Головко\Desktop\Task_1_Basics\3_5_MiddleArifmeticInput\bin\Debug\3_5_MiddleArifmeticInput.exe.config +C:\Users\Головко\Desktop\Task_1_Basics\3_5_MiddleArifmeticInput\bin\Debug\3_5_MiddleArifmeticInput.exe +C:\Users\Головко\Desktop\Task_1_Basics\3_5_MiddleArifmeticInput\bin\Debug\3_5_MiddleArifmeticInput.pdb +C:\Users\Головко\Desktop\Task_1_Basics\3_5_MiddleArifmeticInput\obj\Debug\3_5_MiddleArifmeticInput.exe +C:\Users\Головко\Desktop\Task_1_Basics\3_5_MiddleArifmeticInput\obj\Debug\3_5_MiddleArifmeticInput.pdb +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\3_5_MiddleArifmeticInput\bin\Debug\3_5_MiddleArifmeticInput.exe.config +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\3_5_MiddleArifmeticInput\bin\Debug\3_5_MiddleArifmeticInput.exe +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\3_5_MiddleArifmeticInput\bin\Debug\3_5_MiddleArifmeticInput.pdb +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\3_5_MiddleArifmeticInput\obj\Debug\3_5_MiddleArifmeticInput.exe +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\3_5_MiddleArifmeticInput\obj\Debug\3_5_MiddleArifmeticInput.pdb diff --git a/Golovko/Task_1/3_5_MiddleArifmeticInput/obj/Debug/3_5_MiddleArifmeticInput.exe b/Golovko/Task_1/3_5_MiddleArifmeticInput/obj/Debug/3_5_MiddleArifmeticInput.exe new file mode 100644 index 0000000..5b998a3 Binary files /dev/null and b/Golovko/Task_1/3_5_MiddleArifmeticInput/obj/Debug/3_5_MiddleArifmeticInput.exe differ diff --git a/Golovko/Task_1/3_5_MiddleArifmeticInput/obj/Debug/3_5_MiddleArifmeticInput.pdb b/Golovko/Task_1/3_5_MiddleArifmeticInput/obj/Debug/3_5_MiddleArifmeticInput.pdb new file mode 100644 index 0000000..67557b2 Binary files /dev/null and b/Golovko/Task_1/3_5_MiddleArifmeticInput/obj/Debug/3_5_MiddleArifmeticInput.pdb differ diff --git a/Golovko/Task_1/3_5_MiddleArifmeticInput/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Golovko/Task_1/3_5_MiddleArifmeticInput/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..50d9e73 Binary files /dev/null and b/Golovko/Task_1/3_5_MiddleArifmeticInput/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Golovko/Task_1/3_5_MiddleArifmeticInput/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Golovko/Task_1/3_5_MiddleArifmeticInput/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_1/3_5_MiddleArifmeticInput/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Golovko/Task_1/3_5_MiddleArifmeticInput/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_1/3_5_MiddleArifmeticInput/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Golovko/Task_1/3_5_MiddleArifmeticInput/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_1/3_6_MiddleArifmeticRnd/3_6_MiddleArifmeticRnd.csproj b/Golovko/Task_1/3_6_MiddleArifmeticRnd/3_6_MiddleArifmeticRnd.csproj new file mode 100644 index 0000000..5d82ce7 --- /dev/null +++ b/Golovko/Task_1/3_6_MiddleArifmeticRnd/3_6_MiddleArifmeticRnd.csproj @@ -0,0 +1,63 @@ + + + + + Debug + AnyCPU + {7AEBF815-1581-4F0F-A7A0-143F464B69CD} + Exe + Properties + _3_6_MiddleArifmeticRnd + 3_6_MiddleArifmeticRnd + v4.5.2 + 512 + 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/Golovko/Task_1/3_6_MiddleArifmeticRnd/App.config b/Golovko/Task_1/3_6_MiddleArifmeticRnd/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_1/3_6_MiddleArifmeticRnd/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_1/3_6_MiddleArifmeticRnd/Generator.cs b/Golovko/Task_1/3_6_MiddleArifmeticRnd/Generator.cs new file mode 100644 index 0000000..4c53173 --- /dev/null +++ b/Golovko/Task_1/3_6_MiddleArifmeticRnd/Generator.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _3_6_MiddleArifmeticRnd +{ + static class Generator + { + private static readonly Random rnd; + private static readonly object syncLocker; + static Generator() + { + rnd = new Random(DateTime.Now.Millisecond); + syncLocker = new object(); + } + public static int Generate(int min, int max) + { + lock(syncLocker) + { + return rnd.Next(min, max + 1); + } + } + } +} diff --git a/Golovko/Task_1/3_6_MiddleArifmeticRnd/INumber.cs b/Golovko/Task_1/3_6_MiddleArifmeticRnd/INumber.cs new file mode 100644 index 0000000..400093a --- /dev/null +++ b/Golovko/Task_1/3_6_MiddleArifmeticRnd/INumber.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _3_6_MiddleArifmeticRnd +{ + interface INumber + { + decimal GetMiddleArifmetic(); + } +} diff --git a/Golovko/Task_1/3_6_MiddleArifmeticRnd/Number.cs b/Golovko/Task_1/3_6_MiddleArifmeticRnd/Number.cs new file mode 100644 index 0000000..f4ffb94 --- /dev/null +++ b/Golovko/Task_1/3_6_MiddleArifmeticRnd/Number.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _3_6_MiddleArifmeticRnd +{ + class Number : INumber + { + private readonly int[] numbers; + public Number(int min, int max, int count) + { + numbers = new int[count]; + for (int i = 0; i < count; i++) + { + numbers[i] = Generator.Generate(min, max); + Console.WriteLine("Generate number[{0}] = {1}", i + 1, numbers[i]); + } + } + public decimal GetMiddleArifmetic() + { + int sum = 0; + for (int i = 0; i < numbers.Length; i++) + { + sum += numbers[i]; + } + return Math.Round((decimal)sum / numbers.Length, 2); + } + } +} diff --git a/Golovko/Task_1/3_6_MiddleArifmeticRnd/Program.cs b/Golovko/Task_1/3_6_MiddleArifmeticRnd/Program.cs new file mode 100644 index 0000000..7db03e3 --- /dev/null +++ b/Golovko/Task_1/3_6_MiddleArifmeticRnd/Program.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _3_6_MiddleArifmeticRnd +{ + class Program + { + static void Main(string[] args) + { + INumber numbers = new Number(1, 100, 5); + Console.WriteLine("Middle arifmetic is {0}", numbers.GetMiddleArifmetic()); + Console.ReadKey(); + } + } +} diff --git a/Golovko/Task_1/3_6_MiddleArifmeticRnd/Properties/AssemblyInfo.cs b/Golovko/Task_1/3_6_MiddleArifmeticRnd/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..31324f3 --- /dev/null +++ b/Golovko/Task_1/3_6_MiddleArifmeticRnd/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("3_6_MiddleArifmeticRnd")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("3_6_MiddleArifmeticRnd")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[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("7aebf815-1581-4f0f-a7a0-143f464b69cd")] + +// 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")] diff --git a/Golovko/Task_1/3_6_MiddleArifmeticRnd/bin/Debug/3_6_MiddleArifmeticRnd.exe b/Golovko/Task_1/3_6_MiddleArifmeticRnd/bin/Debug/3_6_MiddleArifmeticRnd.exe new file mode 100644 index 0000000..8a8d9b7 Binary files /dev/null and b/Golovko/Task_1/3_6_MiddleArifmeticRnd/bin/Debug/3_6_MiddleArifmeticRnd.exe differ diff --git a/Golovko/Task_1/3_6_MiddleArifmeticRnd/bin/Debug/3_6_MiddleArifmeticRnd.exe.config b/Golovko/Task_1/3_6_MiddleArifmeticRnd/bin/Debug/3_6_MiddleArifmeticRnd.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_1/3_6_MiddleArifmeticRnd/bin/Debug/3_6_MiddleArifmeticRnd.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_1/3_6_MiddleArifmeticRnd/bin/Debug/3_6_MiddleArifmeticRnd.pdb b/Golovko/Task_1/3_6_MiddleArifmeticRnd/bin/Debug/3_6_MiddleArifmeticRnd.pdb new file mode 100644 index 0000000..79be69d Binary files /dev/null and b/Golovko/Task_1/3_6_MiddleArifmeticRnd/bin/Debug/3_6_MiddleArifmeticRnd.pdb differ diff --git a/Golovko/Task_1/3_6_MiddleArifmeticRnd/bin/Debug/3_6_MiddleArifmeticRnd.vshost.exe b/Golovko/Task_1/3_6_MiddleArifmeticRnd/bin/Debug/3_6_MiddleArifmeticRnd.vshost.exe new file mode 100644 index 0000000..681ab77 Binary files /dev/null and b/Golovko/Task_1/3_6_MiddleArifmeticRnd/bin/Debug/3_6_MiddleArifmeticRnd.vshost.exe differ diff --git a/Golovko/Task_1/3_6_MiddleArifmeticRnd/bin/Debug/3_6_MiddleArifmeticRnd.vshost.exe.config b/Golovko/Task_1/3_6_MiddleArifmeticRnd/bin/Debug/3_6_MiddleArifmeticRnd.vshost.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_1/3_6_MiddleArifmeticRnd/bin/Debug/3_6_MiddleArifmeticRnd.vshost.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_1/3_6_MiddleArifmeticRnd/obj/Debug/3_6_MiddleArifmeticRnd.csproj.FileListAbsolute.txt b/Golovko/Task_1/3_6_MiddleArifmeticRnd/obj/Debug/3_6_MiddleArifmeticRnd.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..195c286 --- /dev/null +++ b/Golovko/Task_1/3_6_MiddleArifmeticRnd/obj/Debug/3_6_MiddleArifmeticRnd.csproj.FileListAbsolute.txt @@ -0,0 +1,10 @@ +C:\Users\Головко\Desktop\Task_1_Basics\3_6_MiddleArifmeticRnd\bin\Debug\3_6_MiddleArifmeticRnd.exe.config +C:\Users\Головко\Desktop\Task_1_Basics\3_6_MiddleArifmeticRnd\bin\Debug\3_6_MiddleArifmeticRnd.exe +C:\Users\Головко\Desktop\Task_1_Basics\3_6_MiddleArifmeticRnd\bin\Debug\3_6_MiddleArifmeticRnd.pdb +C:\Users\Головко\Desktop\Task_1_Basics\3_6_MiddleArifmeticRnd\obj\Debug\3_6_MiddleArifmeticRnd.exe +C:\Users\Головко\Desktop\Task_1_Basics\3_6_MiddleArifmeticRnd\obj\Debug\3_6_MiddleArifmeticRnd.pdb +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\3_6_MiddleArifmeticRnd\bin\Debug\3_6_MiddleArifmeticRnd.exe.config +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\3_6_MiddleArifmeticRnd\bin\Debug\3_6_MiddleArifmeticRnd.exe +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\3_6_MiddleArifmeticRnd\bin\Debug\3_6_MiddleArifmeticRnd.pdb +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\3_6_MiddleArifmeticRnd\obj\Debug\3_6_MiddleArifmeticRnd.exe +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\3_6_MiddleArifmeticRnd\obj\Debug\3_6_MiddleArifmeticRnd.pdb diff --git a/Golovko/Task_1/3_6_MiddleArifmeticRnd/obj/Debug/3_6_MiddleArifmeticRnd.exe b/Golovko/Task_1/3_6_MiddleArifmeticRnd/obj/Debug/3_6_MiddleArifmeticRnd.exe new file mode 100644 index 0000000..8a8d9b7 Binary files /dev/null and b/Golovko/Task_1/3_6_MiddleArifmeticRnd/obj/Debug/3_6_MiddleArifmeticRnd.exe differ diff --git a/Golovko/Task_1/3_6_MiddleArifmeticRnd/obj/Debug/3_6_MiddleArifmeticRnd.pdb b/Golovko/Task_1/3_6_MiddleArifmeticRnd/obj/Debug/3_6_MiddleArifmeticRnd.pdb new file mode 100644 index 0000000..79be69d Binary files /dev/null and b/Golovko/Task_1/3_6_MiddleArifmeticRnd/obj/Debug/3_6_MiddleArifmeticRnd.pdb differ diff --git a/Golovko/Task_1/3_6_MiddleArifmeticRnd/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Golovko/Task_1/3_6_MiddleArifmeticRnd/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..429b336 Binary files /dev/null and b/Golovko/Task_1/3_6_MiddleArifmeticRnd/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Golovko/Task_1/3_6_MiddleArifmeticRnd/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Golovko/Task_1/3_6_MiddleArifmeticRnd/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_1/3_6_MiddleArifmeticRnd/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Golovko/Task_1/3_6_MiddleArifmeticRnd/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_1/3_6_MiddleArifmeticRnd/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Golovko/Task_1/3_6_MiddleArifmeticRnd/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_1/3_7_RabbitsVsGooses/3_7_RabbitsVsGooses.csproj b/Golovko/Task_1/3_7_RabbitsVsGooses/3_7_RabbitsVsGooses.csproj new file mode 100644 index 0000000..1dc1173 --- /dev/null +++ b/Golovko/Task_1/3_7_RabbitsVsGooses/3_7_RabbitsVsGooses.csproj @@ -0,0 +1,62 @@ + + + + + Debug + AnyCPU + {EB787D0A-8E3F-4BCD-821E-DFE18D5ED7B0} + Exe + Properties + _3_7_RabbitsVsGooses + 3_7_RabbitsVsGooses + v4.5.2 + 512 + 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/Golovko/Task_1/3_7_RabbitsVsGooses/App.config b/Golovko/Task_1/3_7_RabbitsVsGooses/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_1/3_7_RabbitsVsGooses/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_1/3_7_RabbitsVsGooses/IlegsCounter.cs b/Golovko/Task_1/3_7_RabbitsVsGooses/IlegsCounter.cs new file mode 100644 index 0000000..b1345b8 --- /dev/null +++ b/Golovko/Task_1/3_7_RabbitsVsGooses/IlegsCounter.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _3_7_RabbitsVsGooses +{ + interface IlegsCounter + { + void GetLegsCount(); + } +} diff --git a/Golovko/Task_1/3_7_RabbitsVsGooses/LegsCounter.cs b/Golovko/Task_1/3_7_RabbitsVsGooses/LegsCounter.cs new file mode 100644 index 0000000..267c02b --- /dev/null +++ b/Golovko/Task_1/3_7_RabbitsVsGooses/LegsCounter.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _3_7_RabbitsVsGooses +{ + class LegsCounter : IlegsCounter + { + private readonly int count; + public LegsCounter(int count) + { + this.count = count; + } + public void GetLegsCount() + { + for (int i = 0; i <= count; i++) + { + for (int j = 0; j <= count; j++) + { + if (2 * i + 4 * j == count) + { + Console.WriteLine("{0} gooses and {1} rabbits", i, j); + } + } + } + } + } +} diff --git a/Golovko/Task_1/3_7_RabbitsVsGooses/Program.cs b/Golovko/Task_1/3_7_RabbitsVsGooses/Program.cs new file mode 100644 index 0000000..8537a86 --- /dev/null +++ b/Golovko/Task_1/3_7_RabbitsVsGooses/Program.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _3_7_RabbitsVsGooses +{ + class Program + { + static void Main(string[] args) + { + IlegsCounter counter = new LegsCounter(64); + counter.GetLegsCount(); + Console.ReadKey(); + } + } +} diff --git a/Golovko/Task_1/3_7_RabbitsVsGooses/Properties/AssemblyInfo.cs b/Golovko/Task_1/3_7_RabbitsVsGooses/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..a536b6e --- /dev/null +++ b/Golovko/Task_1/3_7_RabbitsVsGooses/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("3_7_RabbitsVsGooses")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("3_7_RabbitsVsGooses")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[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("eb787d0a-8e3f-4bcd-821e-dfe18d5ed7b0")] + +// 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")] diff --git a/Golovko/Task_1/3_7_RabbitsVsGooses/bin/Debug/3_7_RabbitsVsGooses.exe b/Golovko/Task_1/3_7_RabbitsVsGooses/bin/Debug/3_7_RabbitsVsGooses.exe new file mode 100644 index 0000000..04d44a5 Binary files /dev/null and b/Golovko/Task_1/3_7_RabbitsVsGooses/bin/Debug/3_7_RabbitsVsGooses.exe differ diff --git a/Golovko/Task_1/3_7_RabbitsVsGooses/bin/Debug/3_7_RabbitsVsGooses.exe.config b/Golovko/Task_1/3_7_RabbitsVsGooses/bin/Debug/3_7_RabbitsVsGooses.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_1/3_7_RabbitsVsGooses/bin/Debug/3_7_RabbitsVsGooses.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_1/3_7_RabbitsVsGooses/bin/Debug/3_7_RabbitsVsGooses.pdb b/Golovko/Task_1/3_7_RabbitsVsGooses/bin/Debug/3_7_RabbitsVsGooses.pdb new file mode 100644 index 0000000..a3dae17 Binary files /dev/null and b/Golovko/Task_1/3_7_RabbitsVsGooses/bin/Debug/3_7_RabbitsVsGooses.pdb differ diff --git a/Golovko/Task_1/3_7_RabbitsVsGooses/bin/Debug/3_7_RabbitsVsGooses.vshost.exe b/Golovko/Task_1/3_7_RabbitsVsGooses/bin/Debug/3_7_RabbitsVsGooses.vshost.exe new file mode 100644 index 0000000..681ab77 Binary files /dev/null and b/Golovko/Task_1/3_7_RabbitsVsGooses/bin/Debug/3_7_RabbitsVsGooses.vshost.exe differ diff --git a/Golovko/Task_1/3_7_RabbitsVsGooses/bin/Debug/3_7_RabbitsVsGooses.vshost.exe.config b/Golovko/Task_1/3_7_RabbitsVsGooses/bin/Debug/3_7_RabbitsVsGooses.vshost.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_1/3_7_RabbitsVsGooses/bin/Debug/3_7_RabbitsVsGooses.vshost.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_1/3_7_RabbitsVsGooses/obj/Debug/3_7_RabbitsVsGooses.csproj.FileListAbsolute.txt b/Golovko/Task_1/3_7_RabbitsVsGooses/obj/Debug/3_7_RabbitsVsGooses.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..2db0f29 --- /dev/null +++ b/Golovko/Task_1/3_7_RabbitsVsGooses/obj/Debug/3_7_RabbitsVsGooses.csproj.FileListAbsolute.txt @@ -0,0 +1,10 @@ +C:\Users\Головко\Desktop\Task_1_Basics\3_7_RabbitsVsGooses\bin\Debug\3_7_RabbitsVsGooses.exe.config +C:\Users\Головко\Desktop\Task_1_Basics\3_7_RabbitsVsGooses\bin\Debug\3_7_RabbitsVsGooses.exe +C:\Users\Головко\Desktop\Task_1_Basics\3_7_RabbitsVsGooses\bin\Debug\3_7_RabbitsVsGooses.pdb +C:\Users\Головко\Desktop\Task_1_Basics\3_7_RabbitsVsGooses\obj\Debug\3_7_RabbitsVsGooses.exe +C:\Users\Головко\Desktop\Task_1_Basics\3_7_RabbitsVsGooses\obj\Debug\3_7_RabbitsVsGooses.pdb +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\3_7_RabbitsVsGooses\bin\Debug\3_7_RabbitsVsGooses.exe.config +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\3_7_RabbitsVsGooses\bin\Debug\3_7_RabbitsVsGooses.exe +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\3_7_RabbitsVsGooses\bin\Debug\3_7_RabbitsVsGooses.pdb +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\3_7_RabbitsVsGooses\obj\Debug\3_7_RabbitsVsGooses.exe +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\3_7_RabbitsVsGooses\obj\Debug\3_7_RabbitsVsGooses.pdb diff --git a/Golovko/Task_1/3_7_RabbitsVsGooses/obj/Debug/3_7_RabbitsVsGooses.exe b/Golovko/Task_1/3_7_RabbitsVsGooses/obj/Debug/3_7_RabbitsVsGooses.exe new file mode 100644 index 0000000..04d44a5 Binary files /dev/null and b/Golovko/Task_1/3_7_RabbitsVsGooses/obj/Debug/3_7_RabbitsVsGooses.exe differ diff --git a/Golovko/Task_1/3_7_RabbitsVsGooses/obj/Debug/3_7_RabbitsVsGooses.pdb b/Golovko/Task_1/3_7_RabbitsVsGooses/obj/Debug/3_7_RabbitsVsGooses.pdb new file mode 100644 index 0000000..a3dae17 Binary files /dev/null and b/Golovko/Task_1/3_7_RabbitsVsGooses/obj/Debug/3_7_RabbitsVsGooses.pdb differ diff --git a/Golovko/Task_1/3_7_RabbitsVsGooses/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Golovko/Task_1/3_7_RabbitsVsGooses/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..5b9c87f Binary files /dev/null and b/Golovko/Task_1/3_7_RabbitsVsGooses/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Golovko/Task_1/3_7_RabbitsVsGooses/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Golovko/Task_1/3_7_RabbitsVsGooses/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_1/3_7_RabbitsVsGooses/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Golovko/Task_1/3_7_RabbitsVsGooses/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_1/3_7_RabbitsVsGooses/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Golovko/Task_1/3_7_RabbitsVsGooses/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_1/3_8_Password/3_8_Password.csproj b/Golovko/Task_1/3_8_Password/3_8_Password.csproj new file mode 100644 index 0000000..16429fb --- /dev/null +++ b/Golovko/Task_1/3_8_Password/3_8_Password.csproj @@ -0,0 +1,62 @@ + + + + + Debug + AnyCPU + {3A2BCE3F-FAF9-4822-934F-C344E1B87FF0} + Exe + Properties + _3_8_Password + 3_8_Password + v4.5.2 + 512 + 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/Golovko/Task_1/3_8_Password/App.config b/Golovko/Task_1/3_8_Password/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_1/3_8_Password/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_1/3_8_Password/Auth.cs b/Golovko/Task_1/3_8_Password/Auth.cs new file mode 100644 index 0000000..9b039a6 --- /dev/null +++ b/Golovko/Task_1/3_8_Password/Auth.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _3_8_Password +{ + class Auth : IAuth + { + private const string password = "root"; + public bool GetAccess(string pass) + { + return pass == password; + } + } +} diff --git a/Golovko/Task_1/3_8_Password/IAuth.cs b/Golovko/Task_1/3_8_Password/IAuth.cs new file mode 100644 index 0000000..ab13220 --- /dev/null +++ b/Golovko/Task_1/3_8_Password/IAuth.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _3_8_Password +{ + interface IAuth + { + bool GetAccess(string pass); + } +} diff --git a/Golovko/Task_1/3_8_Password/Program.cs b/Golovko/Task_1/3_8_Password/Program.cs new file mode 100644 index 0000000..476f2f4 --- /dev/null +++ b/Golovko/Task_1/3_8_Password/Program.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _3_8_Password +{ + class Program + { + static void Main(string[] args) + { + IAuth auth = new Auth(); + Console.WriteLine("Enter the password:"); + while (!auth.GetAccess(Console.ReadLine())) + { + Console.WriteLine("Access denied. Wrong Password. Try again."); + } + Console.WriteLine("Welcome to system!"); + Console.ReadKey(); + } + } +} diff --git a/Golovko/Task_1/3_8_Password/Properties/AssemblyInfo.cs b/Golovko/Task_1/3_8_Password/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..70d8b28 --- /dev/null +++ b/Golovko/Task_1/3_8_Password/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("3_8_Password")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("3_8_Password")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[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("3a2bce3f-faf9-4822-934f-c344e1b87ff0")] + +// 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")] diff --git a/Golovko/Task_1/3_8_Password/bin/Debug/3_8_Password.exe b/Golovko/Task_1/3_8_Password/bin/Debug/3_8_Password.exe new file mode 100644 index 0000000..af2d724 Binary files /dev/null and b/Golovko/Task_1/3_8_Password/bin/Debug/3_8_Password.exe differ diff --git a/Golovko/Task_1/3_8_Password/bin/Debug/3_8_Password.exe.config b/Golovko/Task_1/3_8_Password/bin/Debug/3_8_Password.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_1/3_8_Password/bin/Debug/3_8_Password.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_1/3_8_Password/bin/Debug/3_8_Password.pdb b/Golovko/Task_1/3_8_Password/bin/Debug/3_8_Password.pdb new file mode 100644 index 0000000..fe63b9f Binary files /dev/null and b/Golovko/Task_1/3_8_Password/bin/Debug/3_8_Password.pdb differ diff --git a/Golovko/Task_1/3_8_Password/bin/Debug/3_8_Password.vshost.exe b/Golovko/Task_1/3_8_Password/bin/Debug/3_8_Password.vshost.exe new file mode 100644 index 0000000..681ab77 Binary files /dev/null and b/Golovko/Task_1/3_8_Password/bin/Debug/3_8_Password.vshost.exe differ diff --git a/Golovko/Task_1/3_8_Password/bin/Debug/3_8_Password.vshost.exe.config b/Golovko/Task_1/3_8_Password/bin/Debug/3_8_Password.vshost.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_1/3_8_Password/bin/Debug/3_8_Password.vshost.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_1/3_8_Password/bin/Debug/3_8_Password.vshost.exe.manifest b/Golovko/Task_1/3_8_Password/bin/Debug/3_8_Password.vshost.exe.manifest new file mode 100644 index 0000000..061c9ca --- /dev/null +++ b/Golovko/Task_1/3_8_Password/bin/Debug/3_8_Password.vshost.exe.manifest @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/Golovko/Task_1/3_8_Password/obj/Debug/3_8_Password.csproj.FileListAbsolute.txt b/Golovko/Task_1/3_8_Password/obj/Debug/3_8_Password.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..2bdbc9e --- /dev/null +++ b/Golovko/Task_1/3_8_Password/obj/Debug/3_8_Password.csproj.FileListAbsolute.txt @@ -0,0 +1,10 @@ +C:\Users\Головко\Desktop\Task_1_Basics\3_8_Password\bin\Debug\3_8_Password.exe.config +C:\Users\Головко\Desktop\Task_1_Basics\3_8_Password\bin\Debug\3_8_Password.exe +C:\Users\Головко\Desktop\Task_1_Basics\3_8_Password\bin\Debug\3_8_Password.pdb +C:\Users\Головко\Desktop\Task_1_Basics\3_8_Password\obj\Debug\3_8_Password.exe +C:\Users\Головко\Desktop\Task_1_Basics\3_8_Password\obj\Debug\3_8_Password.pdb +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\3_8_Password\bin\Debug\3_8_Password.exe.config +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\3_8_Password\obj\Debug\3_8_Password.exe +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\3_8_Password\obj\Debug\3_8_Password.pdb +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\3_8_Password\bin\Debug\3_8_Password.exe +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_1\3_8_Password\bin\Debug\3_8_Password.pdb diff --git a/Golovko/Task_1/3_8_Password/obj/Debug/3_8_Password.exe b/Golovko/Task_1/3_8_Password/obj/Debug/3_8_Password.exe new file mode 100644 index 0000000..af2d724 Binary files /dev/null and b/Golovko/Task_1/3_8_Password/obj/Debug/3_8_Password.exe differ diff --git a/Golovko/Task_1/3_8_Password/obj/Debug/3_8_Password.pdb b/Golovko/Task_1/3_8_Password/obj/Debug/3_8_Password.pdb new file mode 100644 index 0000000..fe63b9f Binary files /dev/null and b/Golovko/Task_1/3_8_Password/obj/Debug/3_8_Password.pdb differ diff --git a/Golovko/Task_1/3_8_Password/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Golovko/Task_1/3_8_Password/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..237b1d4 Binary files /dev/null and b/Golovko/Task_1/3_8_Password/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Golovko/Task_1/3_8_Password/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Golovko/Task_1/3_8_Password/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_1/3_8_Password/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Golovko/Task_1/3_8_Password/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_1/3_8_Password/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Golovko/Task_1/3_8_Password/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_1/Task_1_Basics.sln b/Golovko/Task_1/Task_1_Basics.sln new file mode 100644 index 0000000..0721c7a --- /dev/null +++ b/Golovko/Task_1/Task_1_Basics.sln @@ -0,0 +1,124 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.23107.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "1_Console", "1_Strings\1_Console.csproj", "{0B845B55-E717-4D70-98E8-C856AFEA69BC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "2_1_Comparation", "2_1_Comparation\2_1_Comparation.csproj", "{82D8CACC-C707-4772-A6B3-F4DDFFB0E404}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "2_2_MauGau", "2_2_MauGau\2_2_MauGau.csproj", "{E0D35179-5819-4A8E-9ABB-8CF445923351}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "2_3_Season", "2_3_Season\2_3_Season.csproj", "{A701592F-747C-4671-9DDF-73F502E35924}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "2_4_GoodVsBad", "2_4_GoodVsBad\2_4_GoodVsBad.csproj", "{3C2F7651-8F57-42B0-A50B-1CF6ABB15360}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "2_5_DayOfWeek", "2_5_DayOfWeek\2_5_DayOfWeek.csproj", "{2989914B-6552-40E8-AE52-6C2E61117EE8}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "2_6_Taxi", "2_6_Taxi\2_6_Taxi.csproj", "{722B5DF2-2531-44FD-B8D2-D535CB8F9137}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "2_7_SimpleNumber", "2_7_SimpleNumber\2_7_SimpleNumber.csproj", "{40F4F834-264B-48D1-BAB5-F3877771B9FA}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "2_8_Lottery", "2_8_Lottery\2_8_Lottery.csproj", "{A068AC42-233C-4473-A202-7C0AEB185AC8}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "2_9_CurrencyExchanger", "2_9_CurrencyExchanger\2_9_CurrencyExchanger.csproj", "{04D1A851-6A61-414B-965E-6D83B9C020BA}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "3_1_MultiplyTable", "3_1_MultiplyTable\3_1_MultiplyTable.csproj", "{00CF51DD-5B4D-4F72-9A74-A8067F8D6B98}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "3_2_NumberRange", "3_2_NumberRange\3_2_NumberRange.csproj", "{79DF1B8F-1A1F-4EF8-BE3C-5CD1BBFC9DDF}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "3_3_WhatNumber", "3_3_WhatNumber\3_3_WhatNumber.csproj", "{28A30B0E-6195-474D-BAB8-00E08F1A5BE2}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "3_4_SquareNumbers", "3_4_SquareNumbers\3_4_SquareNumbers.csproj", "{8C82D2FF-4A44-4B24-8785-423CC503EC13}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "3_5_MiddleArifmeticInput", "3_5_MiddleArifmeticInput\3_5_MiddleArifmeticInput.csproj", "{3AEA8C2A-0348-4F7D-A8E9-902DDA3F2314}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "3_6_MiddleArifmeticRnd", "3_6_MiddleArifmeticRnd\3_6_MiddleArifmeticRnd.csproj", "{7AEBF815-1581-4F0F-A7A0-143F464B69CD}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "3_7_RabbitsVsGooses", "3_7_RabbitsVsGooses\3_7_RabbitsVsGooses.csproj", "{EB787D0A-8E3F-4BCD-821E-DFE18D5ED7B0}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "3_8_Password", "3_8_Password\3_8_Password.csproj", "{3A2BCE3F-FAF9-4822-934F-C344E1B87FF0}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {0B845B55-E717-4D70-98E8-C856AFEA69BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0B845B55-E717-4D70-98E8-C856AFEA69BC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0B845B55-E717-4D70-98E8-C856AFEA69BC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0B845B55-E717-4D70-98E8-C856AFEA69BC}.Release|Any CPU.Build.0 = Release|Any CPU + {82D8CACC-C707-4772-A6B3-F4DDFFB0E404}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {82D8CACC-C707-4772-A6B3-F4DDFFB0E404}.Debug|Any CPU.Build.0 = Debug|Any CPU + {82D8CACC-C707-4772-A6B3-F4DDFFB0E404}.Release|Any CPU.ActiveCfg = Release|Any CPU + {82D8CACC-C707-4772-A6B3-F4DDFFB0E404}.Release|Any CPU.Build.0 = Release|Any CPU + {E0D35179-5819-4A8E-9ABB-8CF445923351}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E0D35179-5819-4A8E-9ABB-8CF445923351}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E0D35179-5819-4A8E-9ABB-8CF445923351}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E0D35179-5819-4A8E-9ABB-8CF445923351}.Release|Any CPU.Build.0 = Release|Any CPU + {A701592F-747C-4671-9DDF-73F502E35924}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A701592F-747C-4671-9DDF-73F502E35924}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A701592F-747C-4671-9DDF-73F502E35924}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A701592F-747C-4671-9DDF-73F502E35924}.Release|Any CPU.Build.0 = Release|Any CPU + {3C2F7651-8F57-42B0-A50B-1CF6ABB15360}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3C2F7651-8F57-42B0-A50B-1CF6ABB15360}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3C2F7651-8F57-42B0-A50B-1CF6ABB15360}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3C2F7651-8F57-42B0-A50B-1CF6ABB15360}.Release|Any CPU.Build.0 = Release|Any CPU + {2989914B-6552-40E8-AE52-6C2E61117EE8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2989914B-6552-40E8-AE52-6C2E61117EE8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2989914B-6552-40E8-AE52-6C2E61117EE8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2989914B-6552-40E8-AE52-6C2E61117EE8}.Release|Any CPU.Build.0 = Release|Any CPU + {722B5DF2-2531-44FD-B8D2-D535CB8F9137}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {722B5DF2-2531-44FD-B8D2-D535CB8F9137}.Debug|Any CPU.Build.0 = Debug|Any CPU + {722B5DF2-2531-44FD-B8D2-D535CB8F9137}.Release|Any CPU.ActiveCfg = Release|Any CPU + {722B5DF2-2531-44FD-B8D2-D535CB8F9137}.Release|Any CPU.Build.0 = Release|Any CPU + {40F4F834-264B-48D1-BAB5-F3877771B9FA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {40F4F834-264B-48D1-BAB5-F3877771B9FA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {40F4F834-264B-48D1-BAB5-F3877771B9FA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {40F4F834-264B-48D1-BAB5-F3877771B9FA}.Release|Any CPU.Build.0 = Release|Any CPU + {A068AC42-233C-4473-A202-7C0AEB185AC8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A068AC42-233C-4473-A202-7C0AEB185AC8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A068AC42-233C-4473-A202-7C0AEB185AC8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A068AC42-233C-4473-A202-7C0AEB185AC8}.Release|Any CPU.Build.0 = Release|Any CPU + {04D1A851-6A61-414B-965E-6D83B9C020BA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {04D1A851-6A61-414B-965E-6D83B9C020BA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {04D1A851-6A61-414B-965E-6D83B9C020BA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {04D1A851-6A61-414B-965E-6D83B9C020BA}.Release|Any CPU.Build.0 = Release|Any CPU + {00CF51DD-5B4D-4F72-9A74-A8067F8D6B98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {00CF51DD-5B4D-4F72-9A74-A8067F8D6B98}.Debug|Any CPU.Build.0 = Debug|Any CPU + {00CF51DD-5B4D-4F72-9A74-A8067F8D6B98}.Release|Any CPU.ActiveCfg = Release|Any CPU + {00CF51DD-5B4D-4F72-9A74-A8067F8D6B98}.Release|Any CPU.Build.0 = Release|Any CPU + {79DF1B8F-1A1F-4EF8-BE3C-5CD1BBFC9DDF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {79DF1B8F-1A1F-4EF8-BE3C-5CD1BBFC9DDF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {79DF1B8F-1A1F-4EF8-BE3C-5CD1BBFC9DDF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {79DF1B8F-1A1F-4EF8-BE3C-5CD1BBFC9DDF}.Release|Any CPU.Build.0 = Release|Any CPU + {28A30B0E-6195-474D-BAB8-00E08F1A5BE2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {28A30B0E-6195-474D-BAB8-00E08F1A5BE2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {28A30B0E-6195-474D-BAB8-00E08F1A5BE2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {28A30B0E-6195-474D-BAB8-00E08F1A5BE2}.Release|Any CPU.Build.0 = Release|Any CPU + {8C82D2FF-4A44-4B24-8785-423CC503EC13}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8C82D2FF-4A44-4B24-8785-423CC503EC13}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8C82D2FF-4A44-4B24-8785-423CC503EC13}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8C82D2FF-4A44-4B24-8785-423CC503EC13}.Release|Any CPU.Build.0 = Release|Any CPU + {3AEA8C2A-0348-4F7D-A8E9-902DDA3F2314}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3AEA8C2A-0348-4F7D-A8E9-902DDA3F2314}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3AEA8C2A-0348-4F7D-A8E9-902DDA3F2314}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3AEA8C2A-0348-4F7D-A8E9-902DDA3F2314}.Release|Any CPU.Build.0 = Release|Any CPU + {7AEBF815-1581-4F0F-A7A0-143F464B69CD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7AEBF815-1581-4F0F-A7A0-143F464B69CD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7AEBF815-1581-4F0F-A7A0-143F464B69CD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7AEBF815-1581-4F0F-A7A0-143F464B69CD}.Release|Any CPU.Build.0 = Release|Any CPU + {EB787D0A-8E3F-4BCD-821E-DFE18D5ED7B0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EB787D0A-8E3F-4BCD-821E-DFE18D5ED7B0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EB787D0A-8E3F-4BCD-821E-DFE18D5ED7B0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EB787D0A-8E3F-4BCD-821E-DFE18D5ED7B0}.Release|Any CPU.Build.0 = Release|Any CPU + {3A2BCE3F-FAF9-4822-934F-C344E1B87FF0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3A2BCE3F-FAF9-4822-934F-C344E1B87FF0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3A2BCE3F-FAF9-4822-934F-C344E1B87FF0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3A2BCE3F-FAF9-4822-934F-C344E1B87FF0}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Golovko/Task_10/.vs/Task_10/v14/.suo b/Golovko/Task_10/.vs/Task_10/v14/.suo new file mode 100644 index 0000000..bace949 Binary files /dev/null and b/Golovko/Task_10/.vs/Task_10/v14/.suo differ diff --git a/Golovko/Task_10/1_DirectoryCreator/1_DirectoryCreator.csproj b/Golovko/Task_10/1_DirectoryCreator/1_DirectoryCreator.csproj new file mode 100644 index 0000000..7b53613 --- /dev/null +++ b/Golovko/Task_10/1_DirectoryCreator/1_DirectoryCreator.csproj @@ -0,0 +1,62 @@ + + + + + Debug + AnyCPU + {FF41DE36-D96E-4000-9BED-F1308EF8631E} + Exe + Properties + _1_DirectoryCreator + 1_DirectoryCreator + v4.5.2 + 512 + 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/Golovko/Task_10/1_DirectoryCreator/App.config b/Golovko/Task_10/1_DirectoryCreator/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_10/1_DirectoryCreator/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_10/1_DirectoryCreator/Directory.cs b/Golovko/Task_10/1_DirectoryCreator/Directory.cs new file mode 100644 index 0000000..546d813 --- /dev/null +++ b/Golovko/Task_10/1_DirectoryCreator/Directory.cs @@ -0,0 +1,57 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.IO; + +namespace _1_Directory +{ + class Directory + { + public static void Create(string path, string name, int count) + { + DirectoryInfo directoryInfo; + for (int i = 0; i < count; i++) + { + directoryInfo = new DirectoryInfo(String.Format(@"{0}\{1}_{2}", path, name, i)); + if (!directoryInfo.Exists) + { + try + { + directoryInfo.Create(); + Logger.Write("New directory created: " + directoryInfo.FullName); + } + catch (DirectoryNotFoundException e) + { + Logger.Write(e.Message); + } + } + else + { + Logger.Write("Folder has already created: " + directoryInfo.FullName); + } + } + } + public static void Remove(string path, string nameMask, bool recursive) + { + DirectoryInfo directoryInfo = new DirectoryInfo(path); + if (directoryInfo.Exists) + { + foreach (DirectoryInfo directory in directoryInfo.GetDirectories()) + { + if (directory.FullName.Contains(nameMask)) + { + directory.Delete(recursive); + Logger.Write("Folder has deleted: " + directory.FullName); + } + + } + } + else + { + Logger.Write("The directory by path " + path + " doesn't exist"); + } + } + } +} diff --git a/Golovko/Task_10/1_DirectoryCreator/Logger.cs b/Golovko/Task_10/1_DirectoryCreator/Logger.cs new file mode 100644 index 0000000..752daa8 --- /dev/null +++ b/Golovko/Task_10/1_DirectoryCreator/Logger.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _1_Directory +{ + static class Logger + { + public static void Write(string message) + { + DateTime currentDate = DateTime.Now; + Console.WriteLine("{0} => {1}", currentDate, message); + } + } +} diff --git a/Golovko/Task_10/1_DirectoryCreator/Program.cs b/Golovko/Task_10/1_DirectoryCreator/Program.cs new file mode 100644 index 0000000..5f0c410 --- /dev/null +++ b/Golovko/Task_10/1_DirectoryCreator/Program.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _1_Directory +{ + class Program + { + static void Main(string[] args) + { + Directory.Create(@"D:\", "Folder", 100); + Directory.Remove(@"D:\", "Folder", true); + Console.ReadKey(); + } + } +} diff --git a/Golovko/Task_10/1_DirectoryCreator/Properties/AssemblyInfo.cs b/Golovko/Task_10/1_DirectoryCreator/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..1b8e7ee --- /dev/null +++ b/Golovko/Task_10/1_DirectoryCreator/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("1_DirectoryCreator")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("1_DirectoryCreator")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[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("ff41de36-d96e-4000-9bed-f1308ef8631e")] + +// 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")] diff --git a/Golovko/Task_10/1_DirectoryCreator/bin/Debug/1_DirectoryCreator.exe b/Golovko/Task_10/1_DirectoryCreator/bin/Debug/1_DirectoryCreator.exe new file mode 100644 index 0000000..d102739 Binary files /dev/null and b/Golovko/Task_10/1_DirectoryCreator/bin/Debug/1_DirectoryCreator.exe differ diff --git a/Golovko/Task_10/1_DirectoryCreator/bin/Debug/1_DirectoryCreator.exe.config b/Golovko/Task_10/1_DirectoryCreator/bin/Debug/1_DirectoryCreator.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_10/1_DirectoryCreator/bin/Debug/1_DirectoryCreator.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_10/1_DirectoryCreator/bin/Debug/1_DirectoryCreator.pdb b/Golovko/Task_10/1_DirectoryCreator/bin/Debug/1_DirectoryCreator.pdb new file mode 100644 index 0000000..c14fc9a Binary files /dev/null and b/Golovko/Task_10/1_DirectoryCreator/bin/Debug/1_DirectoryCreator.pdb differ diff --git a/Golovko/Task_10/1_DirectoryCreator/bin/Debug/1_DirectoryCreator.vshost.exe b/Golovko/Task_10/1_DirectoryCreator/bin/Debug/1_DirectoryCreator.vshost.exe new file mode 100644 index 0000000..681ab77 Binary files /dev/null and b/Golovko/Task_10/1_DirectoryCreator/bin/Debug/1_DirectoryCreator.vshost.exe differ diff --git a/Golovko/Task_10/1_DirectoryCreator/bin/Debug/1_DirectoryCreator.vshost.exe.config b/Golovko/Task_10/1_DirectoryCreator/bin/Debug/1_DirectoryCreator.vshost.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_10/1_DirectoryCreator/bin/Debug/1_DirectoryCreator.vshost.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_10/1_DirectoryCreator/obj/Debug/1_DirectoryCreator.csproj.FileListAbsolute.txt b/Golovko/Task_10/1_DirectoryCreator/obj/Debug/1_DirectoryCreator.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..739c178 --- /dev/null +++ b/Golovko/Task_10/1_DirectoryCreator/obj/Debug/1_DirectoryCreator.csproj.FileListAbsolute.txt @@ -0,0 +1,5 @@ +c:\users\головко\documents\visual studio 2015\Projects\Task_10\1_DirectoryCreator\bin\Debug\1_DirectoryCreator.exe.config +c:\users\головко\documents\visual studio 2015\Projects\Task_10\1_DirectoryCreator\bin\Debug\1_DirectoryCreator.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_10\1_DirectoryCreator\bin\Debug\1_DirectoryCreator.pdb +c:\users\головко\documents\visual studio 2015\Projects\Task_10\1_DirectoryCreator\obj\Debug\1_DirectoryCreator.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_10\1_DirectoryCreator\obj\Debug\1_DirectoryCreator.pdb diff --git a/Golovko/Task_10/1_DirectoryCreator/obj/Debug/1_DirectoryCreator.exe b/Golovko/Task_10/1_DirectoryCreator/obj/Debug/1_DirectoryCreator.exe new file mode 100644 index 0000000..d102739 Binary files /dev/null and b/Golovko/Task_10/1_DirectoryCreator/obj/Debug/1_DirectoryCreator.exe differ diff --git a/Golovko/Task_10/1_DirectoryCreator/obj/Debug/1_DirectoryCreator.pdb b/Golovko/Task_10/1_DirectoryCreator/obj/Debug/1_DirectoryCreator.pdb new file mode 100644 index 0000000..c14fc9a Binary files /dev/null and b/Golovko/Task_10/1_DirectoryCreator/obj/Debug/1_DirectoryCreator.pdb differ diff --git a/Golovko/Task_10/1_DirectoryCreator/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Golovko/Task_10/1_DirectoryCreator/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..4d9cac7 Binary files /dev/null and b/Golovko/Task_10/1_DirectoryCreator/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Golovko/Task_10/1_DirectoryCreator/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Golovko/Task_10/1_DirectoryCreator/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_10/1_DirectoryCreator/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Golovko/Task_10/1_DirectoryCreator/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_10/1_DirectoryCreator/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Golovko/Task_10/1_DirectoryCreator/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_10/2_FileWriterReader/2_FileWriterReader.csproj b/Golovko/Task_10/2_FileWriterReader/2_FileWriterReader.csproj new file mode 100644 index 0000000..c60c406 --- /dev/null +++ b/Golovko/Task_10/2_FileWriterReader/2_FileWriterReader.csproj @@ -0,0 +1,62 @@ + + + + + Debug + AnyCPU + {02FBCE21-ABDE-45F3-BA37-E846EC13E02F} + Exe + Properties + _2_FileWriterReader + 2_FileWriterReader + v4.5.2 + 512 + 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/Golovko/Task_10/2_FileWriterReader/App.config b/Golovko/Task_10/2_FileWriterReader/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_10/2_FileWriterReader/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_10/2_FileWriterReader/File.cs b/Golovko/Task_10/2_FileWriterReader/File.cs new file mode 100644 index 0000000..ba989a2 --- /dev/null +++ b/Golovko/Task_10/2_FileWriterReader/File.cs @@ -0,0 +1,56 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.IO; + +namespace _2_FileWriterReader +{ + static class File + { + public static void Save(string path, string fileName, string data) + { + FileInfo fileInfo = new FileInfo(path + @"\" + fileName); + if (!fileInfo.Exists) + { + try + { + using (StreamWriter writer = new StreamWriter(fileInfo.FullName)) + { + writer.Write(data); + } + } + catch (DirectoryNotFoundException e) + { + Logger.Write(e.Message); + } + } + else + { + Logger.Write("File " + fileInfo.FullName + " has already existed"); + } + } + public static string Read(string path) + { + string data = string.Empty; + try + { + using (StreamReader reader = new StreamReader(path)) + { + data = reader.ReadToEnd(); + } + } + catch (FileNotFoundException e) + { + Logger.Write(e.Message); + } + catch (FileLoadException e) + { + Logger.Write(e.Message); + } + return data; + } + + } +} diff --git a/Golovko/Task_10/2_FileWriterReader/Logger.cs b/Golovko/Task_10/2_FileWriterReader/Logger.cs new file mode 100644 index 0000000..ade198d --- /dev/null +++ b/Golovko/Task_10/2_FileWriterReader/Logger.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_FileWriterReader +{ + static class Logger + { + public static void Write(string message) + { + DateTime currentDate = DateTime.Now; + Console.WriteLine("{0} => {1}", currentDate, message); + } + } +} diff --git a/Golovko/Task_10/2_FileWriterReader/Program.cs b/Golovko/Task_10/2_FileWriterReader/Program.cs new file mode 100644 index 0000000..4e7dfb9 --- /dev/null +++ b/Golovko/Task_10/2_FileWriterReader/Program.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_FileWriterReader +{ + class Program + { + static void Main(string[] args) + { + string text = "This is test data text\nThis is test data text\nThis is test data text\nThis is test data text\nThis is test data text\nThis is test data text\n"; + string path = @"D:\"; + string fileName = "test.data"; + File.Save(path, fileName, text); + Console.WriteLine(File.Read(path + fileName)); + Console.ReadKey(); + } + } +} diff --git a/Golovko/Task_10/2_FileWriterReader/Properties/AssemblyInfo.cs b/Golovko/Task_10/2_FileWriterReader/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..b78d7f0 --- /dev/null +++ b/Golovko/Task_10/2_FileWriterReader/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("2_FileWriterReader")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("2_FileWriterReader")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[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("02fbce21-abde-45f3-ba37-e846ec13e02f")] + +// 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")] diff --git a/Golovko/Task_10/2_FileWriterReader/bin/Debug/2_FileWriterReader.exe b/Golovko/Task_10/2_FileWriterReader/bin/Debug/2_FileWriterReader.exe new file mode 100644 index 0000000..e0f28b7 Binary files /dev/null and b/Golovko/Task_10/2_FileWriterReader/bin/Debug/2_FileWriterReader.exe differ diff --git a/Golovko/Task_10/2_FileWriterReader/bin/Debug/2_FileWriterReader.exe.config b/Golovko/Task_10/2_FileWriterReader/bin/Debug/2_FileWriterReader.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_10/2_FileWriterReader/bin/Debug/2_FileWriterReader.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_10/2_FileWriterReader/bin/Debug/2_FileWriterReader.pdb b/Golovko/Task_10/2_FileWriterReader/bin/Debug/2_FileWriterReader.pdb new file mode 100644 index 0000000..18c5059 Binary files /dev/null and b/Golovko/Task_10/2_FileWriterReader/bin/Debug/2_FileWriterReader.pdb differ diff --git a/Golovko/Task_10/2_FileWriterReader/bin/Debug/2_FileWriterReader.vshost.exe b/Golovko/Task_10/2_FileWriterReader/bin/Debug/2_FileWriterReader.vshost.exe new file mode 100644 index 0000000..681ab77 Binary files /dev/null and b/Golovko/Task_10/2_FileWriterReader/bin/Debug/2_FileWriterReader.vshost.exe differ diff --git a/Golovko/Task_10/2_FileWriterReader/bin/Debug/2_FileWriterReader.vshost.exe.config b/Golovko/Task_10/2_FileWriterReader/bin/Debug/2_FileWriterReader.vshost.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_10/2_FileWriterReader/bin/Debug/2_FileWriterReader.vshost.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_10/2_FileWriterReader/obj/Debug/2_FileWriterReader.csproj.FileListAbsolute.txt b/Golovko/Task_10/2_FileWriterReader/obj/Debug/2_FileWriterReader.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..cb073ff --- /dev/null +++ b/Golovko/Task_10/2_FileWriterReader/obj/Debug/2_FileWriterReader.csproj.FileListAbsolute.txt @@ -0,0 +1,6 @@ +c:\users\головко\documents\visual studio 2015\Projects\Task_10\2_FileWriterReader\bin\Debug\2_FileWriterReader.exe.config +c:\users\головко\documents\visual studio 2015\Projects\Task_10\2_FileWriterReader\bin\Debug\2_FileWriterReader.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_10\2_FileWriterReader\bin\Debug\2_FileWriterReader.pdb +c:\users\головко\documents\visual studio 2015\Projects\Task_10\2_FileWriterReader\obj\Debug\2_FileWriterReader.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_10\2_FileWriterReader\obj\Debug\2_FileWriterReader.pdb +c:\users\головко\documents\visual studio 2015\Projects\Task_10\2_FileWriterReader\obj\Debug\2_FileWriterReader.csprojResolveAssemblyReference.cache diff --git a/Golovko/Task_10/2_FileWriterReader/obj/Debug/2_FileWriterReader.csprojResolveAssemblyReference.cache b/Golovko/Task_10/2_FileWriterReader/obj/Debug/2_FileWriterReader.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..1150a02 Binary files /dev/null and b/Golovko/Task_10/2_FileWriterReader/obj/Debug/2_FileWriterReader.csprojResolveAssemblyReference.cache differ diff --git a/Golovko/Task_10/2_FileWriterReader/obj/Debug/2_FileWriterReader.exe b/Golovko/Task_10/2_FileWriterReader/obj/Debug/2_FileWriterReader.exe new file mode 100644 index 0000000..e0f28b7 Binary files /dev/null and b/Golovko/Task_10/2_FileWriterReader/obj/Debug/2_FileWriterReader.exe differ diff --git a/Golovko/Task_10/2_FileWriterReader/obj/Debug/2_FileWriterReader.pdb b/Golovko/Task_10/2_FileWriterReader/obj/Debug/2_FileWriterReader.pdb new file mode 100644 index 0000000..18c5059 Binary files /dev/null and b/Golovko/Task_10/2_FileWriterReader/obj/Debug/2_FileWriterReader.pdb differ diff --git a/Golovko/Task_10/2_FileWriterReader/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Golovko/Task_10/2_FileWriterReader/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..5e6606a Binary files /dev/null and b/Golovko/Task_10/2_FileWriterReader/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Golovko/Task_10/2_FileWriterReader/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Golovko/Task_10/2_FileWriterReader/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_10/2_FileWriterReader/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Golovko/Task_10/2_FileWriterReader/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_10/2_FileWriterReader/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Golovko/Task_10/2_FileWriterReader/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_10/3_FileSearcher/3_FileSearcher.csproj b/Golovko/Task_10/3_FileSearcher/3_FileSearcher.csproj new file mode 100644 index 0000000..501bee9 --- /dev/null +++ b/Golovko/Task_10/3_FileSearcher/3_FileSearcher.csproj @@ -0,0 +1,62 @@ + + + + + Debug + AnyCPU + {466E9794-50CB-4576-A5B5-C24B9D4BF19E} + Exe + Properties + _3_FileSearcher + 3_FileSearcher + v4.5.2 + 512 + 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/Golovko/Task_10/3_FileSearcher/App.config b/Golovko/Task_10/3_FileSearcher/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_10/3_FileSearcher/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_10/3_FileSearcher/File.cs b/Golovko/Task_10/3_FileSearcher/File.cs new file mode 100644 index 0000000..811b1f0 --- /dev/null +++ b/Golovko/Task_10/3_FileSearcher/File.cs @@ -0,0 +1,104 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.IO; +using System.IO.Compression; + +namespace _3_FileSearcher +{ + class File + { + private const string compressedExtension = ".zip"; + private readonly FileInfo fileInfo; + public bool IsCompressed + { + get { return IsCompressedExist(); } + protected set { } + } + public long Size { get; protected set; } + public long CompressedSize + { + get { return GetFileSize(fileInfo.FullName + compressedExtension); } + protected set { } + } + public File(FileInfo fileInfo) + { + this.fileInfo = fileInfo; + this.Size = fileInfo.Length; + this.CompressedSize = 0; + this.IsCompressed = false; + } + public static FileInfo[] Search(string pattern, string path) + { + DirectoryInfo directoryInfo = new DirectoryInfo(path); + FileInfo[] filesInfo = new FileInfo[0]; + try + { + filesInfo = directoryInfo.GetFiles(pattern, SearchOption.AllDirectories); + } + catch (DirectoryNotFoundException e) + { + Logger.Write(e.Message); + } + catch (UnauthorizedAccessException e) + { + Logger.Write(e.Message); + } + if (filesInfo.Length > 0) + { + foreach (FileInfo file in filesInfo) + { + Logger.Write(file.FullName); + } + } + return filesInfo; + } + public void Show() + { + try + { + using (FileStream fileStream = new FileStream(fileInfo.FullName, FileMode.Open)) + { + byte[] byteArray = new byte[fileStream.Length]; + fileStream.Read(byteArray, 0, byteArray.Length); + Logger.Write(Encoding.Default.GetString(byteArray)); + } + } + catch (FileNotFoundException e) + { + Logger.Write(e.Message); + } + } + public void Compress() + { + if (!IsCompressed) + { + byte[] zipBytes = System.IO.File.ReadAllBytes(fileInfo.FullName); + using (FileStream stream = new FileStream(fileInfo.FullName + compressedExtension, FileMode.CreateNew)) + { + using (GZipStream zip = new GZipStream(stream, CompressionMode.Compress, false)) + { + zip.Write(zipBytes, 0, zipBytes.Length); + + } + } + IsCompressed = true; + CompressedSize = GetFileSize(fileInfo.FullName + compressedExtension); + } + else + { + Logger.Write("File " + fileInfo.FullName + " has already compressed"); + } + } + private bool IsCompressedExist() + { + return new FileInfo(fileInfo.FullName + compressedExtension).Exists; + } + private long GetFileSize(string path) + { + return System.IO.File.ReadAllBytes(path).Length; + } + } +} diff --git a/Golovko/Task_10/3_FileSearcher/Logger.cs b/Golovko/Task_10/3_FileSearcher/Logger.cs new file mode 100644 index 0000000..91a6a75 --- /dev/null +++ b/Golovko/Task_10/3_FileSearcher/Logger.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _3_FileSearcher +{ + static class Logger + { + public static void Write(string message) + { + DateTime currentDate = DateTime.Now; + Console.WriteLine("{0} => {1}", currentDate, message); + } + } +} diff --git a/Golovko/Task_10/3_FileSearcher/Program.cs b/Golovko/Task_10/3_FileSearcher/Program.cs new file mode 100644 index 0000000..1ab43cd --- /dev/null +++ b/Golovko/Task_10/3_FileSearcher/Program.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _3_FileSearcher +{ + class Program + { + static void Main(string[] args) + { + File file = new File(File.Search("Licence.txt", @"D:\AFF").FirstOrDefault()); + file.Show(); + file.Compress(); + Console.WriteLine("File size: {0} bytes\nCompressed file size: {1} bytes", file.Size, file.CompressedSize); + Console.ReadKey(); + } + } +} diff --git a/Golovko/Task_10/3_FileSearcher/Properties/AssemblyInfo.cs b/Golovko/Task_10/3_FileSearcher/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..2fe2c4e --- /dev/null +++ b/Golovko/Task_10/3_FileSearcher/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("3_FileSearcher")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("3_FileSearcher")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[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("466e9794-50cb-4576-a5b5-c24b9d4bf19e")] + +// 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")] diff --git a/Golovko/Task_10/3_FileSearcher/bin/Debug/3_FileSearcher.exe b/Golovko/Task_10/3_FileSearcher/bin/Debug/3_FileSearcher.exe new file mode 100644 index 0000000..bcfec99 Binary files /dev/null and b/Golovko/Task_10/3_FileSearcher/bin/Debug/3_FileSearcher.exe differ diff --git a/Golovko/Task_10/3_FileSearcher/bin/Debug/3_FileSearcher.exe.config b/Golovko/Task_10/3_FileSearcher/bin/Debug/3_FileSearcher.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_10/3_FileSearcher/bin/Debug/3_FileSearcher.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_10/3_FileSearcher/bin/Debug/3_FileSearcher.pdb b/Golovko/Task_10/3_FileSearcher/bin/Debug/3_FileSearcher.pdb new file mode 100644 index 0000000..dfe5fda Binary files /dev/null and b/Golovko/Task_10/3_FileSearcher/bin/Debug/3_FileSearcher.pdb differ diff --git a/Golovko/Task_10/3_FileSearcher/bin/Debug/3_FileSearcher.vshost.exe b/Golovko/Task_10/3_FileSearcher/bin/Debug/3_FileSearcher.vshost.exe new file mode 100644 index 0000000..681ab77 Binary files /dev/null and b/Golovko/Task_10/3_FileSearcher/bin/Debug/3_FileSearcher.vshost.exe differ diff --git a/Golovko/Task_10/3_FileSearcher/bin/Debug/3_FileSearcher.vshost.exe.config b/Golovko/Task_10/3_FileSearcher/bin/Debug/3_FileSearcher.vshost.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_10/3_FileSearcher/bin/Debug/3_FileSearcher.vshost.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_10/3_FileSearcher/obj/Debug/3_FileSearcher.csproj.FileListAbsolute.txt b/Golovko/Task_10/3_FileSearcher/obj/Debug/3_FileSearcher.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..44c7fb1 --- /dev/null +++ b/Golovko/Task_10/3_FileSearcher/obj/Debug/3_FileSearcher.csproj.FileListAbsolute.txt @@ -0,0 +1,6 @@ +c:\users\головко\documents\visual studio 2015\Projects\Task_10\3_FileSearcher\bin\Debug\3_FileSearcher.exe.config +c:\users\головко\documents\visual studio 2015\Projects\Task_10\3_FileSearcher\bin\Debug\3_FileSearcher.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_10\3_FileSearcher\bin\Debug\3_FileSearcher.pdb +c:\users\головко\documents\visual studio 2015\Projects\Task_10\3_FileSearcher\obj\Debug\3_FileSearcher.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_10\3_FileSearcher\obj\Debug\3_FileSearcher.pdb +c:\users\головко\documents\visual studio 2015\Projects\Task_10\3_FileSearcher\obj\Debug\3_FileSearcher.csprojResolveAssemblyReference.cache diff --git a/Golovko/Task_10/3_FileSearcher/obj/Debug/3_FileSearcher.csprojResolveAssemblyReference.cache b/Golovko/Task_10/3_FileSearcher/obj/Debug/3_FileSearcher.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..1150a02 Binary files /dev/null and b/Golovko/Task_10/3_FileSearcher/obj/Debug/3_FileSearcher.csprojResolveAssemblyReference.cache differ diff --git a/Golovko/Task_10/3_FileSearcher/obj/Debug/3_FileSearcher.exe b/Golovko/Task_10/3_FileSearcher/obj/Debug/3_FileSearcher.exe new file mode 100644 index 0000000..bcfec99 Binary files /dev/null and b/Golovko/Task_10/3_FileSearcher/obj/Debug/3_FileSearcher.exe differ diff --git a/Golovko/Task_10/3_FileSearcher/obj/Debug/3_FileSearcher.pdb b/Golovko/Task_10/3_FileSearcher/obj/Debug/3_FileSearcher.pdb new file mode 100644 index 0000000..dfe5fda Binary files /dev/null and b/Golovko/Task_10/3_FileSearcher/obj/Debug/3_FileSearcher.pdb differ diff --git a/Golovko/Task_10/3_FileSearcher/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Golovko/Task_10/3_FileSearcher/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..d9fae67 Binary files /dev/null and b/Golovko/Task_10/3_FileSearcher/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Golovko/Task_10/3_FileSearcher/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Golovko/Task_10/3_FileSearcher/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_10/3_FileSearcher/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Golovko/Task_10/3_FileSearcher/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_10/3_FileSearcher/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Golovko/Task_10/3_FileSearcher/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_10/Task_10.sln b/Golovko/Task_10/Task_10.sln new file mode 100644 index 0000000..8772086 --- /dev/null +++ b/Golovko/Task_10/Task_10.sln @@ -0,0 +1,34 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.23107.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "1_DirectoryCreator", "1_DirectoryCreator\1_DirectoryCreator.csproj", "{FF41DE36-D96E-4000-9BED-F1308EF8631E}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "2_FileWriterReader", "2_FileWriterReader\2_FileWriterReader.csproj", "{02FBCE21-ABDE-45F3-BA37-E846EC13E02F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "3_FileSearcher", "3_FileSearcher\3_FileSearcher.csproj", "{466E9794-50CB-4576-A5B5-C24B9D4BF19E}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {FF41DE36-D96E-4000-9BED-F1308EF8631E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FF41DE36-D96E-4000-9BED-F1308EF8631E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FF41DE36-D96E-4000-9BED-F1308EF8631E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FF41DE36-D96E-4000-9BED-F1308EF8631E}.Release|Any CPU.Build.0 = Release|Any CPU + {02FBCE21-ABDE-45F3-BA37-E846EC13E02F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {02FBCE21-ABDE-45F3-BA37-E846EC13E02F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {02FBCE21-ABDE-45F3-BA37-E846EC13E02F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {02FBCE21-ABDE-45F3-BA37-E846EC13E02F}.Release|Any CPU.Build.0 = Release|Any CPU + {466E9794-50CB-4576-A5B5-C24B9D4BF19E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {466E9794-50CB-4576-A5B5-C24B9D4BF19E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {466E9794-50CB-4576-A5B5-C24B9D4BF19E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {466E9794-50CB-4576-A5B5-C24B9D4BF19E}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Golovko/Task_2/.vs/Task_2/v14/.suo b/Golovko/Task_2/.vs/Task_2/v14/.suo new file mode 100644 index 0000000..db9c264 Binary files /dev/null and b/Golovko/Task_2/.vs/Task_2/v14/.suo differ diff --git a/Golovko/Task_2/1_Address/1_Address.csproj b/Golovko/Task_2/1_Address/1_Address.csproj new file mode 100644 index 0000000..152beaa --- /dev/null +++ b/Golovko/Task_2/1_Address/1_Address.csproj @@ -0,0 +1,61 @@ + + + + + Debug + AnyCPU + {60CC464F-3B8E-4A0D-A080-0CC9ADFF12E8} + Exe + Properties + _1_Address + 1_Address + v4.5.2 + 512 + 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/Golovko/Task_2/1_Address/Address.cs b/Golovko/Task_2/1_Address/Address.cs new file mode 100644 index 0000000..b5cf1d1 --- /dev/null +++ b/Golovko/Task_2/1_Address/Address.cs @@ -0,0 +1,52 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _1_Address +{ + class Address + { + private uint index; + private string country; + private string city; + private string street; + private uint house; + private uint apartment; + public uint Index + { + get { return index; } + set { index = value; } + } + public string Country + { + get { return country; } + set { country = value; } + } + public string City + { + get { return city; } + set { city = value; } + } + public string Street + { + get { return street; } + set { street = value; } + } + public uint House + { + get { return house; } + set { house = value; } + } + public uint Apartment + { + get { return apartment; } + set { apartment = value; } + } + public void PrintAddressInfo() + { + Console.WriteLine("Index: {0}\nCountry: {1}\nCity: {2}\nStreet: {3}\nHouse: {4}\nApartment: {5}", index, country, city, street, house, apartment); + } + } +} diff --git a/Golovko/Task_2/1_Address/App.config b/Golovko/Task_2/1_Address/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_2/1_Address/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_2/1_Address/Program.cs b/Golovko/Task_2/1_Address/Program.cs new file mode 100644 index 0000000..cd7958a --- /dev/null +++ b/Golovko/Task_2/1_Address/Program.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _1_Address +{ + class Program + { + static void Main(string[] args) + { + Address address = new Address(); + address.Index = 624019; + address.Country = "Ukraine"; + address.City = "Dnepr"; + address.Street = "K. Marks street"; + address.House = 54; + address.Apartment = 19; + address.PrintAddressInfo(); + Console.ReadKey(); + } + } +} diff --git a/Golovko/Task_2/1_Address/Properties/AssemblyInfo.cs b/Golovko/Task_2/1_Address/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..341817b --- /dev/null +++ b/Golovko/Task_2/1_Address/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("1_Address")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("1_Address")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[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("60cc464f-3b8e-4a0d-a080-0cc9adff12e8")] + +// 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")] diff --git a/Golovko/Task_2/1_Address/bin/Debug/1_Address.exe b/Golovko/Task_2/1_Address/bin/Debug/1_Address.exe new file mode 100644 index 0000000..2f14c96 Binary files /dev/null and b/Golovko/Task_2/1_Address/bin/Debug/1_Address.exe differ diff --git a/Golovko/Task_2/1_Address/bin/Debug/1_Address.exe.config b/Golovko/Task_2/1_Address/bin/Debug/1_Address.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_2/1_Address/bin/Debug/1_Address.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_2/1_Address/bin/Debug/1_Address.pdb b/Golovko/Task_2/1_Address/bin/Debug/1_Address.pdb new file mode 100644 index 0000000..24ccbf7 Binary files /dev/null and b/Golovko/Task_2/1_Address/bin/Debug/1_Address.pdb differ diff --git a/Golovko/Task_2/1_Address/bin/Debug/1_Address.vshost.exe b/Golovko/Task_2/1_Address/bin/Debug/1_Address.vshost.exe new file mode 100644 index 0000000..681ab77 Binary files /dev/null and b/Golovko/Task_2/1_Address/bin/Debug/1_Address.vshost.exe differ diff --git a/Golovko/Task_2/1_Address/bin/Debug/1_Address.vshost.exe.config b/Golovko/Task_2/1_Address/bin/Debug/1_Address.vshost.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_2/1_Address/bin/Debug/1_Address.vshost.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_2/1_Address/bin/Debug/1_Address.vshost.exe.manifest b/Golovko/Task_2/1_Address/bin/Debug/1_Address.vshost.exe.manifest new file mode 100644 index 0000000..061c9ca --- /dev/null +++ b/Golovko/Task_2/1_Address/bin/Debug/1_Address.vshost.exe.manifest @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/Golovko/Task_2/1_Address/obj/Debug/1_Address.csproj.FileListAbsolute.txt b/Golovko/Task_2/1_Address/obj/Debug/1_Address.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..e4b4514 --- /dev/null +++ b/Golovko/Task_2/1_Address/obj/Debug/1_Address.csproj.FileListAbsolute.txt @@ -0,0 +1,12 @@ +c:\users\головко\documents\visual studio 2015\Projects\Task_2\1_Address\bin\Debug\1_Address.exe.config +c:\users\головко\documents\visual studio 2015\Projects\Task_2\1_Address\bin\Debug\1_Address.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_2\1_Address\bin\Debug\1_Address.pdb +c:\users\головко\documents\visual studio 2015\Projects\Task_2\1_Address\obj\Debug\1_Address.csprojResolveAssemblyReference.cache +c:\users\головко\documents\visual studio 2015\Projects\Task_2\1_Address\obj\Debug\1_Address.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_2\1_Address\obj\Debug\1_Address.pdb +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_2\1_Address\bin\Debug\1_Address.exe.config +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_2\1_Address\obj\Debug\1_Address.exe +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_2\1_Address\obj\Debug\1_Address.pdb +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_2\1_Address\bin\Debug\1_Address.exe +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_2\1_Address\bin\Debug\1_Address.pdb +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_2\1_Address\obj\Debug\1_Address.csprojResolveAssemblyReference.cache diff --git a/Golovko/Task_2/1_Address/obj/Debug/1_Address.csprojResolveAssemblyReference.cache b/Golovko/Task_2/1_Address/obj/Debug/1_Address.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..8b357ed Binary files /dev/null and b/Golovko/Task_2/1_Address/obj/Debug/1_Address.csprojResolveAssemblyReference.cache differ diff --git a/Golovko/Task_2/1_Address/obj/Debug/1_Address.exe b/Golovko/Task_2/1_Address/obj/Debug/1_Address.exe new file mode 100644 index 0000000..2f14c96 Binary files /dev/null and b/Golovko/Task_2/1_Address/obj/Debug/1_Address.exe differ diff --git a/Golovko/Task_2/1_Address/obj/Debug/1_Address.pdb b/Golovko/Task_2/1_Address/obj/Debug/1_Address.pdb new file mode 100644 index 0000000..24ccbf7 Binary files /dev/null and b/Golovko/Task_2/1_Address/obj/Debug/1_Address.pdb differ diff --git a/Golovko/Task_2/1_Address/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Golovko/Task_2/1_Address/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..1af9731 Binary files /dev/null and b/Golovko/Task_2/1_Address/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Golovko/Task_2/1_Address/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Golovko/Task_2/1_Address/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_2/1_Address/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Golovko/Task_2/1_Address/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_2/1_Address/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Golovko/Task_2/1_Address/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_2/2_Rectangle/2_Rectangle.csproj b/Golovko/Task_2/2_Rectangle/2_Rectangle.csproj new file mode 100644 index 0000000..6d4d835 --- /dev/null +++ b/Golovko/Task_2/2_Rectangle/2_Rectangle.csproj @@ -0,0 +1,61 @@ + + + + + Debug + AnyCPU + {476DA397-6AB2-416D-B83C-C5DC41EBF321} + Exe + Properties + _2_Rectangle + 2_Rectangle + v4.5.2 + 512 + 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/Golovko/Task_2/2_Rectangle/App.config b/Golovko/Task_2/2_Rectangle/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_2/2_Rectangle/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_2/2_Rectangle/Program.cs b/Golovko/Task_2/2_Rectangle/Program.cs new file mode 100644 index 0000000..57f5f89 --- /dev/null +++ b/Golovko/Task_2/2_Rectangle/Program.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_Rectangle +{ + class Program + { + static void Main(string[] args) + { + Console.WriteLine("Enter the Rectangle's sides lenght, pleas:"); + Console.Write("A = "); + double side1 = double.Parse(Console.ReadLine()); + Console.Write("B = "); + double side2 = double.Parse(Console.ReadLine()); + Rectangle rectangle = new Rectangle(side1, side2); + Console.WriteLine("Area = {0}\nPerimeter = {1}", rectangle.Area, rectangle.Perimeter); + Console.ReadKey(); + } + } +} diff --git a/Golovko/Task_2/2_Rectangle/Properties/AssemblyInfo.cs b/Golovko/Task_2/2_Rectangle/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..cc1c6bc --- /dev/null +++ b/Golovko/Task_2/2_Rectangle/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("2_Rectangle")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("2_Rectangle")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[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("476da397-6ab2-416d-b83c-c5dc41ebf321")] + +// 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")] diff --git a/Golovko/Task_2/2_Rectangle/Rectangle.cs b/Golovko/Task_2/2_Rectangle/Rectangle.cs new file mode 100644 index 0000000..30d487e --- /dev/null +++ b/Golovko/Task_2/2_Rectangle/Rectangle.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_Rectangle +{ + class Rectangle + { + private double side1; + private double side2; + public double Area + { + get { return AreaCalculator(); } + } + public double Perimeter + { + get { return PerimeterCalculator(); } + } + public Rectangle(double side1, double side2) + { + this.side1 = side1; + this.side2 = side2; + } + private double AreaCalculator() + { + return side1 * side2; + } + private double PerimeterCalculator() + { + return 2 * (side1 + side2); + } + } +} diff --git a/Golovko/Task_2/2_Rectangle/bin/Debug/2_Rectangle.exe b/Golovko/Task_2/2_Rectangle/bin/Debug/2_Rectangle.exe new file mode 100644 index 0000000..5c43c99 Binary files /dev/null and b/Golovko/Task_2/2_Rectangle/bin/Debug/2_Rectangle.exe differ diff --git a/Golovko/Task_2/2_Rectangle/bin/Debug/2_Rectangle.exe.config b/Golovko/Task_2/2_Rectangle/bin/Debug/2_Rectangle.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_2/2_Rectangle/bin/Debug/2_Rectangle.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_2/2_Rectangle/bin/Debug/2_Rectangle.pdb b/Golovko/Task_2/2_Rectangle/bin/Debug/2_Rectangle.pdb new file mode 100644 index 0000000..d59c0af Binary files /dev/null and b/Golovko/Task_2/2_Rectangle/bin/Debug/2_Rectangle.pdb differ diff --git a/Golovko/Task_2/2_Rectangle/bin/Debug/2_Rectangle.vshost.exe b/Golovko/Task_2/2_Rectangle/bin/Debug/2_Rectangle.vshost.exe new file mode 100644 index 0000000..681ab77 Binary files /dev/null and b/Golovko/Task_2/2_Rectangle/bin/Debug/2_Rectangle.vshost.exe differ diff --git a/Golovko/Task_2/2_Rectangle/bin/Debug/2_Rectangle.vshost.exe.config b/Golovko/Task_2/2_Rectangle/bin/Debug/2_Rectangle.vshost.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_2/2_Rectangle/bin/Debug/2_Rectangle.vshost.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_2/2_Rectangle/bin/Debug/2_Rectangle.vshost.exe.manifest b/Golovko/Task_2/2_Rectangle/bin/Debug/2_Rectangle.vshost.exe.manifest new file mode 100644 index 0000000..061c9ca --- /dev/null +++ b/Golovko/Task_2/2_Rectangle/bin/Debug/2_Rectangle.vshost.exe.manifest @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/Golovko/Task_2/2_Rectangle/obj/Debug/2_Rectangle.csproj.FileListAbsolute.txt b/Golovko/Task_2/2_Rectangle/obj/Debug/2_Rectangle.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..17215c8 --- /dev/null +++ b/Golovko/Task_2/2_Rectangle/obj/Debug/2_Rectangle.csproj.FileListAbsolute.txt @@ -0,0 +1,6 @@ +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_2\2_Rectangle\bin\Debug\2_Rectangle.exe.config +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_2\2_Rectangle\bin\Debug\2_Rectangle.exe +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_2\2_Rectangle\bin\Debug\2_Rectangle.pdb +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_2\2_Rectangle\obj\Debug\2_Rectangle.csprojResolveAssemblyReference.cache +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_2\2_Rectangle\obj\Debug\2_Rectangle.exe +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_2\2_Rectangle\obj\Debug\2_Rectangle.pdb diff --git a/Golovko/Task_2/2_Rectangle/obj/Debug/2_Rectangle.csprojResolveAssemblyReference.cache b/Golovko/Task_2/2_Rectangle/obj/Debug/2_Rectangle.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..8b357ed Binary files /dev/null and b/Golovko/Task_2/2_Rectangle/obj/Debug/2_Rectangle.csprojResolveAssemblyReference.cache differ diff --git a/Golovko/Task_2/2_Rectangle/obj/Debug/2_Rectangle.exe b/Golovko/Task_2/2_Rectangle/obj/Debug/2_Rectangle.exe new file mode 100644 index 0000000..5c43c99 Binary files /dev/null and b/Golovko/Task_2/2_Rectangle/obj/Debug/2_Rectangle.exe differ diff --git a/Golovko/Task_2/2_Rectangle/obj/Debug/2_Rectangle.pdb b/Golovko/Task_2/2_Rectangle/obj/Debug/2_Rectangle.pdb new file mode 100644 index 0000000..d59c0af Binary files /dev/null and b/Golovko/Task_2/2_Rectangle/obj/Debug/2_Rectangle.pdb differ diff --git a/Golovko/Task_2/2_Rectangle/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Golovko/Task_2/2_Rectangle/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..daf3f18 Binary files /dev/null and b/Golovko/Task_2/2_Rectangle/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Golovko/Task_2/2_Rectangle/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Golovko/Task_2/2_Rectangle/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_2/2_Rectangle/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Golovko/Task_2/2_Rectangle/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_2/2_Rectangle/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Golovko/Task_2/2_Rectangle/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_2/3_Book/3_Book.csproj b/Golovko/Task_2/3_Book/3_Book.csproj new file mode 100644 index 0000000..4d230e7 --- /dev/null +++ b/Golovko/Task_2/3_Book/3_Book.csproj @@ -0,0 +1,64 @@ + + + + + Debug + AnyCPU + {64E9CAE0-D0A1-4225-B443-120B36E76A31} + Exe + Properties + _3_Book + 3_Book + v4.5.2 + 512 + 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/Golovko/Task_2/3_Book/App.config b/Golovko/Task_2/3_Book/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_2/3_Book/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_2/3_Book/Author.cs b/Golovko/Task_2/3_Book/Author.cs new file mode 100644 index 0000000..11c06cf --- /dev/null +++ b/Golovko/Task_2/3_Book/Author.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _3_Book +{ + class Author + { + private string author; + public Author(string author) + { + this.author = author; + } + public void Show() + { + Console.ForegroundColor = ConsoleColor.Yellow; + Console.WriteLine(author); + Console.ForegroundColor = ConsoleColor.Gray; + } + } +} diff --git a/Golovko/Task_2/3_Book/Book.cs b/Golovko/Task_2/3_Book/Book.cs new file mode 100644 index 0000000..28dd32d --- /dev/null +++ b/Golovko/Task_2/3_Book/Book.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _3_Book +{ + class Book + { + public Title Title { get; set; } + public Author Author { get; set; } + public Content Content { get; set; } + public void Show() + { + Title.Show(); + Author.Show(); + Content.Show(); + } + } +} diff --git a/Golovko/Task_2/3_Book/Content.cs b/Golovko/Task_2/3_Book/Content.cs new file mode 100644 index 0000000..4472c8c --- /dev/null +++ b/Golovko/Task_2/3_Book/Content.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _3_Book +{ + class Content + { + private string content; + public Content(string content) + { + this.content = content; + } + public void Show() + { + Console.ForegroundColor = ConsoleColor.Red; + Console.WriteLine(content); + Console.ForegroundColor = ConsoleColor.Gray; + } + } +} diff --git a/Golovko/Task_2/3_Book/Program.cs b/Golovko/Task_2/3_Book/Program.cs new file mode 100644 index 0000000..b9f9a16 --- /dev/null +++ b/Golovko/Task_2/3_Book/Program.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _3_Book +{ + class Program + { + static void Main(string[] args) + { + Book book = new Book(); + book.Title = new Title("Shantaram"); + book.Author = new Author("Gregory David Roberts"); + book.Content = new Content("India GOA"); + book.Show(); + Console.ReadKey(); + } + } +} diff --git a/Golovko/Task_2/3_Book/Properties/AssemblyInfo.cs b/Golovko/Task_2/3_Book/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..391090a --- /dev/null +++ b/Golovko/Task_2/3_Book/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Управление общими сведениями о сборке осуществляется с помощью +// набора атрибутов. Измените значения этих атрибутов, чтобы изменить сведения, +// связанные со сборкой. +[assembly: AssemblyTitle("3_Book")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("3_Book")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Параметр ComVisible со значением FALSE делает типы в сборке невидимыми +// для COM-компонентов. Если требуется обратиться к типу в этой сборке через +// COM, задайте атрибуту ComVisible значение TRUE для этого типа. +[assembly: ComVisible(false)] + +// Следующий GUID служит для идентификации библиотеки типов, если этот проект будет видимым для COM +[assembly: Guid("64e9cae0-d0a1-4225-b443-120b36e76a31")] + +// Сведения о версии сборки состоят из следующих четырех значений: +// +// Основной номер версии +// Дополнительный номер версии +// Номер сборки +// Редакция +// +// Можно задать все значения или принять номера сборки и редакции по умолчанию +// используя "*", как показано ниже: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Golovko/Task_2/3_Book/Title.cs b/Golovko/Task_2/3_Book/Title.cs new file mode 100644 index 0000000..6b3823a --- /dev/null +++ b/Golovko/Task_2/3_Book/Title.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _3_Book +{ + class Title + { + private string title; + public Title(string title) + { + this.title = title; + } + public void Show() + { + Console.ForegroundColor = ConsoleColor.Green; + Console.WriteLine(title); + Console.ForegroundColor = ConsoleColor.Gray; + } + } +} diff --git a/Golovko/Task_2/3_Book/bin/Debug/3_Book.exe b/Golovko/Task_2/3_Book/bin/Debug/3_Book.exe new file mode 100644 index 0000000..bae71bd Binary files /dev/null and b/Golovko/Task_2/3_Book/bin/Debug/3_Book.exe differ diff --git a/Golovko/Task_2/3_Book/bin/Debug/3_Book.exe.config b/Golovko/Task_2/3_Book/bin/Debug/3_Book.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_2/3_Book/bin/Debug/3_Book.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_2/3_Book/bin/Debug/3_Book.pdb b/Golovko/Task_2/3_Book/bin/Debug/3_Book.pdb new file mode 100644 index 0000000..bc9f605 Binary files /dev/null and b/Golovko/Task_2/3_Book/bin/Debug/3_Book.pdb differ diff --git a/Golovko/Task_2/3_Book/bin/Debug/3_Book.vshost.exe b/Golovko/Task_2/3_Book/bin/Debug/3_Book.vshost.exe new file mode 100644 index 0000000..681ab77 Binary files /dev/null and b/Golovko/Task_2/3_Book/bin/Debug/3_Book.vshost.exe differ diff --git a/Golovko/Task_2/3_Book/bin/Debug/3_Book.vshost.exe.config b/Golovko/Task_2/3_Book/bin/Debug/3_Book.vshost.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_2/3_Book/bin/Debug/3_Book.vshost.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_2/3_Book/obj/Debug/3_Book.csproj.FileListAbsolute.txt b/Golovko/Task_2/3_Book/obj/Debug/3_Book.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..4668d70 --- /dev/null +++ b/Golovko/Task_2/3_Book/obj/Debug/3_Book.csproj.FileListAbsolute.txt @@ -0,0 +1,6 @@ +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_2\3_Book\bin\Debug\3_Book.exe.config +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_2\3_Book\bin\Debug\3_Book.exe +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_2\3_Book\bin\Debug\3_Book.pdb +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_2\3_Book\obj\Debug\3_Book.csprojResolveAssemblyReference.cache +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_2\3_Book\obj\Debug\3_Book.exe +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_2\3_Book\obj\Debug\3_Book.pdb diff --git a/Golovko/Task_2/3_Book/obj/Debug/3_Book.csprojResolveAssemblyReference.cache b/Golovko/Task_2/3_Book/obj/Debug/3_Book.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..8b357ed Binary files /dev/null and b/Golovko/Task_2/3_Book/obj/Debug/3_Book.csprojResolveAssemblyReference.cache differ diff --git a/Golovko/Task_2/3_Book/obj/Debug/3_Book.exe b/Golovko/Task_2/3_Book/obj/Debug/3_Book.exe new file mode 100644 index 0000000..bae71bd Binary files /dev/null and b/Golovko/Task_2/3_Book/obj/Debug/3_Book.exe differ diff --git a/Golovko/Task_2/3_Book/obj/Debug/3_Book.pdb b/Golovko/Task_2/3_Book/obj/Debug/3_Book.pdb new file mode 100644 index 0000000..bc9f605 Binary files /dev/null and b/Golovko/Task_2/3_Book/obj/Debug/3_Book.pdb differ diff --git a/Golovko/Task_2/3_Book/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Golovko/Task_2/3_Book/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..7b11f38 Binary files /dev/null and b/Golovko/Task_2/3_Book/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Golovko/Task_2/3_Book/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Golovko/Task_2/3_Book/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_2/3_Book/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Golovko/Task_2/3_Book/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_2/3_Book/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Golovko/Task_2/3_Book/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_2/4_Figure/4_Figure.csproj b/Golovko/Task_2/4_Figure/4_Figure.csproj new file mode 100644 index 0000000..ac0edd4 --- /dev/null +++ b/Golovko/Task_2/4_Figure/4_Figure.csproj @@ -0,0 +1,62 @@ + + + + + Debug + AnyCPU + {9AEBDEA4-3B4E-46D7-81F9-00F94AEA47A0} + Exe + Properties + _4_Figure + 4_Figure + v4.5.2 + 512 + 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/Golovko/Task_2/4_Figure/App.config b/Golovko/Task_2/4_Figure/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_2/4_Figure/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_2/4_Figure/Figure.cs b/Golovko/Task_2/4_Figure/Figure.cs new file mode 100644 index 0000000..a522d20 --- /dev/null +++ b/Golovko/Task_2/4_Figure/Figure.cs @@ -0,0 +1,62 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _4_Figure +{ + class Figure + { + private Point[] points; + public string Name + { + get + { + string name = string.Empty; + foreach (Point point in points) + { + if (point == null) break; + name += point.Name; + } + return name; + } + } + public double Perimeter + { + get { return PerimeterCalculator(); } + } + public Figure(Point pointA, Point pointB, Point pointC) + { + points = new Point[5]; + points[0] = pointA; + points[1] = pointB; + points[2] = pointC; + } + public Figure(Point pointA, Point pointB, Point pointC, Point pointD) : + this(pointA, pointB, pointC) + { + points[3] = pointD; + } + public Figure(Point pointA, Point pointB, Point pointC, Point pointD, Point pointE) : + this(pointA, pointB, pointC, pointD) + { + points[4] = pointE; + } + private double LengthSide(Point A, Point B) + { + return Math.Sqrt(Math.Pow(A.X - B.X, 2) + Math.Pow(A.Y - B.Y, 2)); + } + private double PerimeterCalculator() + { + int k = 0; + double perimeter = 0; + while (points[++k] != null) + { + perimeter += LengthSide(points[k-1], points[k]); + } + perimeter += LengthSide(points[0], points[--k]); + return perimeter; + } + } +} diff --git a/Golovko/Task_2/4_Figure/Point.cs b/Golovko/Task_2/4_Figure/Point.cs new file mode 100644 index 0000000..d6edf5b --- /dev/null +++ b/Golovko/Task_2/4_Figure/Point.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _4_Figure +{ + class Point + { + private int x; + private int y; + private string name; + public int X + { + get { return x; } + } + public int Y + { + get { return y; } + } + public string Name + { + get { return name; } + } + public Point(int x, int y, string name) + { + this.x = x; + this.y = y; + this.name = name; + } + } +} diff --git a/Golovko/Task_2/4_Figure/Program.cs b/Golovko/Task_2/4_Figure/Program.cs new file mode 100644 index 0000000..3e381fa --- /dev/null +++ b/Golovko/Task_2/4_Figure/Program.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _4_Figure +{ + class Program + { + static void Main(string[] args) + { + Figure figure = new Figure( + new Point(3, 5, "A"), + new Point(7, -2, "B"), + new Point(1, 5, "C"), + new Point(14, 3, "D")); + + Console.WriteLine("P({0}) = {1:f4}", figure.Name, figure.Perimeter); + Console.ReadKey(); + } + } +} diff --git a/Golovko/Task_2/4_Figure/Properties/AssemblyInfo.cs b/Golovko/Task_2/4_Figure/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..a03cf69 --- /dev/null +++ b/Golovko/Task_2/4_Figure/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Управление общими сведениями о сборке осуществляется с помощью +// набора атрибутов. Измените значения этих атрибутов, чтобы изменить сведения, +// связанные со сборкой. +[assembly: AssemblyTitle("4_Figure")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("4_Figure")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Параметр ComVisible со значением FALSE делает типы в сборке невидимыми +// для COM-компонентов. Если требуется обратиться к типу в этой сборке через +// COM, задайте атрибуту ComVisible значение TRUE для этого типа. +[assembly: ComVisible(false)] + +// Следующий GUID служит для идентификации библиотеки типов, если этот проект будет видимым для COM +[assembly: Guid("9aebdea4-3b4e-46d7-81f9-00f94aea47a0")] + +// Сведения о версии сборки состоят из следующих четырех значений: +// +// Основной номер версии +// Дополнительный номер версии +// Номер сборки +// Редакция +// +// Можно задать все значения или принять номера сборки и редакции по умолчанию +// используя "*", как показано ниже: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Golovko/Task_2/4_Figure/bin/Debug/4_Figure.exe b/Golovko/Task_2/4_Figure/bin/Debug/4_Figure.exe new file mode 100644 index 0000000..7c97bf1 Binary files /dev/null and b/Golovko/Task_2/4_Figure/bin/Debug/4_Figure.exe differ diff --git a/Golovko/Task_2/4_Figure/bin/Debug/4_Figure.exe.config b/Golovko/Task_2/4_Figure/bin/Debug/4_Figure.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_2/4_Figure/bin/Debug/4_Figure.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_2/4_Figure/bin/Debug/4_Figure.pdb b/Golovko/Task_2/4_Figure/bin/Debug/4_Figure.pdb new file mode 100644 index 0000000..59aff40 Binary files /dev/null and b/Golovko/Task_2/4_Figure/bin/Debug/4_Figure.pdb differ diff --git a/Golovko/Task_2/4_Figure/bin/Debug/4_Figure.vshost.exe b/Golovko/Task_2/4_Figure/bin/Debug/4_Figure.vshost.exe new file mode 100644 index 0000000..681ab77 Binary files /dev/null and b/Golovko/Task_2/4_Figure/bin/Debug/4_Figure.vshost.exe differ diff --git a/Golovko/Task_2/4_Figure/bin/Debug/4_Figure.vshost.exe.config b/Golovko/Task_2/4_Figure/bin/Debug/4_Figure.vshost.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_2/4_Figure/bin/Debug/4_Figure.vshost.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_2/4_Figure/obj/Debug/4_Figure.csproj.FileListAbsolute.txt b/Golovko/Task_2/4_Figure/obj/Debug/4_Figure.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..6631575 --- /dev/null +++ b/Golovko/Task_2/4_Figure/obj/Debug/4_Figure.csproj.FileListAbsolute.txt @@ -0,0 +1,6 @@ +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_2\4_Figure\bin\Debug\4_Figure.exe.config +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_2\4_Figure\bin\Debug\4_Figure.exe +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_2\4_Figure\bin\Debug\4_Figure.pdb +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_2\4_Figure\obj\Debug\4_Figure.csprojResolveAssemblyReference.cache +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_2\4_Figure\obj\Debug\4_Figure.exe +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_2\4_Figure\obj\Debug\4_Figure.pdb diff --git a/Golovko/Task_2/4_Figure/obj/Debug/4_Figure.csprojResolveAssemblyReference.cache b/Golovko/Task_2/4_Figure/obj/Debug/4_Figure.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..8b357ed Binary files /dev/null and b/Golovko/Task_2/4_Figure/obj/Debug/4_Figure.csprojResolveAssemblyReference.cache differ diff --git a/Golovko/Task_2/4_Figure/obj/Debug/4_Figure.exe b/Golovko/Task_2/4_Figure/obj/Debug/4_Figure.exe new file mode 100644 index 0000000..7c97bf1 Binary files /dev/null and b/Golovko/Task_2/4_Figure/obj/Debug/4_Figure.exe differ diff --git a/Golovko/Task_2/4_Figure/obj/Debug/4_Figure.pdb b/Golovko/Task_2/4_Figure/obj/Debug/4_Figure.pdb new file mode 100644 index 0000000..59aff40 Binary files /dev/null and b/Golovko/Task_2/4_Figure/obj/Debug/4_Figure.pdb differ diff --git a/Golovko/Task_2/4_Figure/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Golovko/Task_2/4_Figure/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..6eacbb9 Binary files /dev/null and b/Golovko/Task_2/4_Figure/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Golovko/Task_2/4_Figure/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Golovko/Task_2/4_Figure/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_2/4_Figure/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Golovko/Task_2/4_Figure/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_2/4_Figure/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Golovko/Task_2/4_Figure/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_2/5_User/5_User.csproj b/Golovko/Task_2/5_User/5_User.csproj new file mode 100644 index 0000000..3e4c6c4 --- /dev/null +++ b/Golovko/Task_2/5_User/5_User.csproj @@ -0,0 +1,61 @@ + + + + + Debug + AnyCPU + {83FE914A-9E88-4EFB-B772-44035EFB2C98} + Exe + Properties + _5_User + 5_User + v4.5.2 + 512 + 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/Golovko/Task_2/5_User/App.config b/Golovko/Task_2/5_User/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_2/5_User/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_2/5_User/Program.cs b/Golovko/Task_2/5_User/Program.cs new file mode 100644 index 0000000..09e47fb --- /dev/null +++ b/Golovko/Task_2/5_User/Program.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _5_User +{ + class Program + { + static void Main(string[] args) + { + User user = new User("mrSmile", "Gregory", "Golovko", 29); + user.PrintInfo(); + Console.ReadKey(); + } + } +} diff --git a/Golovko/Task_2/5_User/Properties/AssemblyInfo.cs b/Golovko/Task_2/5_User/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..5eeab90 --- /dev/null +++ b/Golovko/Task_2/5_User/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Управление общими сведениями о сборке осуществляется с помощью +// набора атрибутов. Измените значения этих атрибутов, чтобы изменить сведения, +// связанные со сборкой. +[assembly: AssemblyTitle("5_User")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("5_User")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Параметр ComVisible со значением FALSE делает типы в сборке невидимыми +// для COM-компонентов. Если требуется обратиться к типу в этой сборке через +// COM, задайте атрибуту ComVisible значение TRUE для этого типа. +[assembly: ComVisible(false)] + +// Следующий GUID служит для идентификации библиотеки типов, если этот проект будет видимым для COM +[assembly: Guid("83fe914a-9e88-4efb-b772-44035efb2c98")] + +// Сведения о версии сборки состоят из следующих четырех значений: +// +// Основной номер версии +// Дополнительный номер версии +// Номер сборки +// Редакция +// +// Можно задать все значения или принять номера сборки и редакции по умолчанию +// используя "*", как показано ниже: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Golovko/Task_2/5_User/User.cs b/Golovko/Task_2/5_User/User.cs new file mode 100644 index 0000000..a62525c --- /dev/null +++ b/Golovko/Task_2/5_User/User.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _5_User +{ + class User + { + private readonly DateTime date; + public string Login { get; private set; } + public string Name { get; private set; } + public string Surname { get; private set; } + public uint Age { get; private set; } + public User(string login, string name, string surname, uint age) + { + this.Login = login; + this.Name = name; + this.Surname = surname; + this.Age = age; + date = DateTime.Now; + } + public void PrintInfo() + { + Console.WriteLine("Login: {0}\nName: {1}\nSurname: {2}\nAge: {3}\nFilling date: {4}", Login, Name, Surname, Age, date); + } + } +} diff --git a/Golovko/Task_2/5_User/bin/Debug/5_User.exe b/Golovko/Task_2/5_User/bin/Debug/5_User.exe new file mode 100644 index 0000000..8513211 Binary files /dev/null and b/Golovko/Task_2/5_User/bin/Debug/5_User.exe differ diff --git a/Golovko/Task_2/5_User/bin/Debug/5_User.exe.config b/Golovko/Task_2/5_User/bin/Debug/5_User.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_2/5_User/bin/Debug/5_User.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_2/5_User/bin/Debug/5_User.pdb b/Golovko/Task_2/5_User/bin/Debug/5_User.pdb new file mode 100644 index 0000000..79faea0 Binary files /dev/null and b/Golovko/Task_2/5_User/bin/Debug/5_User.pdb differ diff --git a/Golovko/Task_2/5_User/bin/Debug/5_User.vshost.exe b/Golovko/Task_2/5_User/bin/Debug/5_User.vshost.exe new file mode 100644 index 0000000..681ab77 Binary files /dev/null and b/Golovko/Task_2/5_User/bin/Debug/5_User.vshost.exe differ diff --git a/Golovko/Task_2/5_User/bin/Debug/5_User.vshost.exe.config b/Golovko/Task_2/5_User/bin/Debug/5_User.vshost.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_2/5_User/bin/Debug/5_User.vshost.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_2/5_User/obj/Debug/5_User.csproj.FileListAbsolute.txt b/Golovko/Task_2/5_User/obj/Debug/5_User.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..7ab5c4b --- /dev/null +++ b/Golovko/Task_2/5_User/obj/Debug/5_User.csproj.FileListAbsolute.txt @@ -0,0 +1,6 @@ +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_2\5_User\bin\Debug\5_User.exe.config +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_2\5_User\bin\Debug\5_User.exe +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_2\5_User\bin\Debug\5_User.pdb +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_2\5_User\obj\Debug\5_User.exe +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_2\5_User\obj\Debug\5_User.pdb +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_2\5_User\obj\Debug\5_User.csprojResolveAssemblyReference.cache diff --git a/Golovko/Task_2/5_User/obj/Debug/5_User.csprojResolveAssemblyReference.cache b/Golovko/Task_2/5_User/obj/Debug/5_User.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..8b357ed Binary files /dev/null and b/Golovko/Task_2/5_User/obj/Debug/5_User.csprojResolveAssemblyReference.cache differ diff --git a/Golovko/Task_2/5_User/obj/Debug/5_User.exe b/Golovko/Task_2/5_User/obj/Debug/5_User.exe new file mode 100644 index 0000000..8513211 Binary files /dev/null and b/Golovko/Task_2/5_User/obj/Debug/5_User.exe differ diff --git a/Golovko/Task_2/5_User/obj/Debug/5_User.pdb b/Golovko/Task_2/5_User/obj/Debug/5_User.pdb new file mode 100644 index 0000000..79faea0 Binary files /dev/null and b/Golovko/Task_2/5_User/obj/Debug/5_User.pdb differ diff --git a/Golovko/Task_2/5_User/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Golovko/Task_2/5_User/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..4915451 Binary files /dev/null and b/Golovko/Task_2/5_User/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Golovko/Task_2/5_User/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Golovko/Task_2/5_User/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_2/5_User/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Golovko/Task_2/5_User/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_2/5_User/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Golovko/Task_2/5_User/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_2/6_Converter/6_Converter.csproj b/Golovko/Task_2/6_Converter/6_Converter.csproj new file mode 100644 index 0000000..facbb9a --- /dev/null +++ b/Golovko/Task_2/6_Converter/6_Converter.csproj @@ -0,0 +1,63 @@ + + + + + Debug + AnyCPU + {A52E9EDB-5942-4922-8B3D-764E74F8ECAB} + Exe + Properties + _6_Converter + 6_Converter + v4.5.2 + 512 + 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/Golovko/Task_2/6_Converter/App.config b/Golovko/Task_2/6_Converter/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_2/6_Converter/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_2/6_Converter/Converter.cs b/Golovko/Task_2/6_Converter/Converter.cs new file mode 100644 index 0000000..21e25d9 --- /dev/null +++ b/Golovko/Task_2/6_Converter/Converter.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _6_Converter +{ + class Converter + { + private readonly Currency usd; + private readonly Currency eur; + private readonly Currency rub; + private readonly Currency uah; + private readonly List curencies; + public Converter(double usd, double eur, double rub) + { + this.usd = new Currency(Symbol.USD, usd); + this.eur = new Currency(Symbol.EUR, eur); + this.rub = new Currency(Symbol.RUB, rub); + this.uah = new Currency(Symbol.UAH, 1); + curencies = new List(); + this.CurrenciesInit(); + } + private void CurrenciesInit() + { + curencies.Add(usd); + curencies.Add(eur); + curencies.Add(rub); + curencies.Add(uah); + } + private Currency GetCurrency(Symbol symbol) + { + return curencies.First(currency => currency.Symbol == symbol); + } + public double Convert(double sum, Symbol symbolFrom, Symbol symbolTo) + { + return sum * GetCurrency(symbolTo).Price / GetCurrency(symbolFrom).Price; + } + } +} diff --git a/Golovko/Task_2/6_Converter/Currency.cs b/Golovko/Task_2/6_Converter/Currency.cs new file mode 100644 index 0000000..0155a7d --- /dev/null +++ b/Golovko/Task_2/6_Converter/Currency.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _6_Converter +{ + struct Currency + { + public Symbol Symbol { get; set; } + public double Price { get; set; } + public Currency(Symbol symbol, double price) + { + this.Symbol = symbol; + this.Price = price; + } + } +} diff --git a/Golovko/Task_2/6_Converter/Program.cs b/Golovko/Task_2/6_Converter/Program.cs new file mode 100644 index 0000000..a9d4941 --- /dev/null +++ b/Golovko/Task_2/6_Converter/Program.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _6_Converter +{ + class Program + { + static void Main(string[] args) + { + Converter converter = new Converter(0.038, 0.034, 2.52); + Console.WriteLine("{0} => {1} = {2:f4}", Symbol.UAH, Symbol.EUR, converter.Convert(100, Symbol.UAH, Symbol.EUR)); + Console.WriteLine("{0} => {1} = {2:f4}", Symbol.UAH, Symbol.RUB, converter.Convert(100, Symbol.UAH, Symbol.RUB)); + Console.WriteLine("{0} => {1} = {2:f4}", Symbol.USD, Symbol.UAH, converter.Convert(100, Symbol.USD, Symbol.UAH)); + Console.WriteLine("{0} => {1} = {2:f4}", Symbol.EUR, Symbol.USD, converter.Convert(100, Symbol.EUR, Symbol.USD)); + Console.ReadKey(); + } + } +} diff --git a/Golovko/Task_2/6_Converter/Properties/AssemblyInfo.cs b/Golovko/Task_2/6_Converter/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..a6740e1 --- /dev/null +++ b/Golovko/Task_2/6_Converter/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Управление общими сведениями о сборке осуществляется с помощью +// набора атрибутов. Измените значения этих атрибутов, чтобы изменить сведения, +// связанные со сборкой. +[assembly: AssemblyTitle("6_Converter")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("6_Converter")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Параметр ComVisible со значением FALSE делает типы в сборке невидимыми +// для COM-компонентов. Если требуется обратиться к типу в этой сборке через +// COM, задайте атрибуту ComVisible значение TRUE для этого типа. +[assembly: ComVisible(false)] + +// Следующий GUID служит для идентификации библиотеки типов, если этот проект будет видимым для COM +[assembly: Guid("a52e9edb-5942-4922-8b3d-764e74f8ecab")] + +// Сведения о версии сборки состоят из следующих четырех значений: +// +// Основной номер версии +// Дополнительный номер версии +// Номер сборки +// Редакция +// +// Можно задать все значения или принять номера сборки и редакции по умолчанию +// используя "*", как показано ниже: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Golovko/Task_2/6_Converter/Symbol.cs b/Golovko/Task_2/6_Converter/Symbol.cs new file mode 100644 index 0000000..817cbe2 --- /dev/null +++ b/Golovko/Task_2/6_Converter/Symbol.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _6_Converter +{ + enum Symbol : byte + { + UAH, + USD, + EUR, + RUB + } +} diff --git a/Golovko/Task_2/6_Converter/bin/Debug/6_Converter.exe b/Golovko/Task_2/6_Converter/bin/Debug/6_Converter.exe new file mode 100644 index 0000000..767fc8f Binary files /dev/null and b/Golovko/Task_2/6_Converter/bin/Debug/6_Converter.exe differ diff --git a/Golovko/Task_2/6_Converter/bin/Debug/6_Converter.exe.config b/Golovko/Task_2/6_Converter/bin/Debug/6_Converter.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_2/6_Converter/bin/Debug/6_Converter.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_2/6_Converter/bin/Debug/6_Converter.pdb b/Golovko/Task_2/6_Converter/bin/Debug/6_Converter.pdb new file mode 100644 index 0000000..4dba337 Binary files /dev/null and b/Golovko/Task_2/6_Converter/bin/Debug/6_Converter.pdb differ diff --git a/Golovko/Task_2/6_Converter/bin/Debug/6_Converter.vshost.exe b/Golovko/Task_2/6_Converter/bin/Debug/6_Converter.vshost.exe new file mode 100644 index 0000000..681ab77 Binary files /dev/null and b/Golovko/Task_2/6_Converter/bin/Debug/6_Converter.vshost.exe differ diff --git a/Golovko/Task_2/6_Converter/bin/Debug/6_Converter.vshost.exe.config b/Golovko/Task_2/6_Converter/bin/Debug/6_Converter.vshost.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_2/6_Converter/bin/Debug/6_Converter.vshost.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_2/6_Converter/bin/Debug/6_Converter.vshost.exe.manifest b/Golovko/Task_2/6_Converter/bin/Debug/6_Converter.vshost.exe.manifest new file mode 100644 index 0000000..061c9ca --- /dev/null +++ b/Golovko/Task_2/6_Converter/bin/Debug/6_Converter.vshost.exe.manifest @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/Golovko/Task_2/6_Converter/obj/Debug/6_Converter.csproj.FileListAbsolute.txt b/Golovko/Task_2/6_Converter/obj/Debug/6_Converter.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..004981e --- /dev/null +++ b/Golovko/Task_2/6_Converter/obj/Debug/6_Converter.csproj.FileListAbsolute.txt @@ -0,0 +1,6 @@ +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_2\6_Converter\bin\Debug\6_Converter.exe.config +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_2\6_Converter\bin\Debug\6_Converter.exe +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_2\6_Converter\bin\Debug\6_Converter.pdb +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_2\6_Converter\obj\Debug\6_Converter.csprojResolveAssemblyReference.cache +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_2\6_Converter\obj\Debug\6_Converter.exe +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_2\6_Converter\obj\Debug\6_Converter.pdb diff --git a/Golovko/Task_2/6_Converter/obj/Debug/6_Converter.csprojResolveAssemblyReference.cache b/Golovko/Task_2/6_Converter/obj/Debug/6_Converter.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..8b357ed Binary files /dev/null and b/Golovko/Task_2/6_Converter/obj/Debug/6_Converter.csprojResolveAssemblyReference.cache differ diff --git a/Golovko/Task_2/6_Converter/obj/Debug/6_Converter.exe b/Golovko/Task_2/6_Converter/obj/Debug/6_Converter.exe new file mode 100644 index 0000000..767fc8f Binary files /dev/null and b/Golovko/Task_2/6_Converter/obj/Debug/6_Converter.exe differ diff --git a/Golovko/Task_2/6_Converter/obj/Debug/6_Converter.pdb b/Golovko/Task_2/6_Converter/obj/Debug/6_Converter.pdb new file mode 100644 index 0000000..4dba337 Binary files /dev/null and b/Golovko/Task_2/6_Converter/obj/Debug/6_Converter.pdb differ diff --git a/Golovko/Task_2/6_Converter/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Golovko/Task_2/6_Converter/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..9cb1331 Binary files /dev/null and b/Golovko/Task_2/6_Converter/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Golovko/Task_2/6_Converter/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Golovko/Task_2/6_Converter/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_2/6_Converter/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Golovko/Task_2/6_Converter/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_2/6_Converter/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Golovko/Task_2/6_Converter/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_2/7_Employee/7_Employee.csproj b/Golovko/Task_2/7_Employee/7_Employee.csproj new file mode 100644 index 0000000..b8c9a16 --- /dev/null +++ b/Golovko/Task_2/7_Employee/7_Employee.csproj @@ -0,0 +1,64 @@ + + + + + Debug + AnyCPU + {DE54626E-044F-45D1-8895-63B81583D610} + Exe + Properties + _7_Employee + 7_Employee + v4.5.2 + 512 + 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/Golovko/Task_2/7_Employee/App.config b/Golovko/Task_2/7_Employee/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_2/7_Employee/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_2/7_Employee/Employee.cs b/Golovko/Task_2/7_Employee/Employee.cs new file mode 100644 index 0000000..059413f --- /dev/null +++ b/Golovko/Task_2/7_Employee/Employee.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _7_Employee +{ + class Employee + { + private readonly string name; + private readonly string surname; + public string Name { get { return name; } } + public string Surname { get { return surname; } } + public Position Position { get; set; } + public int Experience { get; set; } + public double Salary + { + get { return GetSalary(); } + } + public double TaxPaid + { + get { return GetTaxes(); } + } + public Employee(string name, string surname) + { + this.name = name; + this.surname = surname; + } + private double GetSalary() + { + return Position.Salary + Experience * Position.Surcharge; + } + private double GetTaxes() + { + return GetSalary() * Enterprise.Tax / 100; + } + } +} diff --git a/Golovko/Task_2/7_Employee/Enterprise.cs b/Golovko/Task_2/7_Employee/Enterprise.cs new file mode 100644 index 0000000..9d8da0c --- /dev/null +++ b/Golovko/Task_2/7_Employee/Enterprise.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _7_Employee +{ + class Enterprise + { + public string Title { get; private set; } + public List Employees { get; set; } + public static List Taxes { get; set; } + public static double Tax + { + get { return GetSumTax(); } + } + public Enterprise(string title) + { + this.Title = title; + Employees = new List(); + Taxes = new List(); + } + private static double GetSumTax() + { + return Taxes.Sum(tax => tax.TaxValue); + } + public void PrintEmployeesInfo() + { + foreach (Employee employee in Employees) + { + Console.WriteLine("Name: {0}\nSurname: {1}\nPosition: {2}\nSalary: {3}\nTax: {4}", + employee.Name, employee.Surname, employee.Position.Name, employee.Salary, employee.TaxPaid); + } + } + } +} diff --git a/Golovko/Task_2/7_Employee/Position.cs b/Golovko/Task_2/7_Employee/Position.cs new file mode 100644 index 0000000..e50eaaa --- /dev/null +++ b/Golovko/Task_2/7_Employee/Position.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _7_Employee +{ + class Position + { + public string Name { get; private set; } + public double Salary { get; private set; } + public double Surcharge { get; private set; } + public Position(string name, double salary, double surcharge) + { + this.Name = name; + this.Salary = salary; + this.Surcharge = surcharge; + } + } +} diff --git a/Golovko/Task_2/7_Employee/Program.cs b/Golovko/Task_2/7_Employee/Program.cs new file mode 100644 index 0000000..6e4711f --- /dev/null +++ b/Golovko/Task_2/7_Employee/Program.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _7_Employee +{ + class Program + { + static void Main(string[] args) + { + Enterprise enterprise = new Enterprise("ISD"); + Enterprise.Taxes.Add(new Tax("Social ensuarence", 5)); + Enterprise.Taxes.Add(new Tax("Provident found", 15)); + Enterprise.Taxes.Add(new Tax("Other paids", 10)); + Employee developer = new Employee("Jhon", "Jhames"); + Employee admin = new Employee("Macy", "Luis"); + Employee manager = new Employee("Kate", "Willis"); + developer.Position = new Position(".NET Developer", 2500, 200); + developer.Experience = 8; + admin.Position = new Position("DevOps", 2000, 150); + admin.Experience = 5; + manager.Position = new Position("Project manager", 2800, 220); + manager.Experience = 10; + enterprise.Employees.Add(developer); + enterprise.Employees.Add(admin); + enterprise.Employees.Add(manager); + enterprise.PrintEmployeesInfo(); + Console.ReadKey(); + } + } +} diff --git a/Golovko/Task_2/7_Employee/Properties/AssemblyInfo.cs b/Golovko/Task_2/7_Employee/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..f54f99c --- /dev/null +++ b/Golovko/Task_2/7_Employee/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Управление общими сведениями о сборке осуществляется с помощью +// набора атрибутов. Измените значения этих атрибутов, чтобы изменить сведения, +// связанные со сборкой. +[assembly: AssemblyTitle("7_Employee")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("7_Employee")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Параметр ComVisible со значением FALSE делает типы в сборке невидимыми +// для COM-компонентов. Если требуется обратиться к типу в этой сборке через +// COM, задайте атрибуту ComVisible значение TRUE для этого типа. +[assembly: ComVisible(false)] + +// Следующий GUID служит для идентификации библиотеки типов, если этот проект будет видимым для COM +[assembly: Guid("de54626e-044f-45d1-8895-63b81583d610")] + +// Сведения о версии сборки состоят из следующих четырех значений: +// +// Основной номер версии +// Дополнительный номер версии +// Номер сборки +// Редакция +// +// Можно задать все значения или принять номера сборки и редакции по умолчанию +// используя "*", как показано ниже: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Golovko/Task_2/7_Employee/Tax.cs b/Golovko/Task_2/7_Employee/Tax.cs new file mode 100644 index 0000000..0b3dbb3 --- /dev/null +++ b/Golovko/Task_2/7_Employee/Tax.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _7_Employee +{ + class Tax + { + public string Name { get; private set; } + public double TaxValue { get; private set; } + public Tax(string name, double taxValue) + { + this.Name = name; + this.TaxValue = taxValue; + } + } +} diff --git a/Golovko/Task_2/7_Employee/bin/Debug/7_Employee.exe b/Golovko/Task_2/7_Employee/bin/Debug/7_Employee.exe new file mode 100644 index 0000000..b3109b0 Binary files /dev/null and b/Golovko/Task_2/7_Employee/bin/Debug/7_Employee.exe differ diff --git a/Golovko/Task_2/7_Employee/bin/Debug/7_Employee.exe.config b/Golovko/Task_2/7_Employee/bin/Debug/7_Employee.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_2/7_Employee/bin/Debug/7_Employee.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_2/7_Employee/bin/Debug/7_Employee.pdb b/Golovko/Task_2/7_Employee/bin/Debug/7_Employee.pdb new file mode 100644 index 0000000..8a1088a Binary files /dev/null and b/Golovko/Task_2/7_Employee/bin/Debug/7_Employee.pdb differ diff --git a/Golovko/Task_2/7_Employee/bin/Debug/7_Employee.vshost.exe b/Golovko/Task_2/7_Employee/bin/Debug/7_Employee.vshost.exe new file mode 100644 index 0000000..681ab77 Binary files /dev/null and b/Golovko/Task_2/7_Employee/bin/Debug/7_Employee.vshost.exe differ diff --git a/Golovko/Task_2/7_Employee/bin/Debug/7_Employee.vshost.exe.config b/Golovko/Task_2/7_Employee/bin/Debug/7_Employee.vshost.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_2/7_Employee/bin/Debug/7_Employee.vshost.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_2/7_Employee/obj/Debug/7_Employee.csproj.FileListAbsolute.txt b/Golovko/Task_2/7_Employee/obj/Debug/7_Employee.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..fa985c2 --- /dev/null +++ b/Golovko/Task_2/7_Employee/obj/Debug/7_Employee.csproj.FileListAbsolute.txt @@ -0,0 +1,6 @@ +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_2\7_Employee\bin\Debug\7_Employee.exe.config +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_2\7_Employee\bin\Debug\7_Employee.exe +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_2\7_Employee\bin\Debug\7_Employee.pdb +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_2\7_Employee\obj\Debug\7_Employee.csprojResolveAssemblyReference.cache +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_2\7_Employee\obj\Debug\7_Employee.exe +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_2\7_Employee\obj\Debug\7_Employee.pdb diff --git a/Golovko/Task_2/7_Employee/obj/Debug/7_Employee.csprojResolveAssemblyReference.cache b/Golovko/Task_2/7_Employee/obj/Debug/7_Employee.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..8b357ed Binary files /dev/null and b/Golovko/Task_2/7_Employee/obj/Debug/7_Employee.csprojResolveAssemblyReference.cache differ diff --git a/Golovko/Task_2/7_Employee/obj/Debug/7_Employee.exe b/Golovko/Task_2/7_Employee/obj/Debug/7_Employee.exe new file mode 100644 index 0000000..b3109b0 Binary files /dev/null and b/Golovko/Task_2/7_Employee/obj/Debug/7_Employee.exe differ diff --git a/Golovko/Task_2/7_Employee/obj/Debug/7_Employee.pdb b/Golovko/Task_2/7_Employee/obj/Debug/7_Employee.pdb new file mode 100644 index 0000000..8a1088a Binary files /dev/null and b/Golovko/Task_2/7_Employee/obj/Debug/7_Employee.pdb differ diff --git a/Golovko/Task_2/7_Employee/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Golovko/Task_2/7_Employee/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..e50c468 Binary files /dev/null and b/Golovko/Task_2/7_Employee/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Golovko/Task_2/7_Employee/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Golovko/Task_2/7_Employee/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_2/7_Employee/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Golovko/Task_2/7_Employee/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_2/7_Employee/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Golovko/Task_2/7_Employee/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_2/8_Invoice/8_Invoice.csproj b/Golovko/Task_2/8_Invoice/8_Invoice.csproj new file mode 100644 index 0000000..58927de --- /dev/null +++ b/Golovko/Task_2/8_Invoice/8_Invoice.csproj @@ -0,0 +1,61 @@ + + + + + Debug + AnyCPU + {F85DDAA8-0445-4D1D-BB90-43B011F17346} + Exe + Properties + Invoice + Invoice + v4.5.2 + 512 + 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/Golovko/Task_2/8_Invoice/App.config b/Golovko/Task_2/8_Invoice/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_2/8_Invoice/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_2/8_Invoice/Invoice.cs b/Golovko/Task_2/8_Invoice/Invoice.cs new file mode 100644 index 0000000..514631b --- /dev/null +++ b/Golovko/Task_2/8_Invoice/Invoice.cs @@ -0,0 +1,50 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Invoice +{ + class Invoice + { + private const double nds = 18; + private readonly int account; + private readonly string customer; + private readonly string provider; + private string article; + private int quantity; + public string Article + { + set { article = value; } + } + public int Quantity + { + set { quantity = value; } + } + public double Price { get; set; } + public double CostWithNDS + { + get { return GetCostWithNds(); } + } + public double CostWithoutNDS + { + get { return GetCostWithoutNds(); } + } + public Invoice(int account, string customer, string provider) + { + this.account = account; + this.customer = customer; + this.provider = provider; + } + private double GetCostWithNds() + { + return quantity * Price; + } + private double GetCostWithoutNds() + { + return quantity * Price * (100 - nds) / 100; + } + + } +} diff --git a/Golovko/Task_2/8_Invoice/Program.cs b/Golovko/Task_2/8_Invoice/Program.cs new file mode 100644 index 0000000..f60c6c3 --- /dev/null +++ b/Golovko/Task_2/8_Invoice/Program.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Invoice +{ + class Program + { + static void Main(string[] args) + { + Invoice invoice = new Invoice(102115, "Golovko Greg", "CE ABC"); + invoice.Article = "Rope jumping"; + invoice.Price = 400; + invoice.Quantity = 3; + Console.WriteLine("Cost without NDS is {0} uah\nCost with NDS is {1} uah", invoice.CostWithoutNDS, invoice.CostWithNDS); + Console.ReadKey(); + } + } +} diff --git a/Golovko/Task_2/8_Invoice/Properties/AssemblyInfo.cs b/Golovko/Task_2/8_Invoice/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..a682b5f --- /dev/null +++ b/Golovko/Task_2/8_Invoice/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Управление общими сведениями о сборке осуществляется с помощью +// набора атрибутов. Измените значения этих атрибутов, чтобы изменить сведения, +// связанные со сборкой. +[assembly: AssemblyTitle("Invoice")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Invoice")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Параметр ComVisible со значением FALSE делает типы в сборке невидимыми +// для COM-компонентов. Если требуется обратиться к типу в этой сборке через +// COM, задайте атрибуту ComVisible значение TRUE для этого типа. +[assembly: ComVisible(false)] + +// Следующий GUID служит для идентификации библиотеки типов, если этот проект будет видимым для COM +[assembly: Guid("f85ddaa8-0445-4d1d-bb90-43b011f17346")] + +// Сведения о версии сборки состоят из следующих четырех значений: +// +// Основной номер версии +// Дополнительный номер версии +// Номер сборки +// Редакция +// +// Можно задать все значения или принять номера сборки и редакции по умолчанию +// используя "*", как показано ниже: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Golovko/Task_2/8_Invoice/bin/Debug/Invoice.exe b/Golovko/Task_2/8_Invoice/bin/Debug/Invoice.exe new file mode 100644 index 0000000..69e5871 Binary files /dev/null and b/Golovko/Task_2/8_Invoice/bin/Debug/Invoice.exe differ diff --git a/Golovko/Task_2/8_Invoice/bin/Debug/Invoice.exe.config b/Golovko/Task_2/8_Invoice/bin/Debug/Invoice.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_2/8_Invoice/bin/Debug/Invoice.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_2/8_Invoice/bin/Debug/Invoice.pdb b/Golovko/Task_2/8_Invoice/bin/Debug/Invoice.pdb new file mode 100644 index 0000000..baf517d Binary files /dev/null and b/Golovko/Task_2/8_Invoice/bin/Debug/Invoice.pdb differ diff --git a/Golovko/Task_2/8_Invoice/bin/Debug/Invoice.vshost.exe b/Golovko/Task_2/8_Invoice/bin/Debug/Invoice.vshost.exe new file mode 100644 index 0000000..681ab77 Binary files /dev/null and b/Golovko/Task_2/8_Invoice/bin/Debug/Invoice.vshost.exe differ diff --git a/Golovko/Task_2/8_Invoice/bin/Debug/Invoice.vshost.exe.config b/Golovko/Task_2/8_Invoice/bin/Debug/Invoice.vshost.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_2/8_Invoice/bin/Debug/Invoice.vshost.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_2/8_Invoice/bin/Debug/Invoice.vshost.exe.manifest b/Golovko/Task_2/8_Invoice/bin/Debug/Invoice.vshost.exe.manifest new file mode 100644 index 0000000..061c9ca --- /dev/null +++ b/Golovko/Task_2/8_Invoice/bin/Debug/Invoice.vshost.exe.manifest @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/Golovko/Task_2/8_Invoice/obj/Debug/8_Invoice.csproj.FileListAbsolute.txt b/Golovko/Task_2/8_Invoice/obj/Debug/8_Invoice.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..9b6aecd --- /dev/null +++ b/Golovko/Task_2/8_Invoice/obj/Debug/8_Invoice.csproj.FileListAbsolute.txt @@ -0,0 +1,6 @@ +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_2\Invoice\bin\Debug\Invoice.exe.config +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_2\Invoice\bin\Debug\Invoice.exe +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_2\Invoice\bin\Debug\Invoice.pdb +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_2\Invoice\obj\Debug\8_Invoice.csprojResolveAssemblyReference.cache +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_2\Invoice\obj\Debug\Invoice.exe +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_2\Invoice\obj\Debug\Invoice.pdb diff --git a/Golovko/Task_2/8_Invoice/obj/Debug/8_Invoice.csprojResolveAssemblyReference.cache b/Golovko/Task_2/8_Invoice/obj/Debug/8_Invoice.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..8b357ed Binary files /dev/null and b/Golovko/Task_2/8_Invoice/obj/Debug/8_Invoice.csprojResolveAssemblyReference.cache differ diff --git a/Golovko/Task_2/8_Invoice/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Golovko/Task_2/8_Invoice/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..b630273 Binary files /dev/null and b/Golovko/Task_2/8_Invoice/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Golovko/Task_2/8_Invoice/obj/Debug/Invoice.csproj.FileListAbsolute.txt b/Golovko/Task_2/8_Invoice/obj/Debug/Invoice.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..146bc5d --- /dev/null +++ b/Golovko/Task_2/8_Invoice/obj/Debug/Invoice.csproj.FileListAbsolute.txt @@ -0,0 +1 @@ +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_2\Invoice\bin\Debug\Invoice.exe.config diff --git a/Golovko/Task_2/8_Invoice/obj/Debug/Invoice.exe b/Golovko/Task_2/8_Invoice/obj/Debug/Invoice.exe new file mode 100644 index 0000000..69e5871 Binary files /dev/null and b/Golovko/Task_2/8_Invoice/obj/Debug/Invoice.exe differ diff --git a/Golovko/Task_2/8_Invoice/obj/Debug/Invoice.pdb b/Golovko/Task_2/8_Invoice/obj/Debug/Invoice.pdb new file mode 100644 index 0000000..baf517d Binary files /dev/null and b/Golovko/Task_2/8_Invoice/obj/Debug/Invoice.pdb differ diff --git a/Golovko/Task_2/8_Invoice/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Golovko/Task_2/8_Invoice/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_2/8_Invoice/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Golovko/Task_2/8_Invoice/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_2/8_Invoice/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Golovko/Task_2/8_Invoice/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_2/Task_2.sln b/Golovko/Task_2/Task_2.sln new file mode 100644 index 0000000..6e4dc37 --- /dev/null +++ b/Golovko/Task_2/Task_2.sln @@ -0,0 +1,64 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.25123.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "1_Address", "1_Address\1_Address.csproj", "{60CC464F-3B8E-4A0D-A080-0CC9ADFF12E8}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "2_Rectangle", "2_Rectangle\2_Rectangle.csproj", "{476DA397-6AB2-416D-B83C-C5DC41EBF321}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "3_Book", "3_Book\3_Book.csproj", "{64E9CAE0-D0A1-4225-B443-120B36E76A31}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "4_Figure", "4_Figure\4_Figure.csproj", "{9AEBDEA4-3B4E-46D7-81F9-00F94AEA47A0}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "5_User", "5_User\5_User.csproj", "{83FE914A-9E88-4EFB-B772-44035EFB2C98}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "6_Converter", "6_Converter\6_Converter.csproj", "{A52E9EDB-5942-4922-8B3D-764E74F8ECAB}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "7_Employee", "7_Employee\7_Employee.csproj", "{DE54626E-044F-45D1-8895-63B81583D610}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "8_Invoice", "Invoice\8_Invoice.csproj", "{F85DDAA8-0445-4D1D-BB90-43B011F17346}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {60CC464F-3B8E-4A0D-A080-0CC9ADFF12E8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {60CC464F-3B8E-4A0D-A080-0CC9ADFF12E8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {60CC464F-3B8E-4A0D-A080-0CC9ADFF12E8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {60CC464F-3B8E-4A0D-A080-0CC9ADFF12E8}.Release|Any CPU.Build.0 = Release|Any CPU + {476DA397-6AB2-416D-B83C-C5DC41EBF321}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {476DA397-6AB2-416D-B83C-C5DC41EBF321}.Debug|Any CPU.Build.0 = Debug|Any CPU + {476DA397-6AB2-416D-B83C-C5DC41EBF321}.Release|Any CPU.ActiveCfg = Release|Any CPU + {476DA397-6AB2-416D-B83C-C5DC41EBF321}.Release|Any CPU.Build.0 = Release|Any CPU + {64E9CAE0-D0A1-4225-B443-120B36E76A31}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {64E9CAE0-D0A1-4225-B443-120B36E76A31}.Debug|Any CPU.Build.0 = Debug|Any CPU + {64E9CAE0-D0A1-4225-B443-120B36E76A31}.Release|Any CPU.ActiveCfg = Release|Any CPU + {64E9CAE0-D0A1-4225-B443-120B36E76A31}.Release|Any CPU.Build.0 = Release|Any CPU + {9AEBDEA4-3B4E-46D7-81F9-00F94AEA47A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9AEBDEA4-3B4E-46D7-81F9-00F94AEA47A0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9AEBDEA4-3B4E-46D7-81F9-00F94AEA47A0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9AEBDEA4-3B4E-46D7-81F9-00F94AEA47A0}.Release|Any CPU.Build.0 = Release|Any CPU + {83FE914A-9E88-4EFB-B772-44035EFB2C98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {83FE914A-9E88-4EFB-B772-44035EFB2C98}.Debug|Any CPU.Build.0 = Debug|Any CPU + {83FE914A-9E88-4EFB-B772-44035EFB2C98}.Release|Any CPU.ActiveCfg = Release|Any CPU + {83FE914A-9E88-4EFB-B772-44035EFB2C98}.Release|Any CPU.Build.0 = Release|Any CPU + {A52E9EDB-5942-4922-8B3D-764E74F8ECAB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A52E9EDB-5942-4922-8B3D-764E74F8ECAB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A52E9EDB-5942-4922-8B3D-764E74F8ECAB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A52E9EDB-5942-4922-8B3D-764E74F8ECAB}.Release|Any CPU.Build.0 = Release|Any CPU + {DE54626E-044F-45D1-8895-63B81583D610}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DE54626E-044F-45D1-8895-63B81583D610}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DE54626E-044F-45D1-8895-63B81583D610}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DE54626E-044F-45D1-8895-63B81583D610}.Release|Any CPU.Build.0 = Release|Any CPU + {F85DDAA8-0445-4D1D-BB90-43B011F17346}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F85DDAA8-0445-4D1D-BB90-43B011F17346}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F85DDAA8-0445-4D1D-BB90-43B011F17346}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F85DDAA8-0445-4D1D-BB90-43B011F17346}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Golovko/Task_3/.vs/Task_3/v14/.suo b/Golovko/Task_3/.vs/Task_3/v14/.suo new file mode 100644 index 0000000..3188e0d Binary files /dev/null and b/Golovko/Task_3/.vs/Task_3/v14/.suo differ diff --git a/Golovko/Task_3/1_Printer/1_Printer.csproj b/Golovko/Task_3/1_Printer/1_Printer.csproj new file mode 100644 index 0000000..27f87b7 --- /dev/null +++ b/Golovko/Task_3/1_Printer/1_Printer.csproj @@ -0,0 +1,64 @@ + + + + + Debug + AnyCPU + {C5D2C685-C79B-45BB-AA71-637004887A80} + Exe + Properties + _1_Printer + 1_Printer + v4.5.2 + 512 + 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/Golovko/Task_3/1_Printer/App.config b/Golovko/Task_3/1_Printer/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_3/1_Printer/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_3/1_Printer/BlackWhitePrinter.cs b/Golovko/Task_3/1_Printer/BlackWhitePrinter.cs new file mode 100644 index 0000000..b1591e0 --- /dev/null +++ b/Golovko/Task_3/1_Printer/BlackWhitePrinter.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _1_Printer +{ + class BlackWhitePrinter : Printer + { + public override void Print(string value) + { + Console.BackgroundColor = ConsoleColor.White; + Console.ForegroundColor = ConsoleColor.Black; + base.Print(value); + Console.BackgroundColor = ConsoleColor.Black; + Console.ForegroundColor = ConsoleColor.Gray; + } + } +} diff --git a/Golovko/Task_3/1_Printer/ColourPrinter.cs b/Golovko/Task_3/1_Printer/ColourPrinter.cs new file mode 100644 index 0000000..823fbf6 --- /dev/null +++ b/Golovko/Task_3/1_Printer/ColourPrinter.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _1_Printer +{ + class ColourPrinter : Printer + { + public override void Print(string value) + { + Console.BackgroundColor = ConsoleColor.Yellow; + Console.ForegroundColor = ConsoleColor.Red; + base.Print(value); + Console.BackgroundColor = ConsoleColor.Black; + Console.ForegroundColor = ConsoleColor.Gray; + } + } +} diff --git a/Golovko/Task_3/1_Printer/IPrinter.cs b/Golovko/Task_3/1_Printer/IPrinter.cs new file mode 100644 index 0000000..cba3087 --- /dev/null +++ b/Golovko/Task_3/1_Printer/IPrinter.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _1_Printer +{ + interface IPrinter + { + void Print(string value); + } +} diff --git a/Golovko/Task_3/1_Printer/Printer.cs b/Golovko/Task_3/1_Printer/Printer.cs new file mode 100644 index 0000000..d32c03e --- /dev/null +++ b/Golovko/Task_3/1_Printer/Printer.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _1_Printer +{ + class Printer : IPrinter + { + public virtual void Print(string value) + { + Console.WriteLine(value); + } + } +} diff --git a/Golovko/Task_3/1_Printer/Program.cs b/Golovko/Task_3/1_Printer/Program.cs new file mode 100644 index 0000000..457a891 --- /dev/null +++ b/Golovko/Task_3/1_Printer/Program.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _1_Printer +{ + class Program + { + static void Main(string[] args) + { + IPrinter printer = new Printer(); + printer.Print("Default print"); + IPrinter colourPrinter = new ColourPrinter(); + colourPrinter.Print("Colour print"); + printer = colourPrinter; + printer.Print("Transfer the ref to Colour printer"); + IPrinter bwPrinter = new BlackWhitePrinter(); + bwPrinter.Print("Black and White print"); + printer = bwPrinter; + printer.Print("Transfer the ref to Black and White printer"); + Console.ReadKey(); + } + } +} diff --git a/Golovko/Task_3/1_Printer/Properties/AssemblyInfo.cs b/Golovko/Task_3/1_Printer/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..4abb2b6 --- /dev/null +++ b/Golovko/Task_3/1_Printer/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("1_Printer")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("1_Printer")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[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("c5d2c685-c79b-45bb-aa71-637004887a80")] + +// 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")] diff --git a/Golovko/Task_3/1_Printer/bin/Debug/1_Printer.exe b/Golovko/Task_3/1_Printer/bin/Debug/1_Printer.exe new file mode 100644 index 0000000..93e0d38 Binary files /dev/null and b/Golovko/Task_3/1_Printer/bin/Debug/1_Printer.exe differ diff --git a/Golovko/Task_3/1_Printer/bin/Debug/1_Printer.exe.config b/Golovko/Task_3/1_Printer/bin/Debug/1_Printer.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_3/1_Printer/bin/Debug/1_Printer.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_3/1_Printer/bin/Debug/1_Printer.pdb b/Golovko/Task_3/1_Printer/bin/Debug/1_Printer.pdb new file mode 100644 index 0000000..ebaa602 Binary files /dev/null and b/Golovko/Task_3/1_Printer/bin/Debug/1_Printer.pdb differ diff --git a/Golovko/Task_3/1_Printer/bin/Debug/1_Printer.vshost.exe b/Golovko/Task_3/1_Printer/bin/Debug/1_Printer.vshost.exe new file mode 100644 index 0000000..681ab77 Binary files /dev/null and b/Golovko/Task_3/1_Printer/bin/Debug/1_Printer.vshost.exe differ diff --git a/Golovko/Task_3/1_Printer/bin/Debug/1_Printer.vshost.exe.config b/Golovko/Task_3/1_Printer/bin/Debug/1_Printer.vshost.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_3/1_Printer/bin/Debug/1_Printer.vshost.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_3/1_Printer/bin/Debug/1_Printer.vshost.exe.manifest b/Golovko/Task_3/1_Printer/bin/Debug/1_Printer.vshost.exe.manifest new file mode 100644 index 0000000..061c9ca --- /dev/null +++ b/Golovko/Task_3/1_Printer/bin/Debug/1_Printer.vshost.exe.manifest @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/Golovko/Task_3/1_Printer/obj/Debug/1_Printer.csproj.FileListAbsolute.txt b/Golovko/Task_3/1_Printer/obj/Debug/1_Printer.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..848be85 --- /dev/null +++ b/Golovko/Task_3/1_Printer/obj/Debug/1_Printer.csproj.FileListAbsolute.txt @@ -0,0 +1,8 @@ +c:\users\головко\documents\visual studio 2015\Projects\Task_3\1_Printer\bin\Debug\1_Printer.exe.config +c:\users\головко\documents\visual studio 2015\Projects\Task_3\1_Printer\bin\Debug\1_Printer.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_3\1_Printer\bin\Debug\1_Printer.pdb +c:\users\головко\documents\visual studio 2015\Projects\Task_3\1_Printer\obj\Debug\1_Printer.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_3\1_Printer\obj\Debug\1_Printer.pdb +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_3\1_Printer\bin\Debug\1_Printer.exe.config +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_3\1_Printer\obj\Debug\1_Printer.exe +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_3\1_Printer\obj\Debug\1_Printer.pdb diff --git a/Golovko/Task_3/1_Printer/obj/Debug/1_Printer.exe b/Golovko/Task_3/1_Printer/obj/Debug/1_Printer.exe new file mode 100644 index 0000000..93e0d38 Binary files /dev/null and b/Golovko/Task_3/1_Printer/obj/Debug/1_Printer.exe differ diff --git a/Golovko/Task_3/1_Printer/obj/Debug/1_Printer.pdb b/Golovko/Task_3/1_Printer/obj/Debug/1_Printer.pdb new file mode 100644 index 0000000..ebaa602 Binary files /dev/null and b/Golovko/Task_3/1_Printer/obj/Debug/1_Printer.pdb differ diff --git a/Golovko/Task_3/1_Printer/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Golovko/Task_3/1_Printer/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..bf66a9c Binary files /dev/null and b/Golovko/Task_3/1_Printer/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Golovko/Task_3/1_Printer/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Golovko/Task_3/1_Printer/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_3/1_Printer/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Golovko/Task_3/1_Printer/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_3/1_Printer/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Golovko/Task_3/1_Printer/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_3/2_ClassRoom/2_ClassRoom.csproj b/Golovko/Task_3/2_ClassRoom/2_ClassRoom.csproj new file mode 100644 index 0000000..9c7ce9e --- /dev/null +++ b/Golovko/Task_3/2_ClassRoom/2_ClassRoom.csproj @@ -0,0 +1,66 @@ + + + + + Debug + AnyCPU + {392DA49A-B626-4E9B-AA2D-2BFCEE5851F9} + Exe + Properties + _2_ClassRoom + 2_ClassRoom + v4.5.2 + 512 + 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/Golovko/Task_3/2_ClassRoom/App.config b/Golovko/Task_3/2_ClassRoom/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_3/2_ClassRoom/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_3/2_ClassRoom/BadPupil.cs b/Golovko/Task_3/2_ClassRoom/BadPupil.cs new file mode 100644 index 0000000..dcd5867 --- /dev/null +++ b/Golovko/Task_3/2_ClassRoom/BadPupil.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_ClassRoom +{ + class BadPupil : Pupil + { + public BadPupil(string name) : base(name) { } + public override void Study() + { + Console.WriteLine("Pupil studies bad"); + } + public override void Read() + { + Console.WriteLine("Pupil doesn't read"); + } + public override void Write() + { + Console.WriteLine("Pupil doesn't write"); + } + public override void Relax() + { + Console.WriteLine("Pupil relax a lot"); + } + } +} diff --git a/Golovko/Task_3/2_ClassRoom/ClassRoom.cs b/Golovko/Task_3/2_ClassRoom/ClassRoom.cs new file mode 100644 index 0000000..b57864b --- /dev/null +++ b/Golovko/Task_3/2_ClassRoom/ClassRoom.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_ClassRoom +{ + class ClassRoom + { + private readonly Pupil[] pupils; + public ClassRoom(Pupil pupil) + { + pupils = new Pupil[4]; + pupils[0] = pupil; + } + public ClassRoom(Pupil pupilFirst, Pupil pupilSecond) : this(pupilFirst) + { + pupils[1] = pupilSecond; + } + public ClassRoom(Pupil pupilFirst, Pupil pupilSecond, Pupil pupilThird) : this(pupilFirst, pupilSecond) + { + pupils[2] = pupilThird; + } + public ClassRoom(Pupil pupilFirst, Pupil pupilSecond, Pupil pupilThird, Pupil pupilFourth) : this(pupilFirst, pupilSecond, pupilThird) + { + pupils[3] = pupilFourth; + } + public void PrintClassInfo() + { + for (int i = 0; i < pupils.Count(); i++) + { + if (pupils[i] == null) break; + Console.WriteLine("Pupil {0}:", pupils[i].Name); + pupils[i].Study(); + pupils[i].Read(); + pupils[i].Write(); + pupils[i].Relax(); + } + } + } +} diff --git a/Golovko/Task_3/2_ClassRoom/ExcelentPupil.cs b/Golovko/Task_3/2_ClassRoom/ExcelentPupil.cs new file mode 100644 index 0000000..7e59045 --- /dev/null +++ b/Golovko/Task_3/2_ClassRoom/ExcelentPupil.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_ClassRoom +{ + class ExcelentPupil : Pupil + { + public ExcelentPupil(string name) : base(name){} + public override void Study() + { + Console.WriteLine("Pupil studies hard"); + } + public override void Read() + { + Console.WriteLine("Pupil reads a lot"); + } + public override void Write() + { + Console.WriteLine("Pupil writes a lot"); + } + public override void Relax() + { + Console.WriteLine("Pupil doesn't relax"); + } + } +} diff --git a/Golovko/Task_3/2_ClassRoom/GoodPupil.cs b/Golovko/Task_3/2_ClassRoom/GoodPupil.cs new file mode 100644 index 0000000..67c85b3 --- /dev/null +++ b/Golovko/Task_3/2_ClassRoom/GoodPupil.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_ClassRoom +{ + class GoodPupil : Pupil + { + public GoodPupil(string name) : base(name){} + public override void Study() + { + Console.WriteLine("Pupil studies good"); + } + public override void Read() + { + Console.WriteLine("Pupil usually reads"); + } + public override void Write() + { + Console.WriteLine("Pupil usually writes"); + } + public override void Relax() + { + Console.WriteLine("Pupil sometimes relaxs"); + } + } +} diff --git a/Golovko/Task_3/2_ClassRoom/IPupil.cs b/Golovko/Task_3/2_ClassRoom/IPupil.cs new file mode 100644 index 0000000..e92ddfd --- /dev/null +++ b/Golovko/Task_3/2_ClassRoom/IPupil.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_ClassRoom +{ + interface IPupil + { + void Study(); + void Read(); + void Write(); + void Relax(); + } +} diff --git a/Golovko/Task_3/2_ClassRoom/Program.cs b/Golovko/Task_3/2_ClassRoom/Program.cs new file mode 100644 index 0000000..f9c7c25 --- /dev/null +++ b/Golovko/Task_3/2_ClassRoom/Program.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_ClassRoom +{ + class Program + { + static void Main(string[] args) + { + ClassRoom classRoom = new ClassRoom(new ExcelentPupil("Walter"), new BadPupil("Dean"), new GoodPupil("Dick"), new GoodPupil("Alex")); + classRoom.PrintClassInfo(); + Console.ReadKey(); + } + } +} diff --git a/Golovko/Task_3/2_ClassRoom/Properties/AssemblyInfo.cs b/Golovko/Task_3/2_ClassRoom/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..e97ad81 --- /dev/null +++ b/Golovko/Task_3/2_ClassRoom/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("2_ClassRoom")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("2_ClassRoom")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[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("392da49a-b626-4e9b-aa2d-2bfcee5851f9")] + +// 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")] diff --git a/Golovko/Task_3/2_ClassRoom/Pupil.cs b/Golovko/Task_3/2_ClassRoom/Pupil.cs new file mode 100644 index 0000000..8bd591b --- /dev/null +++ b/Golovko/Task_3/2_ClassRoom/Pupil.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_ClassRoom +{ + class Pupil : IPupil + { + public string Name { get; private set; } + public Pupil(string name) + { + this.Name = name; + } + public virtual void Study() + { + Console.WriteLine("Pupil studying"); + } + public virtual void Read() + { + Console.WriteLine("Pupil reading"); + } + public virtual void Write() + { + Console.WriteLine("Pupil writing"); + } + public virtual void Relax() + { + Console.WriteLine("Pupil relaxing"); + } + } +} diff --git a/Golovko/Task_3/2_ClassRoom/bin/Debug/2_ClassRoom.exe b/Golovko/Task_3/2_ClassRoom/bin/Debug/2_ClassRoom.exe new file mode 100644 index 0000000..1ba9951 Binary files /dev/null and b/Golovko/Task_3/2_ClassRoom/bin/Debug/2_ClassRoom.exe differ diff --git a/Golovko/Task_3/2_ClassRoom/bin/Debug/2_ClassRoom.exe.config b/Golovko/Task_3/2_ClassRoom/bin/Debug/2_ClassRoom.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_3/2_ClassRoom/bin/Debug/2_ClassRoom.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_3/2_ClassRoom/bin/Debug/2_ClassRoom.pdb b/Golovko/Task_3/2_ClassRoom/bin/Debug/2_ClassRoom.pdb new file mode 100644 index 0000000..706bd26 Binary files /dev/null and b/Golovko/Task_3/2_ClassRoom/bin/Debug/2_ClassRoom.pdb differ diff --git a/Golovko/Task_3/2_ClassRoom/bin/Debug/2_ClassRoom.vshost.exe b/Golovko/Task_3/2_ClassRoom/bin/Debug/2_ClassRoom.vshost.exe new file mode 100644 index 0000000..681ab77 Binary files /dev/null and b/Golovko/Task_3/2_ClassRoom/bin/Debug/2_ClassRoom.vshost.exe differ diff --git a/Golovko/Task_3/2_ClassRoom/bin/Debug/2_ClassRoom.vshost.exe.config b/Golovko/Task_3/2_ClassRoom/bin/Debug/2_ClassRoom.vshost.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_3/2_ClassRoom/bin/Debug/2_ClassRoom.vshost.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_3/2_ClassRoom/bin/Debug/2_ClassRoom.vshost.exe.manifest b/Golovko/Task_3/2_ClassRoom/bin/Debug/2_ClassRoom.vshost.exe.manifest new file mode 100644 index 0000000..061c9ca --- /dev/null +++ b/Golovko/Task_3/2_ClassRoom/bin/Debug/2_ClassRoom.vshost.exe.manifest @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/Golovko/Task_3/2_ClassRoom/obj/Debug/2_ClassRoom.csproj.FileListAbsolute.txt b/Golovko/Task_3/2_ClassRoom/obj/Debug/2_ClassRoom.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..1e6baee --- /dev/null +++ b/Golovko/Task_3/2_ClassRoom/obj/Debug/2_ClassRoom.csproj.FileListAbsolute.txt @@ -0,0 +1,9 @@ +c:\users\головко\documents\visual studio 2015\Projects\Task_3\2_ClassRoom\bin\Debug\2_ClassRoom.exe.config +c:\users\головко\documents\visual studio 2015\Projects\Task_3\2_ClassRoom\bin\Debug\2_ClassRoom.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_3\2_ClassRoom\bin\Debug\2_ClassRoom.pdb +c:\users\головко\documents\visual studio 2015\Projects\Task_3\2_ClassRoom\obj\Debug\2_ClassRoom.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_3\2_ClassRoom\obj\Debug\2_ClassRoom.pdb +c:\users\головко\documents\visual studio 2015\Projects\Task_3\2_ClassRoom\obj\Debug\2_ClassRoom.csprojResolveAssemblyReference.cache +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_3\2_ClassRoom\bin\Debug\2_ClassRoom.exe.config +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_3\2_ClassRoom\obj\Debug\2_ClassRoom.exe +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_3\2_ClassRoom\obj\Debug\2_ClassRoom.pdb diff --git a/Golovko/Task_3/2_ClassRoom/obj/Debug/2_ClassRoom.csprojResolveAssemblyReference.cache b/Golovko/Task_3/2_ClassRoom/obj/Debug/2_ClassRoom.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..1150a02 Binary files /dev/null and b/Golovko/Task_3/2_ClassRoom/obj/Debug/2_ClassRoom.csprojResolveAssemblyReference.cache differ diff --git a/Golovko/Task_3/2_ClassRoom/obj/Debug/2_ClassRoom.exe b/Golovko/Task_3/2_ClassRoom/obj/Debug/2_ClassRoom.exe new file mode 100644 index 0000000..1ba9951 Binary files /dev/null and b/Golovko/Task_3/2_ClassRoom/obj/Debug/2_ClassRoom.exe differ diff --git a/Golovko/Task_3/2_ClassRoom/obj/Debug/2_ClassRoom.pdb b/Golovko/Task_3/2_ClassRoom/obj/Debug/2_ClassRoom.pdb new file mode 100644 index 0000000..706bd26 Binary files /dev/null and b/Golovko/Task_3/2_ClassRoom/obj/Debug/2_ClassRoom.pdb differ diff --git a/Golovko/Task_3/2_ClassRoom/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Golovko/Task_3/2_ClassRoom/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..9c4a04d Binary files /dev/null and b/Golovko/Task_3/2_ClassRoom/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Golovko/Task_3/2_ClassRoom/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Golovko/Task_3/2_ClassRoom/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_3/2_ClassRoom/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Golovko/Task_3/2_ClassRoom/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_3/2_ClassRoom/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Golovko/Task_3/2_ClassRoom/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_3/3_Vehicle/3_Vehicle.csproj b/Golovko/Task_3/3_Vehicle/3_Vehicle.csproj new file mode 100644 index 0000000..580c3a5 --- /dev/null +++ b/Golovko/Task_3/3_Vehicle/3_Vehicle.csproj @@ -0,0 +1,68 @@ + + + + + Debug + AnyCPU + {3F8481BE-7FA4-473C-B8A3-FC6A8FA634B4} + Exe + Properties + _3_Vehicle + 3_Vehicle + v4.5.2 + 512 + 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/Golovko/Task_3/3_Vehicle/App.config b/Golovko/Task_3/3_Vehicle/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_3/3_Vehicle/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_3/3_Vehicle/Car.cs b/Golovko/Task_3/3_Vehicle/Car.cs new file mode 100644 index 0000000..6a3c122 --- /dev/null +++ b/Golovko/Task_3/3_Vehicle/Car.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _3_Vehicle +{ + class Car : Vehicle + { + public Car(double speed, int year, double price) : base(speed, year, price) { } + } +} diff --git a/Golovko/Task_3/3_Vehicle/IPassengersCounter.cs b/Golovko/Task_3/3_Vehicle/IPassengersCounter.cs new file mode 100644 index 0000000..595cce7 --- /dev/null +++ b/Golovko/Task_3/3_Vehicle/IPassengersCounter.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _3_Vehicle +{ + interface IPassengersCounter + { + int PassengersCount { get; set; } + } +} diff --git a/Golovko/Task_3/3_Vehicle/IPlane.cs b/Golovko/Task_3/3_Vehicle/IPlane.cs new file mode 100644 index 0000000..b710483 --- /dev/null +++ b/Golovko/Task_3/3_Vehicle/IPlane.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _3_Vehicle +{ + interface IPlane + { + double Height { get; set; } + } +} diff --git a/Golovko/Task_3/3_Vehicle/IShip.cs b/Golovko/Task_3/3_Vehicle/IShip.cs new file mode 100644 index 0000000..8e960b2 --- /dev/null +++ b/Golovko/Task_3/3_Vehicle/IShip.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _3_Vehicle +{ + interface IShip + { + string PortName { get; set; } + } +} diff --git a/Golovko/Task_3/3_Vehicle/Plane.cs b/Golovko/Task_3/3_Vehicle/Plane.cs new file mode 100644 index 0000000..7edc2a9 --- /dev/null +++ b/Golovko/Task_3/3_Vehicle/Plane.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _3_Vehicle +{ + class Plane : Vehicle, IPlane, IPassengersCounter + { + public double Height { get; set; } + public int PassengersCount { get; set; } + public Plane(double speed, int year, double price) : base(speed, year, price) { } + public override void PrintInfo() + { + base.PrintInfo(); + Console.WriteLine("Height is {0} km", Height); + Console.WriteLine("Passengers count is {0}", PassengersCount); + } + } +} diff --git a/Golovko/Task_3/3_Vehicle/Point.cs b/Golovko/Task_3/3_Vehicle/Point.cs new file mode 100644 index 0000000..0945f54 --- /dev/null +++ b/Golovko/Task_3/3_Vehicle/Point.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _3_Vehicle +{ + struct Point + { + public int X { get; private set; } + public int Y { get; private set; } + public Point(int x, int y) + { + this.X = x; + this.Y = y; + } + } +} diff --git a/Golovko/Task_3/3_Vehicle/Program.cs b/Golovko/Task_3/3_Vehicle/Program.cs new file mode 100644 index 0000000..7158686 --- /dev/null +++ b/Golovko/Task_3/3_Vehicle/Program.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _3_Vehicle +{ + class Program + { + static void Main(string[] args) + { + Car car = new Car(200, 2016, 50000); + car.Coordinates = new Point(12, 87); + car.PrintInfo(); + Plane plane = new Plane(800, 2013, 600000); + plane.Coordinates = new Point(102, 316); + plane.Height = 2000; + plane.PassengersCount = 120; + plane.PrintInfo(); + Ship ship = new Ship(220, 2010, 300000); + ship.Coordinates = new Point(44, 62); + ship.PortName = "Glasgow"; + ship.PassengersCount = 800; + ship.PrintInfo(); + Console.ReadKey(); + } + } +} diff --git a/Golovko/Task_3/3_Vehicle/Properties/AssemblyInfo.cs b/Golovko/Task_3/3_Vehicle/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..0d59562 --- /dev/null +++ b/Golovko/Task_3/3_Vehicle/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("3_Vehicle")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("3_Vehicle")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[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("3f8481be-7fa4-473c-b8a3-fc6a8fa634b4")] + +// 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")] diff --git a/Golovko/Task_3/3_Vehicle/Ship.cs b/Golovko/Task_3/3_Vehicle/Ship.cs new file mode 100644 index 0000000..7872232 --- /dev/null +++ b/Golovko/Task_3/3_Vehicle/Ship.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _3_Vehicle +{ + class Ship : Vehicle, IShip, IPassengersCounter + { + public string PortName { get; set; } + public int PassengersCount { get; set; } + public Ship(double speed, int year, double price) : base(speed, year, price) { } + public override void PrintInfo() + { + base.PrintInfo(); + Console.WriteLine("Port name: {0}", PortName); + Console.WriteLine("Passengers count is {0}", PassengersCount); + } + } +} diff --git a/Golovko/Task_3/3_Vehicle/Vehicle.cs b/Golovko/Task_3/3_Vehicle/Vehicle.cs new file mode 100644 index 0000000..6cabaa2 --- /dev/null +++ b/Golovko/Task_3/3_Vehicle/Vehicle.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _3_Vehicle +{ + abstract class Vehicle + { + private Point coordinates; + private readonly double speed; + private readonly int year; + private readonly double price; + public Point Coordinates + { + get { return coordinates; } + set { coordinates = value; } + } + public Vehicle(double speed, int year, double price) + { + this.speed = speed; + this.year = year; + this.price = price; + } + public virtual void PrintInfo() + { + Console.WriteLine("This is {0}", this.GetType().Name); + Console.WriteLine("Coordinates: ({0}, {1})", coordinates.X, coordinates.Y); + Console.WriteLine("Speed: {0} km/h", speed); + Console.WriteLine("Year: {0}", year); + Console.WriteLine("Price: {0}$", price); + } + } +} diff --git a/Golovko/Task_3/3_Vehicle/bin/Debug/3_Vehicle.exe b/Golovko/Task_3/3_Vehicle/bin/Debug/3_Vehicle.exe new file mode 100644 index 0000000..bce7c98 Binary files /dev/null and b/Golovko/Task_3/3_Vehicle/bin/Debug/3_Vehicle.exe differ diff --git a/Golovko/Task_3/3_Vehicle/bin/Debug/3_Vehicle.exe.config b/Golovko/Task_3/3_Vehicle/bin/Debug/3_Vehicle.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_3/3_Vehicle/bin/Debug/3_Vehicle.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_3/3_Vehicle/bin/Debug/3_Vehicle.pdb b/Golovko/Task_3/3_Vehicle/bin/Debug/3_Vehicle.pdb new file mode 100644 index 0000000..e8863be Binary files /dev/null and b/Golovko/Task_3/3_Vehicle/bin/Debug/3_Vehicle.pdb differ diff --git a/Golovko/Task_3/3_Vehicle/bin/Debug/3_Vehicle.vshost.exe b/Golovko/Task_3/3_Vehicle/bin/Debug/3_Vehicle.vshost.exe new file mode 100644 index 0000000..681ab77 Binary files /dev/null and b/Golovko/Task_3/3_Vehicle/bin/Debug/3_Vehicle.vshost.exe differ diff --git a/Golovko/Task_3/3_Vehicle/bin/Debug/3_Vehicle.vshost.exe.config b/Golovko/Task_3/3_Vehicle/bin/Debug/3_Vehicle.vshost.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_3/3_Vehicle/bin/Debug/3_Vehicle.vshost.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_3/3_Vehicle/bin/Debug/3_Vehicle.vshost.exe.manifest b/Golovko/Task_3/3_Vehicle/bin/Debug/3_Vehicle.vshost.exe.manifest new file mode 100644 index 0000000..061c9ca --- /dev/null +++ b/Golovko/Task_3/3_Vehicle/bin/Debug/3_Vehicle.vshost.exe.manifest @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/Golovko/Task_3/3_Vehicle/obj/Debug/3_Vehicle.csproj.FileListAbsolute.txt b/Golovko/Task_3/3_Vehicle/obj/Debug/3_Vehicle.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..3dc6628 --- /dev/null +++ b/Golovko/Task_3/3_Vehicle/obj/Debug/3_Vehicle.csproj.FileListAbsolute.txt @@ -0,0 +1,9 @@ +c:\users\головко\documents\visual studio 2015\Projects\Task_3\3_Vehicle\bin\Debug\3_Vehicle.exe.config +c:\users\головко\documents\visual studio 2015\Projects\Task_3\3_Vehicle\bin\Debug\3_Vehicle.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_3\3_Vehicle\bin\Debug\3_Vehicle.pdb +c:\users\головко\documents\visual studio 2015\Projects\Task_3\3_Vehicle\obj\Debug\3_Vehicle.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_3\3_Vehicle\obj\Debug\3_Vehicle.pdb +c:\users\головко\documents\visual studio 2015\Projects\Task_3\3_Vehicle\obj\Debug\3_Vehicle.csprojResolveAssemblyReference.cache +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_3\3_Vehicle\bin\Debug\3_Vehicle.exe.config +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_3\3_Vehicle\obj\Debug\3_Vehicle.exe +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_3\3_Vehicle\obj\Debug\3_Vehicle.pdb diff --git a/Golovko/Task_3/3_Vehicle/obj/Debug/3_Vehicle.csprojResolveAssemblyReference.cache b/Golovko/Task_3/3_Vehicle/obj/Debug/3_Vehicle.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..1150a02 Binary files /dev/null and b/Golovko/Task_3/3_Vehicle/obj/Debug/3_Vehicle.csprojResolveAssemblyReference.cache differ diff --git a/Golovko/Task_3/3_Vehicle/obj/Debug/3_Vehicle.exe b/Golovko/Task_3/3_Vehicle/obj/Debug/3_Vehicle.exe new file mode 100644 index 0000000..bce7c98 Binary files /dev/null and b/Golovko/Task_3/3_Vehicle/obj/Debug/3_Vehicle.exe differ diff --git a/Golovko/Task_3/3_Vehicle/obj/Debug/3_Vehicle.pdb b/Golovko/Task_3/3_Vehicle/obj/Debug/3_Vehicle.pdb new file mode 100644 index 0000000..e8863be Binary files /dev/null and b/Golovko/Task_3/3_Vehicle/obj/Debug/3_Vehicle.pdb differ diff --git a/Golovko/Task_3/3_Vehicle/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Golovko/Task_3/3_Vehicle/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..dfe662d Binary files /dev/null and b/Golovko/Task_3/3_Vehicle/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Golovko/Task_3/3_Vehicle/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Golovko/Task_3/3_Vehicle/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_3/3_Vehicle/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Golovko/Task_3/3_Vehicle/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_3/3_Vehicle/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Golovko/Task_3/3_Vehicle/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_3/4_DocumentWorker/4_DocumentWorker.csproj b/Golovko/Task_3/4_DocumentWorker/4_DocumentWorker.csproj new file mode 100644 index 0000000..66fbe3c --- /dev/null +++ b/Golovko/Task_3/4_DocumentWorker/4_DocumentWorker.csproj @@ -0,0 +1,65 @@ + + + + + Debug + AnyCPU + {89F0CFF6-A56B-44DA-B331-41A5ABD9BE3C} + Exe + Properties + _4_DocumentWorker + 4_DocumentWorker + v4.5.2 + 512 + 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/Golovko/Task_3/4_DocumentWorker/App.config b/Golovko/Task_3/4_DocumentWorker/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_3/4_DocumentWorker/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_3/4_DocumentWorker/DocumentWorker.cs b/Golovko/Task_3/4_DocumentWorker/DocumentWorker.cs new file mode 100644 index 0000000..29f1233 --- /dev/null +++ b/Golovko/Task_3/4_DocumentWorker/DocumentWorker.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _4_DocumentWorker +{ + class DocumentWorker : IDocumentWorker + { + public void OpenDocument() + { + Console.WriteLine("Document has opened"); + } + public virtual void EditDocument() + { + Console.WriteLine("The document edition acceessed in Pro version"); + } + public virtual void SaveDocument() + { + Console.WriteLine("The document saving accessed in Pro version"); + } + } +} diff --git a/Golovko/Task_3/4_DocumentWorker/ExpertDocumentWorker.cs b/Golovko/Task_3/4_DocumentWorker/ExpertDocumentWorker.cs new file mode 100644 index 0000000..03a636c --- /dev/null +++ b/Golovko/Task_3/4_DocumentWorker/ExpertDocumentWorker.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _4_DocumentWorker +{ + class ExpertDocumentWorker : ProDocumentWorker + { + public override void SaveDocument() + { + Console.WriteLine("The document has saved in the new format"); + } + } +} diff --git a/Golovko/Task_3/4_DocumentWorker/IDocumentWorker.cs b/Golovko/Task_3/4_DocumentWorker/IDocumentWorker.cs new file mode 100644 index 0000000..ee3dc72 --- /dev/null +++ b/Golovko/Task_3/4_DocumentWorker/IDocumentWorker.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _4_DocumentWorker +{ + interface IDocumentWorker + { + void OpenDocument(); + void EditDocument(); + void SaveDocument(); + } +} diff --git a/Golovko/Task_3/4_DocumentWorker/License.cs b/Golovko/Task_3/4_DocumentWorker/License.cs new file mode 100644 index 0000000..71eddd1 --- /dev/null +++ b/Golovko/Task_3/4_DocumentWorker/License.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _4_DocumentWorker +{ + class License + { + public static DocumentWorker GetLicense(string key) + { + DocumentWorker documentWorker; + switch (key) + { + case "pro": + documentWorker = new ProDocumentWorker(); + break; + case "exp": + documentWorker = new ExpertDocumentWorker(); + break; + default: + documentWorker = new DocumentWorker(); + break; + } + return documentWorker; + } + } +} diff --git a/Golovko/Task_3/4_DocumentWorker/ProDocumentWorker.cs b/Golovko/Task_3/4_DocumentWorker/ProDocumentWorker.cs new file mode 100644 index 0000000..a631c5c --- /dev/null +++ b/Golovko/Task_3/4_DocumentWorker/ProDocumentWorker.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _4_DocumentWorker +{ + class ProDocumentWorker : DocumentWorker + { + public override void EditDocument() + { + Console.WriteLine("The document has edited"); + } + public override void SaveDocument() + { + Console.WriteLine("The document has saved in old format, saving in another formats accessed in Expert version"); + } + } +} diff --git a/Golovko/Task_3/4_DocumentWorker/Program.cs b/Golovko/Task_3/4_DocumentWorker/Program.cs new file mode 100644 index 0000000..0e16b9d --- /dev/null +++ b/Golovko/Task_3/4_DocumentWorker/Program.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _4_DocumentWorker +{ + class Program + { + static void Main(string[] args) + { + Console.Write("Enter the product key, please: "); + IDocumentWorker documentWorker = License.GetLicense(Console.ReadLine()); + documentWorker.OpenDocument(); + documentWorker.EditDocument(); + documentWorker.SaveDocument(); + Console.ReadKey(); + } + } +} diff --git a/Golovko/Task_3/4_DocumentWorker/Properties/AssemblyInfo.cs b/Golovko/Task_3/4_DocumentWorker/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..bbeb1ec --- /dev/null +++ b/Golovko/Task_3/4_DocumentWorker/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("4_DocumentWorker")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("4_DocumentWorker")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[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("89f0cff6-a56b-44da-b331-41a5abd9be3c")] + +// 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")] diff --git a/Golovko/Task_3/4_DocumentWorker/bin/Debug/4_DocumentWorker.exe b/Golovko/Task_3/4_DocumentWorker/bin/Debug/4_DocumentWorker.exe new file mode 100644 index 0000000..a09bf16 Binary files /dev/null and b/Golovko/Task_3/4_DocumentWorker/bin/Debug/4_DocumentWorker.exe differ diff --git a/Golovko/Task_3/4_DocumentWorker/bin/Debug/4_DocumentWorker.exe.config b/Golovko/Task_3/4_DocumentWorker/bin/Debug/4_DocumentWorker.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_3/4_DocumentWorker/bin/Debug/4_DocumentWorker.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_3/4_DocumentWorker/bin/Debug/4_DocumentWorker.pdb b/Golovko/Task_3/4_DocumentWorker/bin/Debug/4_DocumentWorker.pdb new file mode 100644 index 0000000..925dbfe Binary files /dev/null and b/Golovko/Task_3/4_DocumentWorker/bin/Debug/4_DocumentWorker.pdb differ diff --git a/Golovko/Task_3/4_DocumentWorker/bin/Debug/4_DocumentWorker.vshost.exe b/Golovko/Task_3/4_DocumentWorker/bin/Debug/4_DocumentWorker.vshost.exe new file mode 100644 index 0000000..681ab77 Binary files /dev/null and b/Golovko/Task_3/4_DocumentWorker/bin/Debug/4_DocumentWorker.vshost.exe differ diff --git a/Golovko/Task_3/4_DocumentWorker/bin/Debug/4_DocumentWorker.vshost.exe.config b/Golovko/Task_3/4_DocumentWorker/bin/Debug/4_DocumentWorker.vshost.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_3/4_DocumentWorker/bin/Debug/4_DocumentWorker.vshost.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_3/4_DocumentWorker/obj/Debug/4_DocumentWorker.csproj.FileListAbsolute.txt b/Golovko/Task_3/4_DocumentWorker/obj/Debug/4_DocumentWorker.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..7146a42 --- /dev/null +++ b/Golovko/Task_3/4_DocumentWorker/obj/Debug/4_DocumentWorker.csproj.FileListAbsolute.txt @@ -0,0 +1,5 @@ +c:\users\головко\documents\visual studio 2015\Projects\Task_3\4_DocumentWorker\bin\Debug\4_DocumentWorker.exe.config +c:\users\головко\documents\visual studio 2015\Projects\Task_3\4_DocumentWorker\bin\Debug\4_DocumentWorker.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_3\4_DocumentWorker\bin\Debug\4_DocumentWorker.pdb +c:\users\головко\documents\visual studio 2015\Projects\Task_3\4_DocumentWorker\obj\Debug\4_DocumentWorker.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_3\4_DocumentWorker\obj\Debug\4_DocumentWorker.pdb diff --git a/Golovko/Task_3/4_DocumentWorker/obj/Debug/4_DocumentWorker.exe b/Golovko/Task_3/4_DocumentWorker/obj/Debug/4_DocumentWorker.exe new file mode 100644 index 0000000..a09bf16 Binary files /dev/null and b/Golovko/Task_3/4_DocumentWorker/obj/Debug/4_DocumentWorker.exe differ diff --git a/Golovko/Task_3/4_DocumentWorker/obj/Debug/4_DocumentWorker.pdb b/Golovko/Task_3/4_DocumentWorker/obj/Debug/4_DocumentWorker.pdb new file mode 100644 index 0000000..925dbfe Binary files /dev/null and b/Golovko/Task_3/4_DocumentWorker/obj/Debug/4_DocumentWorker.pdb differ diff --git a/Golovko/Task_3/4_DocumentWorker/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Golovko/Task_3/4_DocumentWorker/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..8139684 Binary files /dev/null and b/Golovko/Task_3/4_DocumentWorker/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Golovko/Task_3/4_DocumentWorker/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Golovko/Task_3/4_DocumentWorker/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_3/4_DocumentWorker/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Golovko/Task_3/4_DocumentWorker/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_3/4_DocumentWorker/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Golovko/Task_3/4_DocumentWorker/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_3/Task_3.sln b/Golovko/Task_3/Task_3.sln new file mode 100644 index 0000000..27016b1 --- /dev/null +++ b/Golovko/Task_3/Task_3.sln @@ -0,0 +1,40 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.23107.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "1_Printer", "1_Printer\1_Printer.csproj", "{C5D2C685-C79B-45BB-AA71-637004887A80}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "2_ClassRoom", "2_ClassRoom\2_ClassRoom.csproj", "{392DA49A-B626-4E9B-AA2D-2BFCEE5851F9}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "3_Vehicle", "3_Vehicle\3_Vehicle.csproj", "{3F8481BE-7FA4-473C-B8A3-FC6A8FA634B4}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "4_DocumentWorker", "4_DocumentWorker\4_DocumentWorker.csproj", "{89F0CFF6-A56B-44DA-B331-41A5ABD9BE3C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C5D2C685-C79B-45BB-AA71-637004887A80}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C5D2C685-C79B-45BB-AA71-637004887A80}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C5D2C685-C79B-45BB-AA71-637004887A80}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C5D2C685-C79B-45BB-AA71-637004887A80}.Release|Any CPU.Build.0 = Release|Any CPU + {392DA49A-B626-4E9B-AA2D-2BFCEE5851F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {392DA49A-B626-4E9B-AA2D-2BFCEE5851F9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {392DA49A-B626-4E9B-AA2D-2BFCEE5851F9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {392DA49A-B626-4E9B-AA2D-2BFCEE5851F9}.Release|Any CPU.Build.0 = Release|Any CPU + {3F8481BE-7FA4-473C-B8A3-FC6A8FA634B4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3F8481BE-7FA4-473C-B8A3-FC6A8FA634B4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3F8481BE-7FA4-473C-B8A3-FC6A8FA634B4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3F8481BE-7FA4-473C-B8A3-FC6A8FA634B4}.Release|Any CPU.Build.0 = Release|Any CPU + {89F0CFF6-A56B-44DA-B331-41A5ABD9BE3C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {89F0CFF6-A56B-44DA-B331-41A5ABD9BE3C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {89F0CFF6-A56B-44DA-B331-41A5ABD9BE3C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {89F0CFF6-A56B-44DA-B331-41A5ABD9BE3C}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Golovko/Task_4/.vs/Task_4/v14/.suo b/Golovko/Task_4/.vs/Task_4/v14/.suo new file mode 100644 index 0000000..306e641 Binary files /dev/null and b/Golovko/Task_4/.vs/Task_4/v14/.suo differ diff --git a/Golovko/Task_4/1_AbstractHandler/1_AbstractHandler.csproj b/Golovko/Task_4/1_AbstractHandler/1_AbstractHandler.csproj new file mode 100644 index 0000000..3326835 --- /dev/null +++ b/Golovko/Task_4/1_AbstractHandler/1_AbstractHandler.csproj @@ -0,0 +1,65 @@ + + + + + Debug + AnyCPU + {8FFC4A95-28CE-40CF-9EE2-0813D86AABF1} + Exe + Properties + _1_AbstractHandler + 1_AbstractHandler + v4.5.2 + 512 + 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/Golovko/Task_4/1_AbstractHandler/AbstractHandler.cs b/Golovko/Task_4/1_AbstractHandler/AbstractHandler.cs new file mode 100644 index 0000000..aa35529 --- /dev/null +++ b/Golovko/Task_4/1_AbstractHandler/AbstractHandler.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _1_AbstractHandler +{ + abstract class AbstractHandler + { + public abstract void Open(); + public abstract void Create(); + public abstract void Change(); + public abstract void Save(); + } +} diff --git a/Golovko/Task_4/1_AbstractHandler/App.config b/Golovko/Task_4/1_AbstractHandler/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_4/1_AbstractHandler/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_4/1_AbstractHandler/DOCHandler.cs b/Golovko/Task_4/1_AbstractHandler/DOCHandler.cs new file mode 100644 index 0000000..636fe00 --- /dev/null +++ b/Golovko/Task_4/1_AbstractHandler/DOCHandler.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _1_AbstractHandler +{ + class DOCHandler : AbstractHandler + { + public override void Open() + { + Console.WriteLine(".doc document has opened"); + } + public override void Create() + { + Console.WriteLine(".doc document has created"); + } + public override void Change() + { + Console.WriteLine(".doc document has changed"); + } + public override void Save() + { + Console.WriteLine(".doc document has saved"); + } + } +} diff --git a/Golovko/Task_4/1_AbstractHandler/DocumentFormat.cs b/Golovko/Task_4/1_AbstractHandler/DocumentFormat.cs new file mode 100644 index 0000000..8d82ba0 --- /dev/null +++ b/Golovko/Task_4/1_AbstractHandler/DocumentFormat.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _1_AbstractHandler +{ + class DocumentFormat + { + public static AbstractHandler GetHandler(string documentFormat) + { + AbstractHandler abstractHandler; + switch (documentFormat) + { + case ".xml": + abstractHandler = new XMLHandler(); + break; + case ".txt": + abstractHandler = new TXTHandler(); + break; + case ".doc": + abstractHandler = new DOCHandler(); + break; + default: + abstractHandler = null; + break; + } + return abstractHandler; + } + } +} diff --git a/Golovko/Task_4/1_AbstractHandler/Program.cs b/Golovko/Task_4/1_AbstractHandler/Program.cs new file mode 100644 index 0000000..524780c --- /dev/null +++ b/Golovko/Task_4/1_AbstractHandler/Program.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _1_AbstractHandler +{ + class Program + { + static void Main(string[] args) + { + Console.Write("Enter the document format, please (for example .txt): "); + AbstractHandler handler = DocumentFormat.GetHandler(Console.ReadLine()); + if (handler != null) + { + handler.Open(); + handler.Create(); + handler.Change(); + handler.Save(); + } + else + { + Console.WriteLine("Unknown document format"); + } + Console.ReadKey(); + } + } +} diff --git a/Golovko/Task_4/1_AbstractHandler/Properties/AssemblyInfo.cs b/Golovko/Task_4/1_AbstractHandler/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..a67a8df --- /dev/null +++ b/Golovko/Task_4/1_AbstractHandler/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("1_AbstractHandler")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("1_AbstractHandler")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[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("8ffc4a95-28ce-40cf-9ee2-0813d86aabf1")] + +// 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")] diff --git a/Golovko/Task_4/1_AbstractHandler/TXTHandler.cs b/Golovko/Task_4/1_AbstractHandler/TXTHandler.cs new file mode 100644 index 0000000..f5c9760 --- /dev/null +++ b/Golovko/Task_4/1_AbstractHandler/TXTHandler.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _1_AbstractHandler +{ + class TXTHandler : AbstractHandler + { + public override void Open() + { + Console.WriteLine(".txt document has opened"); + } + public override void Create() + { + Console.WriteLine(".txt document has created"); + } + public override void Change() + { + Console.WriteLine(".txt document has changed"); + } + public override void Save() + { + Console.WriteLine(".txt document has saved"); + } + } +} diff --git a/Golovko/Task_4/1_AbstractHandler/XMLHandler.cs b/Golovko/Task_4/1_AbstractHandler/XMLHandler.cs new file mode 100644 index 0000000..797abac --- /dev/null +++ b/Golovko/Task_4/1_AbstractHandler/XMLHandler.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _1_AbstractHandler +{ + class XMLHandler : AbstractHandler + { + public override void Open() + { + Console.WriteLine(".xml document has opened"); + } + public override void Create() + { + Console.WriteLine(".xml document has created"); + } + public override void Change() + { + Console.WriteLine(".xml document has changed"); + } + public override void Save() + { + Console.WriteLine(".xml document has saved"); + } + } +} diff --git a/Golovko/Task_4/1_AbstractHandler/bin/Debug/1_AbstractHandler.exe b/Golovko/Task_4/1_AbstractHandler/bin/Debug/1_AbstractHandler.exe new file mode 100644 index 0000000..dabafda Binary files /dev/null and b/Golovko/Task_4/1_AbstractHandler/bin/Debug/1_AbstractHandler.exe differ diff --git a/Golovko/Task_4/1_AbstractHandler/bin/Debug/1_AbstractHandler.exe.config b/Golovko/Task_4/1_AbstractHandler/bin/Debug/1_AbstractHandler.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_4/1_AbstractHandler/bin/Debug/1_AbstractHandler.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_4/1_AbstractHandler/bin/Debug/1_AbstractHandler.pdb b/Golovko/Task_4/1_AbstractHandler/bin/Debug/1_AbstractHandler.pdb new file mode 100644 index 0000000..3b851e5 Binary files /dev/null and b/Golovko/Task_4/1_AbstractHandler/bin/Debug/1_AbstractHandler.pdb differ diff --git a/Golovko/Task_4/1_AbstractHandler/bin/Debug/1_AbstractHandler.vshost.exe b/Golovko/Task_4/1_AbstractHandler/bin/Debug/1_AbstractHandler.vshost.exe new file mode 100644 index 0000000..681ab77 Binary files /dev/null and b/Golovko/Task_4/1_AbstractHandler/bin/Debug/1_AbstractHandler.vshost.exe differ diff --git a/Golovko/Task_4/1_AbstractHandler/bin/Debug/1_AbstractHandler.vshost.exe.config b/Golovko/Task_4/1_AbstractHandler/bin/Debug/1_AbstractHandler.vshost.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_4/1_AbstractHandler/bin/Debug/1_AbstractHandler.vshost.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_4/1_AbstractHandler/bin/Debug/1_AbstractHandler.vshost.exe.manifest b/Golovko/Task_4/1_AbstractHandler/bin/Debug/1_AbstractHandler.vshost.exe.manifest new file mode 100644 index 0000000..061c9ca --- /dev/null +++ b/Golovko/Task_4/1_AbstractHandler/bin/Debug/1_AbstractHandler.vshost.exe.manifest @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/Golovko/Task_4/1_AbstractHandler/obj/Debug/1_AbstractHandler.csproj.FileListAbsolute.txt b/Golovko/Task_4/1_AbstractHandler/obj/Debug/1_AbstractHandler.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..556c8a6 --- /dev/null +++ b/Golovko/Task_4/1_AbstractHandler/obj/Debug/1_AbstractHandler.csproj.FileListAbsolute.txt @@ -0,0 +1,8 @@ +c:\users\головко\documents\visual studio 2015\Projects\Task_4\1_AbstractHandler\bin\Debug\1_AbstractHandler.exe.config +c:\users\головко\documents\visual studio 2015\Projects\Task_4\1_AbstractHandler\bin\Debug\1_AbstractHandler.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_4\1_AbstractHandler\bin\Debug\1_AbstractHandler.pdb +c:\users\головко\documents\visual studio 2015\Projects\Task_4\1_AbstractHandler\obj\Debug\1_AbstractHandler.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_4\1_AbstractHandler\obj\Debug\1_AbstractHandler.pdb +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_4\1_AbstractHandler\bin\Debug\1_AbstractHandler.exe.config +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_4\1_AbstractHandler\obj\Debug\1_AbstractHandler.exe +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_4\1_AbstractHandler\obj\Debug\1_AbstractHandler.pdb diff --git a/Golovko/Task_4/1_AbstractHandler/obj/Debug/1_AbstractHandler.exe b/Golovko/Task_4/1_AbstractHandler/obj/Debug/1_AbstractHandler.exe new file mode 100644 index 0000000..dabafda Binary files /dev/null and b/Golovko/Task_4/1_AbstractHandler/obj/Debug/1_AbstractHandler.exe differ diff --git a/Golovko/Task_4/1_AbstractHandler/obj/Debug/1_AbstractHandler.pdb b/Golovko/Task_4/1_AbstractHandler/obj/Debug/1_AbstractHandler.pdb new file mode 100644 index 0000000..3b851e5 Binary files /dev/null and b/Golovko/Task_4/1_AbstractHandler/obj/Debug/1_AbstractHandler.pdb differ diff --git a/Golovko/Task_4/1_AbstractHandler/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Golovko/Task_4/1_AbstractHandler/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..8a9614a Binary files /dev/null and b/Golovko/Task_4/1_AbstractHandler/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Golovko/Task_4/1_AbstractHandler/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Golovko/Task_4/1_AbstractHandler/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_4/1_AbstractHandler/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Golovko/Task_4/1_AbstractHandler/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_4/1_AbstractHandler/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Golovko/Task_4/1_AbstractHandler/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_4/2_Player/2_Player.csproj b/Golovko/Task_4/2_Player/2_Player.csproj new file mode 100644 index 0000000..f1c8ac7 --- /dev/null +++ b/Golovko/Task_4/2_Player/2_Player.csproj @@ -0,0 +1,63 @@ + + + + + Debug + AnyCPU + {D05AA1AA-3AE6-4CF1-8334-FF46891CC3E1} + Exe + Properties + _2_Player + 2_Player + v4.5.2 + 512 + 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/Golovko/Task_4/2_Player/App.config b/Golovko/Task_4/2_Player/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_4/2_Player/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_4/2_Player/IPlayable.cs b/Golovko/Task_4/2_Player/IPlayable.cs new file mode 100644 index 0000000..df06e1e --- /dev/null +++ b/Golovko/Task_4/2_Player/IPlayable.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_Player +{ + interface IPlayable + { + void Play(); + void Pause(); + void Stop(); + } +} diff --git a/Golovko/Task_4/2_Player/IRecordable.cs b/Golovko/Task_4/2_Player/IRecordable.cs new file mode 100644 index 0000000..567c281 --- /dev/null +++ b/Golovko/Task_4/2_Player/IRecordable.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_Player +{ + interface IRecordable + { + void Record(); + void Pause(); + void Stop(); + } +} diff --git a/Golovko/Task_4/2_Player/Player.cs b/Golovko/Task_4/2_Player/Player.cs new file mode 100644 index 0000000..0880b84 --- /dev/null +++ b/Golovko/Task_4/2_Player/Player.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_Player +{ + class Player : IRecordable, IPlayable + { + public void Record() + { + Console.WriteLine("The record has began"); + } + void IRecordable.Stop() + { + Console.WriteLine("The record has stopped"); + } + void IRecordable.Pause() + { + Console.WriteLine("The record has paused"); + } + public void Play() + { + Console.WriteLine("The playing has began"); + } + void IPlayable.Pause() + { + Console.WriteLine("The playing has paused"); + } + void IPlayable.Stop() + { + Console.WriteLine("The playing has stopped"); + } + } +} diff --git a/Golovko/Task_4/2_Player/Program.cs b/Golovko/Task_4/2_Player/Program.cs new file mode 100644 index 0000000..aaecc62 --- /dev/null +++ b/Golovko/Task_4/2_Player/Program.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_Player +{ + class Program + { + static void Main(string[] args) + { + Player player = new Player(); + player.Play(); + (player as IPlayable).Pause(); + (player as IPlayable).Stop(); + player.Record(); + (player as IRecordable).Pause(); + (player as IRecordable).Stop(); + Console.ReadKey(); + } + } +} diff --git a/Golovko/Task_4/2_Player/Properties/AssemblyInfo.cs b/Golovko/Task_4/2_Player/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..1b48124 --- /dev/null +++ b/Golovko/Task_4/2_Player/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("2_Player")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("2_Player")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[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("d05aa1aa-3ae6-4cf1-8334-ff46891cc3e1")] + +// 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")] diff --git a/Golovko/Task_4/2_Player/bin/Debug/2_Player.exe b/Golovko/Task_4/2_Player/bin/Debug/2_Player.exe new file mode 100644 index 0000000..a64e17e Binary files /dev/null and b/Golovko/Task_4/2_Player/bin/Debug/2_Player.exe differ diff --git a/Golovko/Task_4/2_Player/bin/Debug/2_Player.exe.config b/Golovko/Task_4/2_Player/bin/Debug/2_Player.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_4/2_Player/bin/Debug/2_Player.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_4/2_Player/bin/Debug/2_Player.pdb b/Golovko/Task_4/2_Player/bin/Debug/2_Player.pdb new file mode 100644 index 0000000..810b751 Binary files /dev/null and b/Golovko/Task_4/2_Player/bin/Debug/2_Player.pdb differ diff --git a/Golovko/Task_4/2_Player/bin/Debug/2_Player.vshost.exe b/Golovko/Task_4/2_Player/bin/Debug/2_Player.vshost.exe new file mode 100644 index 0000000..681ab77 Binary files /dev/null and b/Golovko/Task_4/2_Player/bin/Debug/2_Player.vshost.exe differ diff --git a/Golovko/Task_4/2_Player/bin/Debug/2_Player.vshost.exe.config b/Golovko/Task_4/2_Player/bin/Debug/2_Player.vshost.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_4/2_Player/bin/Debug/2_Player.vshost.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_4/2_Player/bin/Debug/2_Player.vshost.exe.manifest b/Golovko/Task_4/2_Player/bin/Debug/2_Player.vshost.exe.manifest new file mode 100644 index 0000000..061c9ca --- /dev/null +++ b/Golovko/Task_4/2_Player/bin/Debug/2_Player.vshost.exe.manifest @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/Golovko/Task_4/2_Player/obj/Debug/2_Player.csproj.FileListAbsolute.txt b/Golovko/Task_4/2_Player/obj/Debug/2_Player.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..d55d68b --- /dev/null +++ b/Golovko/Task_4/2_Player/obj/Debug/2_Player.csproj.FileListAbsolute.txt @@ -0,0 +1,12 @@ +c:\users\головко\documents\visual studio 2015\Projects\Task_4\2_Player\bin\Debug\2_Player.exe.config +c:\users\головко\documents\visual studio 2015\Projects\Task_4\2_Player\bin\Debug\2_Player.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_4\2_Player\bin\Debug\2_Player.pdb +c:\users\головко\documents\visual studio 2015\Projects\Task_4\2_Player\obj\Debug\2_Player.csprojResolveAssemblyReference.cache +c:\users\головко\documents\visual studio 2015\Projects\Task_4\2_Player\obj\Debug\2_Player.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_4\2_Player\obj\Debug\2_Player.pdb +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_4\2_Player\bin\Debug\2_Player.exe.config +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_4\2_Player\obj\Debug\2_Player.exe +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_4\2_Player\obj\Debug\2_Player.pdb +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_4\2_Player\bin\Debug\2_Player.exe +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_4\2_Player\bin\Debug\2_Player.pdb +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_4\2_Player\obj\Debug\2_Player.csprojResolveAssemblyReference.cache diff --git a/Golovko/Task_4/2_Player/obj/Debug/2_Player.csprojResolveAssemblyReference.cache b/Golovko/Task_4/2_Player/obj/Debug/2_Player.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..8ca9aff Binary files /dev/null and b/Golovko/Task_4/2_Player/obj/Debug/2_Player.csprojResolveAssemblyReference.cache differ diff --git a/Golovko/Task_4/2_Player/obj/Debug/2_Player.exe b/Golovko/Task_4/2_Player/obj/Debug/2_Player.exe new file mode 100644 index 0000000..a64e17e Binary files /dev/null and b/Golovko/Task_4/2_Player/obj/Debug/2_Player.exe differ diff --git a/Golovko/Task_4/2_Player/obj/Debug/2_Player.pdb b/Golovko/Task_4/2_Player/obj/Debug/2_Player.pdb new file mode 100644 index 0000000..810b751 Binary files /dev/null and b/Golovko/Task_4/2_Player/obj/Debug/2_Player.pdb differ diff --git a/Golovko/Task_4/2_Player/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Golovko/Task_4/2_Player/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..26f89d6 Binary files /dev/null and b/Golovko/Task_4/2_Player/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Golovko/Task_4/2_Player/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Golovko/Task_4/2_Player/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_4/2_Player/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Golovko/Task_4/2_Player/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_4/2_Player/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Golovko/Task_4/2_Player/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_4/Task_4.sln b/Golovko/Task_4/Task_4.sln new file mode 100644 index 0000000..2bf3270 --- /dev/null +++ b/Golovko/Task_4/Task_4.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.23107.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "1_AbstractHandler", "1_AbstractHandler\1_AbstractHandler.csproj", "{8FFC4A95-28CE-40CF-9EE2-0813D86AABF1}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "2_Player", "2_Player\2_Player.csproj", "{D05AA1AA-3AE6-4CF1-8334-FF46891CC3E1}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {8FFC4A95-28CE-40CF-9EE2-0813D86AABF1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8FFC4A95-28CE-40CF-9EE2-0813D86AABF1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8FFC4A95-28CE-40CF-9EE2-0813D86AABF1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8FFC4A95-28CE-40CF-9EE2-0813D86AABF1}.Release|Any CPU.Build.0 = Release|Any CPU + {D05AA1AA-3AE6-4CF1-8334-FF46891CC3E1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D05AA1AA-3AE6-4CF1-8334-FF46891CC3E1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D05AA1AA-3AE6-4CF1-8334-FF46891CC3E1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D05AA1AA-3AE6-4CF1-8334-FF46891CC3E1}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Golovko/Task_5/.vs/Task_5/v14/.suo b/Golovko/Task_5/.vs/Task_5/v14/.suo new file mode 100644 index 0000000..8ed17ca Binary files /dev/null and b/Golovko/Task_5/.vs/Task_5/v14/.suo differ diff --git a/Golovko/Task_5/1_Calc/1_Calc.csproj b/Golovko/Task_5/1_Calc/1_Calc.csproj new file mode 100644 index 0000000..fb98053 --- /dev/null +++ b/Golovko/Task_5/1_Calc/1_Calc.csproj @@ -0,0 +1,61 @@ + + + + + Debug + AnyCPU + {9B24C324-B6DF-4F71-A4BC-CF202A098539} + Exe + Properties + _1_Calc + 1_Calc + v4.5.2 + 512 + 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/Golovko/Task_5/1_Calc/App.config b/Golovko/Task_5/1_Calc/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_5/1_Calc/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_5/1_Calc/Calc.cs b/Golovko/Task_5/1_Calc/Calc.cs new file mode 100644 index 0000000..0436be1 --- /dev/null +++ b/Golovko/Task_5/1_Calc/Calc.cs @@ -0,0 +1,100 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _1_Calc +{ + static class Calc + { + public static double Sum(double a, double b) + { + return a + b; + } + public static double Defference(double a, double b) + { + return a - b; + } + public static double Opposite(double a) + { + return -a; + } + public static double Composition(double a, double b) + { + return a * b; + } + /// + /// Quotient calclation + /// + /// devidend + /// devider + /// quotient + public static double Quotient(double a, double b) + { + double result; + try + { + if (b == 0) + { + throw new DivideByZeroException(); + } + result = a / b; + } + catch (DivideByZeroException e) + { + result = a > 0 ? double.PositiveInfinity : double.NegativeInfinity; + Console.WriteLine(e.Message); + + } + return result; + } + public static double Percent(double a) + { + return a / 100; + } + public static double Reciproc(double a) + { + return Quotient(1, a); + } + public static double Sqrt(double x) + { + return GeronSqrt(x, 1); + } + /// + /// Implemintation of Geron method for Sqrt function + /// + /// argument + /// hypothesis first argument (x0) + /// hypothetic value of Sqrt with some deviation + private static double GeronSqrt(double x, double a) + { + double xn; + if (x < 0) + { + return double.NaN; + } + if ((xn = (a + x / a) / 2) - a == 0) + { + return xn; + } + return GeronSqrt(x, xn); + } + public static double Pow(double a, int b) + { + if (b == 0) + { + return 1; + } + return a * Pow(a, --b); + } + public static double Pow2(double a) + { + return Pow(a, 2); + } + public static double Abs(double a) + { + return a > 0 ? a : -a; + } + } +} diff --git a/Golovko/Task_5/1_Calc/Program.cs b/Golovko/Task_5/1_Calc/Program.cs new file mode 100644 index 0000000..9c5fe31 --- /dev/null +++ b/Golovko/Task_5/1_Calc/Program.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _1_Calc +{ + class Program + { + static void Main(string[] args) + { + Console.WriteLine(Calc.Composition(10, 20)); + Console.WriteLine(Calc.Defference(25, 5)); + Console.WriteLine(Calc.Opposite(100)); + Console.WriteLine(Calc.Percent(15)); + Console.WriteLine(Calc.Quotient(50, 10)); + Console.WriteLine(Calc.Reciproc(10)); + Console.WriteLine(Calc.Sum(199, 1)); + Console.WriteLine(Calc.Sqrt(625)); + Console.WriteLine(Calc.Pow(2, 8)); + Console.WriteLine(Calc.Abs(-50)); + Console.ReadKey(); + } + } +} diff --git a/Golovko/Task_5/1_Calc/Properties/AssemblyInfo.cs b/Golovko/Task_5/1_Calc/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..76e385f --- /dev/null +++ b/Golovko/Task_5/1_Calc/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Управление общими сведениями о сборке осуществляется с помощью +// набора атрибутов. Измените значения этих атрибутов, чтобы изменить сведения, +// связанные со сборкой. +[assembly: AssemblyTitle("1_Calc")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("1_Calc")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Параметр ComVisible со значением FALSE делает типы в сборке невидимыми +// для COM-компонентов. Если требуется обратиться к типу в этой сборке через +// COM, задайте атрибуту ComVisible значение TRUE для этого типа. +[assembly: ComVisible(false)] + +// Следующий GUID служит для идентификации библиотеки типов, если этот проект будет видимым для COM +[assembly: Guid("9b24c324-b6df-4f71-a4bc-cf202a098539")] + +// Сведения о версии сборки состоят из следующих четырех значений: +// +// Основной номер версии +// Дополнительный номер версии +// Номер сборки +// Редакция +// +// Можно задать все значения или принять номера сборки и редакции по умолчанию +// используя "*", как показано ниже: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Golovko/Task_5/1_Calc/bin/Debug/1_Calc.exe b/Golovko/Task_5/1_Calc/bin/Debug/1_Calc.exe new file mode 100644 index 0000000..b06c0c6 Binary files /dev/null and b/Golovko/Task_5/1_Calc/bin/Debug/1_Calc.exe differ diff --git a/Golovko/Task_5/1_Calc/bin/Debug/1_Calc.exe.config b/Golovko/Task_5/1_Calc/bin/Debug/1_Calc.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_5/1_Calc/bin/Debug/1_Calc.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_5/1_Calc/bin/Debug/1_Calc.pdb b/Golovko/Task_5/1_Calc/bin/Debug/1_Calc.pdb new file mode 100644 index 0000000..1d8ec1c Binary files /dev/null and b/Golovko/Task_5/1_Calc/bin/Debug/1_Calc.pdb differ diff --git a/Golovko/Task_5/1_Calc/bin/Debug/1_Calc.vshost.exe b/Golovko/Task_5/1_Calc/bin/Debug/1_Calc.vshost.exe new file mode 100644 index 0000000..681ab77 Binary files /dev/null and b/Golovko/Task_5/1_Calc/bin/Debug/1_Calc.vshost.exe differ diff --git a/Golovko/Task_5/1_Calc/bin/Debug/1_Calc.vshost.exe.config b/Golovko/Task_5/1_Calc/bin/Debug/1_Calc.vshost.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_5/1_Calc/bin/Debug/1_Calc.vshost.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_5/1_Calc/bin/Debug/1_Calc.vshost.exe.manifest b/Golovko/Task_5/1_Calc/bin/Debug/1_Calc.vshost.exe.manifest new file mode 100644 index 0000000..061c9ca --- /dev/null +++ b/Golovko/Task_5/1_Calc/bin/Debug/1_Calc.vshost.exe.manifest @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/Golovko/Task_5/1_Calc/obj/Debug/1_Calc.csproj.FileListAbsolute.txt b/Golovko/Task_5/1_Calc/obj/Debug/1_Calc.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..56f9160 --- /dev/null +++ b/Golovko/Task_5/1_Calc/obj/Debug/1_Calc.csproj.FileListAbsolute.txt @@ -0,0 +1,10 @@ +c:\users\головко\documents\visual studio 2015\Projects\Task_5\1_Calc\bin\Debug\1_Calc.exe.config +c:\users\головко\documents\visual studio 2015\Projects\Task_5\1_Calc\bin\Debug\1_Calc.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_5\1_Calc\bin\Debug\1_Calc.pdb +c:\users\головко\documents\visual studio 2015\Projects\Task_5\1_Calc\obj\Debug\1_Calc.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_5\1_Calc\obj\Debug\1_Calc.pdb +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_5\1_Calc\bin\Debug\1_Calc.exe.config +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_5\1_Calc\obj\Debug\1_Calc.exe +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_5\1_Calc\obj\Debug\1_Calc.pdb +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_5\1_Calc\bin\Debug\1_Calc.exe +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_5\1_Calc\bin\Debug\1_Calc.pdb diff --git a/Golovko/Task_5/1_Calc/obj/Debug/1_Calc.exe b/Golovko/Task_5/1_Calc/obj/Debug/1_Calc.exe new file mode 100644 index 0000000..b06c0c6 Binary files /dev/null and b/Golovko/Task_5/1_Calc/obj/Debug/1_Calc.exe differ diff --git a/Golovko/Task_5/1_Calc/obj/Debug/1_Calc.pdb b/Golovko/Task_5/1_Calc/obj/Debug/1_Calc.pdb new file mode 100644 index 0000000..1d8ec1c Binary files /dev/null and b/Golovko/Task_5/1_Calc/obj/Debug/1_Calc.pdb differ diff --git a/Golovko/Task_5/1_Calc/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Golovko/Task_5/1_Calc/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..6800bd5 Binary files /dev/null and b/Golovko/Task_5/1_Calc/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Golovko/Task_5/1_Calc/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Golovko/Task_5/1_Calc/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_5/1_Calc/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Golovko/Task_5/1_Calc/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_5/1_Calc/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Golovko/Task_5/1_Calc/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_5/2_ArraySortASC/2_ArraySortASC.csproj b/Golovko/Task_5/2_ArraySortASC/2_ArraySortASC.csproj new file mode 100644 index 0000000..166590a --- /dev/null +++ b/Golovko/Task_5/2_ArraySortASC/2_ArraySortASC.csproj @@ -0,0 +1,61 @@ + + + + + Debug + AnyCPU + {51D1B4CF-CAA4-4D08-831B-9756D1259B03} + Exe + Properties + _2_ArraySortASC + 2_ArraySortASC + v4.5.2 + 512 + 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/Golovko/Task_5/2_ArraySortASC/App.config b/Golovko/Task_5/2_ArraySortASC/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_5/2_ArraySortASC/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_5/2_ArraySortASC/Array.cs b/Golovko/Task_5/2_ArraySortASC/Array.cs new file mode 100644 index 0000000..388d975 --- /dev/null +++ b/Golovko/Task_5/2_ArraySortASC/Array.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_ArraySortASC +{ + static class Array + { + public static int[] SortAsc(this int[] array) + { + int tmp; + for (int i = 0; i < array.Length - 1; i++) + { + for (int j = i + 1; j < array.Length; j++) + { + if (array[i] > array[j]) + { + tmp = array[i]; + array[i] = array[j]; + array[j] = tmp; + } + } + } + return array; + } + public static void Print(this int[] array) + { + for (int i = 0; i < array.Length; i++) + { + Console.WriteLine("array[{0}] = {1}", i, array[i]); + } + } + } +} diff --git a/Golovko/Task_5/2_ArraySortASC/Program.cs b/Golovko/Task_5/2_ArraySortASC/Program.cs new file mode 100644 index 0000000..562b1be --- /dev/null +++ b/Golovko/Task_5/2_ArraySortASC/Program.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_ArraySortASC +{ + class Program + { + static void Main(string[] args) + { + int[] array = { 1, 33, 4, 9, 10, 5, 8, 16 }; + array.SortAsc().Print(); + Console.ReadKey(); + } + } +} diff --git a/Golovko/Task_5/2_ArraySortASC/Properties/AssemblyInfo.cs b/Golovko/Task_5/2_ArraySortASC/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..01a9bdb --- /dev/null +++ b/Golovko/Task_5/2_ArraySortASC/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Управление общими сведениями о сборке осуществляется с помощью +// набора атрибутов. Измените значения этих атрибутов, чтобы изменить сведения, +// связанные со сборкой. +[assembly: AssemblyTitle("2_ArraySortASC")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("2_ArraySortASC")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Параметр ComVisible со значением FALSE делает типы в сборке невидимыми +// для COM-компонентов. Если требуется обратиться к типу в этой сборке через +// COM, задайте атрибуту ComVisible значение TRUE для этого типа. +[assembly: ComVisible(false)] + +// Следующий GUID служит для идентификации библиотеки типов, если этот проект будет видимым для COM +[assembly: Guid("51d1b4cf-caa4-4d08-831b-9756d1259b03")] + +// Сведения о версии сборки состоят из следующих четырех значений: +// +// Основной номер версии +// Дополнительный номер версии +// Номер сборки +// Редакция +// +// Можно задать все значения или принять номера сборки и редакции по умолчанию +// используя "*", как показано ниже: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Golovko/Task_5/2_ArraySortASC/bin/Debug/2_ArraySortASC.exe b/Golovko/Task_5/2_ArraySortASC/bin/Debug/2_ArraySortASC.exe new file mode 100644 index 0000000..700b1d9 Binary files /dev/null and b/Golovko/Task_5/2_ArraySortASC/bin/Debug/2_ArraySortASC.exe differ diff --git a/Golovko/Task_5/2_ArraySortASC/bin/Debug/2_ArraySortASC.exe.config b/Golovko/Task_5/2_ArraySortASC/bin/Debug/2_ArraySortASC.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_5/2_ArraySortASC/bin/Debug/2_ArraySortASC.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_5/2_ArraySortASC/bin/Debug/2_ArraySortASC.pdb b/Golovko/Task_5/2_ArraySortASC/bin/Debug/2_ArraySortASC.pdb new file mode 100644 index 0000000..afe3f25 Binary files /dev/null and b/Golovko/Task_5/2_ArraySortASC/bin/Debug/2_ArraySortASC.pdb differ diff --git a/Golovko/Task_5/2_ArraySortASC/bin/Debug/2_ArraySortASC.vshost.exe b/Golovko/Task_5/2_ArraySortASC/bin/Debug/2_ArraySortASC.vshost.exe new file mode 100644 index 0000000..681ab77 Binary files /dev/null and b/Golovko/Task_5/2_ArraySortASC/bin/Debug/2_ArraySortASC.vshost.exe differ diff --git a/Golovko/Task_5/2_ArraySortASC/bin/Debug/2_ArraySortASC.vshost.exe.config b/Golovko/Task_5/2_ArraySortASC/bin/Debug/2_ArraySortASC.vshost.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_5/2_ArraySortASC/bin/Debug/2_ArraySortASC.vshost.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_5/2_ArraySortASC/bin/Debug/2_ArraySortASC.vshost.exe.manifest b/Golovko/Task_5/2_ArraySortASC/bin/Debug/2_ArraySortASC.vshost.exe.manifest new file mode 100644 index 0000000..061c9ca --- /dev/null +++ b/Golovko/Task_5/2_ArraySortASC/bin/Debug/2_ArraySortASC.vshost.exe.manifest @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/Golovko/Task_5/2_ArraySortASC/obj/Debug/2_ArraySortASC.csproj.FileListAbsolute.txt b/Golovko/Task_5/2_ArraySortASC/obj/Debug/2_ArraySortASC.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..0e32928 --- /dev/null +++ b/Golovko/Task_5/2_ArraySortASC/obj/Debug/2_ArraySortASC.csproj.FileListAbsolute.txt @@ -0,0 +1,11 @@ +c:\users\головко\documents\visual studio 2015\Projects\Task_5\2_ArraySortASC\bin\Debug\2_ArraySortASC.exe.config +c:\users\головко\documents\visual studio 2015\Projects\Task_5\2_ArraySortASC\bin\Debug\2_ArraySortASC.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_5\2_ArraySortASC\bin\Debug\2_ArraySortASC.pdb +c:\users\головко\documents\visual studio 2015\Projects\Task_5\2_ArraySortASC\obj\Debug\2_ArraySortASC.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_5\2_ArraySortASC\obj\Debug\2_ArraySortASC.pdb +c:\users\головко\documents\visual studio 2015\Projects\Task_5\2_ArraySortASC\obj\Debug\2_ArraySortASC.csprojResolveAssemblyReference.cache +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_5\2_ArraySortASC\bin\Debug\2_ArraySortASC.exe.config +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_5\2_ArraySortASC\bin\Debug\2_ArraySortASC.exe +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_5\2_ArraySortASC\bin\Debug\2_ArraySortASC.pdb +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_5\2_ArraySortASC\obj\Debug\2_ArraySortASC.exe +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_5\2_ArraySortASC\obj\Debug\2_ArraySortASC.pdb diff --git a/Golovko/Task_5/2_ArraySortASC/obj/Debug/2_ArraySortASC.exe b/Golovko/Task_5/2_ArraySortASC/obj/Debug/2_ArraySortASC.exe new file mode 100644 index 0000000..700b1d9 Binary files /dev/null and b/Golovko/Task_5/2_ArraySortASC/obj/Debug/2_ArraySortASC.exe differ diff --git a/Golovko/Task_5/2_ArraySortASC/obj/Debug/2_ArraySortASC.pdb b/Golovko/Task_5/2_ArraySortASC/obj/Debug/2_ArraySortASC.pdb new file mode 100644 index 0000000..afe3f25 Binary files /dev/null and b/Golovko/Task_5/2_ArraySortASC/obj/Debug/2_ArraySortASC.pdb differ diff --git a/Golovko/Task_5/2_ArraySortASC/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Golovko/Task_5/2_ArraySortASC/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..ff6da2f Binary files /dev/null and b/Golovko/Task_5/2_ArraySortASC/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Golovko/Task_5/2_ArraySortASC/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Golovko/Task_5/2_ArraySortASC/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_5/2_ArraySortASC/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Golovko/Task_5/2_ArraySortASC/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_5/2_ArraySortASC/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Golovko/Task_5/2_ArraySortASC/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_5/3_ArraySortAscDesc/3_ArraySortAscDesc.csproj b/Golovko/Task_5/3_ArraySortAscDesc/3_ArraySortAscDesc.csproj new file mode 100644 index 0000000..abd1517 --- /dev/null +++ b/Golovko/Task_5/3_ArraySortAscDesc/3_ArraySortAscDesc.csproj @@ -0,0 +1,62 @@ + + + + + Debug + AnyCPU + {CE6941F8-5045-4F38-91FB-B9DBDB515E03} + Exe + Properties + _3_ArraySortAscDesc + 3_ArraySortAscDesc + v4.5.2 + 512 + 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/Golovko/Task_5/3_ArraySortAscDesc/App.config b/Golovko/Task_5/3_ArraySortAscDesc/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_5/3_ArraySortAscDesc/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_5/3_ArraySortAscDesc/Array.cs b/Golovko/Task_5/3_ArraySortAscDesc/Array.cs new file mode 100644 index 0000000..4aaeffc --- /dev/null +++ b/Golovko/Task_5/3_ArraySortAscDesc/Array.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _3_ArraySortAscDesc +{ + static class Array + { + public static int[] Sort(this int[] array, SortType type) + { + int tmp; + for (int i = 0; i < array.Length - 1; i++) + { + for (int j = i + 1; j < array.Length; j++) + { + if (array[i] > array[j] * (type == SortType.ASC ? 1 : -1)) + { + tmp = array[i]; + array[i] = array[j]; + array[j] = tmp; + } + } + } + return array; + } + public static void Print(this int[] array) + { + for (int i = 0; i < array.Length; i++) + { + Console.WriteLine("array[{0}] = {1}", i, array[i]); + } + } + } +} diff --git a/Golovko/Task_5/3_ArraySortAscDesc/Program.cs b/Golovko/Task_5/3_ArraySortAscDesc/Program.cs new file mode 100644 index 0000000..3de8aa7 --- /dev/null +++ b/Golovko/Task_5/3_ArraySortAscDesc/Program.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _3_ArraySortAscDesc +{ + class Program + { + static void Main(string[] args) + { + int[] array = { 1, 33, 4, 9, 10, 5, 8, 16 }; + array.Sort(SortType.ASC).Print(); + array.Sort(SortType.DESC).Print(); + Console.ReadKey(); + } + } +} diff --git a/Golovko/Task_5/3_ArraySortAscDesc/Properties/AssemblyInfo.cs b/Golovko/Task_5/3_ArraySortAscDesc/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..9b69d7d --- /dev/null +++ b/Golovko/Task_5/3_ArraySortAscDesc/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Управление общими сведениями о сборке осуществляется с помощью +// набора атрибутов. Измените значения этих атрибутов, чтобы изменить сведения, +// связанные со сборкой. +[assembly: AssemblyTitle("3_ArraySortAscDesc")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("3_ArraySortAscDesc")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Параметр ComVisible со значением FALSE делает типы в сборке невидимыми +// для COM-компонентов. Если требуется обратиться к типу в этой сборке через +// COM, задайте атрибуту ComVisible значение TRUE для этого типа. +[assembly: ComVisible(false)] + +// Следующий GUID служит для идентификации библиотеки типов, если этот проект будет видимым для COM +[assembly: Guid("ce6941f8-5045-4f38-91fb-b9dbdb515e03")] + +// Сведения о версии сборки состоят из следующих четырех значений: +// +// Основной номер версии +// Дополнительный номер версии +// Номер сборки +// Редакция +// +// Можно задать все значения или принять номера сборки и редакции по умолчанию +// используя "*", как показано ниже: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Golovko/Task_5/3_ArraySortAscDesc/SortType.cs b/Golovko/Task_5/3_ArraySortAscDesc/SortType.cs new file mode 100644 index 0000000..bb4f1d7 --- /dev/null +++ b/Golovko/Task_5/3_ArraySortAscDesc/SortType.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _3_ArraySortAscDesc +{ + enum SortType : byte + { + ASC, + DESC + } +} diff --git a/Golovko/Task_5/3_ArraySortAscDesc/bin/Debug/3_ArraySortAscDesc.exe b/Golovko/Task_5/3_ArraySortAscDesc/bin/Debug/3_ArraySortAscDesc.exe new file mode 100644 index 0000000..33f9f37 Binary files /dev/null and b/Golovko/Task_5/3_ArraySortAscDesc/bin/Debug/3_ArraySortAscDesc.exe differ diff --git a/Golovko/Task_5/3_ArraySortAscDesc/bin/Debug/3_ArraySortAscDesc.exe.config b/Golovko/Task_5/3_ArraySortAscDesc/bin/Debug/3_ArraySortAscDesc.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_5/3_ArraySortAscDesc/bin/Debug/3_ArraySortAscDesc.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_5/3_ArraySortAscDesc/bin/Debug/3_ArraySortAscDesc.pdb b/Golovko/Task_5/3_ArraySortAscDesc/bin/Debug/3_ArraySortAscDesc.pdb new file mode 100644 index 0000000..9147a8a Binary files /dev/null and b/Golovko/Task_5/3_ArraySortAscDesc/bin/Debug/3_ArraySortAscDesc.pdb differ diff --git a/Golovko/Task_5/3_ArraySortAscDesc/bin/Debug/3_ArraySortAscDesc.vshost.exe b/Golovko/Task_5/3_ArraySortAscDesc/bin/Debug/3_ArraySortAscDesc.vshost.exe new file mode 100644 index 0000000..681ab77 Binary files /dev/null and b/Golovko/Task_5/3_ArraySortAscDesc/bin/Debug/3_ArraySortAscDesc.vshost.exe differ diff --git a/Golovko/Task_5/3_ArraySortAscDesc/bin/Debug/3_ArraySortAscDesc.vshost.exe.config b/Golovko/Task_5/3_ArraySortAscDesc/bin/Debug/3_ArraySortAscDesc.vshost.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_5/3_ArraySortAscDesc/bin/Debug/3_ArraySortAscDesc.vshost.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_5/3_ArraySortAscDesc/bin/Debug/3_ArraySortAscDesc.vshost.exe.manifest b/Golovko/Task_5/3_ArraySortAscDesc/bin/Debug/3_ArraySortAscDesc.vshost.exe.manifest new file mode 100644 index 0000000..061c9ca --- /dev/null +++ b/Golovko/Task_5/3_ArraySortAscDesc/bin/Debug/3_ArraySortAscDesc.vshost.exe.manifest @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/Golovko/Task_5/3_ArraySortAscDesc/obj/Debug/3_ArraySortAscDesc.csproj.FileListAbsolute.txt b/Golovko/Task_5/3_ArraySortAscDesc/obj/Debug/3_ArraySortAscDesc.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..8c1d365 --- /dev/null +++ b/Golovko/Task_5/3_ArraySortAscDesc/obj/Debug/3_ArraySortAscDesc.csproj.FileListAbsolute.txt @@ -0,0 +1,11 @@ +c:\users\головко\documents\visual studio 2015\Projects\Task_5\3_ArraySortAscDesc\bin\Debug\3_ArraySortAscDesc.exe.config +c:\users\головко\documents\visual studio 2015\Projects\Task_5\3_ArraySortAscDesc\bin\Debug\3_ArraySortAscDesc.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_5\3_ArraySortAscDesc\bin\Debug\3_ArraySortAscDesc.pdb +c:\users\головко\documents\visual studio 2015\Projects\Task_5\3_ArraySortAscDesc\obj\Debug\3_ArraySortAscDesc.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_5\3_ArraySortAscDesc\obj\Debug\3_ArraySortAscDesc.pdb +c:\users\головко\documents\visual studio 2015\Projects\Task_5\3_ArraySortAscDesc\obj\Debug\3_ArraySortAscDesc.csprojResolveAssemblyReference.cache +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_5\3_ArraySortAscDesc\bin\Debug\3_ArraySortAscDesc.exe.config +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_5\3_ArraySortAscDesc\bin\Debug\3_ArraySortAscDesc.exe +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_5\3_ArraySortAscDesc\bin\Debug\3_ArraySortAscDesc.pdb +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_5\3_ArraySortAscDesc\obj\Debug\3_ArraySortAscDesc.exe +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_5\3_ArraySortAscDesc\obj\Debug\3_ArraySortAscDesc.pdb diff --git a/Golovko/Task_5/3_ArraySortAscDesc/obj/Debug/3_ArraySortAscDesc.exe b/Golovko/Task_5/3_ArraySortAscDesc/obj/Debug/3_ArraySortAscDesc.exe new file mode 100644 index 0000000..33f9f37 Binary files /dev/null and b/Golovko/Task_5/3_ArraySortAscDesc/obj/Debug/3_ArraySortAscDesc.exe differ diff --git a/Golovko/Task_5/3_ArraySortAscDesc/obj/Debug/3_ArraySortAscDesc.pdb b/Golovko/Task_5/3_ArraySortAscDesc/obj/Debug/3_ArraySortAscDesc.pdb new file mode 100644 index 0000000..9147a8a Binary files /dev/null and b/Golovko/Task_5/3_ArraySortAscDesc/obj/Debug/3_ArraySortAscDesc.pdb differ diff --git a/Golovko/Task_5/3_ArraySortAscDesc/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Golovko/Task_5/3_ArraySortAscDesc/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..451bef6 Binary files /dev/null and b/Golovko/Task_5/3_ArraySortAscDesc/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Golovko/Task_5/3_ArraySortAscDesc/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Golovko/Task_5/3_ArraySortAscDesc/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_5/3_ArraySortAscDesc/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Golovko/Task_5/3_ArraySortAscDesc/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_5/3_ArraySortAscDesc/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Golovko/Task_5/3_ArraySortAscDesc/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_5/4_StringExtension/4_StringExtension.csproj b/Golovko/Task_5/4_StringExtension/4_StringExtension.csproj new file mode 100644 index 0000000..a9d3a5d --- /dev/null +++ b/Golovko/Task_5/4_StringExtension/4_StringExtension.csproj @@ -0,0 +1,61 @@ + + + + + Debug + AnyCPU + {696E9804-AF2B-474F-BA41-C5F0083841CF} + Exe + Properties + _4_StringExtension + 4_StringExtension + v4.5.2 + 512 + 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/Golovko/Task_5/4_StringExtension/App.config b/Golovko/Task_5/4_StringExtension/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_5/4_StringExtension/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_5/4_StringExtension/Program.cs b/Golovko/Task_5/4_StringExtension/Program.cs new file mode 100644 index 0000000..49895e6 --- /dev/null +++ b/Golovko/Task_5/4_StringExtension/Program.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _4_StringExtension +{ + class Program + { + static void Main(string[] args) + { + string str ="Hello .NET"; + Console.WriteLine(str.Substring(startIndex: 6, countChars: 4)); + Console.WriteLine(str.IndexOf(stringValue: ".NET")); + Console.WriteLine(str.Replace(oldValue: "HELLO", replaceValue: "CLR")); + Console.ReadKey(); + + } + } +} diff --git a/Golovko/Task_5/4_StringExtension/Properties/AssemblyInfo.cs b/Golovko/Task_5/4_StringExtension/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..b232158 --- /dev/null +++ b/Golovko/Task_5/4_StringExtension/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Управление общими сведениями о сборке осуществляется с помощью +// набора атрибутов. Измените значения этих атрибутов, чтобы изменить сведения, +// связанные со сборкой. +[assembly: AssemblyTitle("4_StringExtension")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("4_StringExtension")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Параметр ComVisible со значением FALSE делает типы в сборке невидимыми +// для COM-компонентов. Если требуется обратиться к типу в этой сборке через +// COM, задайте атрибуту ComVisible значение TRUE для этого типа. +[assembly: ComVisible(false)] + +// Следующий GUID служит для идентификации библиотеки типов, если этот проект будет видимым для COM +[assembly: Guid("696e9804-af2b-474f-ba41-c5f0083841cf")] + +// Сведения о версии сборки состоят из следующих четырех значений: +// +// Основной номер версии +// Дополнительный номер версии +// Номер сборки +// Редакция +// +// Можно задать все значения или принять номера сборки и редакции по умолчанию +// используя "*", как показано ниже: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Golovko/Task_5/4_StringExtension/StringExtension.cs b/Golovko/Task_5/4_StringExtension/StringExtension.cs new file mode 100644 index 0000000..fb9430e --- /dev/null +++ b/Golovko/Task_5/4_StringExtension/StringExtension.cs @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _4_StringExtension +{ + static class StringExtension + { + public static string Substring(this string substring, int startIndex, int countChars) + { + string result = string.Empty; + if (startIndex < 0 || startIndex >= substring.Length) + { + Console.WriteLine("Invalid startIndex argument. Must be between 0 and length of the string"); + } + else + { + if (startIndex + countChars > substring.Length) + { + Console.WriteLine("Invalid countChars argument."); + } + else + { + for (int i = startIndex; i < startIndex + countChars; i++) + { + try + { + result += substring[i]; + } + catch (IndexOutOfRangeException e) + { + Console.WriteLine(e.Message); + result = string.Empty; + } + } + } + } + return result; + } + public static int IndexOf(this string substring, string stringValue) + { + int result = 0; + if (substring.Length < stringValue.Length) + { + Console.WriteLine("Substring length must be greater than string value"); + } + else + { + for (int i = 0; i < substring.Length; i++) + { + if (substring.Length - i < stringValue.Length) + { + break; + } + if (substring.Substring(startIndex: i, countChars: stringValue.Length).Equals(stringValue)) + { + result = i; + break; + } + } + } + return result; + } + public static string Replace(this string substring, string oldValue, string replaceValue) + { + int index = substring.IndexOf(stringValue: oldValue); + if (index < 0) return ""; + return + substring.Substring(startIndex: 0, countChars: index) + + replaceValue + + substring.Substring(startIndex: index + oldValue.Length, countChars: substring.Length - index - oldValue.Length); + } + } +} diff --git a/Golovko/Task_5/4_StringExtension/bin/Debug/4_StringExtension.exe b/Golovko/Task_5/4_StringExtension/bin/Debug/4_StringExtension.exe new file mode 100644 index 0000000..143104e Binary files /dev/null and b/Golovko/Task_5/4_StringExtension/bin/Debug/4_StringExtension.exe differ diff --git a/Golovko/Task_5/4_StringExtension/bin/Debug/4_StringExtension.exe.config b/Golovko/Task_5/4_StringExtension/bin/Debug/4_StringExtension.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_5/4_StringExtension/bin/Debug/4_StringExtension.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_5/4_StringExtension/bin/Debug/4_StringExtension.pdb b/Golovko/Task_5/4_StringExtension/bin/Debug/4_StringExtension.pdb new file mode 100644 index 0000000..1392278 Binary files /dev/null and b/Golovko/Task_5/4_StringExtension/bin/Debug/4_StringExtension.pdb differ diff --git a/Golovko/Task_5/4_StringExtension/bin/Debug/4_StringExtension.vshost.exe b/Golovko/Task_5/4_StringExtension/bin/Debug/4_StringExtension.vshost.exe new file mode 100644 index 0000000..681ab77 Binary files /dev/null and b/Golovko/Task_5/4_StringExtension/bin/Debug/4_StringExtension.vshost.exe differ diff --git a/Golovko/Task_5/4_StringExtension/bin/Debug/4_StringExtension.vshost.exe.config b/Golovko/Task_5/4_StringExtension/bin/Debug/4_StringExtension.vshost.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_5/4_StringExtension/bin/Debug/4_StringExtension.vshost.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_5/4_StringExtension/bin/Debug/4_StringExtension.vshost.exe.manifest b/Golovko/Task_5/4_StringExtension/bin/Debug/4_StringExtension.vshost.exe.manifest new file mode 100644 index 0000000..061c9ca --- /dev/null +++ b/Golovko/Task_5/4_StringExtension/bin/Debug/4_StringExtension.vshost.exe.manifest @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/Golovko/Task_5/4_StringExtension/obj/Debug/4_StringExtension.csproj.FileListAbsolute.txt b/Golovko/Task_5/4_StringExtension/obj/Debug/4_StringExtension.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..be4b1ee --- /dev/null +++ b/Golovko/Task_5/4_StringExtension/obj/Debug/4_StringExtension.csproj.FileListAbsolute.txt @@ -0,0 +1,11 @@ +c:\users\головко\documents\visual studio 2015\Projects\Task_5\4_StringExtension\bin\Debug\4_StringExtension.exe.config +c:\users\головко\documents\visual studio 2015\Projects\Task_5\4_StringExtension\bin\Debug\4_StringExtension.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_5\4_StringExtension\bin\Debug\4_StringExtension.pdb +c:\users\головко\documents\visual studio 2015\Projects\Task_5\4_StringExtension\obj\Debug\4_StringExtension.csprojResolveAssemblyReference.cache +c:\users\головко\documents\visual studio 2015\Projects\Task_5\4_StringExtension\obj\Debug\4_StringExtension.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_5\4_StringExtension\obj\Debug\4_StringExtension.pdb +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_5\4_StringExtension\bin\Debug\4_StringExtension.exe.config +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_5\4_StringExtension\bin\Debug\4_StringExtension.exe +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_5\4_StringExtension\bin\Debug\4_StringExtension.pdb +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_5\4_StringExtension\obj\Debug\4_StringExtension.exe +C:\Users\Головко\CSharpCourse-2016\Golovko\Task_5\4_StringExtension\obj\Debug\4_StringExtension.pdb diff --git a/Golovko/Task_5/4_StringExtension/obj/Debug/4_StringExtension.exe b/Golovko/Task_5/4_StringExtension/obj/Debug/4_StringExtension.exe new file mode 100644 index 0000000..143104e Binary files /dev/null and b/Golovko/Task_5/4_StringExtension/obj/Debug/4_StringExtension.exe differ diff --git a/Golovko/Task_5/4_StringExtension/obj/Debug/4_StringExtension.pdb b/Golovko/Task_5/4_StringExtension/obj/Debug/4_StringExtension.pdb new file mode 100644 index 0000000..1392278 Binary files /dev/null and b/Golovko/Task_5/4_StringExtension/obj/Debug/4_StringExtension.pdb differ diff --git a/Golovko/Task_5/4_StringExtension/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Golovko/Task_5/4_StringExtension/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..25c26eb Binary files /dev/null and b/Golovko/Task_5/4_StringExtension/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Golovko/Task_5/4_StringExtension/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Golovko/Task_5/4_StringExtension/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_5/4_StringExtension/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Golovko/Task_5/4_StringExtension/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_5/4_StringExtension/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Golovko/Task_5/4_StringExtension/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_5/Task_5.sln b/Golovko/Task_5/Task_5.sln new file mode 100644 index 0000000..4ec6dc6 --- /dev/null +++ b/Golovko/Task_5/Task_5.sln @@ -0,0 +1,40 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.25123.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "1_Calc", "1_Calc\1_Calc.csproj", "{9B24C324-B6DF-4F71-A4BC-CF202A098539}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "2_ArraySortASC", "2_ArraySortASC\2_ArraySortASC.csproj", "{51D1B4CF-CAA4-4D08-831B-9756D1259B03}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "3_ArraySortAscDesc", "3_ArraySortAscDesc\3_ArraySortAscDesc.csproj", "{CE6941F8-5045-4F38-91FB-B9DBDB515E03}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "4_StringExtension", "4_StringExtension\4_StringExtension.csproj", "{696E9804-AF2B-474F-BA41-C5F0083841CF}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9B24C324-B6DF-4F71-A4BC-CF202A098539}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9B24C324-B6DF-4F71-A4BC-CF202A098539}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9B24C324-B6DF-4F71-A4BC-CF202A098539}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9B24C324-B6DF-4F71-A4BC-CF202A098539}.Release|Any CPU.Build.0 = Release|Any CPU + {51D1B4CF-CAA4-4D08-831B-9756D1259B03}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {51D1B4CF-CAA4-4D08-831B-9756D1259B03}.Debug|Any CPU.Build.0 = Debug|Any CPU + {51D1B4CF-CAA4-4D08-831B-9756D1259B03}.Release|Any CPU.ActiveCfg = Release|Any CPU + {51D1B4CF-CAA4-4D08-831B-9756D1259B03}.Release|Any CPU.Build.0 = Release|Any CPU + {CE6941F8-5045-4F38-91FB-B9DBDB515E03}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CE6941F8-5045-4F38-91FB-B9DBDB515E03}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CE6941F8-5045-4F38-91FB-B9DBDB515E03}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CE6941F8-5045-4F38-91FB-B9DBDB515E03}.Release|Any CPU.Build.0 = Release|Any CPU + {696E9804-AF2B-474F-BA41-C5F0083841CF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {696E9804-AF2B-474F-BA41-C5F0083841CF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {696E9804-AF2B-474F-BA41-C5F0083841CF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {696E9804-AF2B-474F-BA41-C5F0083841CF}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Golovko/Task_6/.vs/Task_6/v14/.suo b/Golovko/Task_6/.vs/Task_6/v14/.suo new file mode 100644 index 0000000..9cec997 Binary files /dev/null and b/Golovko/Task_6/.vs/Task_6/v14/.suo differ diff --git a/Golovko/Task_6/1_Notebook/1_Notebook.csproj b/Golovko/Task_6/1_Notebook/1_Notebook.csproj new file mode 100644 index 0000000..8c72f1c --- /dev/null +++ b/Golovko/Task_6/1_Notebook/1_Notebook.csproj @@ -0,0 +1,61 @@ + + + + + Debug + AnyCPU + {77817169-3ABE-4337-BAEC-A42F9658A2D2} + Exe + Properties + _1_Notebook + 1_Notebook + v4.5.2 + 512 + 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/Golovko/Task_6/1_Notebook/App.config b/Golovko/Task_6/1_Notebook/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_6/1_Notebook/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_6/1_Notebook/Notebook.cs b/Golovko/Task_6/1_Notebook/Notebook.cs new file mode 100644 index 0000000..8ea110b --- /dev/null +++ b/Golovko/Task_6/1_Notebook/Notebook.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _1_Notebook +{ + struct Notebook + { + private readonly string model; + private readonly string factory; + private readonly double price; + public Notebook(string model, string factory, double price) + { + this.model = model; + this.factory = factory; + this.price = price; + } + public void PrintInfo() + { + Console.WriteLine("Model: {0}", model); + Console.WriteLine("Factory: {0}", factory); + Console.WriteLine("Price: {0}$", price); + } + } +} diff --git a/Golovko/Task_6/1_Notebook/Program.cs b/Golovko/Task_6/1_Notebook/Program.cs new file mode 100644 index 0000000..0e944d5 --- /dev/null +++ b/Golovko/Task_6/1_Notebook/Program.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _1_Notebook +{ + class Program + { + static void Main(string[] args) + { + Notebook notebook = new Notebook("G55", "ASUS", 2000); + notebook.PrintInfo(); + Console.ReadKey(); + } + } +} diff --git a/Golovko/Task_6/1_Notebook/Properties/AssemblyInfo.cs b/Golovko/Task_6/1_Notebook/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..9300667 --- /dev/null +++ b/Golovko/Task_6/1_Notebook/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("1_Notebook")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("1_Notebook")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[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("77817169-3abe-4337-baec-a42f9658a2d2")] + +// 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")] diff --git a/Golovko/Task_6/1_Notebook/bin/Debug/1_Notebook.exe b/Golovko/Task_6/1_Notebook/bin/Debug/1_Notebook.exe new file mode 100644 index 0000000..b5d483d Binary files /dev/null and b/Golovko/Task_6/1_Notebook/bin/Debug/1_Notebook.exe differ diff --git a/Golovko/Task_6/1_Notebook/bin/Debug/1_Notebook.exe.config b/Golovko/Task_6/1_Notebook/bin/Debug/1_Notebook.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_6/1_Notebook/bin/Debug/1_Notebook.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_6/1_Notebook/bin/Debug/1_Notebook.pdb b/Golovko/Task_6/1_Notebook/bin/Debug/1_Notebook.pdb new file mode 100644 index 0000000..4571282 Binary files /dev/null and b/Golovko/Task_6/1_Notebook/bin/Debug/1_Notebook.pdb differ diff --git a/Golovko/Task_6/1_Notebook/bin/Debug/1_Notebook.vshost.exe b/Golovko/Task_6/1_Notebook/bin/Debug/1_Notebook.vshost.exe new file mode 100644 index 0000000..681ab77 Binary files /dev/null and b/Golovko/Task_6/1_Notebook/bin/Debug/1_Notebook.vshost.exe differ diff --git a/Golovko/Task_6/1_Notebook/bin/Debug/1_Notebook.vshost.exe.config b/Golovko/Task_6/1_Notebook/bin/Debug/1_Notebook.vshost.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_6/1_Notebook/bin/Debug/1_Notebook.vshost.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_6/1_Notebook/bin/Debug/1_Notebook.vshost.exe.manifest b/Golovko/Task_6/1_Notebook/bin/Debug/1_Notebook.vshost.exe.manifest new file mode 100644 index 0000000..061c9ca --- /dev/null +++ b/Golovko/Task_6/1_Notebook/bin/Debug/1_Notebook.vshost.exe.manifest @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/Golovko/Task_6/1_Notebook/obj/Debug/1_Notebook.csproj.FileListAbsolute.txt b/Golovko/Task_6/1_Notebook/obj/Debug/1_Notebook.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..bff7886 --- /dev/null +++ b/Golovko/Task_6/1_Notebook/obj/Debug/1_Notebook.csproj.FileListAbsolute.txt @@ -0,0 +1,6 @@ +c:\users\головко\documents\visual studio 2015\Projects\Task_6\1_Notebook\bin\Debug\1_Notebook.exe.config +c:\users\головко\documents\visual studio 2015\Projects\Task_6\1_Notebook\bin\Debug\1_Notebook.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_6\1_Notebook\bin\Debug\1_Notebook.pdb +c:\users\головко\documents\visual studio 2015\Projects\Task_6\1_Notebook\obj\Debug\1_Notebook.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_6\1_Notebook\obj\Debug\1_Notebook.pdb +c:\users\головко\documents\visual studio 2015\Projects\Task_6\1_Notebook\obj\Debug\1_Notebook.csprojResolveAssemblyReference.cache diff --git a/Golovko/Task_6/1_Notebook/obj/Debug/1_Notebook.csprojResolveAssemblyReference.cache b/Golovko/Task_6/1_Notebook/obj/Debug/1_Notebook.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..1150a02 Binary files /dev/null and b/Golovko/Task_6/1_Notebook/obj/Debug/1_Notebook.csprojResolveAssemblyReference.cache differ diff --git a/Golovko/Task_6/1_Notebook/obj/Debug/1_Notebook.exe b/Golovko/Task_6/1_Notebook/obj/Debug/1_Notebook.exe new file mode 100644 index 0000000..b5d483d Binary files /dev/null and b/Golovko/Task_6/1_Notebook/obj/Debug/1_Notebook.exe differ diff --git a/Golovko/Task_6/1_Notebook/obj/Debug/1_Notebook.pdb b/Golovko/Task_6/1_Notebook/obj/Debug/1_Notebook.pdb new file mode 100644 index 0000000..4571282 Binary files /dev/null and b/Golovko/Task_6/1_Notebook/obj/Debug/1_Notebook.pdb differ diff --git a/Golovko/Task_6/1_Notebook/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Golovko/Task_6/1_Notebook/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..8350a6b Binary files /dev/null and b/Golovko/Task_6/1_Notebook/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Golovko/Task_6/1_Notebook/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Golovko/Task_6/1_Notebook/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_6/1_Notebook/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Golovko/Task_6/1_Notebook/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_6/1_Notebook/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Golovko/Task_6/1_Notebook/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_6/2_Train/2_Train.csproj b/Golovko/Task_6/2_Train/2_Train.csproj new file mode 100644 index 0000000..adcf449 --- /dev/null +++ b/Golovko/Task_6/2_Train/2_Train.csproj @@ -0,0 +1,62 @@ + + + + + Debug + AnyCPU + {59639EAE-0369-4A1E-97BF-E0C8C4F6702E} + Exe + Properties + _2_Train + 2_Train + v4.5.2 + 512 + 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/Golovko/Task_6/2_Train/App.config b/Golovko/Task_6/2_Train/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_6/2_Train/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_6/2_Train/Program.cs b/Golovko/Task_6/2_Train/Program.cs new file mode 100644 index 0000000..5ef38f8 --- /dev/null +++ b/Golovko/Task_6/2_Train/Program.cs @@ -0,0 +1,50 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_Train +{ + class Program + { + static void Main(string[] args) + { + RailwayStation railwayStation = new RailwayStation("Dnepr"); + int trainNumber; + string destination; + DateTime depatureTime; + int counter = 0; + string toAdd; + while (true) + { + Console.WriteLine("Do you want add new Train? (y - yes, n - no):"); + toAdd = Console.ReadLine(); + if (toAdd == "y") + { + Console.WriteLine("Train[{0}]:", counter++); + Console.Write("Enter train number: "); + int.TryParse(Console.ReadLine(), out trainNumber); + Console.Write("Enter destination: "); + destination = Console.ReadLine(); + Console.Write("Enter depature time: "); + DateTime.TryParse(Console.ReadLine(), out depatureTime); + railwayStation.AddTrain(new Train(trainNumber, destination, depatureTime)); + } + else if (toAdd == "n") + { + break; + } + else + { + Console.WriteLine("Unknown answer"); + } + + } + Console.Write("Enter the train number for getting arrival info: "); + int.TryParse(Console.ReadLine(), out trainNumber); + railwayStation.PrintInfo(trainNumber); + Console.ReadKey(); + } + } +} diff --git a/Golovko/Task_6/2_Train/Properties/AssemblyInfo.cs b/Golovko/Task_6/2_Train/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..8fd53e2 --- /dev/null +++ b/Golovko/Task_6/2_Train/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("2_Train")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("2_Train")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[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("59639eae-0369-4a1e-97bf-e0c8c4f6702e")] + +// 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")] diff --git a/Golovko/Task_6/2_Train/RailwayStation.cs b/Golovko/Task_6/2_Train/RailwayStation.cs new file mode 100644 index 0000000..b5c1be5 --- /dev/null +++ b/Golovko/Task_6/2_Train/RailwayStation.cs @@ -0,0 +1,50 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_Train +{ + class RailwayStation + { + private Train[] trains; + private string Name { get; } + public RailwayStation(string name) + { + this.Name = name; + trains = new Train[0]; + } + public void AddTrain(Train train) + { + Train[] tmpTrains = new Train[trains.Length + 1]; + Train tmpTrain = train; + for (int i = 0; i < trains.Length; i++) + { + if (trains[i].TrainNumber > train.TrainNumber) + { + tmpTrain = trains[i]; + tmpTrains[i] = train; + } + else + { + tmpTrains[i] = trains[i]; + } + } + tmpTrains[tmpTrains.Length - 1] = tmpTrain; + trains = tmpTrains; + } + public void PrintInfo(int trainNumber) + { + Train train = trains.FirstOrDefault(t => t.TrainNumber == trainNumber); + if (train.TrainNumber != trainNumber) + { + Console.WriteLine("Train with number {0} doesn't exist", trainNumber); + } + else + { + Console.WriteLine("{0}: Destination -> {1}. Departure Time -> {2}\n", train.TrainNumber, train.Destination, train.DepatureTime); + } + } + } +} diff --git a/Golovko/Task_6/2_Train/Train.cs b/Golovko/Task_6/2_Train/Train.cs new file mode 100644 index 0000000..dc2d47d --- /dev/null +++ b/Golovko/Task_6/2_Train/Train.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_Train +{ + struct Train + { + private readonly string destiantion; + private readonly int trainNumber; + private readonly DateTime depatureTime; + public string Destination { get { return destiantion; } } + public int TrainNumber { get { return trainNumber; } } + public DateTime DepatureTime { get { return depatureTime; } } + public Train(int trainNumber, string destiantion, DateTime depatureTime) + { + this.destiantion = destiantion; + this.trainNumber = trainNumber; + this.depatureTime = depatureTime; + } + } +} diff --git a/Golovko/Task_6/2_Train/bin/Debug/2_Train.exe b/Golovko/Task_6/2_Train/bin/Debug/2_Train.exe new file mode 100644 index 0000000..4666013 Binary files /dev/null and b/Golovko/Task_6/2_Train/bin/Debug/2_Train.exe differ diff --git a/Golovko/Task_6/2_Train/bin/Debug/2_Train.exe.config b/Golovko/Task_6/2_Train/bin/Debug/2_Train.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_6/2_Train/bin/Debug/2_Train.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_6/2_Train/bin/Debug/2_Train.pdb b/Golovko/Task_6/2_Train/bin/Debug/2_Train.pdb new file mode 100644 index 0000000..a37f7a0 Binary files /dev/null and b/Golovko/Task_6/2_Train/bin/Debug/2_Train.pdb differ diff --git a/Golovko/Task_6/2_Train/bin/Debug/2_Train.vshost.exe b/Golovko/Task_6/2_Train/bin/Debug/2_Train.vshost.exe new file mode 100644 index 0000000..681ab77 Binary files /dev/null and b/Golovko/Task_6/2_Train/bin/Debug/2_Train.vshost.exe differ diff --git a/Golovko/Task_6/2_Train/bin/Debug/2_Train.vshost.exe.config b/Golovko/Task_6/2_Train/bin/Debug/2_Train.vshost.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_6/2_Train/bin/Debug/2_Train.vshost.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_6/2_Train/obj/Debug/2_Train.csproj.FileListAbsolute.txt b/Golovko/Task_6/2_Train/obj/Debug/2_Train.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..8d5b5e2 --- /dev/null +++ b/Golovko/Task_6/2_Train/obj/Debug/2_Train.csproj.FileListAbsolute.txt @@ -0,0 +1,6 @@ +c:\users\головко\documents\visual studio 2015\Projects\Task_6\2_Train\bin\Debug\2_Train.exe.config +c:\users\головко\documents\visual studio 2015\Projects\Task_6\2_Train\bin\Debug\2_Train.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_6\2_Train\bin\Debug\2_Train.pdb +c:\users\головко\documents\visual studio 2015\Projects\Task_6\2_Train\obj\Debug\2_Train.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_6\2_Train\obj\Debug\2_Train.pdb +c:\users\головко\documents\visual studio 2015\Projects\Task_6\2_Train\obj\Debug\2_Train.csprojResolveAssemblyReference.cache diff --git a/Golovko/Task_6/2_Train/obj/Debug/2_Train.csprojResolveAssemblyReference.cache b/Golovko/Task_6/2_Train/obj/Debug/2_Train.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..1150a02 Binary files /dev/null and b/Golovko/Task_6/2_Train/obj/Debug/2_Train.csprojResolveAssemblyReference.cache differ diff --git a/Golovko/Task_6/2_Train/obj/Debug/2_Train.exe b/Golovko/Task_6/2_Train/obj/Debug/2_Train.exe new file mode 100644 index 0000000..4666013 Binary files /dev/null and b/Golovko/Task_6/2_Train/obj/Debug/2_Train.exe differ diff --git a/Golovko/Task_6/2_Train/obj/Debug/2_Train.pdb b/Golovko/Task_6/2_Train/obj/Debug/2_Train.pdb new file mode 100644 index 0000000..a37f7a0 Binary files /dev/null and b/Golovko/Task_6/2_Train/obj/Debug/2_Train.pdb differ diff --git a/Golovko/Task_6/2_Train/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Golovko/Task_6/2_Train/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..78e9cbd Binary files /dev/null and b/Golovko/Task_6/2_Train/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Golovko/Task_6/2_Train/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Golovko/Task_6/2_Train/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_6/2_Train/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Golovko/Task_6/2_Train/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_6/2_Train/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Golovko/Task_6/2_Train/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_6/3_MyClassMyStruct/3_MyClassMyStruct.csproj b/Golovko/Task_6/3_MyClassMyStruct/3_MyClassMyStruct.csproj new file mode 100644 index 0000000..f4bde10 --- /dev/null +++ b/Golovko/Task_6/3_MyClassMyStruct/3_MyClassMyStruct.csproj @@ -0,0 +1,62 @@ + + + + + Debug + AnyCPU + {2984E764-F28B-4D7B-8202-53F2037ABF32} + Exe + Properties + _3_MyClassMyStruct + 3_MyClassMyStruct + v4.5.2 + 512 + 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/Golovko/Task_6/3_MyClassMyStruct/App.config b/Golovko/Task_6/3_MyClassMyStruct/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_6/3_MyClassMyStruct/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_6/3_MyClassMyStruct/MyClass.cs b/Golovko/Task_6/3_MyClassMyStruct/MyClass.cs new file mode 100644 index 0000000..2798659 --- /dev/null +++ b/Golovko/Task_6/3_MyClassMyStruct/MyClass.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _3_MyClassMyStruct +{ + class MyClass + { + public string change; + } +} diff --git a/Golovko/Task_6/3_MyClassMyStruct/MyStruct.cs b/Golovko/Task_6/3_MyClassMyStruct/MyStruct.cs new file mode 100644 index 0000000..fc98ede --- /dev/null +++ b/Golovko/Task_6/3_MyClassMyStruct/MyStruct.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _3_MyClassMyStruct +{ + struct MyStruct + { + public string change; + } +} diff --git a/Golovko/Task_6/3_MyClassMyStruct/Program.cs b/Golovko/Task_6/3_MyClassMyStruct/Program.cs new file mode 100644 index 0000000..e536b72 --- /dev/null +++ b/Golovko/Task_6/3_MyClassMyStruct/Program.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _3_MyClassMyStruct +{ + class Program + { + static void Main(string[] args) + { + MyClass myClass = new MyClass() { change = "unchanged" }; + MyStruct myStruct = new MyStruct() { change = "unchanged" }; + ClassTaker(myClass); + StructTaker(myStruct); + Console.WriteLine("Class change value = {0}", myClass.change); + Console.WriteLine("Struct change value = {0}", myStruct.change); + Console.ReadKey(); + } + static void ClassTaker(MyClass myClass) + { + myClass.change = "changed"; + } + static void StructTaker(MyStruct myStruct) + { + myStruct.change = "changed"; + } + } +} diff --git a/Golovko/Task_6/3_MyClassMyStruct/Properties/AssemblyInfo.cs b/Golovko/Task_6/3_MyClassMyStruct/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..953c8cc --- /dev/null +++ b/Golovko/Task_6/3_MyClassMyStruct/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("3_MyClassMyStruct")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("3_MyClassMyStruct")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[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("2984e764-f28b-4d7b-8202-53f2037abf32")] + +// 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")] diff --git a/Golovko/Task_6/3_MyClassMyStruct/bin/Debug/3_MyClassMyStruct.exe b/Golovko/Task_6/3_MyClassMyStruct/bin/Debug/3_MyClassMyStruct.exe new file mode 100644 index 0000000..41ae65d Binary files /dev/null and b/Golovko/Task_6/3_MyClassMyStruct/bin/Debug/3_MyClassMyStruct.exe differ diff --git a/Golovko/Task_6/3_MyClassMyStruct/bin/Debug/3_MyClassMyStruct.exe.config b/Golovko/Task_6/3_MyClassMyStruct/bin/Debug/3_MyClassMyStruct.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_6/3_MyClassMyStruct/bin/Debug/3_MyClassMyStruct.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_6/3_MyClassMyStruct/bin/Debug/3_MyClassMyStruct.pdb b/Golovko/Task_6/3_MyClassMyStruct/bin/Debug/3_MyClassMyStruct.pdb new file mode 100644 index 0000000..12d265d Binary files /dev/null and b/Golovko/Task_6/3_MyClassMyStruct/bin/Debug/3_MyClassMyStruct.pdb differ diff --git a/Golovko/Task_6/3_MyClassMyStruct/bin/Debug/3_MyClassMyStruct.vshost.exe b/Golovko/Task_6/3_MyClassMyStruct/bin/Debug/3_MyClassMyStruct.vshost.exe new file mode 100644 index 0000000..681ab77 Binary files /dev/null and b/Golovko/Task_6/3_MyClassMyStruct/bin/Debug/3_MyClassMyStruct.vshost.exe differ diff --git a/Golovko/Task_6/3_MyClassMyStruct/bin/Debug/3_MyClassMyStruct.vshost.exe.config b/Golovko/Task_6/3_MyClassMyStruct/bin/Debug/3_MyClassMyStruct.vshost.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_6/3_MyClassMyStruct/bin/Debug/3_MyClassMyStruct.vshost.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_6/3_MyClassMyStruct/obj/Debug/3_MyClassMyStruct.csproj.FileListAbsolute.txt b/Golovko/Task_6/3_MyClassMyStruct/obj/Debug/3_MyClassMyStruct.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..9004fdc --- /dev/null +++ b/Golovko/Task_6/3_MyClassMyStruct/obj/Debug/3_MyClassMyStruct.csproj.FileListAbsolute.txt @@ -0,0 +1,6 @@ +c:\users\головко\documents\visual studio 2015\Projects\Task_6\3_MyClassMyStruct\bin\Debug\3_MyClassMyStruct.exe.config +c:\users\головко\documents\visual studio 2015\Projects\Task_6\3_MyClassMyStruct\bin\Debug\3_MyClassMyStruct.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_6\3_MyClassMyStruct\bin\Debug\3_MyClassMyStruct.pdb +c:\users\головко\documents\visual studio 2015\Projects\Task_6\3_MyClassMyStruct\obj\Debug\3_MyClassMyStruct.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_6\3_MyClassMyStruct\obj\Debug\3_MyClassMyStruct.pdb +c:\users\головко\documents\visual studio 2015\Projects\Task_6\3_MyClassMyStruct\obj\Debug\3_MyClassMyStruct.csprojResolveAssemblyReference.cache diff --git a/Golovko/Task_6/3_MyClassMyStruct/obj/Debug/3_MyClassMyStruct.csprojResolveAssemblyReference.cache b/Golovko/Task_6/3_MyClassMyStruct/obj/Debug/3_MyClassMyStruct.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..1150a02 Binary files /dev/null and b/Golovko/Task_6/3_MyClassMyStruct/obj/Debug/3_MyClassMyStruct.csprojResolveAssemblyReference.cache differ diff --git a/Golovko/Task_6/3_MyClassMyStruct/obj/Debug/3_MyClassMyStruct.exe b/Golovko/Task_6/3_MyClassMyStruct/obj/Debug/3_MyClassMyStruct.exe new file mode 100644 index 0000000..41ae65d Binary files /dev/null and b/Golovko/Task_6/3_MyClassMyStruct/obj/Debug/3_MyClassMyStruct.exe differ diff --git a/Golovko/Task_6/3_MyClassMyStruct/obj/Debug/3_MyClassMyStruct.pdb b/Golovko/Task_6/3_MyClassMyStruct/obj/Debug/3_MyClassMyStruct.pdb new file mode 100644 index 0000000..12d265d Binary files /dev/null and b/Golovko/Task_6/3_MyClassMyStruct/obj/Debug/3_MyClassMyStruct.pdb differ diff --git a/Golovko/Task_6/3_MyClassMyStruct/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Golovko/Task_6/3_MyClassMyStruct/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..6dfdbf2 Binary files /dev/null and b/Golovko/Task_6/3_MyClassMyStruct/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Golovko/Task_6/3_MyClassMyStruct/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Golovko/Task_6/3_MyClassMyStruct/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_6/3_MyClassMyStruct/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Golovko/Task_6/3_MyClassMyStruct/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_6/3_MyClassMyStruct/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Golovko/Task_6/3_MyClassMyStruct/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_6/4_Birthday/4_Birthday.csproj b/Golovko/Task_6/4_Birthday/4_Birthday.csproj new file mode 100644 index 0000000..e48ad71 --- /dev/null +++ b/Golovko/Task_6/4_Birthday/4_Birthday.csproj @@ -0,0 +1,61 @@ + + + + + Debug + AnyCPU + {96106EB7-B393-407F-B6AF-C63A7983551D} + Exe + Properties + _4_Birthday + 4_Birthday + v4.5.2 + 512 + 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/Golovko/Task_6/4_Birthday/App.config b/Golovko/Task_6/4_Birthday/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_6/4_Birthday/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_6/4_Birthday/Birth.cs b/Golovko/Task_6/4_Birthday/Birth.cs new file mode 100644 index 0000000..b51e365 --- /dev/null +++ b/Golovko/Task_6/4_Birthday/Birth.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _4_Birthday +{ + struct Birth + { + public DateTime Birthday { get; set; } + public int DaysToBirthday + { + get + { + return GetDaysToBirthday(); + } + } + + public Birth(DateTime birthday) + { + this.Birthday = birthday; + } + private int GetDaysToBirthday() + { + DateTime currentDate = DateTime.Now.Date; + DateTime birthDate = new DateTime(currentDate.Year, Birthday.Month, Birthday.Day); + + return birthDate.DayOfYear >= currentDate.DayOfYear ? + birthDate.DayOfYear - currentDate.DayOfYear : + (currentDate.AddYears(1) - currentDate).Days - (birthDate.DayOfYear - currentDate.DayOfYear); + } + } +} diff --git a/Golovko/Task_6/4_Birthday/Program.cs b/Golovko/Task_6/4_Birthday/Program.cs new file mode 100644 index 0000000..cb5981c --- /dev/null +++ b/Golovko/Task_6/4_Birthday/Program.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _4_Birthday +{ + class Program + { + static void Main(string[] args) + { + Birth birth = new Birth(new DateTime(1986,11,29)); + Console.WriteLine("Days to your next birthday: {0}", birth.DaysToBirthday); + Console.ReadKey(); + } + } +} diff --git a/Golovko/Task_6/4_Birthday/Properties/AssemblyInfo.cs b/Golovko/Task_6/4_Birthday/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..6102952 --- /dev/null +++ b/Golovko/Task_6/4_Birthday/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("4_Birthday")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("4_Birthday")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[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("96106eb7-b393-407f-b6af-c63a7983551d")] + +// 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")] diff --git a/Golovko/Task_6/4_Birthday/bin/Debug/4_Birthday.exe b/Golovko/Task_6/4_Birthday/bin/Debug/4_Birthday.exe new file mode 100644 index 0000000..9a694a5 Binary files /dev/null and b/Golovko/Task_6/4_Birthday/bin/Debug/4_Birthday.exe differ diff --git a/Golovko/Task_6/4_Birthday/bin/Debug/4_Birthday.exe.config b/Golovko/Task_6/4_Birthday/bin/Debug/4_Birthday.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_6/4_Birthday/bin/Debug/4_Birthday.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_6/4_Birthday/bin/Debug/4_Birthday.pdb b/Golovko/Task_6/4_Birthday/bin/Debug/4_Birthday.pdb new file mode 100644 index 0000000..8804f49 Binary files /dev/null and b/Golovko/Task_6/4_Birthday/bin/Debug/4_Birthday.pdb differ diff --git a/Golovko/Task_6/4_Birthday/bin/Debug/4_Birthday.vshost.exe b/Golovko/Task_6/4_Birthday/bin/Debug/4_Birthday.vshost.exe new file mode 100644 index 0000000..681ab77 Binary files /dev/null and b/Golovko/Task_6/4_Birthday/bin/Debug/4_Birthday.vshost.exe differ diff --git a/Golovko/Task_6/4_Birthday/bin/Debug/4_Birthday.vshost.exe.config b/Golovko/Task_6/4_Birthday/bin/Debug/4_Birthday.vshost.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_6/4_Birthday/bin/Debug/4_Birthday.vshost.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_6/4_Birthday/bin/Debug/4_Birthday.vshost.exe.manifest b/Golovko/Task_6/4_Birthday/bin/Debug/4_Birthday.vshost.exe.manifest new file mode 100644 index 0000000..061c9ca --- /dev/null +++ b/Golovko/Task_6/4_Birthday/bin/Debug/4_Birthday.vshost.exe.manifest @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/Golovko/Task_6/4_Birthday/obj/Debug/4_Birthday.csproj.FileListAbsolute.txt b/Golovko/Task_6/4_Birthday/obj/Debug/4_Birthday.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..d4c41eb --- /dev/null +++ b/Golovko/Task_6/4_Birthday/obj/Debug/4_Birthday.csproj.FileListAbsolute.txt @@ -0,0 +1,6 @@ +c:\users\головко\documents\visual studio 2015\Projects\Task_6\4_Birthday\bin\Debug\4_Birthday.exe.config +c:\users\головко\documents\visual studio 2015\Projects\Task_6\4_Birthday\bin\Debug\4_Birthday.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_6\4_Birthday\bin\Debug\4_Birthday.pdb +c:\users\головко\documents\visual studio 2015\Projects\Task_6\4_Birthday\obj\Debug\4_Birthday.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_6\4_Birthday\obj\Debug\4_Birthday.pdb +c:\users\головко\documents\visual studio 2015\Projects\Task_6\4_Birthday\obj\Debug\4_Birthday.csprojResolveAssemblyReference.cache diff --git a/Golovko/Task_6/4_Birthday/obj/Debug/4_Birthday.csprojResolveAssemblyReference.cache b/Golovko/Task_6/4_Birthday/obj/Debug/4_Birthday.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..1150a02 Binary files /dev/null and b/Golovko/Task_6/4_Birthday/obj/Debug/4_Birthday.csprojResolveAssemblyReference.cache differ diff --git a/Golovko/Task_6/4_Birthday/obj/Debug/4_Birthday.exe b/Golovko/Task_6/4_Birthday/obj/Debug/4_Birthday.exe new file mode 100644 index 0000000..9a694a5 Binary files /dev/null and b/Golovko/Task_6/4_Birthday/obj/Debug/4_Birthday.exe differ diff --git a/Golovko/Task_6/4_Birthday/obj/Debug/4_Birthday.pdb b/Golovko/Task_6/4_Birthday/obj/Debug/4_Birthday.pdb new file mode 100644 index 0000000..8804f49 Binary files /dev/null and b/Golovko/Task_6/4_Birthday/obj/Debug/4_Birthday.pdb differ diff --git a/Golovko/Task_6/4_Birthday/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Golovko/Task_6/4_Birthday/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..cf2905b Binary files /dev/null and b/Golovko/Task_6/4_Birthday/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Golovko/Task_6/4_Birthday/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Golovko/Task_6/4_Birthday/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_6/4_Birthday/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Golovko/Task_6/4_Birthday/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_6/4_Birthday/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Golovko/Task_6/4_Birthday/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_6/5_Printer/5_Printer.csproj b/Golovko/Task_6/5_Printer/5_Printer.csproj new file mode 100644 index 0000000..a381957 --- /dev/null +++ b/Golovko/Task_6/5_Printer/5_Printer.csproj @@ -0,0 +1,62 @@ + + + + + Debug + AnyCPU + {44063638-BD52-4E91-88CE-58B209212D06} + Exe + Properties + _5_Printer + 5_Printer + v4.5.2 + 512 + 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/Golovko/Task_6/5_Printer/App.config b/Golovko/Task_6/5_Printer/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_6/5_Printer/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_6/5_Printer/Color.cs b/Golovko/Task_6/5_Printer/Color.cs new file mode 100644 index 0000000..0849288 --- /dev/null +++ b/Golovko/Task_6/5_Printer/Color.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _5_Printer +{ + enum Color : byte + { + Red, + Green, + Blue, + Yellow, + White, + Gray + } +} diff --git a/Golovko/Task_6/5_Printer/Printer.cs b/Golovko/Task_6/5_Printer/Printer.cs new file mode 100644 index 0000000..4015a50 --- /dev/null +++ b/Golovko/Task_6/5_Printer/Printer.cs @@ -0,0 +1,58 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _5_Printer +{ + static class Printer + { + public static void Print(string stroka, int color) + { + Console.ForegroundColor = GetColor(color); + Console.WriteLine(stroka); + Console.ResetColor(); + } + + private static ConsoleColor GetColor(int color) + { + ConsoleColor resultColor; + Color paintColor = (Color)color; + switch (paintColor) + { + case Color.Blue: + resultColor = ConsoleColor.Blue; + break; + case Color.Gray: + resultColor = ConsoleColor.Gray; + break; + case Color.Green: + resultColor = ConsoleColor.Green; + break; + case Color.Red: + resultColor = ConsoleColor.Red; + break; + case Color.White: + resultColor = ConsoleColor.White; + break; + case Color.Yellow: + resultColor = ConsoleColor.Yellow; + break; + default: + resultColor = ConsoleColor.Gray; + Console.WriteLine("Unknown color. Setup the deffault color 'Gray'"); + break; + } + return resultColor; + } + + public static void ShowColorList() + { + foreach (Color color in Enum.GetValues(typeof(Color))) + { + Console.WriteLine("{0} -> {1}", (int)color, Enum.GetName(typeof(Color), color)); + } + } + } +} diff --git a/Golovko/Task_6/5_Printer/Program.cs b/Golovko/Task_6/5_Printer/Program.cs new file mode 100644 index 0000000..8d1d346 --- /dev/null +++ b/Golovko/Task_6/5_Printer/Program.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _5_Printer +{ + class Program + { + static void Main(string[] args) + { + string text; + int color; + Console.Write("Enter text for printing, please:"); + text = Console.ReadLine(); + Console.WriteLine("Select color index, please:"); + Printer.ShowColorList(); + if (int.TryParse(Console.ReadLine(), out color)) + { + Printer.Print(text, color); + } + else + { + Console.WriteLine("Uncorrect color index format"); + } + Console.ReadKey(); + } + } +} diff --git a/Golovko/Task_6/5_Printer/Properties/AssemblyInfo.cs b/Golovko/Task_6/5_Printer/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..ff037d2 --- /dev/null +++ b/Golovko/Task_6/5_Printer/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("5_Printer")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("5_Printer")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[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("44063638-bd52-4e91-88ce-58b209212d06")] + +// 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")] diff --git a/Golovko/Task_6/5_Printer/bin/Debug/5_Printer.exe b/Golovko/Task_6/5_Printer/bin/Debug/5_Printer.exe new file mode 100644 index 0000000..347d62d Binary files /dev/null and b/Golovko/Task_6/5_Printer/bin/Debug/5_Printer.exe differ diff --git a/Golovko/Task_6/5_Printer/bin/Debug/5_Printer.exe.config b/Golovko/Task_6/5_Printer/bin/Debug/5_Printer.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_6/5_Printer/bin/Debug/5_Printer.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_6/5_Printer/bin/Debug/5_Printer.pdb b/Golovko/Task_6/5_Printer/bin/Debug/5_Printer.pdb new file mode 100644 index 0000000..ed06a54 Binary files /dev/null and b/Golovko/Task_6/5_Printer/bin/Debug/5_Printer.pdb differ diff --git a/Golovko/Task_6/5_Printer/bin/Debug/5_Printer.vshost.exe b/Golovko/Task_6/5_Printer/bin/Debug/5_Printer.vshost.exe new file mode 100644 index 0000000..681ab77 Binary files /dev/null and b/Golovko/Task_6/5_Printer/bin/Debug/5_Printer.vshost.exe differ diff --git a/Golovko/Task_6/5_Printer/bin/Debug/5_Printer.vshost.exe.config b/Golovko/Task_6/5_Printer/bin/Debug/5_Printer.vshost.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_6/5_Printer/bin/Debug/5_Printer.vshost.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_6/5_Printer/bin/Debug/5_Printer.vshost.exe.manifest b/Golovko/Task_6/5_Printer/bin/Debug/5_Printer.vshost.exe.manifest new file mode 100644 index 0000000..061c9ca --- /dev/null +++ b/Golovko/Task_6/5_Printer/bin/Debug/5_Printer.vshost.exe.manifest @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/Golovko/Task_6/5_Printer/obj/Debug/5_Printer.csproj.FileListAbsolute.txt b/Golovko/Task_6/5_Printer/obj/Debug/5_Printer.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..a1c35a0 --- /dev/null +++ b/Golovko/Task_6/5_Printer/obj/Debug/5_Printer.csproj.FileListAbsolute.txt @@ -0,0 +1,6 @@ +c:\users\головко\documents\visual studio 2015\Projects\Task_6\5_Printer\bin\Debug\5_Printer.exe.config +c:\users\головко\documents\visual studio 2015\Projects\Task_6\5_Printer\bin\Debug\5_Printer.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_6\5_Printer\bin\Debug\5_Printer.pdb +c:\users\головко\documents\visual studio 2015\Projects\Task_6\5_Printer\obj\Debug\5_Printer.csprojResolveAssemblyReference.cache +c:\users\головко\documents\visual studio 2015\Projects\Task_6\5_Printer\obj\Debug\5_Printer.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_6\5_Printer\obj\Debug\5_Printer.pdb diff --git a/Golovko/Task_6/5_Printer/obj/Debug/5_Printer.csprojResolveAssemblyReference.cache b/Golovko/Task_6/5_Printer/obj/Debug/5_Printer.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..1150a02 Binary files /dev/null and b/Golovko/Task_6/5_Printer/obj/Debug/5_Printer.csprojResolveAssemblyReference.cache differ diff --git a/Golovko/Task_6/5_Printer/obj/Debug/5_Printer.exe b/Golovko/Task_6/5_Printer/obj/Debug/5_Printer.exe new file mode 100644 index 0000000..347d62d Binary files /dev/null and b/Golovko/Task_6/5_Printer/obj/Debug/5_Printer.exe differ diff --git a/Golovko/Task_6/5_Printer/obj/Debug/5_Printer.pdb b/Golovko/Task_6/5_Printer/obj/Debug/5_Printer.pdb new file mode 100644 index 0000000..ed06a54 Binary files /dev/null and b/Golovko/Task_6/5_Printer/obj/Debug/5_Printer.pdb differ diff --git a/Golovko/Task_6/5_Printer/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Golovko/Task_6/5_Printer/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..283e5a6 Binary files /dev/null and b/Golovko/Task_6/5_Printer/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Golovko/Task_6/5_Printer/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Golovko/Task_6/5_Printer/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_6/5_Printer/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Golovko/Task_6/5_Printer/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_6/5_Printer/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Golovko/Task_6/5_Printer/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_6/6_Accauntant/6_Accauntant.csproj b/Golovko/Task_6/6_Accauntant/6_Accauntant.csproj new file mode 100644 index 0000000..52ba0d7 --- /dev/null +++ b/Golovko/Task_6/6_Accauntant/6_Accauntant.csproj @@ -0,0 +1,62 @@ + + + + + Debug + AnyCPU + {A93433B5-F39B-4C04-968F-9F57C3DC3462} + Exe + Properties + _6_Accauntant + 6_Accauntant + v4.5.2 + 512 + 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/Golovko/Task_6/6_Accauntant/Accauntant.cs b/Golovko/Task_6/6_Accauntant/Accauntant.cs new file mode 100644 index 0000000..a98e43f --- /dev/null +++ b/Golovko/Task_6/6_Accauntant/Accauntant.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _6_Accauntant +{ + class Accauntant + { + public static bool AskForBonus(Post worker, int hours) + { + return hours > (int)worker; + } + } +} diff --git a/Golovko/Task_6/6_Accauntant/App.config b/Golovko/Task_6/6_Accauntant/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_6/6_Accauntant/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_6/6_Accauntant/Post.cs b/Golovko/Task_6/6_Accauntant/Post.cs new file mode 100644 index 0000000..9c81232 --- /dev/null +++ b/Golovko/Task_6/6_Accauntant/Post.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _6_Accauntant +{ + enum Post + { + Manager = 180, + Assistant = 190, + Designer = 160, + Developer = 150, + Architector = 140, + } +} diff --git a/Golovko/Task_6/6_Accauntant/Program.cs b/Golovko/Task_6/6_Accauntant/Program.cs new file mode 100644 index 0000000..97ea849 --- /dev/null +++ b/Golovko/Task_6/6_Accauntant/Program.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _6_Accauntant +{ + class Program + { + static void Main(string[] args) + { + Console.WriteLine("{0} worked {1} hours and {2} a bonus", + Enum.GetName(typeof(Post), Post.Architector), + 120, + Accauntant.AskForBonus(Post.Architector, 120)? "have" : "doesn't have"); + Console.ReadKey(); + } + } +} diff --git a/Golovko/Task_6/6_Accauntant/Properties/AssemblyInfo.cs b/Golovko/Task_6/6_Accauntant/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..497411d --- /dev/null +++ b/Golovko/Task_6/6_Accauntant/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("6_Accauntant")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("6_Accauntant")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[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("a93433b5-f39b-4c04-968f-9f57c3dc3462")] + +// 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")] diff --git a/Golovko/Task_6/6_Accauntant/bin/Debug/6_Accauntant.exe b/Golovko/Task_6/6_Accauntant/bin/Debug/6_Accauntant.exe new file mode 100644 index 0000000..4bee764 Binary files /dev/null and b/Golovko/Task_6/6_Accauntant/bin/Debug/6_Accauntant.exe differ diff --git a/Golovko/Task_6/6_Accauntant/bin/Debug/6_Accauntant.exe.config b/Golovko/Task_6/6_Accauntant/bin/Debug/6_Accauntant.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_6/6_Accauntant/bin/Debug/6_Accauntant.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_6/6_Accauntant/bin/Debug/6_Accauntant.pdb b/Golovko/Task_6/6_Accauntant/bin/Debug/6_Accauntant.pdb new file mode 100644 index 0000000..7411c82 Binary files /dev/null and b/Golovko/Task_6/6_Accauntant/bin/Debug/6_Accauntant.pdb differ diff --git a/Golovko/Task_6/6_Accauntant/bin/Debug/6_Accauntant.vshost.exe b/Golovko/Task_6/6_Accauntant/bin/Debug/6_Accauntant.vshost.exe new file mode 100644 index 0000000..681ab77 Binary files /dev/null and b/Golovko/Task_6/6_Accauntant/bin/Debug/6_Accauntant.vshost.exe differ diff --git a/Golovko/Task_6/6_Accauntant/bin/Debug/6_Accauntant.vshost.exe.config b/Golovko/Task_6/6_Accauntant/bin/Debug/6_Accauntant.vshost.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_6/6_Accauntant/bin/Debug/6_Accauntant.vshost.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_6/6_Accauntant/obj/Debug/6_Accauntant.csproj.FileListAbsolute.txt b/Golovko/Task_6/6_Accauntant/obj/Debug/6_Accauntant.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..916ee1a --- /dev/null +++ b/Golovko/Task_6/6_Accauntant/obj/Debug/6_Accauntant.csproj.FileListAbsolute.txt @@ -0,0 +1,6 @@ +C:\Users\Головко\Documents\Visual Studio 2015\Projects\Task_6\6_Accauntant\bin\Debug\6_Accauntant.exe.config +C:\Users\Головко\Documents\Visual Studio 2015\Projects\Task_6\6_Accauntant\bin\Debug\6_Accauntant.exe +C:\Users\Головко\Documents\Visual Studio 2015\Projects\Task_6\6_Accauntant\bin\Debug\6_Accauntant.pdb +C:\Users\Головко\Documents\Visual Studio 2015\Projects\Task_6\6_Accauntant\obj\Debug\6_Accauntant.csprojResolveAssemblyReference.cache +C:\Users\Головко\Documents\Visual Studio 2015\Projects\Task_6\6_Accauntant\obj\Debug\6_Accauntant.exe +C:\Users\Головко\Documents\Visual Studio 2015\Projects\Task_6\6_Accauntant\obj\Debug\6_Accauntant.pdb diff --git a/Golovko/Task_6/6_Accauntant/obj/Debug/6_Accauntant.csprojResolveAssemblyReference.cache b/Golovko/Task_6/6_Accauntant/obj/Debug/6_Accauntant.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..1150a02 Binary files /dev/null and b/Golovko/Task_6/6_Accauntant/obj/Debug/6_Accauntant.csprojResolveAssemblyReference.cache differ diff --git a/Golovko/Task_6/6_Accauntant/obj/Debug/6_Accauntant.exe b/Golovko/Task_6/6_Accauntant/obj/Debug/6_Accauntant.exe new file mode 100644 index 0000000..4bee764 Binary files /dev/null and b/Golovko/Task_6/6_Accauntant/obj/Debug/6_Accauntant.exe differ diff --git a/Golovko/Task_6/6_Accauntant/obj/Debug/6_Accauntant.pdb b/Golovko/Task_6/6_Accauntant/obj/Debug/6_Accauntant.pdb new file mode 100644 index 0000000..7411c82 Binary files /dev/null and b/Golovko/Task_6/6_Accauntant/obj/Debug/6_Accauntant.pdb differ diff --git a/Golovko/Task_6/6_Accauntant/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Golovko/Task_6/6_Accauntant/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..1e968cc Binary files /dev/null and b/Golovko/Task_6/6_Accauntant/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Golovko/Task_6/6_Accauntant/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Golovko/Task_6/6_Accauntant/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_6/6_Accauntant/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Golovko/Task_6/6_Accauntant/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_6/6_Accauntant/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Golovko/Task_6/6_Accauntant/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_6/Task_6.sln b/Golovko/Task_6/Task_6.sln new file mode 100644 index 0000000..4d70f5d --- /dev/null +++ b/Golovko/Task_6/Task_6.sln @@ -0,0 +1,52 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.23107.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "1_Notebook", "1_Notebook\1_Notebook.csproj", "{77817169-3ABE-4337-BAEC-A42F9658A2D2}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "2_Train", "2_Train\2_Train.csproj", "{59639EAE-0369-4A1E-97BF-E0C8C4F6702E}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "3_MyClassMyStruct", "3_MyClassMyStruct\3_MyClassMyStruct.csproj", "{2984E764-F28B-4D7B-8202-53F2037ABF32}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "4_Birthday", "4_Birthday\4_Birthday.csproj", "{96106EB7-B393-407F-B6AF-C63A7983551D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "5_Printer", "5_Printer\5_Printer.csproj", "{44063638-BD52-4E91-88CE-58B209212D06}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "6_Accauntant", "6_Accauntant\6_Accauntant.csproj", "{A93433B5-F39B-4C04-968F-9F57C3DC3462}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {77817169-3ABE-4337-BAEC-A42F9658A2D2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {77817169-3ABE-4337-BAEC-A42F9658A2D2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {77817169-3ABE-4337-BAEC-A42F9658A2D2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {77817169-3ABE-4337-BAEC-A42F9658A2D2}.Release|Any CPU.Build.0 = Release|Any CPU + {59639EAE-0369-4A1E-97BF-E0C8C4F6702E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {59639EAE-0369-4A1E-97BF-E0C8C4F6702E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {59639EAE-0369-4A1E-97BF-E0C8C4F6702E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {59639EAE-0369-4A1E-97BF-E0C8C4F6702E}.Release|Any CPU.Build.0 = Release|Any CPU + {2984E764-F28B-4D7B-8202-53F2037ABF32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2984E764-F28B-4D7B-8202-53F2037ABF32}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2984E764-F28B-4D7B-8202-53F2037ABF32}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2984E764-F28B-4D7B-8202-53F2037ABF32}.Release|Any CPU.Build.0 = Release|Any CPU + {96106EB7-B393-407F-B6AF-C63A7983551D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {96106EB7-B393-407F-B6AF-C63A7983551D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {96106EB7-B393-407F-B6AF-C63A7983551D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {96106EB7-B393-407F-B6AF-C63A7983551D}.Release|Any CPU.Build.0 = Release|Any CPU + {44063638-BD52-4E91-88CE-58B209212D06}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {44063638-BD52-4E91-88CE-58B209212D06}.Debug|Any CPU.Build.0 = Debug|Any CPU + {44063638-BD52-4E91-88CE-58B209212D06}.Release|Any CPU.ActiveCfg = Release|Any CPU + {44063638-BD52-4E91-88CE-58B209212D06}.Release|Any CPU.Build.0 = Release|Any CPU + {A93433B5-F39B-4C04-968F-9F57C3DC3462}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A93433B5-F39B-4C04-968F-9F57C3DC3462}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A93433B5-F39B-4C04-968F-9F57C3DC3462}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A93433B5-F39B-4C04-968F-9F57C3DC3462}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Golovko/Task_7.1_Exceptions/.vs/7_Exceptions/v14/.suo b/Golovko/Task_7.1_Exceptions/.vs/7_Exceptions/v14/.suo new file mode 100644 index 0000000..bd5e9ed Binary files /dev/null and b/Golovko/Task_7.1_Exceptions/.vs/7_Exceptions/v14/.suo differ diff --git a/Golovko/Task_7.1_Exceptions/7_Exceptions.sln b/Golovko/Task_7.1_Exceptions/7_Exceptions.sln new file mode 100644 index 0000000..c214493 --- /dev/null +++ b/Golovko/Task_7.1_Exceptions/7_Exceptions.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.23107.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "7_Exceptions", "7_Exceptions\7_Exceptions.csproj", "{E283A21A-0306-4F00-89D1-8F1864CBA751}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {E283A21A-0306-4F00-89D1-8F1864CBA751}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E283A21A-0306-4F00-89D1-8F1864CBA751}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E283A21A-0306-4F00-89D1-8F1864CBA751}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E283A21A-0306-4F00-89D1-8F1864CBA751}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Golovko/Task_7.1_Exceptions/7_Exceptions/7_Exceptions.csproj b/Golovko/Task_7.1_Exceptions/7_Exceptions/7_Exceptions.csproj new file mode 100644 index 0000000..8b792b2 --- /dev/null +++ b/Golovko/Task_7.1_Exceptions/7_Exceptions/7_Exceptions.csproj @@ -0,0 +1,63 @@ + + + + + Debug + AnyCPU + {E283A21A-0306-4F00-89D1-8F1864CBA751} + Exe + Properties + _7_Exceptions + 7_Exceptions + v4.5.2 + 512 + 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/Golovko/Task_7.1_Exceptions/7_Exceptions/App.config b/Golovko/Task_7.1_Exceptions/7_Exceptions/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_7.1_Exceptions/7_Exceptions/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_7.1_Exceptions/7_Exceptions/ExceptionHandler.cs b/Golovko/Task_7.1_Exceptions/7_Exceptions/ExceptionHandler.cs new file mode 100644 index 0000000..6c07131 --- /dev/null +++ b/Golovko/Task_7.1_Exceptions/7_Exceptions/ExceptionHandler.cs @@ -0,0 +1,69 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _7_Exceptions +{ + static class ExceptionHandler + { + private static readonly List fatallExceptions; + static ExceptionHandler() + { + fatallExceptions = new List + { + typeof(OutOfMemoryException), + typeof(StackOverflowException) + }; + } + public static string FullMessage(this Exception e) + { + StringBuilder messageBuilder = new StringBuilder(); + while (e != null) + { + messageBuilder.AppendFormat("{0}\n", e); + e = e.InnerException; + } + return messageBuilder.ToString(); + } + public static void TryFilterCatch(Action action, Func isRecoverPossible, Action handlerAction) + { + try + { + action(); + } + catch (Exception e) + { + if (!isRecoverPossible(e)) + { + throw; + } + handlerAction(); + } + } + public static void TryFilterCatch(Action action, Func isRecoverPossible, Action handlerAction) + { + try + { + action(); + } + catch (Exception e) + { + if (!isRecoverPossible(e)) + { + throw; + } + handlerAction(e); + } + } + public static bool NotFatal(this Exception e) + { + return fatallExceptions.All(fatal => fatal != e.GetType()); + } + public static bool IsFatal(this Exception e) + { + return !NotFatal(e); + } + } +} diff --git a/Golovko/Task_7.1_Exceptions/7_Exceptions/Log.cs b/Golovko/Task_7.1_Exceptions/7_Exceptions/Log.cs new file mode 100644 index 0000000..aa29aa5 --- /dev/null +++ b/Golovko/Task_7.1_Exceptions/7_Exceptions/Log.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _7_Exceptions +{ + static class Log + { + public static void Write(string text) + { + DateTime currentDate = DateTime.Now; + Console.WriteLine("{0} --> {1}", currentDate.ToString(), text); + } + } +} diff --git a/Golovko/Task_7.1_Exceptions/7_Exceptions/NullOrEmptyException.cs b/Golovko/Task_7.1_Exceptions/7_Exceptions/NullOrEmptyException.cs new file mode 100644 index 0000000..28194cb --- /dev/null +++ b/Golovko/Task_7.1_Exceptions/7_Exceptions/NullOrEmptyException.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _7_Exceptions +{ + class NullOrEmptyException : Exception + { + public NullOrEmptyException(string message) : base(message) + { + this.HelpLink = "https://social.msdn.microsoft.com/Forums/en-US/c1aad16e-b6ca-40d9-b0fb-72ee8b5eca42/stringisnullorempty-and-argumentexception?forum=vstscode"; + this.HResult = 10221; + } + } +} diff --git a/Golovko/Task_7.1_Exceptions/7_Exceptions/Program.cs b/Golovko/Task_7.1_Exceptions/7_Exceptions/Program.cs new file mode 100644 index 0000000..1aee8ce --- /dev/null +++ b/Golovko/Task_7.1_Exceptions/7_Exceptions/Program.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _7_Exceptions +{ + class Program + { + static void Main(string[] args) + { + ExceptionHandler.TryFilterCatch( + TestMethod, + ExceptionHandler.NotFatal, + e => Log.Write(e.FullMessage())); + + Console.ReadKey(); + } + static void TestMethod() + { + string p = string.Empty; + if (string.IsNullOrEmpty(p)) + { + throw new NullOrEmptyException("The value of argument is null or empty. Check the argumen value."); + } + } + } +} diff --git a/Golovko/Task_7.1_Exceptions/7_Exceptions/Properties/AssemblyInfo.cs b/Golovko/Task_7.1_Exceptions/7_Exceptions/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..aa1848f --- /dev/null +++ b/Golovko/Task_7.1_Exceptions/7_Exceptions/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("7_Exceptions")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("7_Exceptions")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[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("e283a21a-0306-4f00-89d1-8f1864cba751")] + +// 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")] diff --git a/Golovko/Task_7.1_Exceptions/7_Exceptions/bin/Debug/7_Exceptions.exe b/Golovko/Task_7.1_Exceptions/7_Exceptions/bin/Debug/7_Exceptions.exe new file mode 100644 index 0000000..7acaec8 Binary files /dev/null and b/Golovko/Task_7.1_Exceptions/7_Exceptions/bin/Debug/7_Exceptions.exe differ diff --git a/Golovko/Task_7.1_Exceptions/7_Exceptions/bin/Debug/7_Exceptions.exe.config b/Golovko/Task_7.1_Exceptions/7_Exceptions/bin/Debug/7_Exceptions.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_7.1_Exceptions/7_Exceptions/bin/Debug/7_Exceptions.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_7.1_Exceptions/7_Exceptions/bin/Debug/7_Exceptions.pdb b/Golovko/Task_7.1_Exceptions/7_Exceptions/bin/Debug/7_Exceptions.pdb new file mode 100644 index 0000000..67c8061 Binary files /dev/null and b/Golovko/Task_7.1_Exceptions/7_Exceptions/bin/Debug/7_Exceptions.pdb differ diff --git a/Golovko/Task_7.1_Exceptions/7_Exceptions/bin/Debug/7_Exceptions.vshost.exe b/Golovko/Task_7.1_Exceptions/7_Exceptions/bin/Debug/7_Exceptions.vshost.exe new file mode 100644 index 0000000..681ab77 Binary files /dev/null and b/Golovko/Task_7.1_Exceptions/7_Exceptions/bin/Debug/7_Exceptions.vshost.exe differ diff --git a/Golovko/Task_7.1_Exceptions/7_Exceptions/bin/Debug/7_Exceptions.vshost.exe.config b/Golovko/Task_7.1_Exceptions/7_Exceptions/bin/Debug/7_Exceptions.vshost.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_7.1_Exceptions/7_Exceptions/bin/Debug/7_Exceptions.vshost.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_7.1_Exceptions/7_Exceptions/obj/Debug/7_Exceptions.csproj.FileListAbsolute.txt b/Golovko/Task_7.1_Exceptions/7_Exceptions/obj/Debug/7_Exceptions.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..41f9cf6 --- /dev/null +++ b/Golovko/Task_7.1_Exceptions/7_Exceptions/obj/Debug/7_Exceptions.csproj.FileListAbsolute.txt @@ -0,0 +1,5 @@ +c:\users\головко\documents\visual studio 2015\Projects\7_Exceptions\7_Exceptions\bin\Debug\7_Exceptions.exe.config +c:\users\головко\documents\visual studio 2015\Projects\7_Exceptions\7_Exceptions\bin\Debug\7_Exceptions.exe +c:\users\головко\documents\visual studio 2015\Projects\7_Exceptions\7_Exceptions\bin\Debug\7_Exceptions.pdb +c:\users\головко\documents\visual studio 2015\Projects\7_Exceptions\7_Exceptions\obj\Debug\7_Exceptions.exe +c:\users\головко\documents\visual studio 2015\Projects\7_Exceptions\7_Exceptions\obj\Debug\7_Exceptions.pdb diff --git a/Golovko/Task_7.1_Exceptions/7_Exceptions/obj/Debug/7_Exceptions.exe b/Golovko/Task_7.1_Exceptions/7_Exceptions/obj/Debug/7_Exceptions.exe new file mode 100644 index 0000000..7acaec8 Binary files /dev/null and b/Golovko/Task_7.1_Exceptions/7_Exceptions/obj/Debug/7_Exceptions.exe differ diff --git a/Golovko/Task_7.1_Exceptions/7_Exceptions/obj/Debug/7_Exceptions.pdb b/Golovko/Task_7.1_Exceptions/7_Exceptions/obj/Debug/7_Exceptions.pdb new file mode 100644 index 0000000..67c8061 Binary files /dev/null and b/Golovko/Task_7.1_Exceptions/7_Exceptions/obj/Debug/7_Exceptions.pdb differ diff --git a/Golovko/Task_7.1_Exceptions/7_Exceptions/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Golovko/Task_7.1_Exceptions/7_Exceptions/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..4a5a8de Binary files /dev/null and b/Golovko/Task_7.1_Exceptions/7_Exceptions/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Golovko/Task_7.1_Exceptions/7_Exceptions/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Golovko/Task_7.1_Exceptions/7_Exceptions/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_7.1_Exceptions/7_Exceptions/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Golovko/Task_7.1_Exceptions/7_Exceptions/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_7.1_Exceptions/7_Exceptions/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Golovko/Task_7.1_Exceptions/7_Exceptions/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_7.2_Delegates/.vs/Task_7.2_Delegates/v14/.suo b/Golovko/Task_7.2_Delegates/.vs/Task_7.2_Delegates/v14/.suo new file mode 100644 index 0000000..3fdee17 Binary files /dev/null and b/Golovko/Task_7.2_Delegates/.vs/Task_7.2_Delegates/v14/.suo differ diff --git a/Golovko/Task_7.2_Delegates/1_AnonymousMethod/1_AnonymousMethod.csproj b/Golovko/Task_7.2_Delegates/1_AnonymousMethod/1_AnonymousMethod.csproj new file mode 100644 index 0000000..aad14e9 --- /dev/null +++ b/Golovko/Task_7.2_Delegates/1_AnonymousMethod/1_AnonymousMethod.csproj @@ -0,0 +1,62 @@ + + + + + Debug + AnyCPU + {5982F220-AB2B-4FA5-A03B-019BA43CA91B} + Exe + Properties + _1_AnonymousMethod + 1_AnonymousMethod + v4.5.2 + 512 + 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/Golovko/Task_7.2_Delegates/1_AnonymousMethod/App.config b/Golovko/Task_7.2_Delegates/1_AnonymousMethod/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_7.2_Delegates/1_AnonymousMethod/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_7.2_Delegates/1_AnonymousMethod/AvgCalc.cs b/Golovko/Task_7.2_Delegates/1_AnonymousMethod/AvgCalc.cs new file mode 100644 index 0000000..efe892c --- /dev/null +++ b/Golovko/Task_7.2_Delegates/1_AnonymousMethod/AvgCalc.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _1_AnonymousMethod +{ + class AvgCalc + { + public static AvgDelegate Avg = (a, b, c) => (double)(a + b + c) / 3; + } +} diff --git a/Golovko/Task_7.2_Delegates/1_AnonymousMethod/AvgDelegate.cs b/Golovko/Task_7.2_Delegates/1_AnonymousMethod/AvgDelegate.cs new file mode 100644 index 0000000..6106744 --- /dev/null +++ b/Golovko/Task_7.2_Delegates/1_AnonymousMethod/AvgDelegate.cs @@ -0,0 +1,10 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _1_AnonymousMethod +{ + delegate double AvgDelegate(int a, int b, int c); +} diff --git a/Golovko/Task_7.2_Delegates/1_AnonymousMethod/Program.cs b/Golovko/Task_7.2_Delegates/1_AnonymousMethod/Program.cs new file mode 100644 index 0000000..36f3ca6 --- /dev/null +++ b/Golovko/Task_7.2_Delegates/1_AnonymousMethod/Program.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _1_AnonymousMethod +{ + class Program + { + static void Main(string[] args) + { + Console.WriteLine("Average arimetic is {0}", AvgCalc.Avg(1, 2, 3)); + Console.WriteLine("Average arimetic is {0}", AvgCalc.Avg(10, 15, 22)); + Console.ReadKey(); + } + } +} diff --git a/Golovko/Task_7.2_Delegates/1_AnonymousMethod/Properties/AssemblyInfo.cs b/Golovko/Task_7.2_Delegates/1_AnonymousMethod/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..fccd50d --- /dev/null +++ b/Golovko/Task_7.2_Delegates/1_AnonymousMethod/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("1_AnonymousMethod")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("1_AnonymousMethod")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[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("5982f220-ab2b-4fa5-a03b-019ba43ca91b")] + +// 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")] diff --git a/Golovko/Task_7.2_Delegates/1_AnonymousMethod/bin/Debug/1_AnonymousMethod.exe b/Golovko/Task_7.2_Delegates/1_AnonymousMethod/bin/Debug/1_AnonymousMethod.exe new file mode 100644 index 0000000..0a24589 Binary files /dev/null and b/Golovko/Task_7.2_Delegates/1_AnonymousMethod/bin/Debug/1_AnonymousMethod.exe differ diff --git a/Golovko/Task_7.2_Delegates/1_AnonymousMethod/bin/Debug/1_AnonymousMethod.exe.config b/Golovko/Task_7.2_Delegates/1_AnonymousMethod/bin/Debug/1_AnonymousMethod.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_7.2_Delegates/1_AnonymousMethod/bin/Debug/1_AnonymousMethod.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_7.2_Delegates/1_AnonymousMethod/bin/Debug/1_AnonymousMethod.pdb b/Golovko/Task_7.2_Delegates/1_AnonymousMethod/bin/Debug/1_AnonymousMethod.pdb new file mode 100644 index 0000000..feeb283 Binary files /dev/null and b/Golovko/Task_7.2_Delegates/1_AnonymousMethod/bin/Debug/1_AnonymousMethod.pdb differ diff --git a/Golovko/Task_7.2_Delegates/1_AnonymousMethod/bin/Debug/1_AnonymousMethod.vshost.exe b/Golovko/Task_7.2_Delegates/1_AnonymousMethod/bin/Debug/1_AnonymousMethod.vshost.exe new file mode 100644 index 0000000..681ab77 Binary files /dev/null and b/Golovko/Task_7.2_Delegates/1_AnonymousMethod/bin/Debug/1_AnonymousMethod.vshost.exe differ diff --git a/Golovko/Task_7.2_Delegates/1_AnonymousMethod/bin/Debug/1_AnonymousMethod.vshost.exe.config b/Golovko/Task_7.2_Delegates/1_AnonymousMethod/bin/Debug/1_AnonymousMethod.vshost.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_7.2_Delegates/1_AnonymousMethod/bin/Debug/1_AnonymousMethod.vshost.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_7.2_Delegates/1_AnonymousMethod/obj/Debug/1_AnonymousMethod.csproj.FileListAbsolute.txt b/Golovko/Task_7.2_Delegates/1_AnonymousMethod/obj/Debug/1_AnonymousMethod.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..fb216c9 --- /dev/null +++ b/Golovko/Task_7.2_Delegates/1_AnonymousMethod/obj/Debug/1_AnonymousMethod.csproj.FileListAbsolute.txt @@ -0,0 +1,5 @@ +c:\users\головко\documents\visual studio 2015\Projects\Task_7.2_Delegates\1_AnonymousMethod\bin\Debug\1_AnonymousMethod.exe.config +c:\users\головко\documents\visual studio 2015\Projects\Task_7.2_Delegates\1_AnonymousMethod\bin\Debug\1_AnonymousMethod.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_7.2_Delegates\1_AnonymousMethod\bin\Debug\1_AnonymousMethod.pdb +c:\users\головко\documents\visual studio 2015\Projects\Task_7.2_Delegates\1_AnonymousMethod\obj\Debug\1_AnonymousMethod.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_7.2_Delegates\1_AnonymousMethod\obj\Debug\1_AnonymousMethod.pdb diff --git a/Golovko/Task_7.2_Delegates/1_AnonymousMethod/obj/Debug/1_AnonymousMethod.exe b/Golovko/Task_7.2_Delegates/1_AnonymousMethod/obj/Debug/1_AnonymousMethod.exe new file mode 100644 index 0000000..0a24589 Binary files /dev/null and b/Golovko/Task_7.2_Delegates/1_AnonymousMethod/obj/Debug/1_AnonymousMethod.exe differ diff --git a/Golovko/Task_7.2_Delegates/1_AnonymousMethod/obj/Debug/1_AnonymousMethod.pdb b/Golovko/Task_7.2_Delegates/1_AnonymousMethod/obj/Debug/1_AnonymousMethod.pdb new file mode 100644 index 0000000..feeb283 Binary files /dev/null and b/Golovko/Task_7.2_Delegates/1_AnonymousMethod/obj/Debug/1_AnonymousMethod.pdb differ diff --git a/Golovko/Task_7.2_Delegates/1_AnonymousMethod/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Golovko/Task_7.2_Delegates/1_AnonymousMethod/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..3e720a4 Binary files /dev/null and b/Golovko/Task_7.2_Delegates/1_AnonymousMethod/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Golovko/Task_7.2_Delegates/1_AnonymousMethod/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Golovko/Task_7.2_Delegates/1_AnonymousMethod/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_7.2_Delegates/1_AnonymousMethod/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Golovko/Task_7.2_Delegates/1_AnonymousMethod/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_7.2_Delegates/1_AnonymousMethod/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Golovko/Task_7.2_Delegates/1_AnonymousMethod/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_7.2_Delegates/2_LambdaOperatorsCalc/2_LambdaOperatorsCalc.csproj b/Golovko/Task_7.2_Delegates/2_LambdaOperatorsCalc/2_LambdaOperatorsCalc.csproj new file mode 100644 index 0000000..f1a2eb0 --- /dev/null +++ b/Golovko/Task_7.2_Delegates/2_LambdaOperatorsCalc/2_LambdaOperatorsCalc.csproj @@ -0,0 +1,62 @@ + + + + + Debug + AnyCPU + {DCC588B9-A8DB-4964-BE35-C37BF29A8200} + Exe + Properties + _2_LambdaOperatorsCalc + 2_LambdaOperatorsCalc + v4.5.2 + 512 + 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/Golovko/Task_7.2_Delegates/2_LambdaOperatorsCalc/App.config b/Golovko/Task_7.2_Delegates/2_LambdaOperatorsCalc/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_7.2_Delegates/2_LambdaOperatorsCalc/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_7.2_Delegates/2_LambdaOperatorsCalc/CalcDelegate.cs b/Golovko/Task_7.2_Delegates/2_LambdaOperatorsCalc/CalcDelegate.cs new file mode 100644 index 0000000..e02ef2f --- /dev/null +++ b/Golovko/Task_7.2_Delegates/2_LambdaOperatorsCalc/CalcDelegate.cs @@ -0,0 +1,10 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_LambdaOperatorsCalc +{ + delegate double CalcDelegate(double a, double b); +} diff --git a/Golovko/Task_7.2_Delegates/2_LambdaOperatorsCalc/Calculator.cs b/Golovko/Task_7.2_Delegates/2_LambdaOperatorsCalc/Calculator.cs new file mode 100644 index 0000000..3bd99cb --- /dev/null +++ b/Golovko/Task_7.2_Delegates/2_LambdaOperatorsCalc/Calculator.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_LambdaOperatorsCalc +{ + static class Calculator + { + public static CalcDelegate Add = (a, b) => a + b; + public static CalcDelegate Sub = (a, b) => a - b; + public static CalcDelegate Mul = (a, b) => a * b; + public static CalcDelegate Div = (a, b) => + { + try + { + if (b == 0) + { + throw new DivideByZeroException(); + } + return a / b; + } + catch (DivideByZeroException e) + { + Console.WriteLine("Divide by zero exception. {0}", e.Message); + return a < 0 ? double.NegativeInfinity : double.PositiveInfinity; + } + }; + } +} diff --git a/Golovko/Task_7.2_Delegates/2_LambdaOperatorsCalc/Program.cs b/Golovko/Task_7.2_Delegates/2_LambdaOperatorsCalc/Program.cs new file mode 100644 index 0000000..20ed4eb --- /dev/null +++ b/Golovko/Task_7.2_Delegates/2_LambdaOperatorsCalc/Program.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_LambdaOperatorsCalc +{ + class Program + { + static void Main(string[] args) + { + Console.WriteLine(Calculator.Add(2, 3)); + Console.WriteLine(Calculator.Sub(2, 3)); + Console.WriteLine(Calculator.Mul(2, 3)); + Console.WriteLine(Calculator.Div(2, 3)); + Console.WriteLine(Calculator.Div(2, 0)); + Console.ReadKey(); + } + } +} diff --git a/Golovko/Task_7.2_Delegates/2_LambdaOperatorsCalc/Properties/AssemblyInfo.cs b/Golovko/Task_7.2_Delegates/2_LambdaOperatorsCalc/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..129aa30 --- /dev/null +++ b/Golovko/Task_7.2_Delegates/2_LambdaOperatorsCalc/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("2_LambdaOperatorsCalc")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("2_LambdaOperatorsCalc")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[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("dcc588b9-a8db-4964-be35-c37bf29a8200")] + +// 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")] diff --git a/Golovko/Task_7.2_Delegates/2_LambdaOperatorsCalc/bin/Debug/2_LambdaOperatorsCalc.exe b/Golovko/Task_7.2_Delegates/2_LambdaOperatorsCalc/bin/Debug/2_LambdaOperatorsCalc.exe new file mode 100644 index 0000000..2c0dc6a Binary files /dev/null and b/Golovko/Task_7.2_Delegates/2_LambdaOperatorsCalc/bin/Debug/2_LambdaOperatorsCalc.exe differ diff --git a/Golovko/Task_7.2_Delegates/2_LambdaOperatorsCalc/bin/Debug/2_LambdaOperatorsCalc.exe.config b/Golovko/Task_7.2_Delegates/2_LambdaOperatorsCalc/bin/Debug/2_LambdaOperatorsCalc.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_7.2_Delegates/2_LambdaOperatorsCalc/bin/Debug/2_LambdaOperatorsCalc.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_7.2_Delegates/2_LambdaOperatorsCalc/bin/Debug/2_LambdaOperatorsCalc.pdb b/Golovko/Task_7.2_Delegates/2_LambdaOperatorsCalc/bin/Debug/2_LambdaOperatorsCalc.pdb new file mode 100644 index 0000000..1a8628d Binary files /dev/null and b/Golovko/Task_7.2_Delegates/2_LambdaOperatorsCalc/bin/Debug/2_LambdaOperatorsCalc.pdb differ diff --git a/Golovko/Task_7.2_Delegates/2_LambdaOperatorsCalc/bin/Debug/2_LambdaOperatorsCalc.vshost.exe b/Golovko/Task_7.2_Delegates/2_LambdaOperatorsCalc/bin/Debug/2_LambdaOperatorsCalc.vshost.exe new file mode 100644 index 0000000..681ab77 Binary files /dev/null and b/Golovko/Task_7.2_Delegates/2_LambdaOperatorsCalc/bin/Debug/2_LambdaOperatorsCalc.vshost.exe differ diff --git a/Golovko/Task_7.2_Delegates/2_LambdaOperatorsCalc/bin/Debug/2_LambdaOperatorsCalc.vshost.exe.config b/Golovko/Task_7.2_Delegates/2_LambdaOperatorsCalc/bin/Debug/2_LambdaOperatorsCalc.vshost.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_7.2_Delegates/2_LambdaOperatorsCalc/bin/Debug/2_LambdaOperatorsCalc.vshost.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_7.2_Delegates/2_LambdaOperatorsCalc/obj/Debug/2_LambdaOperatorsCalc.csproj.FileListAbsolute.txt b/Golovko/Task_7.2_Delegates/2_LambdaOperatorsCalc/obj/Debug/2_LambdaOperatorsCalc.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..0c6e96d --- /dev/null +++ b/Golovko/Task_7.2_Delegates/2_LambdaOperatorsCalc/obj/Debug/2_LambdaOperatorsCalc.csproj.FileListAbsolute.txt @@ -0,0 +1,5 @@ +c:\users\головко\documents\visual studio 2015\Projects\Task_7.2_Delegates\2_LambdaOperatorsCalc\bin\Debug\2_LambdaOperatorsCalc.exe.config +c:\users\головко\documents\visual studio 2015\Projects\Task_7.2_Delegates\2_LambdaOperatorsCalc\bin\Debug\2_LambdaOperatorsCalc.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_7.2_Delegates\2_LambdaOperatorsCalc\bin\Debug\2_LambdaOperatorsCalc.pdb +c:\users\головко\documents\visual studio 2015\Projects\Task_7.2_Delegates\2_LambdaOperatorsCalc\obj\Debug\2_LambdaOperatorsCalc.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_7.2_Delegates\2_LambdaOperatorsCalc\obj\Debug\2_LambdaOperatorsCalc.pdb diff --git a/Golovko/Task_7.2_Delegates/2_LambdaOperatorsCalc/obj/Debug/2_LambdaOperatorsCalc.exe b/Golovko/Task_7.2_Delegates/2_LambdaOperatorsCalc/obj/Debug/2_LambdaOperatorsCalc.exe new file mode 100644 index 0000000..2c0dc6a Binary files /dev/null and b/Golovko/Task_7.2_Delegates/2_LambdaOperatorsCalc/obj/Debug/2_LambdaOperatorsCalc.exe differ diff --git a/Golovko/Task_7.2_Delegates/2_LambdaOperatorsCalc/obj/Debug/2_LambdaOperatorsCalc.pdb b/Golovko/Task_7.2_Delegates/2_LambdaOperatorsCalc/obj/Debug/2_LambdaOperatorsCalc.pdb new file mode 100644 index 0000000..1a8628d Binary files /dev/null and b/Golovko/Task_7.2_Delegates/2_LambdaOperatorsCalc/obj/Debug/2_LambdaOperatorsCalc.pdb differ diff --git a/Golovko/Task_7.2_Delegates/2_LambdaOperatorsCalc/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Golovko/Task_7.2_Delegates/2_LambdaOperatorsCalc/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..8632f2c Binary files /dev/null and b/Golovko/Task_7.2_Delegates/2_LambdaOperatorsCalc/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Golovko/Task_7.2_Delegates/2_LambdaOperatorsCalc/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Golovko/Task_7.2_Delegates/2_LambdaOperatorsCalc/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_7.2_Delegates/2_LambdaOperatorsCalc/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Golovko/Task_7.2_Delegates/2_LambdaOperatorsCalc/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_7.2_Delegates/2_LambdaOperatorsCalc/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Golovko/Task_7.2_Delegates/2_LambdaOperatorsCalc/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_7.2_Delegates/3_DelegatesArray/3_DelegatesArray.csproj b/Golovko/Task_7.2_Delegates/3_DelegatesArray/3_DelegatesArray.csproj new file mode 100644 index 0000000..8c79d4e --- /dev/null +++ b/Golovko/Task_7.2_Delegates/3_DelegatesArray/3_DelegatesArray.csproj @@ -0,0 +1,65 @@ + + + + + Debug + AnyCPU + {E642623D-F32E-41BA-886C-21B043FDDEA7} + Exe + Properties + _3_DelegatesArray + 3_DelegatesArray + v4.5.2 + 512 + 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/Golovko/Task_7.2_Delegates/3_DelegatesArray/App.config b/Golovko/Task_7.2_Delegates/3_DelegatesArray/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_7.2_Delegates/3_DelegatesArray/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_7.2_Delegates/3_DelegatesArray/AvgCalculator.cs b/Golovko/Task_7.2_Delegates/3_DelegatesArray/AvgCalculator.cs new file mode 100644 index 0000000..8493d61 --- /dev/null +++ b/Golovko/Task_7.2_Delegates/3_DelegatesArray/AvgCalculator.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _3_DelegatesArray +{ + class AvgCalculator + { + public static AvgDelegate Avg = (rndDelegateArray => + { + double sum = 0; + foreach (RndDelegate rndDelegate in rndDelegateArray) + { + sum += rndDelegate(); + } + return sum / rndDelegateArray.Length; + }); + } +} diff --git a/Golovko/Task_7.2_Delegates/3_DelegatesArray/AvgDelegate.cs b/Golovko/Task_7.2_Delegates/3_DelegatesArray/AvgDelegate.cs new file mode 100644 index 0000000..7111f7b --- /dev/null +++ b/Golovko/Task_7.2_Delegates/3_DelegatesArray/AvgDelegate.cs @@ -0,0 +1,10 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _3_DelegatesArray +{ + delegate double AvgDelegate(RndDelegate[] rndDelegatesArray); +} diff --git a/Golovko/Task_7.2_Delegates/3_DelegatesArray/Generator.cs b/Golovko/Task_7.2_Delegates/3_DelegatesArray/Generator.cs new file mode 100644 index 0000000..d50d56d --- /dev/null +++ b/Golovko/Task_7.2_Delegates/3_DelegatesArray/Generator.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _3_DelegatesArray +{ + static class Generator + { + private const int MaxValue = 100; + private static readonly object locker; + private static readonly Random rnd; + static Generator() + { + locker = new object(); + rnd = new Random(DateTime.Now.Millisecond); + } + public static int GetRand() + { + lock(locker) + { + int res = rnd.Next(MaxValue + 1); + Log.Write("Generated: {0}", res); + return res; + } + } + } +} diff --git a/Golovko/Task_7.2_Delegates/3_DelegatesArray/Log.cs b/Golovko/Task_7.2_Delegates/3_DelegatesArray/Log.cs new file mode 100644 index 0000000..5cb9aac --- /dev/null +++ b/Golovko/Task_7.2_Delegates/3_DelegatesArray/Log.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _3_DelegatesArray +{ + static class Log + { + public static void Write(string text, params object[] args) + { + Console.WriteLine(text, args); + } + } +} diff --git a/Golovko/Task_7.2_Delegates/3_DelegatesArray/Program.cs b/Golovko/Task_7.2_Delegates/3_DelegatesArray/Program.cs new file mode 100644 index 0000000..ff613a1 --- /dev/null +++ b/Golovko/Task_7.2_Delegates/3_DelegatesArray/Program.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _3_DelegatesArray +{ + class Program + { + static void Main(string[] args) + { + double avgArifmetic = AvgCalculator.Avg(new RndDelegate[] + { + new RndDelegate(Generator.GetRand), + new RndDelegate(Generator.GetRand), + new RndDelegate(Generator.GetRand), + new RndDelegate(Generator.GetRand), + new RndDelegate(Generator.GetRand) + }); + Console.WriteLine("Average arifmetic is {0}", avgArifmetic); + Console.ReadKey(); + } + } +} diff --git a/Golovko/Task_7.2_Delegates/3_DelegatesArray/Properties/AssemblyInfo.cs b/Golovko/Task_7.2_Delegates/3_DelegatesArray/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..f510a1e --- /dev/null +++ b/Golovko/Task_7.2_Delegates/3_DelegatesArray/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("3_DelegatesArray")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("3_DelegatesArray")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[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("e642623d-f32e-41ba-886c-21b043fddea7")] + +// 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")] diff --git a/Golovko/Task_7.2_Delegates/3_DelegatesArray/RndDelegate.cs b/Golovko/Task_7.2_Delegates/3_DelegatesArray/RndDelegate.cs new file mode 100644 index 0000000..a5114ae --- /dev/null +++ b/Golovko/Task_7.2_Delegates/3_DelegatesArray/RndDelegate.cs @@ -0,0 +1,10 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _3_DelegatesArray +{ + delegate int RndDelegate(); +} diff --git a/Golovko/Task_7.2_Delegates/3_DelegatesArray/bin/Debug/3_DelegatesArray.exe b/Golovko/Task_7.2_Delegates/3_DelegatesArray/bin/Debug/3_DelegatesArray.exe new file mode 100644 index 0000000..474e9a8 Binary files /dev/null and b/Golovko/Task_7.2_Delegates/3_DelegatesArray/bin/Debug/3_DelegatesArray.exe differ diff --git a/Golovko/Task_7.2_Delegates/3_DelegatesArray/bin/Debug/3_DelegatesArray.exe.config b/Golovko/Task_7.2_Delegates/3_DelegatesArray/bin/Debug/3_DelegatesArray.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_7.2_Delegates/3_DelegatesArray/bin/Debug/3_DelegatesArray.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_7.2_Delegates/3_DelegatesArray/bin/Debug/3_DelegatesArray.pdb b/Golovko/Task_7.2_Delegates/3_DelegatesArray/bin/Debug/3_DelegatesArray.pdb new file mode 100644 index 0000000..48ad04e Binary files /dev/null and b/Golovko/Task_7.2_Delegates/3_DelegatesArray/bin/Debug/3_DelegatesArray.pdb differ diff --git a/Golovko/Task_7.2_Delegates/3_DelegatesArray/bin/Debug/3_DelegatesArray.vshost.exe b/Golovko/Task_7.2_Delegates/3_DelegatesArray/bin/Debug/3_DelegatesArray.vshost.exe new file mode 100644 index 0000000..681ab77 Binary files /dev/null and b/Golovko/Task_7.2_Delegates/3_DelegatesArray/bin/Debug/3_DelegatesArray.vshost.exe differ diff --git a/Golovko/Task_7.2_Delegates/3_DelegatesArray/bin/Debug/3_DelegatesArray.vshost.exe.config b/Golovko/Task_7.2_Delegates/3_DelegatesArray/bin/Debug/3_DelegatesArray.vshost.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_7.2_Delegates/3_DelegatesArray/bin/Debug/3_DelegatesArray.vshost.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_7.2_Delegates/3_DelegatesArray/obj/Debug/3_DelegatesArray.csproj.FileListAbsolute.txt b/Golovko/Task_7.2_Delegates/3_DelegatesArray/obj/Debug/3_DelegatesArray.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..3fb0b70 --- /dev/null +++ b/Golovko/Task_7.2_Delegates/3_DelegatesArray/obj/Debug/3_DelegatesArray.csproj.FileListAbsolute.txt @@ -0,0 +1,5 @@ +c:\users\головко\documents\visual studio 2015\Projects\Task_7.2_Delegates\3_DelegatesArray\bin\Debug\3_DelegatesArray.exe.config +c:\users\головко\documents\visual studio 2015\Projects\Task_7.2_Delegates\3_DelegatesArray\bin\Debug\3_DelegatesArray.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_7.2_Delegates\3_DelegatesArray\bin\Debug\3_DelegatesArray.pdb +c:\users\головко\documents\visual studio 2015\Projects\Task_7.2_Delegates\3_DelegatesArray\obj\Debug\3_DelegatesArray.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_7.2_Delegates\3_DelegatesArray\obj\Debug\3_DelegatesArray.pdb diff --git a/Golovko/Task_7.2_Delegates/3_DelegatesArray/obj/Debug/3_DelegatesArray.exe b/Golovko/Task_7.2_Delegates/3_DelegatesArray/obj/Debug/3_DelegatesArray.exe new file mode 100644 index 0000000..474e9a8 Binary files /dev/null and b/Golovko/Task_7.2_Delegates/3_DelegatesArray/obj/Debug/3_DelegatesArray.exe differ diff --git a/Golovko/Task_7.2_Delegates/3_DelegatesArray/obj/Debug/3_DelegatesArray.pdb b/Golovko/Task_7.2_Delegates/3_DelegatesArray/obj/Debug/3_DelegatesArray.pdb new file mode 100644 index 0000000..48ad04e Binary files /dev/null and b/Golovko/Task_7.2_Delegates/3_DelegatesArray/obj/Debug/3_DelegatesArray.pdb differ diff --git a/Golovko/Task_7.2_Delegates/3_DelegatesArray/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Golovko/Task_7.2_Delegates/3_DelegatesArray/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..92f9213 Binary files /dev/null and b/Golovko/Task_7.2_Delegates/3_DelegatesArray/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Golovko/Task_7.2_Delegates/3_DelegatesArray/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Golovko/Task_7.2_Delegates/3_DelegatesArray/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_7.2_Delegates/3_DelegatesArray/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Golovko/Task_7.2_Delegates/3_DelegatesArray/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_7.2_Delegates/3_DelegatesArray/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Golovko/Task_7.2_Delegates/3_DelegatesArray/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_7.2_Delegates/Task_7.2_Delegates.sln b/Golovko/Task_7.2_Delegates/Task_7.2_Delegates.sln new file mode 100644 index 0000000..d32aed2 --- /dev/null +++ b/Golovko/Task_7.2_Delegates/Task_7.2_Delegates.sln @@ -0,0 +1,34 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.23107.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "1_AnonymousMethod", "1_AnonymousMethod\1_AnonymousMethod.csproj", "{5982F220-AB2B-4FA5-A03B-019BA43CA91B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "2_LambdaOperatorsCalc", "2_LambdaOperatorsCalc\2_LambdaOperatorsCalc.csproj", "{DCC588B9-A8DB-4964-BE35-C37BF29A8200}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "3_DelegatesArray", "3_DelegatesArray\3_DelegatesArray.csproj", "{E642623D-F32E-41BA-886C-21B043FDDEA7}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {5982F220-AB2B-4FA5-A03B-019BA43CA91B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5982F220-AB2B-4FA5-A03B-019BA43CA91B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5982F220-AB2B-4FA5-A03B-019BA43CA91B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5982F220-AB2B-4FA5-A03B-019BA43CA91B}.Release|Any CPU.Build.0 = Release|Any CPU + {DCC588B9-A8DB-4964-BE35-C37BF29A8200}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DCC588B9-A8DB-4964-BE35-C37BF29A8200}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DCC588B9-A8DB-4964-BE35-C37BF29A8200}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DCC588B9-A8DB-4964-BE35-C37BF29A8200}.Release|Any CPU.Build.0 = Release|Any CPU + {E642623D-F32E-41BA-886C-21B043FDDEA7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E642623D-F32E-41BA-886C-21B043FDDEA7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E642623D-F32E-41BA-886C-21B043FDDEA7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E642623D-F32E-41BA-886C-21B043FDDEA7}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Golovko/Task_8/.vs/Task_8/v14/.suo b/Golovko/Task_8/.vs/Task_8/v14/.suo new file mode 100644 index 0000000..ac1c160 Binary files /dev/null and b/Golovko/Task_8/.vs/Task_8/v14/.suo differ diff --git a/Golovko/Task_8/1_FactoryMethod/1_FactoryMethod.csproj b/Golovko/Task_8/1_FactoryMethod/1_FactoryMethod.csproj new file mode 100644 index 0000000..2aa3fac --- /dev/null +++ b/Golovko/Task_8/1_FactoryMethod/1_FactoryMethod.csproj @@ -0,0 +1,61 @@ + + + + + Debug + AnyCPU + {E3F5A8FA-A90E-4521-9A2E-90882FC36E75} + Exe + Properties + _1_FactoryMethod + 1_FactoryMethod + v4.5.2 + 512 + 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/Golovko/Task_8/1_FactoryMethod/App.config b/Golovko/Task_8/1_FactoryMethod/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_8/1_FactoryMethod/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_8/1_FactoryMethod/MyClass.cs b/Golovko/Task_8/1_FactoryMethod/MyClass.cs new file mode 100644 index 0000000..5e5e9bc --- /dev/null +++ b/Golovko/Task_8/1_FactoryMethod/MyClass.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _1_FactoryMethod +{ + class MyClass where T : new() + { + public static T FactoryMethod() + { + return new T(); + } + } +} diff --git a/Golovko/Task_8/1_FactoryMethod/Program.cs b/Golovko/Task_8/1_FactoryMethod/Program.cs new file mode 100644 index 0000000..bde50a9 --- /dev/null +++ b/Golovko/Task_8/1_FactoryMethod/Program.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _1_FactoryMethod +{ + class Program + { + static void Main(string[] args) + { + object exception = MyClass.FactoryMethod(); + object @object = MyClass.FactoryMethod(); + object @int = MyClass.FactoryMethod(); + Console.WriteLine("Instance of type {0}", exception.GetType().Name); + Console.WriteLine("Instance of type {0}", @object.GetType().Name); + Console.WriteLine("Instance of type {0}", @int.GetType().Name); + Console.ReadKey(); + } + } +} diff --git a/Golovko/Task_8/1_FactoryMethod/Properties/AssemblyInfo.cs b/Golovko/Task_8/1_FactoryMethod/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..112227c --- /dev/null +++ b/Golovko/Task_8/1_FactoryMethod/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("1_FactoryMethod")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("1_FactoryMethod")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[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("e3f5a8fa-a90e-4521-9a2e-90882fc36e75")] + +// 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")] diff --git a/Golovko/Task_8/1_FactoryMethod/bin/Debug/1_FactoryMethod.exe b/Golovko/Task_8/1_FactoryMethod/bin/Debug/1_FactoryMethod.exe new file mode 100644 index 0000000..b39bfdb Binary files /dev/null and b/Golovko/Task_8/1_FactoryMethod/bin/Debug/1_FactoryMethod.exe differ diff --git a/Golovko/Task_8/1_FactoryMethod/bin/Debug/1_FactoryMethod.exe.config b/Golovko/Task_8/1_FactoryMethod/bin/Debug/1_FactoryMethod.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_8/1_FactoryMethod/bin/Debug/1_FactoryMethod.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_8/1_FactoryMethod/bin/Debug/1_FactoryMethod.pdb b/Golovko/Task_8/1_FactoryMethod/bin/Debug/1_FactoryMethod.pdb new file mode 100644 index 0000000..bc6350c Binary files /dev/null and b/Golovko/Task_8/1_FactoryMethod/bin/Debug/1_FactoryMethod.pdb differ diff --git a/Golovko/Task_8/1_FactoryMethod/bin/Debug/1_FactoryMethod.vshost.exe b/Golovko/Task_8/1_FactoryMethod/bin/Debug/1_FactoryMethod.vshost.exe new file mode 100644 index 0000000..681ab77 Binary files /dev/null and b/Golovko/Task_8/1_FactoryMethod/bin/Debug/1_FactoryMethod.vshost.exe differ diff --git a/Golovko/Task_8/1_FactoryMethod/bin/Debug/1_FactoryMethod.vshost.exe.config b/Golovko/Task_8/1_FactoryMethod/bin/Debug/1_FactoryMethod.vshost.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_8/1_FactoryMethod/bin/Debug/1_FactoryMethod.vshost.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_8/1_FactoryMethod/obj/Debug/1_FactoryMethod.csproj.FileListAbsolute.txt b/Golovko/Task_8/1_FactoryMethod/obj/Debug/1_FactoryMethod.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..f2c089a --- /dev/null +++ b/Golovko/Task_8/1_FactoryMethod/obj/Debug/1_FactoryMethod.csproj.FileListAbsolute.txt @@ -0,0 +1,5 @@ +c:\users\головко\documents\visual studio 2015\Projects\Task_8\1_FactoryMethod\bin\Debug\1_FactoryMethod.exe.config +c:\users\головко\documents\visual studio 2015\Projects\Task_8\1_FactoryMethod\bin\Debug\1_FactoryMethod.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_8\1_FactoryMethod\bin\Debug\1_FactoryMethod.pdb +c:\users\головко\documents\visual studio 2015\Projects\Task_8\1_FactoryMethod\obj\Debug\1_FactoryMethod.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_8\1_FactoryMethod\obj\Debug\1_FactoryMethod.pdb diff --git a/Golovko/Task_8/1_FactoryMethod/obj/Debug/1_FactoryMethod.exe b/Golovko/Task_8/1_FactoryMethod/obj/Debug/1_FactoryMethod.exe new file mode 100644 index 0000000..b39bfdb Binary files /dev/null and b/Golovko/Task_8/1_FactoryMethod/obj/Debug/1_FactoryMethod.exe differ diff --git a/Golovko/Task_8/1_FactoryMethod/obj/Debug/1_FactoryMethod.pdb b/Golovko/Task_8/1_FactoryMethod/obj/Debug/1_FactoryMethod.pdb new file mode 100644 index 0000000..bc6350c Binary files /dev/null and b/Golovko/Task_8/1_FactoryMethod/obj/Debug/1_FactoryMethod.pdb differ diff --git a/Golovko/Task_8/1_FactoryMethod/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Golovko/Task_8/1_FactoryMethod/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..0f25ea5 Binary files /dev/null and b/Golovko/Task_8/1_FactoryMethod/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Golovko/Task_8/1_FactoryMethod/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Golovko/Task_8/1_FactoryMethod/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_8/1_FactoryMethod/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Golovko/Task_8/1_FactoryMethod/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_8/1_FactoryMethod/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Golovko/Task_8/1_FactoryMethod/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_8/2_MyList/2_MyList.csproj b/Golovko/Task_8/2_MyList/2_MyList.csproj new file mode 100644 index 0000000..46609f2 --- /dev/null +++ b/Golovko/Task_8/2_MyList/2_MyList.csproj @@ -0,0 +1,63 @@ + + + + + Debug + AnyCPU + {399D58B4-BE6F-42C5-818C-9088FF2A9384} + Exe + Properties + _2_MyList + 2_MyList + v4.5.2 + 512 + 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/Golovko/Task_8/2_MyList/App.config b/Golovko/Task_8/2_MyList/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_8/2_MyList/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_8/2_MyList/IMyList.cs b/Golovko/Task_8/2_MyList/IMyList.cs new file mode 100644 index 0000000..e4ef967 --- /dev/null +++ b/Golovko/Task_8/2_MyList/IMyList.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_MyList +{ + interface IMyList + { + void Add(T item); + T this[int index] { get; } + int Count { get; } + } +} diff --git a/Golovko/Task_8/2_MyList/Log.cs b/Golovko/Task_8/2_MyList/Log.cs new file mode 100644 index 0000000..1eecb45 --- /dev/null +++ b/Golovko/Task_8/2_MyList/Log.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_MyList +{ + static class Log + { + public static void Write(string message) + { + Console.WriteLine(message); + } + } +} diff --git a/Golovko/Task_8/2_MyList/MyList.cs b/Golovko/Task_8/2_MyList/MyList.cs new file mode 100644 index 0000000..712bdc1 --- /dev/null +++ b/Golovko/Task_8/2_MyList/MyList.cs @@ -0,0 +1,112 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_MyList +{ + public class MyList : IMyList, IEnumerable, IEnumerator + { + private T[] myList; + private int index; + public T this[int index] + { + get + { + T result = default(T); + try + { + result = myList[index]; + } + catch (IndexOutOfRangeException e) + { + Log.Write(e.Message); + } + return result; + } + } + public object Current + { + get { return myList[index]; } + } + public int Count + { + get { return myList.Length; } + } + public MyList() + { + myList = new T[0]; + index = -1; + } + public void Add(T item) + { + T[] tmpList = new T[Count + 1]; + for (int i = 0; i < Count; i++) + { + tmpList[i] = myList[i]; + } + tmpList[Count] = item; + myList = tmpList; + } + public bool RemoveAt(int indexElement) + { + bool hasRemoved = false; + T[] tmpList = new T[Count - 1]; + int k = 0; + try + { + for (int i = 0; i < Count; i++) + { + if (i == indexElement) + { + hasRemoved = true; + continue; + } + tmpList[k++] = myList[i]; + } + myList = tmpList; + } + catch (IndexOutOfRangeException e) + { + Log.Write(e.Message); + } + return hasRemoved; + } + public override string ToString() + { + StringBuilder result = new StringBuilder(); + for (int i = 0; i < Count; i++) + { + result.AppendFormat("List[{0}] = {1}", i, myList[i]); + if (i < Count - 1) + { + result.Append(Environment.NewLine); + } + } + return result.ToString(); + } + public IEnumerator GetEnumerator() + { + return myList.GetEnumerator(); + } + public void Reset() + { + index = -1; + } + public bool MoveNext() + { + bool isMove = false; + if (++index > Count-1) + { + Reset(); + } + else + { + isMove = true; + } + return isMove; + } + } +} diff --git a/Golovko/Task_8/2_MyList/Program.cs b/Golovko/Task_8/2_MyList/Program.cs new file mode 100644 index 0000000..2cc9e0f --- /dev/null +++ b/Golovko/Task_8/2_MyList/Program.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_MyList +{ + class Program + { + static void Main(string[] args) + { + MyList myList = new MyList(); + Console.WriteLine("Adding elements to myList:"); + myList.Add("My"); + myList.Add("List"); + myList.Add("Collection"); + Console.WriteLine("Get info of myList's elements:"); + Console.WriteLine(myList.ToString()); + Console.WriteLine("Get element's value with index '2': {0}", myList[2]); + Console.WriteLine("Remove element with index '1':"); + myList.RemoveAt(1); + Console.WriteLine("Enumerate the collection in foreach cycle:"); + foreach (string element in myList) + { + Console.WriteLine(element); + } + Console.ReadKey(); + } + } +} diff --git a/Golovko/Task_8/2_MyList/Properties/AssemblyInfo.cs b/Golovko/Task_8/2_MyList/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..5704d45 --- /dev/null +++ b/Golovko/Task_8/2_MyList/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("2_MyList")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("2_MyList")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[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("399d58b4-be6f-42c5-818c-9088ff2a9384")] + +// 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")] diff --git a/Golovko/Task_8/2_MyList/bin/Debug/2_MyList.exe b/Golovko/Task_8/2_MyList/bin/Debug/2_MyList.exe new file mode 100644 index 0000000..d942934 Binary files /dev/null and b/Golovko/Task_8/2_MyList/bin/Debug/2_MyList.exe differ diff --git a/Golovko/Task_8/2_MyList/bin/Debug/2_MyList.exe.config b/Golovko/Task_8/2_MyList/bin/Debug/2_MyList.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_8/2_MyList/bin/Debug/2_MyList.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_8/2_MyList/bin/Debug/2_MyList.pdb b/Golovko/Task_8/2_MyList/bin/Debug/2_MyList.pdb new file mode 100644 index 0000000..b56001d Binary files /dev/null and b/Golovko/Task_8/2_MyList/bin/Debug/2_MyList.pdb differ diff --git a/Golovko/Task_8/2_MyList/bin/Debug/2_MyList.vshost.exe b/Golovko/Task_8/2_MyList/bin/Debug/2_MyList.vshost.exe new file mode 100644 index 0000000..681ab77 Binary files /dev/null and b/Golovko/Task_8/2_MyList/bin/Debug/2_MyList.vshost.exe differ diff --git a/Golovko/Task_8/2_MyList/bin/Debug/2_MyList.vshost.exe.config b/Golovko/Task_8/2_MyList/bin/Debug/2_MyList.vshost.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_8/2_MyList/bin/Debug/2_MyList.vshost.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_8/2_MyList/bin/Debug/2_MyList.vshost.exe.manifest b/Golovko/Task_8/2_MyList/bin/Debug/2_MyList.vshost.exe.manifest new file mode 100644 index 0000000..061c9ca --- /dev/null +++ b/Golovko/Task_8/2_MyList/bin/Debug/2_MyList.vshost.exe.manifest @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/Golovko/Task_8/2_MyList/obj/Debug/2_MyList.csproj.FileListAbsolute.txt b/Golovko/Task_8/2_MyList/obj/Debug/2_MyList.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..0485948 --- /dev/null +++ b/Golovko/Task_8/2_MyList/obj/Debug/2_MyList.csproj.FileListAbsolute.txt @@ -0,0 +1,5 @@ +c:\users\головко\documents\visual studio 2015\Projects\Task_8\2_MyList\bin\Debug\2_MyList.exe.config +c:\users\головко\documents\visual studio 2015\Projects\Task_8\2_MyList\bin\Debug\2_MyList.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_8\2_MyList\bin\Debug\2_MyList.pdb +c:\users\головко\documents\visual studio 2015\Projects\Task_8\2_MyList\obj\Debug\2_MyList.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_8\2_MyList\obj\Debug\2_MyList.pdb diff --git a/Golovko/Task_8/2_MyList/obj/Debug/2_MyList.exe b/Golovko/Task_8/2_MyList/obj/Debug/2_MyList.exe new file mode 100644 index 0000000..d942934 Binary files /dev/null and b/Golovko/Task_8/2_MyList/obj/Debug/2_MyList.exe differ diff --git a/Golovko/Task_8/2_MyList/obj/Debug/2_MyList.pdb b/Golovko/Task_8/2_MyList/obj/Debug/2_MyList.pdb new file mode 100644 index 0000000..b56001d Binary files /dev/null and b/Golovko/Task_8/2_MyList/obj/Debug/2_MyList.pdb differ diff --git a/Golovko/Task_8/2_MyList/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Golovko/Task_8/2_MyList/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..4e74358 Binary files /dev/null and b/Golovko/Task_8/2_MyList/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Golovko/Task_8/2_MyList/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Golovko/Task_8/2_MyList/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_8/2_MyList/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Golovko/Task_8/2_MyList/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_8/2_MyList/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Golovko/Task_8/2_MyList/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_8/3_MyDictionary/3_MyDictionary.csproj b/Golovko/Task_8/3_MyDictionary/3_MyDictionary.csproj new file mode 100644 index 0000000..e33337e --- /dev/null +++ b/Golovko/Task_8/3_MyDictionary/3_MyDictionary.csproj @@ -0,0 +1,63 @@ + + + + + Debug + AnyCPU + {FED13C96-DC7A-4E9E-A248-8468BBC4EBD8} + Exe + Properties + _3_MyDictionary + 3_MyDictionary + v4.5.2 + 512 + 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/Golovko/Task_8/3_MyDictionary/App.config b/Golovko/Task_8/3_MyDictionary/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_8/3_MyDictionary/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_8/3_MyDictionary/IMyDictionary.cs b/Golovko/Task_8/3_MyDictionary/IMyDictionary.cs new file mode 100644 index 0000000..e5e241e --- /dev/null +++ b/Golovko/Task_8/3_MyDictionary/IMyDictionary.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _3_MyDictionary +{ + interface IMyDictionary + { + void Add(TKey key, TValue value); + TValue this[int index] { get; } + int Count { get; } + } +} diff --git a/Golovko/Task_8/3_MyDictionary/Log.cs b/Golovko/Task_8/3_MyDictionary/Log.cs new file mode 100644 index 0000000..590c851 --- /dev/null +++ b/Golovko/Task_8/3_MyDictionary/Log.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _3_MyDictionary +{ + static class Log + { + public static void Write(string message, params object[] args) + { + DateTime currentDate = DateTime.Now; + Console.WriteLine("{0} - {1}", currentDate, message); + } + } +} diff --git a/Golovko/Task_8/3_MyDictionary/MyDictionary.cs b/Golovko/Task_8/3_MyDictionary/MyDictionary.cs new file mode 100644 index 0000000..9690d83 --- /dev/null +++ b/Golovko/Task_8/3_MyDictionary/MyDictionary.cs @@ -0,0 +1,144 @@ +using System; +using System.Collections.Generic; +using System.Collections; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _3_MyDictionary +{ + class MyDictionary : IMyDictionary, IEnumerable, IEnumerator + { + private TValue[] values; + private TKey[] keys; + private int index; + public int Count + { + get { return keys.Length; } + } + public object Current + { + get { return values[index]; } + } + public TValue this[int index] + { + get + { + TValue result = default(TValue); + try + { + result = values[index]; + } + catch (IndexOutOfRangeException e) + { + Log.Write(e.Message); + } + return result; + } + } + public TValue this[TKey key] + { + get + { + int index = GetKeyIndex(key); + return index < 0 ? default(TValue) : values[index]; + } + } + public MyDictionary() + { + values = new TValue[0]; + keys = new TKey[0]; + index = -1; + } + public void Add(TKey key, TValue value) + { + TKey[] tmpKeys = new TKey[Count + 1]; + TValue[] tmpValues = new TValue[Count + 1]; + for (int i = 0; i < Count; i++) + { + tmpKeys[i] = keys[i]; + tmpValues[i] = values[i]; + } + tmpKeys[Count] = key; + tmpValues[Count] = value; + keys = tmpKeys; + values = tmpValues; + } + public bool IsExist(TKey key) + { + return GetKeyIndex(key) >= 0; + } + public void Remove(TKey key) + { + TKey[] tmpKeys = new TKey[Count - 1]; + TValue[] tmpValues = new TValue[Count - 1]; + int k = 0; + int index; + if ((index = GetKeyIndex(key)) >= 0) + { + for (int i = 0; i < Count; i++) + { + if (index == i) + { + continue; + } + tmpKeys[k] = keys[i]; + tmpValues[k] = values[i]; + k++; + } + keys = tmpKeys; + values = tmpValues; + } + else + { + Log.Write("Value with '{0}' key doesn't exist", key); + } + } + public IEnumerator GetEnumerator() + { + return values.GetEnumerator(); + } + public void Reset() + { + index = -1; + } + public bool MoveNext() + { + bool hasMoved = false; + if (++index > Count - 1) + { + Reset(); + } + else + { + hasMoved = true; + } + return hasMoved; + } + private int GetKeyIndex(TKey key) + { + int result = -1; + for (int i = 0; i < Count; i++) + { + if (keys[i].Equals(key)) + { + result = i; + } + } + return result; + } + public override string ToString() + { + StringBuilder result = new StringBuilder(); + for (int i = 0; i < Count; i++) + { + result.AppendFormat("Key->{0}: Value->{1}", keys[i], values[i]); + if (i < Count - 1) + { + result.Append(Environment.NewLine); + } + } + return result.ToString(); + } + } +} diff --git a/Golovko/Task_8/3_MyDictionary/Program.cs b/Golovko/Task_8/3_MyDictionary/Program.cs new file mode 100644 index 0000000..2235457 --- /dev/null +++ b/Golovko/Task_8/3_MyDictionary/Program.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _3_MyDictionary +{ + class Program + { + static void Main(string[] args) + { + MyDictionary myDictionary = new MyDictionary(); + Console.WriteLine("Add keys and values to myDictionary:"); + myDictionary.Add("first key", "first value"); + myDictionary.Add("second key", "second value"); + myDictionary.Add("third key", "third value"); + Console.WriteLine(myDictionary.ToString()); + Console.WriteLine("Removing element with key 'second key'"); + Console.WriteLine("Enumerating elements in foreach cycle:"); + myDictionary.Remove("second key"); + foreach (string value in myDictionary) + { + Console.WriteLine(value); + } + Console.WriteLine("Getting element with 'third key' key:"); + Console.WriteLine(myDictionary["third key"]); + Console.ReadKey(); + } + } +} diff --git a/Golovko/Task_8/3_MyDictionary/Properties/AssemblyInfo.cs b/Golovko/Task_8/3_MyDictionary/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..425b821 --- /dev/null +++ b/Golovko/Task_8/3_MyDictionary/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("3_MyDictionary")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("3_MyDictionary")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[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("fed13c96-dc7a-4e9e-a248-8468bbc4ebd8")] + +// 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")] diff --git a/Golovko/Task_8/3_MyDictionary/bin/Debug/3_MyDictionary.exe b/Golovko/Task_8/3_MyDictionary/bin/Debug/3_MyDictionary.exe new file mode 100644 index 0000000..ac3dc67 Binary files /dev/null and b/Golovko/Task_8/3_MyDictionary/bin/Debug/3_MyDictionary.exe differ diff --git a/Golovko/Task_8/3_MyDictionary/bin/Debug/3_MyDictionary.exe.config b/Golovko/Task_8/3_MyDictionary/bin/Debug/3_MyDictionary.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_8/3_MyDictionary/bin/Debug/3_MyDictionary.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_8/3_MyDictionary/bin/Debug/3_MyDictionary.pdb b/Golovko/Task_8/3_MyDictionary/bin/Debug/3_MyDictionary.pdb new file mode 100644 index 0000000..55717c9 Binary files /dev/null and b/Golovko/Task_8/3_MyDictionary/bin/Debug/3_MyDictionary.pdb differ diff --git a/Golovko/Task_8/3_MyDictionary/bin/Debug/3_MyDictionary.vshost.exe b/Golovko/Task_8/3_MyDictionary/bin/Debug/3_MyDictionary.vshost.exe new file mode 100644 index 0000000..681ab77 Binary files /dev/null and b/Golovko/Task_8/3_MyDictionary/bin/Debug/3_MyDictionary.vshost.exe differ diff --git a/Golovko/Task_8/3_MyDictionary/bin/Debug/3_MyDictionary.vshost.exe.config b/Golovko/Task_8/3_MyDictionary/bin/Debug/3_MyDictionary.vshost.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_8/3_MyDictionary/bin/Debug/3_MyDictionary.vshost.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_8/3_MyDictionary/bin/Debug/3_MyDictionary.vshost.exe.manifest b/Golovko/Task_8/3_MyDictionary/bin/Debug/3_MyDictionary.vshost.exe.manifest new file mode 100644 index 0000000..061c9ca --- /dev/null +++ b/Golovko/Task_8/3_MyDictionary/bin/Debug/3_MyDictionary.vshost.exe.manifest @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/Golovko/Task_8/3_MyDictionary/obj/Debug/3_MyDictionary.csproj.FileListAbsolute.txt b/Golovko/Task_8/3_MyDictionary/obj/Debug/3_MyDictionary.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..83fb7be --- /dev/null +++ b/Golovko/Task_8/3_MyDictionary/obj/Debug/3_MyDictionary.csproj.FileListAbsolute.txt @@ -0,0 +1,5 @@ +c:\users\головко\documents\visual studio 2015\Projects\Task_8\3_MyDictionary\bin\Debug\3_MyDictionary.exe.config +c:\users\головко\documents\visual studio 2015\Projects\Task_8\3_MyDictionary\bin\Debug\3_MyDictionary.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_8\3_MyDictionary\bin\Debug\3_MyDictionary.pdb +c:\users\головко\documents\visual studio 2015\Projects\Task_8\3_MyDictionary\obj\Debug\3_MyDictionary.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_8\3_MyDictionary\obj\Debug\3_MyDictionary.pdb diff --git a/Golovko/Task_8/3_MyDictionary/obj/Debug/3_MyDictionary.exe b/Golovko/Task_8/3_MyDictionary/obj/Debug/3_MyDictionary.exe new file mode 100644 index 0000000..ac3dc67 Binary files /dev/null and b/Golovko/Task_8/3_MyDictionary/obj/Debug/3_MyDictionary.exe differ diff --git a/Golovko/Task_8/3_MyDictionary/obj/Debug/3_MyDictionary.pdb b/Golovko/Task_8/3_MyDictionary/obj/Debug/3_MyDictionary.pdb new file mode 100644 index 0000000..55717c9 Binary files /dev/null and b/Golovko/Task_8/3_MyDictionary/obj/Debug/3_MyDictionary.pdb differ diff --git a/Golovko/Task_8/3_MyDictionary/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Golovko/Task_8/3_MyDictionary/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..ea6b732 Binary files /dev/null and b/Golovko/Task_8/3_MyDictionary/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Golovko/Task_8/3_MyDictionary/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Golovko/Task_8/3_MyDictionary/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_8/3_MyDictionary/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Golovko/Task_8/3_MyDictionary/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_8/3_MyDictionary/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Golovko/Task_8/3_MyDictionary/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_8/4_ExtendedMethod/4_ExtendedMethod.csproj b/Golovko/Task_8/4_ExtendedMethod/4_ExtendedMethod.csproj new file mode 100644 index 0000000..692a976 --- /dev/null +++ b/Golovko/Task_8/4_ExtendedMethod/4_ExtendedMethod.csproj @@ -0,0 +1,94 @@ + + + + + Debug + AnyCPU + {E10B1996-B3D7-43D8-A26F-D045423134D4} + Exe + Properties + _4_ExtendedMethod + 4_ExtendedMethod + v4.5.2 + 512 + true + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + + {399d58b4-be6f-42c5-818c-9088ff2a9384} + 2_MyList + + + + + False + Microsoft .NET Framework 4.5.2 %28x86 and x64%29 + true + + + False + .NET Framework 3.5 SP1 + false + + + + + \ No newline at end of file diff --git a/Golovko/Task_8/4_ExtendedMethod/4_ExtendedMethod.csproj.user b/Golovko/Task_8/4_ExtendedMethod/4_ExtendedMethod.csproj.user new file mode 100644 index 0000000..8221333 --- /dev/null +++ b/Golovko/Task_8/4_ExtendedMethod/4_ExtendedMethod.csproj.user @@ -0,0 +1,13 @@ + + + + publish\ + + + + + + en-US + false + + \ No newline at end of file diff --git a/Golovko/Task_8/4_ExtendedMethod/App.config b/Golovko/Task_8/4_ExtendedMethod/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_8/4_ExtendedMethod/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_8/4_ExtendedMethod/MyListExtension.cs b/Golovko/Task_8/4_ExtendedMethod/MyListExtension.cs new file mode 100644 index 0000000..60eaba0 --- /dev/null +++ b/Golovko/Task_8/4_ExtendedMethod/MyListExtension.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using _2_MyList; + +namespace _4_ExtendedMethod +{ + static class MyListExtension + { + public static T[] GetArray(this MyList list) + { + T[] array = new T[list.Count]; + int k = 0; + foreach (T element in list) + { + array[k++] = element; + } + return array; + } + } +} diff --git a/Golovko/Task_8/4_ExtendedMethod/Program.cs b/Golovko/Task_8/4_ExtendedMethod/Program.cs new file mode 100644 index 0000000..f3df99d --- /dev/null +++ b/Golovko/Task_8/4_ExtendedMethod/Program.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using _2_MyList; + +namespace _4_ExtendedMethod +{ + class Program + { + static void Main(string[] args) + { + MyList list = new MyList(); + list.Add(5); + list.Add(7); + list.Add(18); + list.Add(6); + Console.WriteLine(list.ToString()); + int[] array = list.GetArray(); + for (int i = 0; i < array.Length; i++) + { + Console.WriteLine("array[{0}] = {1}", i, array[i]); + } + Console.ReadKey(); + } + } +} diff --git a/Golovko/Task_8/4_ExtendedMethod/Properties/AssemblyInfo.cs b/Golovko/Task_8/4_ExtendedMethod/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..1122186 --- /dev/null +++ b/Golovko/Task_8/4_ExtendedMethod/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("4_ExtendedMethod")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("4_ExtendedMethod")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[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("e10b1996-b3d7-43d8-a26f-d045423134d4")] + +// 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")] diff --git a/Golovko/Task_8/4_ExtendedMethod/bin/Debug/2_MyList.exe b/Golovko/Task_8/4_ExtendedMethod/bin/Debug/2_MyList.exe new file mode 100644 index 0000000..d942934 Binary files /dev/null and b/Golovko/Task_8/4_ExtendedMethod/bin/Debug/2_MyList.exe differ diff --git a/Golovko/Task_8/4_ExtendedMethod/bin/Debug/2_MyList.pdb b/Golovko/Task_8/4_ExtendedMethod/bin/Debug/2_MyList.pdb new file mode 100644 index 0000000..b56001d Binary files /dev/null and b/Golovko/Task_8/4_ExtendedMethod/bin/Debug/2_MyList.pdb differ diff --git a/Golovko/Task_8/4_ExtendedMethod/bin/Debug/4_ExtendedMethod.exe b/Golovko/Task_8/4_ExtendedMethod/bin/Debug/4_ExtendedMethod.exe new file mode 100644 index 0000000..58fc292 Binary files /dev/null and b/Golovko/Task_8/4_ExtendedMethod/bin/Debug/4_ExtendedMethod.exe differ diff --git a/Golovko/Task_8/4_ExtendedMethod/bin/Debug/4_ExtendedMethod.exe.config b/Golovko/Task_8/4_ExtendedMethod/bin/Debug/4_ExtendedMethod.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_8/4_ExtendedMethod/bin/Debug/4_ExtendedMethod.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_8/4_ExtendedMethod/bin/Debug/4_ExtendedMethod.pdb b/Golovko/Task_8/4_ExtendedMethod/bin/Debug/4_ExtendedMethod.pdb new file mode 100644 index 0000000..9eb8d04 Binary files /dev/null and b/Golovko/Task_8/4_ExtendedMethod/bin/Debug/4_ExtendedMethod.pdb differ diff --git a/Golovko/Task_8/4_ExtendedMethod/bin/Debug/4_ExtendedMethod.vshost.exe b/Golovko/Task_8/4_ExtendedMethod/bin/Debug/4_ExtendedMethod.vshost.exe new file mode 100644 index 0000000..681ab77 Binary files /dev/null and b/Golovko/Task_8/4_ExtendedMethod/bin/Debug/4_ExtendedMethod.vshost.exe differ diff --git a/Golovko/Task_8/4_ExtendedMethod/bin/Debug/4_ExtendedMethod.vshost.exe.config b/Golovko/Task_8/4_ExtendedMethod/bin/Debug/4_ExtendedMethod.vshost.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_8/4_ExtendedMethod/bin/Debug/4_ExtendedMethod.vshost.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_8/4_ExtendedMethod/obj/Debug/4_ExtendedMethod.csproj.FileListAbsolute.txt b/Golovko/Task_8/4_ExtendedMethod/obj/Debug/4_ExtendedMethod.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..9372c09 --- /dev/null +++ b/Golovko/Task_8/4_ExtendedMethod/obj/Debug/4_ExtendedMethod.csproj.FileListAbsolute.txt @@ -0,0 +1,8 @@ +C:\Users\Головко\Documents\Visual Studio 2015\Projects\Task_8\4_ExtendedMethod\bin\Debug\4_ExtendedMethod.exe.config +C:\Users\Головко\Documents\Visual Studio 2015\Projects\Task_8\4_ExtendedMethod\obj\Debug\4_ExtendedMethod.csprojResolveAssemblyReference.cache +C:\Users\Головко\Documents\Visual Studio 2015\Projects\Task_8\4_ExtendedMethod\bin\Debug\4_ExtendedMethod.exe +C:\Users\Головко\Documents\Visual Studio 2015\Projects\Task_8\4_ExtendedMethod\bin\Debug\4_ExtendedMethod.pdb +C:\Users\Головко\Documents\Visual Studio 2015\Projects\Task_8\4_ExtendedMethod\bin\Debug\2_MyList.exe +C:\Users\Головко\Documents\Visual Studio 2015\Projects\Task_8\4_ExtendedMethod\bin\Debug\2_MyList.pdb +C:\Users\Головко\Documents\Visual Studio 2015\Projects\Task_8\4_ExtendedMethod\obj\Debug\4_ExtendedMethod.exe +C:\Users\Головко\Documents\Visual Studio 2015\Projects\Task_8\4_ExtendedMethod\obj\Debug\4_ExtendedMethod.pdb diff --git a/Golovko/Task_8/4_ExtendedMethod/obj/Debug/4_ExtendedMethod.csprojResolveAssemblyReference.cache b/Golovko/Task_8/4_ExtendedMethod/obj/Debug/4_ExtendedMethod.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..6f0607a Binary files /dev/null and b/Golovko/Task_8/4_ExtendedMethod/obj/Debug/4_ExtendedMethod.csprojResolveAssemblyReference.cache differ diff --git a/Golovko/Task_8/4_ExtendedMethod/obj/Debug/4_ExtendedMethod.exe b/Golovko/Task_8/4_ExtendedMethod/obj/Debug/4_ExtendedMethod.exe new file mode 100644 index 0000000..58fc292 Binary files /dev/null and b/Golovko/Task_8/4_ExtendedMethod/obj/Debug/4_ExtendedMethod.exe differ diff --git a/Golovko/Task_8/4_ExtendedMethod/obj/Debug/4_ExtendedMethod.pdb b/Golovko/Task_8/4_ExtendedMethod/obj/Debug/4_ExtendedMethod.pdb new file mode 100644 index 0000000..9eb8d04 Binary files /dev/null and b/Golovko/Task_8/4_ExtendedMethod/obj/Debug/4_ExtendedMethod.pdb differ diff --git a/Golovko/Task_8/4_ExtendedMethod/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/Golovko/Task_8/4_ExtendedMethod/obj/Debug/DesignTimeResolveAssemblyReferences.cache new file mode 100644 index 0000000..32192f6 Binary files /dev/null and b/Golovko/Task_8/4_ExtendedMethod/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ diff --git a/Golovko/Task_8/4_ExtendedMethod/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Golovko/Task_8/4_ExtendedMethod/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..e1160c4 Binary files /dev/null and b/Golovko/Task_8/4_ExtendedMethod/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Golovko/Task_8/4_ExtendedMethod/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Golovko/Task_8/4_ExtendedMethod/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_8/4_ExtendedMethod/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Golovko/Task_8/4_ExtendedMethod/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_8/4_ExtendedMethod/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Golovko/Task_8/4_ExtendedMethod/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_8/5_CarCollection/5_CarCollection.csproj b/Golovko/Task_8/5_CarCollection/5_CarCollection.csproj new file mode 100644 index 0000000..0a53e6d --- /dev/null +++ b/Golovko/Task_8/5_CarCollection/5_CarCollection.csproj @@ -0,0 +1,65 @@ + + + + + Debug + AnyCPU + {02953CCB-91E9-42F8-BB74-0EF89A15167C} + Exe + Properties + _5_CarCollection + 5_CarCollection + v4.5.2 + 512 + 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/Golovko/Task_8/5_CarCollection/App.config b/Golovko/Task_8/5_CarCollection/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_8/5_CarCollection/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_8/5_CarCollection/Car.cs b/Golovko/Task_8/5_CarCollection/Car.cs new file mode 100644 index 0000000..7570329 --- /dev/null +++ b/Golovko/Task_8/5_CarCollection/Car.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _5_CarCollection +{ + class Car + { + public string Name { get; protected set; } + public double Speed { get; protected set; } + public double Cost { get; protected set; } + public Car(string name, double speed, double cost) + { + this.Name = name; + this.Speed = speed; + this.Cost = cost; + } + public virtual void PrintInfo() + { + Console.WriteLine("This is {0}", this.GetType().Name); + Console.WriteLine("Name: {0}", Name); + Console.WriteLine("Speed: {0}", Speed); + Console.WriteLine("Cost: {0}", Cost); + } + } +} diff --git a/Golovko/Task_8/5_CarCollection/CarCollection.cs b/Golovko/Task_8/5_CarCollection/CarCollection.cs new file mode 100644 index 0000000..a968253 --- /dev/null +++ b/Golovko/Task_8/5_CarCollection/CarCollection.cs @@ -0,0 +1,79 @@ +using System; +using System.Collections.Generic; +using System.Collections; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _5_CarCollection +{ + class CarCollection : ICarCollection, IEnumerable, IEnumerator where T : Car + { + private T[] cars; + private int index; + public int Count + { + get { return cars.Length; } + } + public T this[int index] + { + get + { + T result = default(T); + try + { + result = cars[index]; + } + catch(IndexOutOfRangeException e) + { + Log.Write(e.Message); + } + return cars[index]; + } + } + public object Current + { + get { return cars[index]; } + } + public CarCollection() + { + cars = new T[0]; + index = -1; + } + public void Add(T car) + { + T[] tmpCars = new T[Count + 1]; + for (int i = 0; i < Count; i++) + { + tmpCars[i] = cars[i]; + } + tmpCars[Count] = car; + cars = tmpCars; + } + public void Clear() + { + cars = new T[0]; + } + public IEnumerator GetEnumerator() + { + return this; + } + public void Reset() + { + index = -1; + } + public bool MoveNext() + { + bool hasMoved = false; + if (++index > Count - 1) + { + Reset(); + } + else + { + hasMoved = true; + } + return hasMoved; + } + } +} diff --git a/Golovko/Task_8/5_CarCollection/ICarCollection.cs b/Golovko/Task_8/5_CarCollection/ICarCollection.cs new file mode 100644 index 0000000..b2735f1 --- /dev/null +++ b/Golovko/Task_8/5_CarCollection/ICarCollection.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _5_CarCollection +{ + interface ICarCollection + { + void Add(T car); + int Count { get; } + T this[int index] { get; } + void Clear(); + } +} diff --git a/Golovko/Task_8/5_CarCollection/Log.cs b/Golovko/Task_8/5_CarCollection/Log.cs new file mode 100644 index 0000000..92ee97a --- /dev/null +++ b/Golovko/Task_8/5_CarCollection/Log.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _5_CarCollection +{ + static class Log + { + public static void Write(string message) + { + Console.WriteLine(message); + } + } +} diff --git a/Golovko/Task_8/5_CarCollection/Program.cs b/Golovko/Task_8/5_CarCollection/Program.cs new file mode 100644 index 0000000..6a3c486 --- /dev/null +++ b/Golovko/Task_8/5_CarCollection/Program.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _5_CarCollection +{ + class Program + { + static void Main(string[] args) + { + CarCollection cars = new CarCollection(); + cars.Add(new Car("Ford", 200, 30000)); + cars.Add(new Car("Toyota", 220, 40000)); + cars.Add(new Car("Mazda", 240, 35000)); + cars.Add(new SportCar("Ferrari", 380, 120000)); + foreach (Car car in cars) + { + car.PrintInfo(); + } + Console.WriteLine("Cars count: {0}", cars.Count); + cars.Clear(); + Console.WriteLine("Cars count: {0}", cars.Count); + Console.ReadKey(); + } + } +} diff --git a/Golovko/Task_8/5_CarCollection/Properties/AssemblyInfo.cs b/Golovko/Task_8/5_CarCollection/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..f36af19 --- /dev/null +++ b/Golovko/Task_8/5_CarCollection/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("5_CarCollection")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("5_CarCollection")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[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("02953ccb-91e9-42f8-bb74-0ef89a15167c")] + +// 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")] diff --git a/Golovko/Task_8/5_CarCollection/SportCar.cs b/Golovko/Task_8/5_CarCollection/SportCar.cs new file mode 100644 index 0000000..5b2a1ce --- /dev/null +++ b/Golovko/Task_8/5_CarCollection/SportCar.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _5_CarCollection +{ + class SportCar : Car + { + public string Specification { get; set; } + public SportCar(string name, double speed, double cost) : base(name, speed, cost) + { + this.Specification = "No data"; + } + public override void PrintInfo() + { + base.PrintInfo(); + Console.WriteLine("Specification: {0}", this.Specification); + } + } +} diff --git a/Golovko/Task_8/5_CarCollection/bin/Debug/5_CarCollection.exe b/Golovko/Task_8/5_CarCollection/bin/Debug/5_CarCollection.exe new file mode 100644 index 0000000..5c2f561 Binary files /dev/null and b/Golovko/Task_8/5_CarCollection/bin/Debug/5_CarCollection.exe differ diff --git a/Golovko/Task_8/5_CarCollection/bin/Debug/5_CarCollection.exe.config b/Golovko/Task_8/5_CarCollection/bin/Debug/5_CarCollection.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_8/5_CarCollection/bin/Debug/5_CarCollection.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_8/5_CarCollection/bin/Debug/5_CarCollection.pdb b/Golovko/Task_8/5_CarCollection/bin/Debug/5_CarCollection.pdb new file mode 100644 index 0000000..066f27f Binary files /dev/null and b/Golovko/Task_8/5_CarCollection/bin/Debug/5_CarCollection.pdb differ diff --git a/Golovko/Task_8/5_CarCollection/bin/Debug/5_CarCollection.vshost.exe b/Golovko/Task_8/5_CarCollection/bin/Debug/5_CarCollection.vshost.exe new file mode 100644 index 0000000..681ab77 Binary files /dev/null and b/Golovko/Task_8/5_CarCollection/bin/Debug/5_CarCollection.vshost.exe differ diff --git a/Golovko/Task_8/5_CarCollection/bin/Debug/5_CarCollection.vshost.exe.config b/Golovko/Task_8/5_CarCollection/bin/Debug/5_CarCollection.vshost.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_8/5_CarCollection/bin/Debug/5_CarCollection.vshost.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_8/5_CarCollection/obj/Debug/5_CarCollection.csproj.FileListAbsolute.txt b/Golovko/Task_8/5_CarCollection/obj/Debug/5_CarCollection.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..3e28e28 --- /dev/null +++ b/Golovko/Task_8/5_CarCollection/obj/Debug/5_CarCollection.csproj.FileListAbsolute.txt @@ -0,0 +1,5 @@ +C:\Users\Головко\Documents\Visual Studio 2015\Projects\Task_8\5_CarCollection\bin\Debug\5_CarCollection.exe.config +C:\Users\Головко\Documents\Visual Studio 2015\Projects\Task_8\5_CarCollection\bin\Debug\5_CarCollection.exe +C:\Users\Головко\Documents\Visual Studio 2015\Projects\Task_8\5_CarCollection\bin\Debug\5_CarCollection.pdb +C:\Users\Головко\Documents\Visual Studio 2015\Projects\Task_8\5_CarCollection\obj\Debug\5_CarCollection.exe +C:\Users\Головко\Documents\Visual Studio 2015\Projects\Task_8\5_CarCollection\obj\Debug\5_CarCollection.pdb diff --git a/Golovko/Task_8/5_CarCollection/obj/Debug/5_CarCollection.exe b/Golovko/Task_8/5_CarCollection/obj/Debug/5_CarCollection.exe new file mode 100644 index 0000000..5c2f561 Binary files /dev/null and b/Golovko/Task_8/5_CarCollection/obj/Debug/5_CarCollection.exe differ diff --git a/Golovko/Task_8/5_CarCollection/obj/Debug/5_CarCollection.pdb b/Golovko/Task_8/5_CarCollection/obj/Debug/5_CarCollection.pdb new file mode 100644 index 0000000..066f27f Binary files /dev/null and b/Golovko/Task_8/5_CarCollection/obj/Debug/5_CarCollection.pdb differ diff --git a/Golovko/Task_8/5_CarCollection/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Golovko/Task_8/5_CarCollection/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..19e2d21 Binary files /dev/null and b/Golovko/Task_8/5_CarCollection/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Golovko/Task_8/5_CarCollection/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Golovko/Task_8/5_CarCollection/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_8/5_CarCollection/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Golovko/Task_8/5_CarCollection/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_8/5_CarCollection/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Golovko/Task_8/5_CarCollection/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_8/6_ArrayList/6_ArrayList.csproj b/Golovko/Task_8/6_ArrayList/6_ArrayList.csproj new file mode 100644 index 0000000..64dc563 --- /dev/null +++ b/Golovko/Task_8/6_ArrayList/6_ArrayList.csproj @@ -0,0 +1,62 @@ + + + + + Debug + AnyCPU + {A54BDC5A-DCF6-4899-AD22-9F6D3791EFD0} + Exe + Properties + _6_ArrayList + 6_ArrayList + v4.5.2 + 512 + 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/Golovko/Task_8/6_ArrayList/App.config b/Golovko/Task_8/6_ArrayList/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_8/6_ArrayList/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_8/6_ArrayList/ArrayList.cs b/Golovko/Task_8/6_ArrayList/ArrayList.cs new file mode 100644 index 0000000..bdd05da --- /dev/null +++ b/Golovko/Task_8/6_ArrayList/ArrayList.cs @@ -0,0 +1,178 @@ +using System; +using System.Collections; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _6_ArrayList +{ + sealed class ArrayList : IList, ICollection, IEnumerable, ICloneable + { + private object[] list; + public int Count + { + get { return list.Length; } + } + public object this[int index] + { + get + { + object result = default(object); + try + { + result = list[index]; + } + catch (IndexOutOfRangeException e) + { + Log.Write(e.Message); + } + return result; + } + set + { + try + { + list[index] = value; + } + catch (IndexOutOfRangeException e) + { + Log.Write(e.Message); + } + } + } + public bool IsReadOnly { get; } + public bool IsFixedSize { get; } + public bool IsSynchronized { get; } + public object SyncRoot { get; } + public ArrayList() + { + list = new object[0]; + this.IsFixedSize = false; + this.IsReadOnly = false; + this.IsSynchronized = false; + this.SyncRoot = this; + } + public int Add(object value) + { + int index = Count; + object[] tmpList = new object[index + 1]; + for (int i = 0; i < index; i++) + { + tmpList[i] = list[i]; + } + tmpList[index] = value; + list = tmpList; + return index; + } + public bool Contains(object value) + { + bool hasContained = false; + for (int i = 0; i < Count; i++) + { + if (list[i].Equals(value)) + { + hasContained = true; + break; + } + } + return hasContained; + } + public void Clear() + { + list = new object[0]; + } + public int IndexOf(object value) + { + int index = -1; + for (int i = 0; i < Count; i++) + { + if (list[i].Equals(value)) + { + index = i; + break; + } + } + return index; + } + public void Insert(int index, object value) + { + object[] tmpList = new object[Count + 1]; + int k = 0; + try + { + for (int i = 0; i < Count; i++) + { + if (index == i) + { + tmpList[k++] = value; + } + tmpList[k++] = list[i]; + } + list = tmpList; + } + catch (IndexOutOfRangeException e) + { + Log.Write(e.Message); + } + } + public void Remove(object value) + { + object[] tmpList = new object[Count - 1]; + int k = 0; + for (int i = 0; i < Count; i++) + { + if (list[i].Equals(value)) + { + continue; + } + tmpList[k++] = list[i]; + } + list = tmpList; + } + public void RemoveAt(int index) + { + object[] tmpList = new object[Count - 1]; + int k = 0; + try + { + for (int i = 0; i < Count; i++) + { + if (index == i) + { + continue; + } + tmpList[k++] = list[i]; + } + + list = tmpList; + } + catch (IndexOutOfRangeException e) + { + Log.Write(e.Message); + } + } + public IEnumerator GetEnumerator() + { + return list.GetEnumerator(); + } + public void CopyTo(Array array, int index) + { + int k = 0; + try + { + for (int i = index; i < Count; i++) + { + array.SetValue(list[i], k++); + } + } + catch (IndexOutOfRangeException e) + { + Log.Write(e.Message); + } + } + public object Clone() + { + return this.MemberwiseClone(); + } + } +} diff --git a/Golovko/Task_8/6_ArrayList/Log.cs b/Golovko/Task_8/6_ArrayList/Log.cs new file mode 100644 index 0000000..5db5fbc --- /dev/null +++ b/Golovko/Task_8/6_ArrayList/Log.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _6_ArrayList +{ + static class Log + { + public static void Write(string message) + { + DateTime currentDate = DateTime.Now; + Console.WriteLine("{0} -- {1}", currentDate, message); + } + } +} diff --git a/Golovko/Task_8/6_ArrayList/Program.cs b/Golovko/Task_8/6_ArrayList/Program.cs new file mode 100644 index 0000000..1a40774 --- /dev/null +++ b/Golovko/Task_8/6_ArrayList/Program.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _6_ArrayList +{ + class Program + { + static void Main(string[] args) + { + ArrayList list = new ArrayList(); + list.Add("ArrayList"); + list.Add(2); + list.Add(new Exception()); + list.Add(null); + list.Add(33.5); + ArrayList clone = (ArrayList)list.Clone(); + list.RemoveAt(2); + Array array = new object[clone.Count]; + clone.CopyTo(array, 0); + Console.WriteLine("array length {0}",array.Length); + foreach (object obj in list) + { + Console.WriteLine(obj); + } + foreach (object obj in clone) + { + Console.WriteLine(obj); + } + Console.WriteLine(array.GetValue(0)); + Console.ReadKey(); + } + } +} diff --git a/Golovko/Task_8/6_ArrayList/Properties/AssemblyInfo.cs b/Golovko/Task_8/6_ArrayList/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..21a8483 --- /dev/null +++ b/Golovko/Task_8/6_ArrayList/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("6_ArrayList")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("6_ArrayList")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[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("a54bdc5a-dcf6-4899-ad22-9f6d3791efd0")] + +// 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")] diff --git a/Golovko/Task_8/6_ArrayList/bin/Debug/6_ArrayList.exe b/Golovko/Task_8/6_ArrayList/bin/Debug/6_ArrayList.exe new file mode 100644 index 0000000..4400457 Binary files /dev/null and b/Golovko/Task_8/6_ArrayList/bin/Debug/6_ArrayList.exe differ diff --git a/Golovko/Task_8/6_ArrayList/bin/Debug/6_ArrayList.exe.config b/Golovko/Task_8/6_ArrayList/bin/Debug/6_ArrayList.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_8/6_ArrayList/bin/Debug/6_ArrayList.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_8/6_ArrayList/bin/Debug/6_ArrayList.pdb b/Golovko/Task_8/6_ArrayList/bin/Debug/6_ArrayList.pdb new file mode 100644 index 0000000..b4f8345 Binary files /dev/null and b/Golovko/Task_8/6_ArrayList/bin/Debug/6_ArrayList.pdb differ diff --git a/Golovko/Task_8/6_ArrayList/bin/Debug/6_ArrayList.vshost.exe b/Golovko/Task_8/6_ArrayList/bin/Debug/6_ArrayList.vshost.exe new file mode 100644 index 0000000..681ab77 Binary files /dev/null and b/Golovko/Task_8/6_ArrayList/bin/Debug/6_ArrayList.vshost.exe differ diff --git a/Golovko/Task_8/6_ArrayList/bin/Debug/6_ArrayList.vshost.exe.config b/Golovko/Task_8/6_ArrayList/bin/Debug/6_ArrayList.vshost.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_8/6_ArrayList/bin/Debug/6_ArrayList.vshost.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_8/6_ArrayList/obj/Debug/6_ArrayList.csproj.FileListAbsolute.txt b/Golovko/Task_8/6_ArrayList/obj/Debug/6_ArrayList.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..cfd7210 --- /dev/null +++ b/Golovko/Task_8/6_ArrayList/obj/Debug/6_ArrayList.csproj.FileListAbsolute.txt @@ -0,0 +1,5 @@ +C:\Users\Головко\Documents\Visual Studio 2015\Projects\Task_8\6_ArrayList\bin\Debug\6_ArrayList.exe.config +C:\Users\Головко\Documents\Visual Studio 2015\Projects\Task_8\6_ArrayList\bin\Debug\6_ArrayList.exe +C:\Users\Головко\Documents\Visual Studio 2015\Projects\Task_8\6_ArrayList\bin\Debug\6_ArrayList.pdb +C:\Users\Головко\Documents\Visual Studio 2015\Projects\Task_8\6_ArrayList\obj\Debug\6_ArrayList.exe +C:\Users\Головко\Documents\Visual Studio 2015\Projects\Task_8\6_ArrayList\obj\Debug\6_ArrayList.pdb diff --git a/Golovko/Task_8/6_ArrayList/obj/Debug/6_ArrayList.exe b/Golovko/Task_8/6_ArrayList/obj/Debug/6_ArrayList.exe new file mode 100644 index 0000000..4400457 Binary files /dev/null and b/Golovko/Task_8/6_ArrayList/obj/Debug/6_ArrayList.exe differ diff --git a/Golovko/Task_8/6_ArrayList/obj/Debug/6_ArrayList.pdb b/Golovko/Task_8/6_ArrayList/obj/Debug/6_ArrayList.pdb new file mode 100644 index 0000000..b4f8345 Binary files /dev/null and b/Golovko/Task_8/6_ArrayList/obj/Debug/6_ArrayList.pdb differ diff --git a/Golovko/Task_8/6_ArrayList/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Golovko/Task_8/6_ArrayList/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..95a1a61 Binary files /dev/null and b/Golovko/Task_8/6_ArrayList/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Golovko/Task_8/6_ArrayList/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Golovko/Task_8/6_ArrayList/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_8/6_ArrayList/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Golovko/Task_8/6_ArrayList/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_8/6_ArrayList/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Golovko/Task_8/6_ArrayList/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_8/Task_8.sln b/Golovko/Task_8/Task_8.sln new file mode 100644 index 0000000..0fb41db --- /dev/null +++ b/Golovko/Task_8/Task_8.sln @@ -0,0 +1,55 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.23107.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "1_FactoryMethod", "1_FactoryMethod\1_FactoryMethod.csproj", "{E3F5A8FA-A90E-4521-9A2E-90882FC36E75}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "2_MyList", "2_MyList\2_MyList.csproj", "{399D58B4-BE6F-42C5-818C-9088FF2A9384}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "3_MyDictionary", "3_MyDictionary\3_MyDictionary.csproj", "{FED13C96-DC7A-4E9E-A248-8468BBC4EBD8}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "4_ExtendedMethod", "4_ExtendedMethod\4_ExtendedMethod.csproj", "{E10B1996-B3D7-43D8-A26F-D045423134D4}" + ProjectSection(ProjectDependencies) = postProject + {399D58B4-BE6F-42C5-818C-9088FF2A9384} = {399D58B4-BE6F-42C5-818C-9088FF2A9384} + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "5_CarCollection", "5_CarCollection\5_CarCollection.csproj", "{02953CCB-91E9-42F8-BB74-0EF89A15167C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "6_ArrayList", "6_ArrayList\6_ArrayList.csproj", "{A54BDC5A-DCF6-4899-AD22-9F6D3791EFD0}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {E3F5A8FA-A90E-4521-9A2E-90882FC36E75}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E3F5A8FA-A90E-4521-9A2E-90882FC36E75}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E3F5A8FA-A90E-4521-9A2E-90882FC36E75}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E3F5A8FA-A90E-4521-9A2E-90882FC36E75}.Release|Any CPU.Build.0 = Release|Any CPU + {399D58B4-BE6F-42C5-818C-9088FF2A9384}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {399D58B4-BE6F-42C5-818C-9088FF2A9384}.Debug|Any CPU.Build.0 = Debug|Any CPU + {399D58B4-BE6F-42C5-818C-9088FF2A9384}.Release|Any CPU.ActiveCfg = Release|Any CPU + {399D58B4-BE6F-42C5-818C-9088FF2A9384}.Release|Any CPU.Build.0 = Release|Any CPU + {FED13C96-DC7A-4E9E-A248-8468BBC4EBD8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FED13C96-DC7A-4E9E-A248-8468BBC4EBD8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FED13C96-DC7A-4E9E-A248-8468BBC4EBD8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FED13C96-DC7A-4E9E-A248-8468BBC4EBD8}.Release|Any CPU.Build.0 = Release|Any CPU + {E10B1996-B3D7-43D8-A26F-D045423134D4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E10B1996-B3D7-43D8-A26F-D045423134D4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E10B1996-B3D7-43D8-A26F-D045423134D4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E10B1996-B3D7-43D8-A26F-D045423134D4}.Release|Any CPU.Build.0 = Release|Any CPU + {02953CCB-91E9-42F8-BB74-0EF89A15167C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {02953CCB-91E9-42F8-BB74-0EF89A15167C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {02953CCB-91E9-42F8-BB74-0EF89A15167C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {02953CCB-91E9-42F8-BB74-0EF89A15167C}.Release|Any CPU.Build.0 = Release|Any CPU + {A54BDC5A-DCF6-4899-AD22-9F6D3791EFD0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A54BDC5A-DCF6-4899-AD22-9F6D3791EFD0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A54BDC5A-DCF6-4899-AD22-9F6D3791EFD0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A54BDC5A-DCF6-4899-AD22-9F6D3791EFD0}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Golovko/Task_9/.vs/Task_9/v14/.suo b/Golovko/Task_9/.vs/Task_9/v14/.suo new file mode 100644 index 0000000..afe0fe6 Binary files /dev/null and b/Golovko/Task_9/.vs/Task_9/v14/.suo differ diff --git a/Golovko/Task_9/1_ArrayToCollection/1_ArrayToCollection.csproj b/Golovko/Task_9/1_ArrayToCollection/1_ArrayToCollection.csproj new file mode 100644 index 0000000..d22d3d0 --- /dev/null +++ b/Golovko/Task_9/1_ArrayToCollection/1_ArrayToCollection.csproj @@ -0,0 +1,61 @@ + + + + + Debug + AnyCPU + {2E79C3C2-6B67-451B-88D1-F23378D7DB81} + Exe + Properties + _1_ArrayToCollection + 1_ArrayToCollection + v4.5.2 + 512 + 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/Golovko/Task_9/1_ArrayToCollection/App.config b/Golovko/Task_9/1_ArrayToCollection/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_9/1_ArrayToCollection/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_9/1_ArrayToCollection/Collection.cs b/Golovko/Task_9/1_ArrayToCollection/Collection.cs new file mode 100644 index 0000000..37644d0 --- /dev/null +++ b/Golovko/Task_9/1_ArrayToCollection/Collection.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _1_ArrayToCollection +{ + static class Collection + { + public static IEnumerable ArrayToCollection(int[] array) + { + for (int i = 0; i < array.Length; i++) + { + if (array[i] % 2 == 0) + { + yield return array[i]; + } + } + } + } +} diff --git a/Golovko/Task_9/1_ArrayToCollection/Program.cs b/Golovko/Task_9/1_ArrayToCollection/Program.cs new file mode 100644 index 0000000..d64e2d3 --- /dev/null +++ b/Golovko/Task_9/1_ArrayToCollection/Program.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _1_ArrayToCollection +{ + class Program + { + static void Main(string[] args) + { + int[] array = new int[] {2, -6, -4, 14, 3, -6, -11, 4, 31 }; + var collection = Collection.ArrayToCollection(array); + foreach (var el in collection) + { + Console.WriteLine(el); + } + Console.ReadKey(); + } + } +} diff --git a/Golovko/Task_9/1_ArrayToCollection/Properties/AssemblyInfo.cs b/Golovko/Task_9/1_ArrayToCollection/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..ee60734 --- /dev/null +++ b/Golovko/Task_9/1_ArrayToCollection/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("1_ArrayToCollection")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("1_ArrayToCollection")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[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("2e79c3c2-6b67-451b-88d1-f23378d7db81")] + +// 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")] diff --git a/Golovko/Task_9/1_ArrayToCollection/bin/Debug/1_ArrayToCollection.exe b/Golovko/Task_9/1_ArrayToCollection/bin/Debug/1_ArrayToCollection.exe new file mode 100644 index 0000000..ec14f58 Binary files /dev/null and b/Golovko/Task_9/1_ArrayToCollection/bin/Debug/1_ArrayToCollection.exe differ diff --git a/Golovko/Task_9/1_ArrayToCollection/bin/Debug/1_ArrayToCollection.exe.config b/Golovko/Task_9/1_ArrayToCollection/bin/Debug/1_ArrayToCollection.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_9/1_ArrayToCollection/bin/Debug/1_ArrayToCollection.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_9/1_ArrayToCollection/bin/Debug/1_ArrayToCollection.pdb b/Golovko/Task_9/1_ArrayToCollection/bin/Debug/1_ArrayToCollection.pdb new file mode 100644 index 0000000..4aed165 Binary files /dev/null and b/Golovko/Task_9/1_ArrayToCollection/bin/Debug/1_ArrayToCollection.pdb differ diff --git a/Golovko/Task_9/1_ArrayToCollection/bin/Debug/1_ArrayToCollection.vshost.exe b/Golovko/Task_9/1_ArrayToCollection/bin/Debug/1_ArrayToCollection.vshost.exe new file mode 100644 index 0000000..681ab77 Binary files /dev/null and b/Golovko/Task_9/1_ArrayToCollection/bin/Debug/1_ArrayToCollection.vshost.exe differ diff --git a/Golovko/Task_9/1_ArrayToCollection/bin/Debug/1_ArrayToCollection.vshost.exe.config b/Golovko/Task_9/1_ArrayToCollection/bin/Debug/1_ArrayToCollection.vshost.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_9/1_ArrayToCollection/bin/Debug/1_ArrayToCollection.vshost.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_9/1_ArrayToCollection/obj/Debug/1_ArrayToCollection.csproj.FileListAbsolute.txt b/Golovko/Task_9/1_ArrayToCollection/obj/Debug/1_ArrayToCollection.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..cd46f70 --- /dev/null +++ b/Golovko/Task_9/1_ArrayToCollection/obj/Debug/1_ArrayToCollection.csproj.FileListAbsolute.txt @@ -0,0 +1,6 @@ +c:\users\головко\documents\visual studio 2015\Projects\Task_9\1_ArrayToCollection\bin\Debug\1_ArrayToCollection.exe.config +c:\users\головко\documents\visual studio 2015\Projects\Task_9\1_ArrayToCollection\bin\Debug\1_ArrayToCollection.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_9\1_ArrayToCollection\bin\Debug\1_ArrayToCollection.pdb +c:\users\головко\documents\visual studio 2015\Projects\Task_9\1_ArrayToCollection\obj\Debug\1_ArrayToCollection.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_9\1_ArrayToCollection\obj\Debug\1_ArrayToCollection.pdb +c:\users\головко\documents\visual studio 2015\Projects\Task_9\1_ArrayToCollection\obj\Debug\1_ArrayToCollection.csprojResolveAssemblyReference.cache diff --git a/Golovko/Task_9/1_ArrayToCollection/obj/Debug/1_ArrayToCollection.csprojResolveAssemblyReference.cache b/Golovko/Task_9/1_ArrayToCollection/obj/Debug/1_ArrayToCollection.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..1150a02 Binary files /dev/null and b/Golovko/Task_9/1_ArrayToCollection/obj/Debug/1_ArrayToCollection.csprojResolveAssemblyReference.cache differ diff --git a/Golovko/Task_9/1_ArrayToCollection/obj/Debug/1_ArrayToCollection.exe b/Golovko/Task_9/1_ArrayToCollection/obj/Debug/1_ArrayToCollection.exe new file mode 100644 index 0000000..ec14f58 Binary files /dev/null and b/Golovko/Task_9/1_ArrayToCollection/obj/Debug/1_ArrayToCollection.exe differ diff --git a/Golovko/Task_9/1_ArrayToCollection/obj/Debug/1_ArrayToCollection.pdb b/Golovko/Task_9/1_ArrayToCollection/obj/Debug/1_ArrayToCollection.pdb new file mode 100644 index 0000000..4aed165 Binary files /dev/null and b/Golovko/Task_9/1_ArrayToCollection/obj/Debug/1_ArrayToCollection.pdb differ diff --git a/Golovko/Task_9/1_ArrayToCollection/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Golovko/Task_9/1_ArrayToCollection/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..dc3389d Binary files /dev/null and b/Golovko/Task_9/1_ArrayToCollection/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Golovko/Task_9/1_ArrayToCollection/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Golovko/Task_9/1_ArrayToCollection/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_9/1_ArrayToCollection/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Golovko/Task_9/1_ArrayToCollection/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_9/1_ArrayToCollection/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Golovko/Task_9/1_ArrayToCollection/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_9/2_MyList/2_MyList.csproj b/Golovko/Task_9/2_MyList/2_MyList.csproj new file mode 100644 index 0000000..0f1f160 --- /dev/null +++ b/Golovko/Task_9/2_MyList/2_MyList.csproj @@ -0,0 +1,63 @@ + + + + + Debug + AnyCPU + {86F46649-B4B6-4505-BB28-0D069DC4694E} + Exe + Properties + _2_MyList + 2_MyList + v4.5.2 + 512 + 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/Golovko/Task_9/2_MyList/App.config b/Golovko/Task_9/2_MyList/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_9/2_MyList/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_9/2_MyList/IMyList.cs b/Golovko/Task_9/2_MyList/IMyList.cs new file mode 100644 index 0000000..e4ef967 --- /dev/null +++ b/Golovko/Task_9/2_MyList/IMyList.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_MyList +{ + interface IMyList + { + void Add(T item); + T this[int index] { get; } + int Count { get; } + } +} diff --git a/Golovko/Task_9/2_MyList/Log.cs b/Golovko/Task_9/2_MyList/Log.cs new file mode 100644 index 0000000..d516615 --- /dev/null +++ b/Golovko/Task_9/2_MyList/Log.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_MyList +{ + public static class Log + { + public static void Write(string message) + { + Console.WriteLine(message); + } + } +} diff --git a/Golovko/Task_9/2_MyList/MyList.cs b/Golovko/Task_9/2_MyList/MyList.cs new file mode 100644 index 0000000..3539b4f --- /dev/null +++ b/Golovko/Task_9/2_MyList/MyList.cs @@ -0,0 +1,122 @@ +using System; +using System.Collections.Generic; +using System.Collections; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_MyList +{ + public class MyList : IMyList, IEnumerable, IEnumerator, IEnumerable + { + private T[] myList; + private int index; + public T this[int index] + { + get + { + T result = default(T); + try + { + result = myList[index]; + } + catch (IndexOutOfRangeException e) + { + Log.Write(e.Message); + } + return result; + } + } + public object Current + { + get { return myList[index]; } + } + public int Count + { + get { return myList.Length; } + } + public MyList() + { + myList = new T[0]; + index = -1; + } + public void Add(T item) + { + T[] tmpList = new T[Count + 1]; + for (int i = 0; i < Count; i++) + { + tmpList[i] = myList[i]; + } + tmpList[Count] = item; + myList = tmpList; + } + public bool RemoveAt(int indexElement) + { + bool hasRemoved = false; + T[] tmpList = new T[Count - 1]; + int k = 0; + try + { + for (int i = 0; i < Count; i++) + { + if (i == indexElement) + { + hasRemoved = true; + continue; + } + tmpList[k++] = myList[i]; + } + myList = tmpList; + } + catch (IndexOutOfRangeException e) + { + Log.Write(e.Message); + } + return hasRemoved; + } + public override string ToString() + { + StringBuilder result = new StringBuilder(); + for (int i = 0; i < Count; i++) + { + result.AppendFormat("List[{0}] = {1}", i, myList[i]); + if (i < Count - 1) + { + result.Append(Environment.NewLine); + } + } + return result.ToString(); + } + IEnumerator IEnumerable.GetEnumerator() + { + for (int i = 0; i < Count; i++) + { + yield return myList[i]; + } + } + public IEnumerator GetEnumerator() + { + for (int i = 0; i < Count; i++) + { + yield return myList[i]; + } + } + public void Reset() + { + index = -1; + } + public bool MoveNext() + { + bool isMove = false; + if (++index > Count - 1) + { + Reset(); + } + else + { + isMove = true; + } + return isMove; + } + } +} diff --git a/Golovko/Task_9/2_MyList/Program.cs b/Golovko/Task_9/2_MyList/Program.cs new file mode 100644 index 0000000..ac8f294 --- /dev/null +++ b/Golovko/Task_9/2_MyList/Program.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace _2_MyList +{ + class Program + { + static void Main(string[] args) + { + MyList myList = new MyList(); + Console.WriteLine("Adding elements to myList:"); + myList.Add("My"); + myList.Add("List"); + myList.Add("Collection"); + Console.WriteLine("Get info of myList's elements:"); + Console.WriteLine(myList.ToString()); + Console.WriteLine("Get element's value with index '2': {0}", myList[2]); + Console.WriteLine("Remove element with index '1':"); + myList.RemoveAt(1); + Console.WriteLine("Enumerate the collection in foreach cycle:"); + foreach (string element in myList) + { + Console.WriteLine(element); + } + Console.ReadKey(); + } + } +} diff --git a/Golovko/Task_9/2_MyList/Properties/AssemblyInfo.cs b/Golovko/Task_9/2_MyList/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..60ab58b --- /dev/null +++ b/Golovko/Task_9/2_MyList/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("2_MyList")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("2_MyList")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[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("86f46649-b4b6-4505-bb28-0d069dc4694e")] + +// 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")] diff --git a/Golovko/Task_9/2_MyList/bin/Debug/2_MyList.exe b/Golovko/Task_9/2_MyList/bin/Debug/2_MyList.exe new file mode 100644 index 0000000..36a0f6c Binary files /dev/null and b/Golovko/Task_9/2_MyList/bin/Debug/2_MyList.exe differ diff --git a/Golovko/Task_9/2_MyList/bin/Debug/2_MyList.exe.config b/Golovko/Task_9/2_MyList/bin/Debug/2_MyList.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_9/2_MyList/bin/Debug/2_MyList.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_9/2_MyList/bin/Debug/2_MyList.pdb b/Golovko/Task_9/2_MyList/bin/Debug/2_MyList.pdb new file mode 100644 index 0000000..db05a8b Binary files /dev/null and b/Golovko/Task_9/2_MyList/bin/Debug/2_MyList.pdb differ diff --git a/Golovko/Task_9/2_MyList/bin/Debug/2_MyList.vshost.exe b/Golovko/Task_9/2_MyList/bin/Debug/2_MyList.vshost.exe new file mode 100644 index 0000000..681ab77 Binary files /dev/null and b/Golovko/Task_9/2_MyList/bin/Debug/2_MyList.vshost.exe differ diff --git a/Golovko/Task_9/2_MyList/bin/Debug/2_MyList.vshost.exe.config b/Golovko/Task_9/2_MyList/bin/Debug/2_MyList.vshost.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_9/2_MyList/bin/Debug/2_MyList.vshost.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_9/2_MyList/bin/Debug/2_MyList.vshost.exe.manifest b/Golovko/Task_9/2_MyList/bin/Debug/2_MyList.vshost.exe.manifest new file mode 100644 index 0000000..061c9ca --- /dev/null +++ b/Golovko/Task_9/2_MyList/bin/Debug/2_MyList.vshost.exe.manifest @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/Golovko/Task_9/2_MyList/obj/Debug/2_MyList.csproj.FileListAbsolute.txt b/Golovko/Task_9/2_MyList/obj/Debug/2_MyList.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..e2552b0 --- /dev/null +++ b/Golovko/Task_9/2_MyList/obj/Debug/2_MyList.csproj.FileListAbsolute.txt @@ -0,0 +1,6 @@ +c:\users\головко\documents\visual studio 2015\Projects\Task_9\2_MyList\bin\Debug\2_MyList.exe.config +c:\users\головко\documents\visual studio 2015\Projects\Task_9\2_MyList\bin\Debug\2_MyList.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_9\2_MyList\bin\Debug\2_MyList.pdb +c:\users\головко\documents\visual studio 2015\Projects\Task_9\2_MyList\obj\Debug\2_MyList.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_9\2_MyList\obj\Debug\2_MyList.pdb +c:\users\головко\documents\visual studio 2015\Projects\Task_9\2_MyList\obj\Debug\2_MyList.csprojResolveAssemblyReference.cache diff --git a/Golovko/Task_9/2_MyList/obj/Debug/2_MyList.csprojResolveAssemblyReference.cache b/Golovko/Task_9/2_MyList/obj/Debug/2_MyList.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..1150a02 Binary files /dev/null and b/Golovko/Task_9/2_MyList/obj/Debug/2_MyList.csprojResolveAssemblyReference.cache differ diff --git a/Golovko/Task_9/2_MyList/obj/Debug/2_MyList.exe b/Golovko/Task_9/2_MyList/obj/Debug/2_MyList.exe new file mode 100644 index 0000000..36a0f6c Binary files /dev/null and b/Golovko/Task_9/2_MyList/obj/Debug/2_MyList.exe differ diff --git a/Golovko/Task_9/2_MyList/obj/Debug/2_MyList.pdb b/Golovko/Task_9/2_MyList/obj/Debug/2_MyList.pdb new file mode 100644 index 0000000..db05a8b Binary files /dev/null and b/Golovko/Task_9/2_MyList/obj/Debug/2_MyList.pdb differ diff --git a/Golovko/Task_9/2_MyList/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Golovko/Task_9/2_MyList/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..776a337 Binary files /dev/null and b/Golovko/Task_9/2_MyList/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Golovko/Task_9/2_MyList/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Golovko/Task_9/2_MyList/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_9/2_MyList/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Golovko/Task_9/2_MyList/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_9/2_MyList/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Golovko/Task_9/2_MyList/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_9/4_MyListExtension/4_MyListExtension.csproj b/Golovko/Task_9/4_MyListExtension/4_MyListExtension.csproj new file mode 100644 index 0000000..0c16a9e --- /dev/null +++ b/Golovko/Task_9/4_MyListExtension/4_MyListExtension.csproj @@ -0,0 +1,67 @@ + + + + + Debug + AnyCPU + {7CB6FC4E-100D-4865-8DDB-FCFE66C4A944} + Exe + Properties + _4_MyListExtension + 4_MyListExtension + v4.5.2 + 512 + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + + {86f46649-b4b6-4505-bb28-0d069dc4694e} + 2_MyList + + + + + \ No newline at end of file diff --git a/Golovko/Task_9/4_MyListExtension/App.config b/Golovko/Task_9/4_MyListExtension/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_9/4_MyListExtension/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_9/4_MyListExtension/MyListExtension.cs b/Golovko/Task_9/4_MyListExtension/MyListExtension.cs new file mode 100644 index 0000000..0b715d3 --- /dev/null +++ b/Golovko/Task_9/4_MyListExtension/MyListExtension.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using _2_MyList; + +namespace _4_MyListExtension +{ + static class MyListExtension + { + public static T[] GetArray(this IEnumerable list) + { + T[] array = new T[list.Count()]; + int k = 0; + foreach (var element in list) + { + array[k++] = element; + } + return array; + } + } +} diff --git a/Golovko/Task_9/4_MyListExtension/Program.cs b/Golovko/Task_9/4_MyListExtension/Program.cs new file mode 100644 index 0000000..ded40a1 --- /dev/null +++ b/Golovko/Task_9/4_MyListExtension/Program.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Collections; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using _2_MyList; + +namespace _4_MyListExtension +{ + class Program + { + static void Main(string[] args) + { + MyList myList = new MyList(); + myList.Add("My"); + myList.Add("List"); + myList.Add("Collection"); + var array = MyListExtension.GetArray(myList); + foreach (var element in array) + { + Console.WriteLine(element); + } + Console.ReadKey(); + } + } +} diff --git a/Golovko/Task_9/4_MyListExtension/Properties/AssemblyInfo.cs b/Golovko/Task_9/4_MyListExtension/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..f3e572f --- /dev/null +++ b/Golovko/Task_9/4_MyListExtension/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("4_MyListExtension")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("4_MyListExtension")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[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("7cb6fc4e-100d-4865-8ddb-fcfe66c4a944")] + +// 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")] diff --git a/Golovko/Task_9/4_MyListExtension/bin/Debug/2_MyList.exe b/Golovko/Task_9/4_MyListExtension/bin/Debug/2_MyList.exe new file mode 100644 index 0000000..36a0f6c Binary files /dev/null and b/Golovko/Task_9/4_MyListExtension/bin/Debug/2_MyList.exe differ diff --git a/Golovko/Task_9/4_MyListExtension/bin/Debug/2_MyList.pdb b/Golovko/Task_9/4_MyListExtension/bin/Debug/2_MyList.pdb new file mode 100644 index 0000000..db05a8b Binary files /dev/null and b/Golovko/Task_9/4_MyListExtension/bin/Debug/2_MyList.pdb differ diff --git a/Golovko/Task_9/4_MyListExtension/bin/Debug/4_MyListExtension.exe b/Golovko/Task_9/4_MyListExtension/bin/Debug/4_MyListExtension.exe new file mode 100644 index 0000000..83781f0 Binary files /dev/null and b/Golovko/Task_9/4_MyListExtension/bin/Debug/4_MyListExtension.exe differ diff --git a/Golovko/Task_9/4_MyListExtension/bin/Debug/4_MyListExtension.exe.config b/Golovko/Task_9/4_MyListExtension/bin/Debug/4_MyListExtension.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_9/4_MyListExtension/bin/Debug/4_MyListExtension.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_9/4_MyListExtension/bin/Debug/4_MyListExtension.pdb b/Golovko/Task_9/4_MyListExtension/bin/Debug/4_MyListExtension.pdb new file mode 100644 index 0000000..ae03b18 Binary files /dev/null and b/Golovko/Task_9/4_MyListExtension/bin/Debug/4_MyListExtension.pdb differ diff --git a/Golovko/Task_9/4_MyListExtension/bin/Debug/4_MyListExtension.vshost.exe b/Golovko/Task_9/4_MyListExtension/bin/Debug/4_MyListExtension.vshost.exe new file mode 100644 index 0000000..681ab77 Binary files /dev/null and b/Golovko/Task_9/4_MyListExtension/bin/Debug/4_MyListExtension.vshost.exe differ diff --git a/Golovko/Task_9/4_MyListExtension/bin/Debug/4_MyListExtension.vshost.exe.config b/Golovko/Task_9/4_MyListExtension/bin/Debug/4_MyListExtension.vshost.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_9/4_MyListExtension/bin/Debug/4_MyListExtension.vshost.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_9/4_MyListExtension/bin/Debug/4_MyListExtension.vshost.exe.manifest b/Golovko/Task_9/4_MyListExtension/bin/Debug/4_MyListExtension.vshost.exe.manifest new file mode 100644 index 0000000..061c9ca --- /dev/null +++ b/Golovko/Task_9/4_MyListExtension/bin/Debug/4_MyListExtension.vshost.exe.manifest @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/Golovko/Task_9/4_MyListExtension/obj/Debug/4_MyListExtension.csproj.FileListAbsolute.txt b/Golovko/Task_9/4_MyListExtension/obj/Debug/4_MyListExtension.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..3571a7b --- /dev/null +++ b/Golovko/Task_9/4_MyListExtension/obj/Debug/4_MyListExtension.csproj.FileListAbsolute.txt @@ -0,0 +1,8 @@ +c:\users\головко\documents\visual studio 2015\Projects\Task_9\4_MyListExtension\bin\Debug\4_MyListExtension.exe.config +c:\users\головко\documents\visual studio 2015\Projects\Task_9\4_MyListExtension\bin\Debug\4_MyListExtension.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_9\4_MyListExtension\bin\Debug\4_MyListExtension.pdb +c:\users\головко\documents\visual studio 2015\Projects\Task_9\4_MyListExtension\bin\Debug\2_MyList.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_9\4_MyListExtension\bin\Debug\2_MyList.pdb +c:\users\головко\documents\visual studio 2015\Projects\Task_9\4_MyListExtension\obj\Debug\4_MyListExtension.csprojResolveAssemblyReference.cache +c:\users\головко\documents\visual studio 2015\Projects\Task_9\4_MyListExtension\obj\Debug\4_MyListExtension.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_9\4_MyListExtension\obj\Debug\4_MyListExtension.pdb diff --git a/Golovko/Task_9/4_MyListExtension/obj/Debug/4_MyListExtension.csprojResolveAssemblyReference.cache b/Golovko/Task_9/4_MyListExtension/obj/Debug/4_MyListExtension.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..6d46ed6 Binary files /dev/null and b/Golovko/Task_9/4_MyListExtension/obj/Debug/4_MyListExtension.csprojResolveAssemblyReference.cache differ diff --git a/Golovko/Task_9/4_MyListExtension/obj/Debug/4_MyListExtension.exe b/Golovko/Task_9/4_MyListExtension/obj/Debug/4_MyListExtension.exe new file mode 100644 index 0000000..83781f0 Binary files /dev/null and b/Golovko/Task_9/4_MyListExtension/obj/Debug/4_MyListExtension.exe differ diff --git a/Golovko/Task_9/4_MyListExtension/obj/Debug/4_MyListExtension.pdb b/Golovko/Task_9/4_MyListExtension/obj/Debug/4_MyListExtension.pdb new file mode 100644 index 0000000..ae03b18 Binary files /dev/null and b/Golovko/Task_9/4_MyListExtension/obj/Debug/4_MyListExtension.pdb differ diff --git a/Golovko/Task_9/4_MyListExtension/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Golovko/Task_9/4_MyListExtension/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..eeb5e4b Binary files /dev/null and b/Golovko/Task_9/4_MyListExtension/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Golovko/Task_9/4_MyListExtension/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Golovko/Task_9/4_MyListExtension/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_9/4_MyListExtension/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Golovko/Task_9/4_MyListExtension/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_9/4_MyListExtension/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Golovko/Task_9/4_MyListExtension/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_9/5_MyDictionary/3_MyDictionary.csproj b/Golovko/Task_9/5_MyDictionary/3_MyDictionary.csproj new file mode 100644 index 0000000..945dda8 --- /dev/null +++ b/Golovko/Task_9/5_MyDictionary/3_MyDictionary.csproj @@ -0,0 +1,63 @@ + + + + + Debug + AnyCPU + {A51D8591-3BF5-462B-8181-608A5FC74C94} + Exe + Properties + MyDictionary + MyDictionary + v4.5.2 + 512 + 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/Golovko/Task_9/5_MyDictionary/App.config b/Golovko/Task_9/5_MyDictionary/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_9/5_MyDictionary/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_9/5_MyDictionary/IMyDictionary.cs b/Golovko/Task_9/5_MyDictionary/IMyDictionary.cs new file mode 100644 index 0000000..74ec63e --- /dev/null +++ b/Golovko/Task_9/5_MyDictionary/IMyDictionary.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MyDictionary +{ + interface IMyDictionary + { + void Add(TKey key, TValue value); + TValue this[int index] { get; } + int Count { get; } + } +} diff --git a/Golovko/Task_9/5_MyDictionary/Log.cs b/Golovko/Task_9/5_MyDictionary/Log.cs new file mode 100644 index 0000000..c240806 --- /dev/null +++ b/Golovko/Task_9/5_MyDictionary/Log.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MyDictionary +{ + static class Log + { + public static void Write(string message, params object[] args) + { + Console.WriteLine(message, args); + } + } +} diff --git a/Golovko/Task_9/5_MyDictionary/MyDictionary.cs b/Golovko/Task_9/5_MyDictionary/MyDictionary.cs new file mode 100644 index 0000000..f47d76d --- /dev/null +++ b/Golovko/Task_9/5_MyDictionary/MyDictionary.cs @@ -0,0 +1,144 @@ +using System; +using System.Collections.Generic; +using System.Collections; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MyDictionary +{ + class MyDictionary : IMyDictionary, IEnumerator, IEnumerable + { + private TValue[] values; + private TKey[] keys; + private int index; + public int Count + { + get { return keys.Length; } + } + public object Current + { + get { return values[index]; } + } + public TValue this[int index] + { + get + { + TValue result = default(TValue); + try + { + result = values[index]; + } + catch (IndexOutOfRangeException e) + { + Log.Write(e.Message); + } + return result; + } + } + public TValue this[TKey key] + { + get + { + int index = GetKeyIndex(key); + return index < 0 ? default(TValue) : values[index]; + } + } + public MyDictionary() + { + values = new TValue[0]; + keys = new TKey[0]; + index = -1; + } + public void Add(TKey key, TValue value) + { + TKey[] tmpKeys = new TKey[Count + 1]; + TValue[] tmpValues = new TValue[Count + 1]; + for (int i = 0; i < Count; i++) + { + tmpKeys[i] = keys[i]; + tmpValues[i] = values[i]; + } + tmpKeys[Count] = key; + tmpValues[Count] = value; + keys = tmpKeys; + values = tmpValues; + } + public bool IsExist(TKey key) + { + return GetKeyIndex(key) >= 0; + } + public void Remove(TKey key) + { + TKey[] tmpKeys = new TKey[Count - 1]; + TValue[] tmpValues = new TValue[Count - 1]; + int k = 0; + int index; + if ((index = GetKeyIndex(key)) >= 0) + { + for (int i = 0; i < Count; i++) + { + if (index == i) + { + continue; + } + tmpKeys[k] = keys[i]; + tmpValues[k] = values[i]; + k++; + } + keys = tmpKeys; + values = tmpValues; + } + else + { + Log.Write("Value with '{0}' key doesn't exist", key); + } + } + public IEnumerator GetEnumerator() + { + return values.GetEnumerator(); + } + public void Reset() + { + index = -1; + } + public bool MoveNext() + { + bool hasMoved = false; + if (++index > Count - 1) + { + Reset(); + } + else + { + hasMoved = true; + } + return hasMoved; + } + private int GetKeyIndex(TKey key) + { + int result = -1; + for (int i = 0; i < Count; i++) + { + if (keys[i].Equals(key)) + { + result = i; + } + } + return result; + } + public override string ToString() + { + StringBuilder result = new StringBuilder(); + for (int i = 0; i < Count; i++) + { + result.AppendFormat("Key->{0}: Value->{1}", keys[i], values[i]); + if (i < Count - 1) + { + result.Append(Environment.NewLine); + } + } + return result.ToString(); + } + } +} diff --git a/Golovko/Task_9/5_MyDictionary/Program.cs b/Golovko/Task_9/5_MyDictionary/Program.cs new file mode 100644 index 0000000..37c0a19 --- /dev/null +++ b/Golovko/Task_9/5_MyDictionary/Program.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MyDictionary +{ + class Program + { + static void Main(string[] args) + { + MyDictionary myDictionary = new MyDictionary(); + Console.WriteLine("Add keys and values to myDictionary:"); + myDictionary.Add("first key", "first value"); + myDictionary.Add("second key", "second value"); + myDictionary.Add("third key", "third value"); + Console.WriteLine(myDictionary.ToString()); + Console.WriteLine("Removing element with key 'second key'"); + Console.WriteLine("Enumerating elements in foreach cycle:"); + myDictionary.Remove("second key"); + foreach (string value in myDictionary) + { + Console.WriteLine(value); + } + Console.WriteLine("Getting element with 'third key' key:"); + Console.WriteLine(myDictionary["third key"]); + Console.ReadKey(); + } + } +} diff --git a/Golovko/Task_9/5_MyDictionary/Properties/AssemblyInfo.cs b/Golovko/Task_9/5_MyDictionary/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..1263de3 --- /dev/null +++ b/Golovko/Task_9/5_MyDictionary/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("MyDictionary")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("MyDictionary")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[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("a51d8591-3bf5-462b-8181-608a5fc74c94")] + +// 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")] diff --git a/Golovko/Task_9/5_MyDictionary/bin/Debug/MyDictionary.exe b/Golovko/Task_9/5_MyDictionary/bin/Debug/MyDictionary.exe new file mode 100644 index 0000000..bac85bd Binary files /dev/null and b/Golovko/Task_9/5_MyDictionary/bin/Debug/MyDictionary.exe differ diff --git a/Golovko/Task_9/5_MyDictionary/bin/Debug/MyDictionary.exe.config b/Golovko/Task_9/5_MyDictionary/bin/Debug/MyDictionary.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_9/5_MyDictionary/bin/Debug/MyDictionary.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_9/5_MyDictionary/bin/Debug/MyDictionary.pdb b/Golovko/Task_9/5_MyDictionary/bin/Debug/MyDictionary.pdb new file mode 100644 index 0000000..d4f00f7 Binary files /dev/null and b/Golovko/Task_9/5_MyDictionary/bin/Debug/MyDictionary.pdb differ diff --git a/Golovko/Task_9/5_MyDictionary/bin/Debug/MyDictionary.vshost.exe b/Golovko/Task_9/5_MyDictionary/bin/Debug/MyDictionary.vshost.exe new file mode 100644 index 0000000..681ab77 Binary files /dev/null and b/Golovko/Task_9/5_MyDictionary/bin/Debug/MyDictionary.vshost.exe differ diff --git a/Golovko/Task_9/5_MyDictionary/bin/Debug/MyDictionary.vshost.exe.config b/Golovko/Task_9/5_MyDictionary/bin/Debug/MyDictionary.vshost.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Golovko/Task_9/5_MyDictionary/bin/Debug/MyDictionary.vshost.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Golovko/Task_9/5_MyDictionary/bin/Debug/MyDictionary.vshost.exe.manifest b/Golovko/Task_9/5_MyDictionary/bin/Debug/MyDictionary.vshost.exe.manifest new file mode 100644 index 0000000..061c9ca --- /dev/null +++ b/Golovko/Task_9/5_MyDictionary/bin/Debug/MyDictionary.vshost.exe.manifest @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/Golovko/Task_9/5_MyDictionary/obj/Debug/3_MyDictionary.csproj.FileListAbsolute.txt b/Golovko/Task_9/5_MyDictionary/obj/Debug/3_MyDictionary.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..23b5272 --- /dev/null +++ b/Golovko/Task_9/5_MyDictionary/obj/Debug/3_MyDictionary.csproj.FileListAbsolute.txt @@ -0,0 +1,9 @@ +c:\users\головко\documents\visual studio 2015\Projects\Task_9\MyDictionary\bin\Debug\MyDictionary.exe.config +c:\users\головко\documents\visual studio 2015\Projects\Task_9\MyDictionary\bin\Debug\MyDictionary.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_9\MyDictionary\bin\Debug\MyDictionary.pdb +c:\users\головко\documents\visual studio 2015\Projects\Task_9\MyDictionary\obj\Debug\MyDictionary.exe +c:\users\головко\documents\visual studio 2015\Projects\Task_9\MyDictionary\obj\Debug\MyDictionary.pdb +c:\users\головко\documents\visual studio 2015\Projects\Task_9\MyDictionary\obj\Debug\3_MyDictionary.csprojResolveAssemblyReference.cache +C:\Users\Головко\Documents\Visual Studio 2015\Projects\Task_9\5_MyDictionary\bin\Debug\MyDictionary.exe.config +C:\Users\Головко\Documents\Visual Studio 2015\Projects\Task_9\5_MyDictionary\obj\Debug\MyDictionary.exe +C:\Users\Головко\Documents\Visual Studio 2015\Projects\Task_9\5_MyDictionary\obj\Debug\MyDictionary.pdb diff --git a/Golovko/Task_9/5_MyDictionary/obj/Debug/3_MyDictionary.csprojResolveAssemblyReference.cache b/Golovko/Task_9/5_MyDictionary/obj/Debug/3_MyDictionary.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..1150a02 Binary files /dev/null and b/Golovko/Task_9/5_MyDictionary/obj/Debug/3_MyDictionary.csprojResolveAssemblyReference.cache differ diff --git a/Golovko/Task_9/5_MyDictionary/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Golovko/Task_9/5_MyDictionary/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..0986d43 Binary files /dev/null and b/Golovko/Task_9/5_MyDictionary/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Golovko/Task_9/5_MyDictionary/obj/Debug/MyDictionary.csproj.FileListAbsolute.txt b/Golovko/Task_9/5_MyDictionary/obj/Debug/MyDictionary.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..a92a884 --- /dev/null +++ b/Golovko/Task_9/5_MyDictionary/obj/Debug/MyDictionary.csproj.FileListAbsolute.txt @@ -0,0 +1 @@ +c:\users\головко\documents\visual studio 2015\Projects\Task_9\MyDictionary\bin\Debug\MyDictionary.exe.config diff --git a/Golovko/Task_9/5_MyDictionary/obj/Debug/MyDictionary.exe b/Golovko/Task_9/5_MyDictionary/obj/Debug/MyDictionary.exe new file mode 100644 index 0000000..bac85bd Binary files /dev/null and b/Golovko/Task_9/5_MyDictionary/obj/Debug/MyDictionary.exe differ diff --git a/Golovko/Task_9/5_MyDictionary/obj/Debug/MyDictionary.pdb b/Golovko/Task_9/5_MyDictionary/obj/Debug/MyDictionary.pdb new file mode 100644 index 0000000..d4f00f7 Binary files /dev/null and b/Golovko/Task_9/5_MyDictionary/obj/Debug/MyDictionary.pdb differ diff --git a/Golovko/Task_9/5_MyDictionary/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Golovko/Task_9/5_MyDictionary/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_9/5_MyDictionary/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Golovko/Task_9/5_MyDictionary/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_9/5_MyDictionary/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Golovko/Task_9/5_MyDictionary/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/Golovko/Task_9/Task_9.sln b/Golovko/Task_9/Task_9.sln new file mode 100644 index 0000000..35b74d1 --- /dev/null +++ b/Golovko/Task_9/Task_9.sln @@ -0,0 +1,40 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.23107.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "1_ArrayToCollection", "1_ArrayToCollection\1_ArrayToCollection.csproj", "{2E79C3C2-6B67-451B-88D1-F23378D7DB81}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "2_MyList", "2_MyList\2_MyList.csproj", "{86F46649-B4B6-4505-BB28-0D069DC4694E}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "3_MyDictionary", "5_MyDictionary\3_MyDictionary.csproj", "{A51D8591-3BF5-462B-8181-608A5FC74C94}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "4_MyListExtension", "4_MyListExtension\4_MyListExtension.csproj", "{7CB6FC4E-100D-4865-8DDB-FCFE66C4A944}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {2E79C3C2-6B67-451B-88D1-F23378D7DB81}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2E79C3C2-6B67-451B-88D1-F23378D7DB81}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2E79C3C2-6B67-451B-88D1-F23378D7DB81}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2E79C3C2-6B67-451B-88D1-F23378D7DB81}.Release|Any CPU.Build.0 = Release|Any CPU + {86F46649-B4B6-4505-BB28-0D069DC4694E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {86F46649-B4B6-4505-BB28-0D069DC4694E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {86F46649-B4B6-4505-BB28-0D069DC4694E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {86F46649-B4B6-4505-BB28-0D069DC4694E}.Release|Any CPU.Build.0 = Release|Any CPU + {A51D8591-3BF5-462B-8181-608A5FC74C94}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A51D8591-3BF5-462B-8181-608A5FC74C94}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A51D8591-3BF5-462B-8181-608A5FC74C94}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A51D8591-3BF5-462B-8181-608A5FC74C94}.Release|Any CPU.Build.0 = Release|Any CPU + {7CB6FC4E-100D-4865-8DDB-FCFE66C4A944}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7CB6FC4E-100D-4865-8DDB-FCFE66C4A944}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7CB6FC4E-100D-4865-8DDB-FCFE66C4A944}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7CB6FC4E-100D-4865-8DDB-FCFE66C4A944}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal