Ejemplo n.º 1
0
        private void SettingsMenuFunction()
        {
            Station.StartTimeThread();

            Console.CursorVisible = false;
            ConsoleKeyInfo key;

            key = Console.ReadKey(true);


            if (key.Key == ConsoleKey.C)
            {
                Station.BeepClick();
                Station.StopTimeThread();
                Station.Highlight(39, topC, textC);
                SettingsLoginDetails sl = new SettingsLoginDetails();
                sl.Start();
            }


            else if (key.Key == ConsoleKey.V)
            {
                Station.BeepClick();
                Station.StopTimeThread();
                Station.Highlight(39, topM, textM);
                Station.StopTimeThread();
                top += 4;
                Station.BeepError();
                Console.SetCursorPosition(39, top);
                Console.WriteLine("Not yet Implemented");
                Thread.Sleep(200);
                top = 14;
                Console.Clear();
                Start();
            }


            else if (key.Key == ConsoleKey.R)
            {
                Station.BeepClick();
                Station.StopTimeThread();
                Station.Highlight(39, topR, textR);
                MainMenu mm = new MainMenu();
                mm.Start();
            }


            else
            {
                Station.StopTimeThread();
                top += 4;
                Station.BeepError();
                Console.SetCursorPosition(39, top);
                Console.WriteLine("Invalid Key.");
                Thread.Sleep(200);
                top = 14;
                Console.Clear();
                Start();
            }
        }
Ejemplo n.º 2
0
        private void PersonalAssistantFunction()
        {
            Station.StartTimeThread();

            Console.CursorVisible = false;
            ConsoleKeyInfo key;

            key = Console.ReadKey(true);


            if (key.Key == ConsoleKey.C)
            {
                Station.BeepClick();
                Station.StopTimeThread();
                Station.Highlight(39, topC, textC);
                ContactDetails cd = new ContactDetails();
                cd.Start();
            }


            else if (key.Key == ConsoleKey.M)
            {
                Station.BeepClick();
                Station.StopTimeThread();
                Station.Highlight(39, topM, textM);
                MeetingAppointment ma = new MeetingAppointment();
                ma.Start();
            }


            else if (key.Key == ConsoleKey.R)
            {
                Station.BeepClick();
                Station.StopTimeThread();
                Station.Highlight(39, topR, textR);
                MainMenu mm = new MainMenu();
                mm.Start();
            }


            else
            {
                Station.StopTimeThread();
                top += 4;
                Station.BeepError();
                Console.SetCursorPosition(39, top);
                Console.WriteLine("Invalid Key.");
                Thread.Sleep(200);
                top = 14;
                Console.Clear();
                Start();
            }
        }
Ejemplo n.º 3
0
        private void PasswordHideMenuFunction()
        {
            Station.StartTimeThread();

            if (Station.passHide == "A")
            {
                Station.writerClearedRow(70, topA, "Active");
                Station.clearRow(70, topI, 6);
            }
            else if (Station.passHide == "I")
            {
                Station.writerClearedRow(70, topI, "Active");
                Station.clearRow(70, topA, 6);
            }


            Console.CursorVisible = false;
            ConsoleKeyInfo key;

            key = Console.ReadKey(true);


            if (key.Key == ConsoleKey.A)
            {
                Station.BeepClick();
                Station.StopTimeThread();
                Station.Highlight(39, topA, textA);

                int toperA = topR + 3;

                Station.writerClearedRow(39, toperA, "Asterix has been selected.");
                toperA++;
                Station.writerClearedRow(39, toperA, "");

                Console.ReadKey();

                SaveToSettingsFile("A");

                Station.writerClearedRow(70, topA, "Active");
                Station.clearRow(70, topI, 6);

                SettingsLoginDetails sl = new SettingsLoginDetails();
                sl.Start();
            }


            else if (key.Key == ConsoleKey.I)
            {
                Station.BeepClick();
                Station.StopTimeThread();
                Station.Highlight(39, topI, textI);


                int toperA = topR + 3;

                Station.writerClearedRow(39, toperA, "Invisible has been selected.");
                toperA++;
                Station.writerClearedRow(39, toperA, "");

                Console.ReadKey();
                SaveToSettingsFile("I");

                Station.writerClearedRow(70, topI, "Active");
                Station.clearRow(70, topA, 6);

                SettingsLoginDetails sl = new SettingsLoginDetails();
                sl.Start();
            }


            else if (key.Key == ConsoleKey.R)
            {
                Station.BeepClick();
                Station.StopTimeThread();
                Station.Highlight(39, topR, textR);
                SettingsLoginDetails sld = new SettingsLoginDetails();
                sld.Start();
            }


            else
            {
                Station.StopTimeThread();
                top += 4;
                Station.BeepError();
                Console.SetCursorPosition(39, top);
                Console.WriteLine("Invalid Key.");
                Thread.Sleep(200);
                top = 14;
                Console.Clear();
                Start();
            }
        }
Ejemplo n.º 4
0
        public void Start()
        {
            Console.Title = "BlueMoon - Contacts Application";

            Console.Clear();
            AsciiClass ac = new AsciiClass();

            ac.BlueMoon(3);

            int left = 37;
            int top  = 14;

            Console.SetCursorPosition(left, top);
            Console.WriteLine("PERSONAL ASSISTANT APPLICATION");

            top++;
            Console.SetCursorPosition(37, top);
            Console.WriteLine("Contact Details Page.");

            top += 3;
            int topA = top;

            Console.SetCursorPosition(39, top);
            String textA = "(A). Add contacts";

            Console.WriteLine(textA);

            top += 2;
            int topE = top;

            Console.SetCursorPosition(39, top);
            string textE = "(E). Edit Contacts";

            Console.WriteLine(textE);

            top += 2;
            int topV = top;

            Console.SetCursorPosition(39, top);
            string textV = "(V). View Contacts ";

            Console.WriteLine(textV);

            top += 2;
            int topS = top;

            Console.SetCursorPosition(39, top);
            string textS = "(S). Search Contacts ";

            Console.WriteLine(textS);

            top += 2;
            int topD = top;

            Console.SetCursorPosition(39, top);
            string textD = "(D). Delete Contacts ";

            Console.WriteLine(textD);

            top += 2;
            int topR = top;

            Console.SetCursorPosition(39, top);
            string textR = "(R). Return to Main Page ";

            Console.WriteLine(textR);


            Station.StartTimeThread();

            Console.CursorVisible = false;
            ConsoleKeyInfo key;

            key = Console.ReadKey(true);

            if (key.Key == ConsoleKey.A)
            {
                Station.StopTimeThread();
                Station.BeepClick();
                Station.Highlight(39, topA, textA);
                AddContacts ad = new AddContacts();
                ad.Start();
            }
            else if (key.Key == ConsoleKey.E)
            {
                Station.StopTimeThread();
                Station.BeepClick();
                Station.Highlight(39, topE, textE);
                EditContacts ec = new EditContacts();
                ec.Start();
            }
            else if (key.Key == ConsoleKey.V)
            {
                Station.StopTimeThread();
                Station.BeepClick();
                Station.Highlight(39, topV, textV);
                ViewContacts vc = new ViewContacts();
                vc.Start();
            }
            else if (key.Key == ConsoleKey.S)
            {
                Station.StopTimeThread();
                Station.BeepClick();
                Station.Highlight(39, topS, textS);
                SearchContacts sc = new SearchContacts();
                sc.Start();
            }
            else if (key.Key == ConsoleKey.D)
            {
                Station.StopTimeThread();
                Station.BeepClick();
                Station.Highlight(39, topD, textD);
                DeleteContacts dc = new DeleteContacts();
                dc.Start();
            }
            else if (key.Key == ConsoleKey.R)
            {
                Station.StopTimeThread();
                Station.BeepClick();
                Station.Highlight(39, topR, textR);
                PersonalAssistant pa = new PersonalAssistant();
                pa.Start();
            }
            else
            {
                Station.StopTimeThread();
                top += 4;
                Station.BeepError();
                Console.SetCursorPosition(39, top);
                Console.WriteLine("Invalid Key.");
                Thread.Sleep(200);
                Console.Clear();
                Start();
            }
        }
