From 496fca068bfae35d5a3ab1794601027993c5da88 Mon Sep 17 00:00:00 2001 From: Kristofer <47741934+kristofer375@users.noreply.github.com> Date: Fri, 11 Oct 2019 15:41:45 +0200 Subject: [PATCH 1/7] Add files via upload --- Lesson1/Lesson1/151268.cs | 85 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 Lesson1/Lesson1/151268.cs diff --git a/Lesson1/Lesson1/151268.cs b/Lesson1/Lesson1/151268.cs new file mode 100644 index 0000000..a79888e --- /dev/null +++ b/Lesson1/Lesson1/151268.cs @@ -0,0 +1,85 @@ +using System; + +namespace ConsoleApp1 +{ + class Program + { + static void Main(string[] args) + { + int[] tablica1 = { 420, 69, 14, 42, 1337, 2137 }; + //potrzebne zmienne + int i = 0; + int x = 0; + int a = 15; + int b = 21; + int c = 31; + //jeden pod drugim + do + { + Console.WriteLine(tablica1[i]); + i++; + } while (i < 6); + //jeden obok drugiego + i = 0; + do + { + Console.Write(tablica1[i] + ", "); + i++; + } while (i < 6); + Console.WriteLine(""); + //odwrotna kolejność + i = 5; + do + { + Console.Write(tablica1[i] + ", "); + i--; + } while (i >= 0); + Console.WriteLine(""); + //porównywanie + if (a > b) + { + if (a > c) + Console.WriteLine("{0} to największa liczba", a); + else + Console.WriteLine("{0} to największa liczba", c); + } + else + { + if (b > c) + Console.WriteLine("{0} to największa liczba", b); + else + Console.WriteLine("{0} to największa liczba", c); + } + //trójkąt + Console.Write("Podaj pierwszy bok trójkąta: "); + a = int.Parse(Console.ReadLine()); + Console.Write("Podaj drugi bok trójkąta: "); + b = int.Parse(Console.ReadLine()); + Console.Write("Podaj trzeci bok trójkąta: "); + c = int.Parse(Console.ReadLine()); + if ((a+b) > c && (a+c) > b && (b+c) > a) + Console.WriteLine("Z takich boków powstanie trójkąt."); + else + Console.WriteLine("Z takich boków nie powstanie trójkąt."); + //pętla while + while (x < 5 || x > 15) + { + Console.Write("Podaj liczbę całkowitą nie mniejszą niż 5 oraz nie większą niż 15: "); + x = int.Parse(Console.ReadLine()); + } + while (x >= 0) + { + Console.WriteLine(x); + x--; + } + //do while + do + { + Console.Write("Podaj liczbę parzystą, niepodzielną przez 10: "); + x = int.Parse(Console.ReadLine()); + } while (x%2 == 1 || x%10 == 0); + Console.WriteLine("{0} to poprawna liczba :)",x); + Console.ReadKey(); + } + } +} From 9e0d26579f9077ead639d5b1cd30f099f7dead84 Mon Sep 17 00:00:00 2001 From: Kristofer <47741934+kristofer375@users.noreply.github.com> Date: Fri, 18 Oct 2019 16:17:17 +0200 Subject: [PATCH 2/7] 151268 lesson2 Zadanie 1-5 zrobione --- Lesson2/Lesson2/Car.cs | 40 ++++++++++++++++++++++++++++++++++++++ Lesson2/Lesson2/Project.cs | 26 +++++++++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 Lesson2/Lesson2/Car.cs create mode 100644 Lesson2/Lesson2/Project.cs diff --git a/Lesson2/Lesson2/Car.cs b/Lesson2/Lesson2/Car.cs new file mode 100644 index 0000000..4116dfa --- /dev/null +++ b/Lesson2/Lesson2/Car.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace ConsoleApp1 +{ + class Car + { + private int rok; + private string marka; + private int przebieg; + //7 + private string model; + private int iloscDrzwi; + private int pojemoscSilnika; + public double srednieSpalanie; + //przebieg + public int Jedz(int trasa) + { + this.przebieg += trasa; + return this.przebieg; + } + //8 + private double ObliczSpalanie(int dlugoscTrasy) + { + return dlugoscTrasy * srednieSpalanie; + } + //Car + public Car(string m, int r, double s) + { + marka = m; + rok = r; + srednieSpalanie = s; + } + public void Pokaz() + { + Console.WriteLine("{0,-15}{1,10}", marka, przebieg); + } + } +} diff --git a/Lesson2/Lesson2/Project.cs b/Lesson2/Lesson2/Project.cs new file mode 100644 index 0000000..c847b68 --- /dev/null +++ b/Lesson2/Lesson2/Project.cs @@ -0,0 +1,26 @@ +using System; + +namespace ConsoleApp1 +{ + class Program + { + static void Main(string[] args) + { + string carName = "Mój samochód"; + Console.WriteLine(carName); + Car car1 = new Car("Subaru", 2000, 7.3); + Car car2 = new Car("Kia", 2014, 5.6); + car1.Pokaz(); + car2.Pokaz(); + //Przepisanie car2 do car1 + car2.Jedz(100); + Console.WriteLine(); + car1 = car2; + car1.Pokaz(); + car2.Jedz(100); + car2.Pokaz(); + //Console.WriteLine("{0}"car2.ObliczSpalanie(100)); + Console.ReadKey(); + } + } +} From 917835ba84490176777063c64ed5759be078508f Mon Sep 17 00:00:00 2001 From: Kristofer <47741934+kristofer375@users.noreply.github.com> Date: Fri, 10 Jan 2020 15:37:59 +0100 Subject: [PATCH 3/7] Delete 151268.cs --- Lesson1/Lesson1/151268.cs | 85 --------------------------------------- 1 file changed, 85 deletions(-) delete mode 100644 Lesson1/Lesson1/151268.cs diff --git a/Lesson1/Lesson1/151268.cs b/Lesson1/Lesson1/151268.cs deleted file mode 100644 index a79888e..0000000 --- a/Lesson1/Lesson1/151268.cs +++ /dev/null @@ -1,85 +0,0 @@ -using System; - -namespace ConsoleApp1 -{ - class Program - { - static void Main(string[] args) - { - int[] tablica1 = { 420, 69, 14, 42, 1337, 2137 }; - //potrzebne zmienne - int i = 0; - int x = 0; - int a = 15; - int b = 21; - int c = 31; - //jeden pod drugim - do - { - Console.WriteLine(tablica1[i]); - i++; - } while (i < 6); - //jeden obok drugiego - i = 0; - do - { - Console.Write(tablica1[i] + ", "); - i++; - } while (i < 6); - Console.WriteLine(""); - //odwrotna kolejność - i = 5; - do - { - Console.Write(tablica1[i] + ", "); - i--; - } while (i >= 0); - Console.WriteLine(""); - //porównywanie - if (a > b) - { - if (a > c) - Console.WriteLine("{0} to największa liczba", a); - else - Console.WriteLine("{0} to największa liczba", c); - } - else - { - if (b > c) - Console.WriteLine("{0} to największa liczba", b); - else - Console.WriteLine("{0} to największa liczba", c); - } - //trójkąt - Console.Write("Podaj pierwszy bok trójkąta: "); - a = int.Parse(Console.ReadLine()); - Console.Write("Podaj drugi bok trójkąta: "); - b = int.Parse(Console.ReadLine()); - Console.Write("Podaj trzeci bok trójkąta: "); - c = int.Parse(Console.ReadLine()); - if ((a+b) > c && (a+c) > b && (b+c) > a) - Console.WriteLine("Z takich boków powstanie trójkąt."); - else - Console.WriteLine("Z takich boków nie powstanie trójkąt."); - //pętla while - while (x < 5 || x > 15) - { - Console.Write("Podaj liczbę całkowitą nie mniejszą niż 5 oraz nie większą niż 15: "); - x = int.Parse(Console.ReadLine()); - } - while (x >= 0) - { - Console.WriteLine(x); - x--; - } - //do while - do - { - Console.Write("Podaj liczbę parzystą, niepodzielną przez 10: "); - x = int.Parse(Console.ReadLine()); - } while (x%2 == 1 || x%10 == 0); - Console.WriteLine("{0} to poprawna liczba :)",x); - Console.ReadKey(); - } - } -} From ac1cf1beb18fabd46a8e13735c6be469e151551c Mon Sep 17 00:00:00 2001 From: Kristofer <47741934+kristofer375@users.noreply.github.com> Date: Fri, 10 Jan 2020 15:38:16 +0100 Subject: [PATCH 4/7] Delete Program.cs --- Lesson2/Lesson2/Program.cs | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 Lesson2/Lesson2/Program.cs diff --git a/Lesson2/Lesson2/Program.cs b/Lesson2/Lesson2/Program.cs deleted file mode 100644 index 1e0a9c1..0000000 --- a/Lesson2/Lesson2/Program.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; - -namespace Lesson2 -{ - class Program - { - static void Main(string[] args) - { - Console.WriteLine("Hello World!"); - } - } -} From 49d5ac785098b1bdf38f48e369971bd72018b009 Mon Sep 17 00:00:00 2001 From: Kristofer <47741934+kristofer375@users.noreply.github.com> Date: Fri, 10 Jan 2020 15:38:23 +0100 Subject: [PATCH 5/7] Delete Car.cs --- Lesson2/Lesson2/Car.cs | 40 ---------------------------------------- 1 file changed, 40 deletions(-) delete mode 100644 Lesson2/Lesson2/Car.cs diff --git a/Lesson2/Lesson2/Car.cs b/Lesson2/Lesson2/Car.cs deleted file mode 100644 index 4116dfa..0000000 --- a/Lesson2/Lesson2/Car.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace ConsoleApp1 -{ - class Car - { - private int rok; - private string marka; - private int przebieg; - //7 - private string model; - private int iloscDrzwi; - private int pojemoscSilnika; - public double srednieSpalanie; - //przebieg - public int Jedz(int trasa) - { - this.przebieg += trasa; - return this.przebieg; - } - //8 - private double ObliczSpalanie(int dlugoscTrasy) - { - return dlugoscTrasy * srednieSpalanie; - } - //Car - public Car(string m, int r, double s) - { - marka = m; - rok = r; - srednieSpalanie = s; - } - public void Pokaz() - { - Console.WriteLine("{0,-15}{1,10}", marka, przebieg); - } - } -} From 5d30ef1bbe08220ea79df65a3aaa20aefc287fb0 Mon Sep 17 00:00:00 2001 From: Kristofer <47741934+kristofer375@users.noreply.github.com> Date: Fri, 10 Jan 2020 15:39:29 +0100 Subject: [PATCH 6/7] Delete Project.cs --- Lesson2/Lesson2/Project.cs | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 Lesson2/Lesson2/Project.cs diff --git a/Lesson2/Lesson2/Project.cs b/Lesson2/Lesson2/Project.cs deleted file mode 100644 index c847b68..0000000 --- a/Lesson2/Lesson2/Project.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System; - -namespace ConsoleApp1 -{ - class Program - { - static void Main(string[] args) - { - string carName = "Mój samochód"; - Console.WriteLine(carName); - Car car1 = new Car("Subaru", 2000, 7.3); - Car car2 = new Car("Kia", 2014, 5.6); - car1.Pokaz(); - car2.Pokaz(); - //Przepisanie car2 do car1 - car2.Jedz(100); - Console.WriteLine(); - car1 = car2; - car1.Pokaz(); - car2.Jedz(100); - car2.Pokaz(); - //Console.WriteLine("{0}"car2.ObliczSpalanie(100)); - Console.ReadKey(); - } - } -} From d919a3c9ce351ebae735beb4d6eb05ba3bfba340 Mon Sep 17 00:00:00 2001 From: Kristofer <47741934+kristofer375@users.noreply.github.com> Date: Fri, 17 Jan 2020 15:53:13 +0100 Subject: [PATCH 7/7] Add files via upload --- Lesson12/Lekcja12b/App.config | 6 + Lesson12/Lekcja12b/App.xaml | 9 ++ Lesson12/Lekcja12b/App.xaml.cs | 17 +++ Lesson12/Lekcja12b/Lekcja12b.csproj | 98 ++++++++++++ Lesson12/Lekcja12b/Lekcja12b.sln | 25 ++++ Lesson12/Lekcja12b/MainWindow.xaml | 15 ++ Lesson12/Lekcja12b/MainWindow.xaml.cs | 80 ++++++++++ Lesson12/Lekcja12b/Properties/AssemblyInfo.cs | 55 +++++++ .../Properties/Resources.Designer.cs | 71 +++++++++ Lesson12/Lekcja12b/Properties/Resources.resx | 117 +++++++++++++++ .../Lekcja12b/Properties/Settings.Designer.cs | 30 ++++ .../Lekcja12b/Properties/Settings.settings | 7 + Lesson12/Lekcja12b/bin/Debug/Lekcja12b.exe | Bin 0 -> 10752 bytes .../Lekcja12b/bin/Debug/Lekcja12b.exe.config | 6 + Lesson12/Lekcja12b/bin/Debug/Lekcja12b.pdb | Bin 0 -> 30208 bytes Lesson12/Lekcja12b/obj/Debug/App.g.cs | 70 +++++++++ Lesson12/Lekcja12b/obj/Debug/App.g.i.cs | 70 +++++++++ ...gnTimeResolveAssemblyReferencesInput.cache | Bin 0 -> 7251 bytes .../Lekcja12b.Properties.Resources.resources | Bin 0 -> 180 bytes .../Lekcja12b.csproj.CoreCompileInputs.cache | 1 + .../Lekcja12b.csproj.FileListAbsolute.txt | 15 ++ .../Lekcja12b.csproj.GenerateResource.cache | Bin 0 -> 954 bytes .../Lekcja12b.csprojAssemblyReference.cache | Bin 0 -> 13714 bytes Lesson12/Lekcja12b/obj/Debug/Lekcja12b.exe | Bin 0 -> 10752 bytes .../Lekcja12b/obj/Debug/Lekcja12b.g.resources | Bin 0 -> 1958 bytes Lesson12/Lekcja12b/obj/Debug/Lekcja12b.pdb | Bin 0 -> 30208 bytes .../obj/Debug/Lekcja12b_MarkupCompile.cache | 20 +++ .../obj/Debug/Lekcja12b_MarkupCompile.i.cache | 20 +++ .../obj/Debug/Lekcja12b_MarkupCompile.i.lref | 4 + .../obj/Debug/Lekcja12b_MarkupCompile.lref | 4 + Lesson12/Lekcja12b/obj/Debug/MainWindow.baml | Bin 0 -> 1730 bytes Lesson12/Lekcja12b/obj/Debug/MainWindow.g.cs | 140 ++++++++++++++++++ .../Lekcja12b/obj/Debug/MainWindow.g.i.cs | 140 ++++++++++++++++++ 33 files changed, 1020 insertions(+) create mode 100644 Lesson12/Lekcja12b/App.config create mode 100644 Lesson12/Lekcja12b/App.xaml create mode 100644 Lesson12/Lekcja12b/App.xaml.cs create mode 100644 Lesson12/Lekcja12b/Lekcja12b.csproj create mode 100644 Lesson12/Lekcja12b/Lekcja12b.sln create mode 100644 Lesson12/Lekcja12b/MainWindow.xaml create mode 100644 Lesson12/Lekcja12b/MainWindow.xaml.cs create mode 100644 Lesson12/Lekcja12b/Properties/AssemblyInfo.cs create mode 100644 Lesson12/Lekcja12b/Properties/Resources.Designer.cs create mode 100644 Lesson12/Lekcja12b/Properties/Resources.resx create mode 100644 Lesson12/Lekcja12b/Properties/Settings.Designer.cs create mode 100644 Lesson12/Lekcja12b/Properties/Settings.settings create mode 100644 Lesson12/Lekcja12b/bin/Debug/Lekcja12b.exe create mode 100644 Lesson12/Lekcja12b/bin/Debug/Lekcja12b.exe.config create mode 100644 Lesson12/Lekcja12b/bin/Debug/Lekcja12b.pdb create mode 100644 Lesson12/Lekcja12b/obj/Debug/App.g.cs create mode 100644 Lesson12/Lekcja12b/obj/Debug/App.g.i.cs create mode 100644 Lesson12/Lekcja12b/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache create mode 100644 Lesson12/Lekcja12b/obj/Debug/Lekcja12b.Properties.Resources.resources create mode 100644 Lesson12/Lekcja12b/obj/Debug/Lekcja12b.csproj.CoreCompileInputs.cache create mode 100644 Lesson12/Lekcja12b/obj/Debug/Lekcja12b.csproj.FileListAbsolute.txt create mode 100644 Lesson12/Lekcja12b/obj/Debug/Lekcja12b.csproj.GenerateResource.cache create mode 100644 Lesson12/Lekcja12b/obj/Debug/Lekcja12b.csprojAssemblyReference.cache create mode 100644 Lesson12/Lekcja12b/obj/Debug/Lekcja12b.exe create mode 100644 Lesson12/Lekcja12b/obj/Debug/Lekcja12b.g.resources create mode 100644 Lesson12/Lekcja12b/obj/Debug/Lekcja12b.pdb create mode 100644 Lesson12/Lekcja12b/obj/Debug/Lekcja12b_MarkupCompile.cache create mode 100644 Lesson12/Lekcja12b/obj/Debug/Lekcja12b_MarkupCompile.i.cache create mode 100644 Lesson12/Lekcja12b/obj/Debug/Lekcja12b_MarkupCompile.i.lref create mode 100644 Lesson12/Lekcja12b/obj/Debug/Lekcja12b_MarkupCompile.lref create mode 100644 Lesson12/Lekcja12b/obj/Debug/MainWindow.baml create mode 100644 Lesson12/Lekcja12b/obj/Debug/MainWindow.g.cs create mode 100644 Lesson12/Lekcja12b/obj/Debug/MainWindow.g.i.cs diff --git a/Lesson12/Lekcja12b/App.config b/Lesson12/Lekcja12b/App.config new file mode 100644 index 0000000..00bfd11 --- /dev/null +++ b/Lesson12/Lekcja12b/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Lesson12/Lekcja12b/App.xaml b/Lesson12/Lekcja12b/App.xaml new file mode 100644 index 0000000..aaa71a6 --- /dev/null +++ b/Lesson12/Lekcja12b/App.xaml @@ -0,0 +1,9 @@ + + + + + diff --git a/Lesson12/Lekcja12b/App.xaml.cs b/Lesson12/Lekcja12b/App.xaml.cs new file mode 100644 index 0000000..fcae2fa --- /dev/null +++ b/Lesson12/Lekcja12b/App.xaml.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data; +using System.Linq; +using System.Threading.Tasks; +using System.Windows; + +namespace Lekcja12b +{ + /// + /// Logika interakcji dla klasy App.xaml + /// + public partial class App : Application + { + } +} diff --git a/Lesson12/Lekcja12b/Lekcja12b.csproj b/Lesson12/Lekcja12b/Lekcja12b.csproj new file mode 100644 index 0000000..a64d826 --- /dev/null +++ b/Lesson12/Lekcja12b/Lekcja12b.csproj @@ -0,0 +1,98 @@ + + + + + Debug + AnyCPU + {CCA088E1-6348-47D5-B149-A44582DFEF84} + WinExe + Lekcja12b + Lekcja12b + v4.6.1 + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 4 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + 4.0 + + + + + + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + App.xaml + Code + + + MainWindow.xaml + Code + + + + + Code + + + True + True + Resources.resx + + + True + Settings.settings + True + + + ResXFileCodeGenerator + Resources.Designer.cs + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + + + + + \ No newline at end of file diff --git a/Lesson12/Lekcja12b/Lekcja12b.sln b/Lesson12/Lekcja12b/Lekcja12b.sln new file mode 100644 index 0000000..e3f0bc6 --- /dev/null +++ b/Lesson12/Lekcja12b/Lekcja12b.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.28307.136 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lekcja12b", "Lekcja12b.csproj", "{CCA088E1-6348-47D5-B149-A44582DFEF84}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {CCA088E1-6348-47D5-B149-A44582DFEF84}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CCA088E1-6348-47D5-B149-A44582DFEF84}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CCA088E1-6348-47D5-B149-A44582DFEF84}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CCA088E1-6348-47D5-B149-A44582DFEF84}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {4D9A330C-D2D6-400A-970A-4A1FDB77A2EA} + EndGlobalSection +EndGlobal diff --git a/Lesson12/Lekcja12b/MainWindow.xaml b/Lesson12/Lekcja12b/MainWindow.xaml new file mode 100644 index 0000000..7d2ab2f --- /dev/null +++ b/Lesson12/Lekcja12b/MainWindow.xaml @@ -0,0 +1,15 @@ + + + + + +