1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
-
- using System.Collections;
- using System.Runtime.InteropServices.Marshalling;
- class PaperScrapper
- {
- static void Main(string[] args)
- {
- String? userCase;
- int resultCount = 10;
- String strErrorUserCase = "Wrong option, try again";
- String uiMessage = @"
- 1 - Search by text
- 2 - Latest page
- 3 - Hot page
- 4 - Toplist page
- 5 - Random page
- 6 - Change result output.
- 0 - Exit";
- do
- {
- Console.WriteLine("Which option PaperScrapper should use:" + uiMessage);
- userCase = Console.ReadLine();
- switch (userCase)
- {
- case "1":
- SearchByText();
- break;
- case "2": break;
- case "3": break;
- case "4": break;
- case "5": break;
- case "6":
- Console.WriteLine("Current result output is "+ resultCount);
- Console.WriteLine("Input how many pictures do you want to download per request: ");
-
- int tmpResCount = resultCount;
-
- if (!int.TryParse(Console.ReadLine(), out resultCount))
- {
- resultCount = tmpResCount;
- Console.WriteLine("You must enter a number. Try again!");
- }
- break;
- case "7": break;
- default: break;
- }
- } while (userCase != "0");
- }
- private static void SearchByText()
- {
- Console.WriteLine("Input text: ");
- String? inputText = Console.ReadLine();
- }
- private static void ShowLatestPage()
- {
- }
- private static void ShowHotPage()
- {
- }
- private static void ShowRandomPage()
- {
- }
- }
|