Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<stdio.h>
- #include<cstdlib>
- #include<windows.h>
- #define PL 1
- #define ENG 2
- int AskForLangugage();
- void MenuPL();
- void MenuEng();
- bool DoYouWantEndProgram();
- int lang = 1;
- using namespace std;
- namespace menupl
- {
- void internet(int a, int b);
- void przegladarka(int a, int b);
- void screen(int a);
- void PowerButton(int a, int b);
- }
- namespace menueng
- {
- void internet(int a, int b);
- void przegladarka(int a, int b);
- void screen(int a);
- void PowerButton(int a, int b);
- }
- int main()
- {
- bool bWork = true;
- while (bWork)
- {
- lang = AskForLangugage();
- if (lang == PL)
- {
- MenuPL();
- }
- else if (lang == ENG)
- {
- MenuEng();
- }
- else { cout << "Blad wyboru jezyka \n"; }
- bWork = DoYouWantEndProgram();
- }
- return 0;
- }
- int AskForLangugage()
- {
- string odp;
- bool sprawdz = true;
- do
- {
- system("cls");
- cout << "Menu: " << endl;
- cout << "[1] PL" << endl;
- cout << "[2] ENG" << endl;
- cout << "Prosze wybrac jezyk: "; cin >> odp;
- if (odp == "1")
- {
- sprawdz = false;
- return 1;
- }
- else if (odp == "2")
- {
- return 2;
- sprawdz = false;
- }
- else if ((odp != "1") && (odp != "2"))
- {
- cout << "Masz podac liczbe nie znak " << endl;
- system("pause");
- sprawdz = true;
- }
- } while (sprawdz);
- }
- bool DoYouWantEndProgram()
- {
- return false;
- }
- void MenuPL()
- {
- int menu, odp, odp1;
- for (;;)
- {
- system("cls");
- cout << "Menu polskie" << endl;
- cout << endl << endl;
- cout << "\t \t \t \t Twoje Centrum pomocy Hello World , Wita!" << endl;
- cout << "Jaki masz problem ? " << endl;
- cout << "Spojrz na menu! I wybierz swoj problem " << endl;
- cout << "[1] Problemy z internetem, lub brak internetu" << endl;
- cout << "[2] Przegladarka nie chce sie wlaczyc" << endl;
- cout << "[3] Pojawiajace sie artefakty na monitorze" << endl;
- cout << "[4} Nie dzialajacy przycisk wylaczania Pc " << endl;
- cout << "[5] Zakoncz Program" << endl;
- cout << "[6]Wybierz ponownie jezyk/Select language again" << endl;
- cout << " Wybierz z naszego menu: ";
- cin >> menu;
- switch (menu)
- {
- case 1:
- cout << endl;
- cout << " Wybrales opcje numer [1] Problemy z internetem, lub brak internetu, chetnie ci pomozemy " << endl << endl;
- cout << "Sprawdz czy masz wlaczony router :)" << endl;
- cout << "[1] Tak, mam wlaczony" << endl;
- cout << "[2] Nie, nie jest wlaczony" << endl;
- cout << "Wybierz : ";
- cin >> odp;
- cout << endl;
- cout << "Czy problem znikl? " << endl;
- cout << "[1]Tak" << endl;
- cout << "[2]Nie" << endl;
- cout << "Wybierz ponownie: ";
- cin >> odp1;
- menupl::internet(odp, odp1);
- break;
- case 2:
- cout << endl;
- cout << " Wybrales opcje numer [2] Przegladarka nie chce sie wlaczyc, chetnie ci pomozemy" << endl << endl;
- cout << "Po pierwsze, zorientuj sie, gdzie lezy problem" << endl << endl;
- cout << "Sprawdz czy w task manager nie masz wlaczonych kilka przegladarek! " << endl;
- cout << "[1] Tak, jest wlaczonych kilka przegladarek " << endl;
- cout << "[2] Nie, nie ma zadnych wlaczoncyh" << endl;
- cout << "Powiedz jak wyglada sprawa: ";
- cin >> odp;
- cout << endl;
- cout << "Problem nadal wystepuje?: " << endl;
- cout << "[1]Tak" << endl;
- cout << "[2]Nie" << endl;
- cout << "Wybierz : ";
- cin >> odp1;
- menupl::przegladarka(odp, odp1);
- break;
- case 3:
- cout << endl;
- cout << "Wybrales opcje numer [3] Pojawiajace sie artefakty na monitorze" << endl << endl;
- cout << "Sprawdz swoja karte graficzna , czy problem lezy po jej stornie" << endl;
- cout << "[1]Tak" << endl;
- cout << "[2] Nie" << endl;
- cout << "Wybierz prosze : ";
- cin >> odp;
- menupl::screen(odp);
- break;
- case 4:
- cout << endl;
- cout << "Wybrales opcje numer[4] Nie dzialajacy przycisk wylaczania Pc" << endl;
- cout << "Sprawdz czy nie masz uszkodzonej obudowy od PC" << endl;
- cout << "[1]Tak jest uszkodzona" << endl;
- cout << "[2]Nie, nie jest uszkodzona" << endl;
- cout << "wybierz :";
- cin >> odp;
- cout << "Chcesz sam podalczyc kontrolki od przycisku POWER?" << endl;
- cout << "[1]Tak" << endl;
- cout << "[2]Nie" << endl;
- cout << "Wybierz: ";
- cin >> odp1;
- menupl::PowerButton(odp, odp1);
- break;
- case 5:
- cout << "Dziekujemy za skorzystanie z naszego programu! Mam Nadzieje, ze udalo nam ci sie pomoc :) " << endl;
- exit(0);
- break;
- case 6:
- cout << "Chcesz wrocic do menu wyboru jezyka? /Do you want to return to the language selection menu?" << endl;
- system("pause");
- main();
- break;
- default:
- cout << "Nie ma takiej opcji w menu!" << endl;
- system("pause");
- break;
- }
- }
- }
- void MenuEng()
- {
- cout << "Menu English" << endl;
- int menu, odp, odp1;
- for (;;)
- {
- system("cls");
- cout << "Menu English " << endl;
- cout << endl << endl;
- cout << "\t \t \t \t Your Help Center MyPc , Welcom!" << endl;
- cout << "What is your problem? " << endl;
- cout << "Look at the menu! And choose your problem" << endl;
- cout << "[1]Problems with the internet, or no internet " << endl;
- cout << "[2] The browser won't turn on" << endl;
- cout << "[3] Artifacts appearing on the monitor" << endl;
- cout << "[4} Inactive Pc off button " << endl;
- cout << "[5] End Program" << endl;
- cout << "[6]Wybierz ponownie jezyk/Select language again" << endl;
- cout << " choose from our menu: ";
- cin >> menu;
- switch (menu)
- {
- case 1:
- cout << endl;
- cout << " You have chosen options number [1] Problems with the internet, or no internet, we will be happy to help you " << endl << endl;
- cout << "Check if your router is turned on :)" << endl;
- cout << "[1] Yes, I have it turned on" << endl;
- cout << "[2] No, it is not enabled" << endl;
- cout << "Select : ";
- cin >> odp;
- cout << "Is the problem gone? " << endl;
- cout << "[1]Yes" << endl;
- cout << "[2]No" << endl;
- cout << "Select again: ";
- cin >> odp1;
- menueng::internet(odp, odp1);
- break;
- case 2:
- cout << endl;
- cout << " You have chosen option number[2] Your browser won't turn on, we'll be happy to help you" << endl << endl;
- cout << "First, find out where the problem lies" << endl << endl;
- cout << "Check if your browser has several browsers enabled!" << endl;
- cout << "[1] Yes, several browsers are enabled " << endl;
- cout << "[2] No, there are none included" << endl;
- cout << "Tell me what the case looks like: ";
- cin >> odp;
- cout << endl;
- cout << "The issue still exists?: " << endl;
- cout << "[1]Yes" << endl;
- cout << "[2]No" << endl;
- cout << "Select : ";
- cin >> odp1;
- menueng::przegladarka(odp, odp1);
- break;
- case 3:
- cout << endl;
- cout << "You have chosen option number [3] Artifacts appearing on the monitor" << endl << endl;
- cout << "Check your graphics card to see if it's a problem" << endl;
- cout << "[1] Yes" << endl;
- cout << "[2] No" << endl;
- cout << "Select again : ";
- cin >> odp;
- menueng::screen(odp);
- break;
- case 4:
- cout << endl;
- cout << "You have chosen option number [4] Inactive Pc off button" << endl;
- cout << "Check if you have a damaged case from the PC" << endl;
- cout << "[1]Yes it is broken" << endl;
- cout << "[2]No, it's not broken" << endl;
- cout << "Select :";
- cin >> odp;
- cout << "You want to connect the POWER button controls yourself?" << endl;
- cout << "[1] Yes" << endl;
- cout << "[2] No" << endl;
- cout << "Select: ";
- cin >> odp1;
- menueng::PowerButton(odp, odp1);
- break;
- case 5:
- cout << "Thank you for using our program! I hope you were able to help :) " << endl;
- exit(0);
- break;
- case 6:
- cout << "Chcesz wrocic do menu wyboru jezyka? /Do you want to return to the language selection menu?" << endl;
- system("pause");
- main();
- break;
- default:
- cout << "There is no such option in the menu!" << endl;
- system("pause");
- break;
- }
- }
- }
- void menupl::internet(int a, int b)
- {
- if (a == 1)
- {
- cout << endl;
- cout << "Skontaktuj sie z dostawca internetu, badz sprawdz czy masz podlaczony kabel od internetu :) " << endl << endl;
- }
- else
- {
- cout << "Musisz wlaczyc router! " << endl << endl;
- }
- if (b == 1)
- {
- cout << endl;
- cout << "Cieszymy sie ze moglismy pomoc :) !" << endl << endl;
- }
- else
- {
- cout << "Skontaktuj sie z dostawca swojego internetu, jest to wymgane!" << endl;
- }
- system("pause");
- }
- void menupl::PowerButton(int a, int b)
- {
- if (a == 1)
- {
- cout << endl;
- cout << "Prosze o sprawdzneie kontrolek na plycie glownej" << endl;
- }
- else
- {
- cout << "Jesli nie jest uszkodzona to sprawdz: \n -podlaczenie kontorlek w plycie glownej \n -sprawdz czy dobrze podlaczyles kontrolki \n " << endl;
- }
- if (b == 1)
- {
- cout << "Przekieruje cie do storny ktora ci pomoze :)" << endl;
- system("start chrome.exe https://www.pcformat.pl/Jak-podlaczyc--przedni-panel,a,2630");
- }
- else
- {
- cout << "Udaj sie do informatyka niech on to zrobi za ciebie :)" << endl;
- cout << "Ps. 50 zl w kieszeni lepiej miej :)" << endl;
- }
- system("pause");
- }
- void menupl::przegladarka(int a, int b)
- {
- if (a == 1)
- {
- cout << "Prosze o ich wylaczenie : -) i sprawdzeniu czy dziala" << endl;
- }
- else
- {
- cout << "Uruchom ponownie komputer i sprawdz czy przegladarka dziala!" << endl;
- }
- if (b == 1)
- {
- cout << "Zainstaluj ponownie przegladarke, badz zainstaluj inna :)" << endl;
- }
- else
- {
- cout << "Cieszymy sie ze moglismy pomoc!" << endl;
- }
- system("pause");
- }
- void menupl::screen(int a)
- {
- if (a == 1)
- {
- cout << "Jesli problem lezy po stornie karty graficnzej. \n Prosze o jej jak najszybszy zakup i wymianie karty.graf " << endl;
- }
- else
- {
- cout << "Jesli to nie wina karty graficznej, sprawdz monitor, badz skontaktuj sie z informatykiem w twoim miescie" << endl;
- }
- system("pause");
- }
- void menueng::internet(int a, int b)
- {
- if (a == 1)
- {
- cout << endl;
- cout << "Contact your internet provider, be sure you have an internet cable connected :) " << endl << endl;
- }
- else
- {
- cout << "You must turn on the router! " << endl << endl;
- }
- if (b == 1)
- {
- cout << endl;
- cout << "We are glad that we could help :) !" << endl << endl;
- }
- else
- {
- cout << "Contact your internet provider, this is required!" << endl;
- }
- system("pause");
- }
- void menueng::PowerButton(int a, int b)
- {
- if (a == 1)
- {
- cout << endl;
- cout << "Please check the lights on the main board" << endl;
- }
- else
- {
- cout << "If it is not damaged, check: \ n - connecting the counter in the main board \ n - check if you have connected the controls correctly \ n " << endl;
- }
- if (b == 1)
- {
- cout << "I will redirect you to a website that will help you :)" << endl;
- system("start chrome.exe https://www.pcformat.pl/Jak-podlaczyc--przedni-panel,a,2630");
- }
- else
- {
- cout << "Go to an IT specialist and let him do it for you :)" << endl;
- cout << "Ps 50 zlotys in your pocket better have :)" << endl;
- }
- system("pause");
- }
- void menueng::przegladarka(int a, int b)
- {
- if (a == 1)
- {
- cout << "Please turn them off :-) and check if it works" << endl;
- }
- else
- {
- cout << "Restart your computer and check if your browser works!" << endl;
- }
- if (b == 1)
- {
- cout << "Reinstall browser, or install another :)" << endl;
- }
- else
- {
- cout << "We are glad that we could help!" << endl;
- }
- system("pause");
- }
- void menueng::screen(int a)
- {
- if (a == 1)
- {
- cout << "If the problem is with the graphics card. \ n Please purchase and replace the graphics card as soon as possible" << endl;
- }
- else
- {
- cout << "If this is not the fault of the graphics card, check the monitor, or contact an IT specialist in your city" << endl;
- }
- system("pause");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement