Esempio n. 1
0
        public void SetStation()
        {
            ClockRadio changeSettings = new ClockRadio();

            Console.WriteLine("**********************************************************");
            Console.WriteLine("Would you like to listen to the RADIO now?");
            string userImput = Console.ReadLine();

            if (userImput == "yes" || userImput == "y" || userImput == "Yes" || userImput == "Y" || userImput == "YES")
            {
                Console.WriteLine("**********************************************************");
                Console.WriteLine("What RADIO STATION would you like to JAM out to?");
                string SetStation = Console.ReadLine();
                Console.WriteLine("**********************************************************");
                Console.WriteLine("Your current RADIO STATION is {0}. JAM ON!!!", SetStation);
                Console.WriteLine("**********************************************************");
            }
            else if (userImput == "no" || userImput == "n" || userImput == "No" || userImput == "N" || userImput == "NO")
            {
                Console.WriteLine("**********************************************************");
                Console.WriteLine("Your RADIO is turned OFF!");
                Console.WriteLine("**********************************************************");
                changeSettings.ChangeSettings();
            }
            else
            {
                Console.WriteLine("INVALID INPUT select [YES] or [NO]");
                SetStation();
            }
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            ClockRadio clockRadio = new ClockRadio();

            Console.Clear();
            clockRadio.Menu();
        }
Esempio n. 3
0
        static void Main(string[] args)
        {
            foreach (string flamingo in args)
            {
                Console.WriteLine(flamingo);
            }
            List <string> thing = new List <string>();

            //for (int i = 0; i < 5000; i++)
            //{
            //    thing.Add("Nevin");
            //}
            //for (int i = 0; i < thing.Count; i++)
            //{
            //    Console.WriteLine(thing[i]);
            //}
            //////////////////////////////
            int[] otherThing = new int[6];

            for (int i = 0; i < otherThing.Length; i++)
            {
                otherThing[i] = i;
            }
            foreach (int banana in otherThing)
            {
                Console.WriteLine(banana);
            }
            Console.WriteLine(otherThing);
            Console.ReadLine();
            ClockRadio myClockRadio = new ClockRadio();

            myClockRadio.Setup();
        }
Esempio n. 4
0
        public void ChangeSettings()
        {
            ClockRadio changeSettings = new ClockRadio();

            Console.WriteLine("What would you like to do?");
            Console.WriteLine("Select [1] to set the ALARM");
            Console.WriteLine("Select [2] to set the RADIO STATION");
            Console.WriteLine("Select [3] to POWER OFF your CLOCK RADIO");
            string userImput = Console.ReadLine();

            if (userImput == "1")
            {
                changeSettings.SetAlarm();
                changeSettings.ChangeSettings();
            }
            else if (userImput == "2")
            {
                changeSettings.SetStation();
                changeSettings.ChangeSettings();
            }
            else if (userImput == "3")
            {
                changeSettings.PowerOff();
            }
            else
            {
                Console.WriteLine("INVALID INPUT");
                ChangeSettings();
            }
        }
Esempio n. 5
0
        static void Main(string[] args)
        {
            ClockRadio ClockRadio = new ClockRadio(false, 100);

            ClockRadio.On();
            ClockRadio.MainMenu();
            Console.ReadLine();
        }
Esempio n. 6
0
        static void Main(string[] args)
        {
            ClockRadio ClockRadio = new ClockRadio();

            Console.WriteLine("**********************************************************");
            Console.WriteLine("************ HELLO ~ This is your CLOCK RADIO ************");
            Console.WriteLine("**********************************************************");
            ClockRadio.CurrentTime();
            Console.WriteLine("**********************************************************");
            ClockRadio.ChangeSettings();
        }
Esempio n. 7
0
        static void Main(string[] args)
        {
            ClockRadio myRadio = new ClockRadio();

            //normally would call the run function instead.
            //myRadio.TogglePower();
            //myRadio.clock.DisplayTime();
            //myRadio.clock.SetTime();
            //myRadio.clock.DisplayTime();
            myRadio.runClockRadio();
            Console.ReadKey();
        }
Esempio n. 8
0
        static void Main(string[] args)
        {
            ClockRadio MyClock     = new ClockRadio();
            bool       exitConsole = false;

            while (exitConsole != true)
            {
                Console.WriteLine("The current time is: " + MyClock.GetTime());
                Console.WriteLine("The current station is set to: " + MyClock.GetStation());
                Console.WriteLine("The alarm is set to: " + MyClock.GetAlarmTime());

                Console.WriteLine("Enter T - update time, S - update station, A - set Alarm, H - toggle Alarm, Q - Quit:");
                string userInput = Console.ReadLine();

                switch (userInput)
                {
                case "T":
                    Console.WriteLine("Enter a new Time: ");
                    userInput = Console.ReadLine();
                    MyClock.SetTime(userInput);
                    break;

                case "S":
                    Console.WriteLine("Enter a new Station");
                    userInput = Console.ReadLine();
                    MyClock.SetStation(userInput);
                    break;

                case "A":
                    Console.WriteLine("Enter a new alarm time: ");
                    userInput = Console.ReadLine();
                    MyClock.SetAlarmTime(userInput);
                    break;

                case "H":
                    MyClock.ToggleAlarm();
                    break;

                case "Q":
                    exitConsole = true;
                    break;
                }
            }
        }
Esempio n. 9
0
        public void PowerOff()
        {
            Console.WriteLine("Do you want to turn the CLOCK RADIO [off]?");
            string     userImput      = Console.ReadLine();
            ClockRadio changeSettings = new ClockRadio();

            if (userImput == "yes" || userImput == "y" || userImput == "Yes" || userImput == "Y" || userImput == "YES")
            {
                Console.WriteLine("**********************************************************");
                Console.WriteLine("Your RADIO will be turned OFf in 6 .. 5 .. 4 ..");
                Console.WriteLine("........3............2....................1...............");
                Console.WriteLine("**********************************************************");
            }
            else if (userImput == "no" || userImput == "n" || userImput == "No" || userImput == "N" || userImput == "NO")
            {
                Console.WriteLine("**********************************************************");
                changeSettings.ChangeSettings();
            }
            else
            {
                Console.WriteLine("INVALID INPUT select [YES] or [NO]");
                PowerOff();
            }
        }
Esempio n. 10
0
        public static void Main(string[] args)
        {
            ClockRadio clockRadio = new ClockRadio();

            clockRadio.ToggleClockRadioPower();
        }
Esempio n. 11
0
        static void Main(string[] args)
        {
            ClockRadio clockRadio = new ClockRadio();

            clockRadio.ChooseMenuOption();
        }