static void Main(string[] args) { Cars cars = new Cars(); FileSupport file = new FileSupport(); bool ifData = false; while (true) { switch (Menu.MainList()) { case 1: Support.WriteCol("--- Wczytywanie z pliku ---", "G"); Console.WriteLine(); if (File.Exists(file.GetTitle())) { Support.Clear(cars); } ifData = file.Read(cars); break; case 2: Support.WriteCol("--- Zapis do pliku ---", "G"); Console.WriteLine(); if (ifData) { file.GetTitle(); file.Save(cars); } else { Support.WriteCol("Brak danych w bazie do zapisania", "DY"); } break; case 3: Support.WriteCol("--- Dodawanie samochodu do bazy ---", "G"); Console.WriteLine(); cars.Add(); ifData = true; break; case 4: Support.WriteCol("--- Usuwanie samochodu z bazy ---", "G"); Console.WriteLine(); if (ifData) { cars.Remove(cars.Search()); } else { Support.WriteCol("Brak danych w bazie", "DY"); } break; case 5: Support.WriteCol("--- Wszystkie samochody ---", "G"); Console.WriteLine(); cars.PrintAll(); break; case 6: Support.WriteCol("--- Warunowa lista samochodow ---", "G"); Console.WriteLine(); if (ifData) { cars.PrintConditional(Menu.ConditionalList()); } else { Support.WriteCol("Brak danych w bazie", "DY"); } break; case 7: Support.WriteCol("--- Wyszukiwanie samochodu ---", "G"); Console.WriteLine(); if (ifData) { cars.Search(); } else { Support.WriteCol("Brak danych w bazie", "DY"); } break; case 8: Support.WriteCol("--- Posortowana lista samochodow ---", "G"); Console.WriteLine(); if (ifData) { cars.PrintSorted(Menu.SortingList(), Menu.SortingDeOrIn()); } else { Support.WriteCol("Brak danych w bazie", "DY"); } break; case 9: return; } Support.PressEnter(); } }
#pragma warning disable 1998 public async override global::System.Threading.Tasks.Task ExecuteAsync() { BeginContext(25, 29, true); WriteLiteral("\r\n<!DOCTYPE HTML>\r\n<html>\r\n\r\n"); EndContext(); BeginContext(54, 206, false); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("head", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "5395554d4a4b4493ac6aefa13c93b24e", async() => { BeginContext(60, 193, true); WriteLiteral("\r\n <meta charset=\"utf-8\">\r\n <title>Messenger</title>\r\n <meta http-equiv=\"refresh\" content=\"10\">\r\n <script>\r\n function f(){\r\n window.scrollTo(0,100000);\r\n }\r\n </script>\r\n"); EndContext(); } ); __Microsoft_AspNetCore_Mvc_Razor_TagHelpers_HeadTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.Razor.TagHelpers.HeadTagHelper>(); __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_Razor_TagHelpers_HeadTagHelper); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); if (!__tagHelperExecutionContext.Output.IsContentModified) { await __tagHelperExecutionContext.SetOutputContentAsync(); } Write(__tagHelperExecutionContext.Output); __tagHelperExecutionContext = __tagHelperScopeManager.End(); EndContext(); BeginContext(260, 8, true); WriteLiteral("\r\n\r\n "); EndContext(); BeginContext(268, 164, false); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("body", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "b2c581f09eab4fb2806b447c55ef1831", async() => { BeginContext(309, 5, true); WriteLiteral("\r\n \r\n"); EndContext(); #line 19 "D:\0.project\c_sharp\messenger\messenger\Views\Home\storage.cshtml" foreach (string item in FileSupport.Read()) { #line default #line hidden BeginContext(380, 17, true); WriteLiteral(" <p> "); EndContext(); BeginContext(398, 4, false); #line 21 "D:\0.project\c_sharp\messenger\messenger\Views\Home\storage.cshtml" Write(item); #line default #line hidden EndContext(); BeginContext(402, 7, true); WriteLiteral(" </p>\r\n"); EndContext(); #line 22 "D:\0.project\c_sharp\messenger\messenger\Views\Home\storage.cshtml" } #line default #line hidden BeginContext(421, 4, true); WriteLiteral(" "); EndContext(); } ); __Microsoft_AspNetCore_Mvc_Razor_TagHelpers_BodyTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.Razor.TagHelpers.BodyTagHelper>(); __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_Razor_TagHelpers_BodyTagHelper); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); if (!__tagHelperExecutionContext.Output.IsContentModified) { await __tagHelperExecutionContext.SetOutputContentAsync(); } Write(__tagHelperExecutionContext.Output); __tagHelperExecutionContext = __tagHelperScopeManager.End(); EndContext(); BeginContext(432, 13, true); WriteLiteral("\r\n\r\n</html>\r\n"); EndContext(); }