Ejemplo n.º 5
0
        private void MeetingAppointmentFunction()
        {
            Station.StartTimeThread();

            Console.CursorVisible = false;
            ConsoleKeyInfo key;

            key = Console.ReadKey(true);

            if (key.Key == ConsoleKey.A)
            {
                Station.StopTimeThread();
                Station.BeepClick();
                Station.Highlight(39, topA, textA);
                AddAppointments ap = new AddAppointments();
                ap.Start();
            }
            else if (key.Key == ConsoleKey.E)
            {
                Station.StopTimeThread();
                Station.BeepClick();
                Station.Highlight(39, topE, textE);
                EditAppointments ea = new EditAppointments();
                ea.Start();
            }
            else if (key.Key == ConsoleKey.V)
            {
                Station.StopTimeThread();
                Station.BeepClick();
                Station.Highlight(39, topV, textV);
                ViewAppointments va = new ViewAppointments();
                va.Start();
            }
            else if (key.Key == ConsoleKey.S)
            {
                Station.StopTimeThread();
                Station.BeepClick();
                Station.Highlight(39, topS, textS);
                SearchAppointments sa = new SearchAppointments();
                sa.Start();
            }
            else if (key.Key == ConsoleKey.D)
            {
                Station.StopTimeThread();
                Station.BeepClick();
                Station.Highlight(39, topD, textD);
                DeleteAppointments da = new DeleteAppointments();
                da.Start();
            }
            else if (key.Key == ConsoleKey.R)
            {
                Station.StopTimeThread();
                Station.BeepClick();
                Station.StopTimeThread();
                Station.Highlight(39, topR, textR);
                PersonalAssistant pa = new PersonalAssistant();
                pa.Start();
            }
            else
            {
                top += 4;
                Station.StopTimeThread();
                Station.BeepError();
                Console.SetCursorPosition(39, top);
                Console.WriteLine("Invalid Key.");
                Thread.Sleep(200);
                Console.Clear();
                top = 14;
                Start();
            }
        }
Ejemplo n.º 6
0
        private void DisplayMainMenu()
        {
            Console.Clear();
            AsciiClass ac = new AsciiClass();

            ac.BlueMoon(3);

            Console.SetCursorPosition(37, 14);
            Console.WriteLine("press the letter in the bracket to select option.");

            Console.SetCursorPosition(37, 15);
            Console.WriteLine("Example : press 'p' for personal assistant.");

            Console.SetCursorPosition(39, 18);
            string textP = "(P). Personal Assistant Application";

            Console.WriteLine(textP);

            Console.SetCursorPosition(39, 20);
            string textS = "(S). Settings";

            Console.WriteLine(textS);

            Console.SetCursorPosition(39, 22);
            string textL = "(L). Log out";

            Console.WriteLine(textL);

            Console.SetCursorPosition(39, 24);
            Console.WriteLine("(X). Exit");


            Station.StartTimeThread();


            Console.CursorVisible = false;
            ConsoleKeyInfo key;

            key = Console.ReadKey(true);

            if (key.Key == ConsoleKey.P)
            {
                Station.BeepClick();
                Station.StopTimeThread();
                Station.Highlight(39, 18, textP);
                PersonalAssistant pa = new PersonalAssistant();
                pa.Start();
            }
            else if (key.Key == ConsoleKey.S)
            {
                Station.BeepClick();
                Station.StopTimeThread();
                Station.Highlight(39, 20, textS);
                SettingsMenu sm = new SettingsMenu();
                sm.Start();
            }
            else if (key.Key == ConsoleKey.L)
            {
                Station.BeepClick();
                Station.StopTimeThread();
                Station.Highlight(39, 22, textL);
                Login l = new Login();
                l.DisplayPassword();
            }
            else if (key.Key == ConsoleKey.X)
            {
                Station.StopTimeThread();
                Environment.Exit(0);
                Application.Exit();
            }
            else
            {
                Station.StopTimeThread();
                Station.BeepError();
                Console.SetCursorPosition(39, 26);
                Console.WriteLine("Invalid Key.");
                Thread.Sleep(200);
                Console.Clear();
                DisplayMainMenu();
            }
        }
Ejemplo n.º 7
0
        public void Start()
        {
            Console.Title = "BlueMoon - Settings - Change Theme Color";

            Console.Clear();
            AsciiClass ac = new AsciiClass();

            ac.BlueMoon(3);

            int left = 37;
            int top  = 14;

            Console.SetCursorPosition(left, top);
            Console.WriteLine("PERSONAL ASSISTANT APPLICATION");

            top++;
            Console.SetCursorPosition(37, top);
            Console.WriteLine("Press the letter in brackets to select Theme Color");

            top += 3;
            int topCyan = top;

            Console.SetCursorPosition(39, top);
            String textCyan = "(C). Theme Cyan (default)";

            Console.WriteLine(textCyan);

            top += 2;
            int topGreen = top;

            Console.SetCursorPosition(39, top);
            string textGreen = "(G). Theme Green";

            Console.WriteLine(textGreen);

            top += 2;
            int topBlue = top;

            Console.SetCursorPosition(39, top);
            string textBlue = "(B). Theme Blue ";

            Console.WriteLine(textBlue);

            top += 2;
            int topMagenta = top;

            Console.SetCursorPosition(39, top);
            string textMagenta = "(M). Theme Magenta ";

            Console.WriteLine(textMagenta);

            top += 2;
            int topGray = top;

            Console.SetCursorPosition(39, top);
            string textGray = "(A). Theme Gray ";

            Console.WriteLine(textGray);

            top += 2;
            int topYellow = top;

            Console.SetCursorPosition(39, top);
            string textYellow = "(Y). Theme Yellow";

            Console.WriteLine(textYellow);

            top += 2;
            int topRed = top;

            Console.SetCursorPosition(39, top);
            string textRed = "(R). Theme Red";

            Console.WriteLine(textRed);

            top += 2;
            int topX = top;

            Console.SetCursorPosition(39, top);
            string textX = "(X). Exit this page ";

            Console.WriteLine(textX);


            Station.StartTimeThread();

            Console.CursorVisible = false;
            ConsoleKeyInfo key;

            key = Console.ReadKey(true);

            if (key.Key == ConsoleKey.C)
            {
                Station.StopTimeThread();
                Station.BeepClick();
                Station.Highlight(39, topCyan, textCyan);

                //
                Station.writerClearedRow(39, 34, "Theme Cyan Selected.");

                Station.writerClearedRow(39, 35, "Press any key to save and return to settings");

                SaveToSettingsFile("Cyan");

                SettingsLoginDetails sld = new SettingsLoginDetails();
                sld.Start();
            }
            else if (key.Key == ConsoleKey.G)
            {
                Station.StopTimeThread();
                Station.BeepClick();
                Station.Highlight(39, topGreen, textGreen);

                Station.writerClearedRow(39, 34, "Theme Green Selected.");

                Station.writerClearedRow(39, 35, "Press any key to save and return to settings");

                SaveToSettingsFile("Green");

                SettingsLoginDetails sld = new SettingsLoginDetails();
                sld.Start();
            }

            else if (key.Key == ConsoleKey.B)
            {
                Station.StopTimeThread();
                Station.BeepClick();
                Station.Highlight(39, topBlue, textBlue);

                Station.writerClearedRow(39, 34, "Theme Blue Selected.");

                Station.writerClearedRow(39, 35, "Press any key to save and return to settings");

                SaveToSettingsFile("Blue");

                SettingsLoginDetails sld = new SettingsLoginDetails();
                sld.Start();
            }

            else if (key.Key == ConsoleKey.M)
            {
                Station.StopTimeThread();
                Station.BeepClick();
                Station.Highlight(39, topMagenta, textMagenta);

                Station.writerClearedRow(39, 34, "Theme Magenta Selected.");

                Station.writerClearedRow(39, 35, "Press any key to save and return to settings");

                SaveToSettingsFile("Magenta");

                SettingsLoginDetails sld = new SettingsLoginDetails();
                sld.Start();
            }

            else if (key.Key == ConsoleKey.A)
            {
                Station.StopTimeThread();
                Station.BeepClick();
                Station.Highlight(39, topGray, textGray);

                Station.writerClearedRow(39, 34, "Theme Gray Selected.");

                Station.writerClearedRow(39, 35, "Press any key to save and return to settings");

                SaveToSettingsFile("Gray");

                SettingsLoginDetails sld = new SettingsLoginDetails();
                sld.Start();
            }

            else if (key.Key == ConsoleKey.Y)
            {
                Station.StopTimeThread();
                Station.BeepClick();
                Station.Highlight(39, topYellow, textYellow);

                Station.writerClearedRow(39, 34, "Theme Yellow Selected.");

                Station.writerClearedRow(39, 35, "Press any key to save and return to settings");

                SaveToSettingsFile("Yellow");

                SettingsLoginDetails sld = new SettingsLoginDetails();
                sld.Start();
            }

            else if (key.Key == ConsoleKey.R)
            {
                Station.StopTimeThread();
                Station.BeepClick();
                Station.Highlight(39, topRed, textRed);

                Station.writerClearedRow(39, 34, "Theme Red Selected.");

                Station.writerClearedRow(39, 35, "Press any key to save and return to settings");

                SaveToSettingsFile("Red");

                SettingsLoginDetails sld = new SettingsLoginDetails();
                sld.Start();
            }

            else if (key.Key == ConsoleKey.X)
            {
                Station.StopTimeThread();
                Station.BeepClick();
                Station.Highlight(39, topX, textX);
                SettingsLoginDetails sld = new SettingsLoginDetails();
                sld.Start();
            }
            else
            {
                Station.StopTimeThread();
                top += 4;
                Station.BeepError();
                Console.SetCursorPosition(39, top);
                Console.WriteLine("Invalid Key.");
                Thread.Sleep(200);
                Console.Clear();
                Start();
            }
        }
Ejemplo n.º 8
0
        private void SettingsMenuFunction()
        {
            Station.StartTimeThread();

            Console.CursorVisible = false;
            ConsoleKeyInfo key;

            key = Console.ReadKey(true);


            if (key.Key == ConsoleKey.C)
            {
                Station.BeepClick();
                Station.StopTimeThread();
                Station.Highlight(39, topC, textC);
                ChangeUserPass cup = new ChangeUserPass();
                cup.Start();
            }


            else if (key.Key == ConsoleKey.P)
            {
                Station.BeepClick();
                Station.StopTimeThread();
                Station.Highlight(39, topP, textP);
                PasswordHide ph = new PasswordHide();
                ph.Start();
            }

            else if (key.Key == ConsoleKey.T)
            {
                Station.BeepClick();
                Station.StopTimeThread();
                Station.Highlight(39, topT, textT);
                ThemeColor tc = new ThemeColor();
                tc.Start();
            }


            else if (key.Key == ConsoleKey.R)
            {
                Station.BeepClick();
                Station.StopTimeThread();
                Station.Highlight(39, topR, textR);
                MainMenu mm = new MainMenu();
                mm.Start();
            }


            else
            {
                Station.StopTimeThread();
                top += 4;
                Station.BeepError();
                Console.SetCursorPosition(39, top);
                Console.WriteLine("Invalid Key.");
                Thread.Sleep(200);
                top = 14;
                Console.Clear();
                Start();
            }
        }