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(); } }
private void DisplayCurrentUserAndOptions() { //39, 17 Console.CursorVisible = false; ConsoleKeyInfo key; key = Console.ReadKey(true); if (key.Key == ConsoleKey.C) { CheckPreviousPassword(); } else if (key.Key == ConsoleKey.R) { SettingsLoginDetails sd = new SettingsLoginDetails(); sd.Start(); } else { Station.BeepError(); Console.SetCursorPosition(39, 26); Console.WriteLine("Invalid Key."); Thread.Sleep(200); Console.Clear(); Start(); } }
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(); } }
private void CheckPreviousPassword() { //39, 21 - 23 Station.writerClearedRow(39, 21, "Enter previous password"); Station.clearRow(1, 23, 118); Console.CursorVisible = true; Console.SetCursorPosition(39, 22); string prevPassword = Station.PassWordStar(); if (prevPassword == Station.password) { Station.writerClearedRow(39, 24, "Enter New User Name"); newUsername = Station.MeteredInput(12, 39, 25); Station.writerClearedRow(39, 27, "Enter New Password"); Console.SetCursorPosition(39, 28); newPassword = Station.PassWordStar(); Station.writerClearedRow(39, 30, "Confirm New Password"); Console.SetCursorPosition(39, 31); string newPasswordConfirm = Station.PassWordStar(); if (newPassword == newPasswordConfirm) { Station.writerClearedRow(39, 33, "Press (Y) to save or (N) to cancel"); Console.CursorVisible = false; ConsoleKeyInfo key1; key1 = Console.ReadKey(true); if (key1.Key == ConsoleKey.Y) { SaveToSettingsFile(); SettingsLoginDetails sld = new SettingsLoginDetails(); sld.Start(); } else if (key1.Key == ConsoleKey.N) { Station.writerClearedRow(39, 35, "Change Login Details Canceled"); Station.writerClearedRow(39, 36, "Press any key to exit"); Console.ReadKey(true); SettingsLoginDetails sld = new SettingsLoginDetails(); sld.Start(); } else { Station.BeepError(); Console.SetCursorPosition(39, 36); Console.WriteLine("Invalid Key."); Thread.Sleep(200); Station.clearRow(39, 36, 15); } } else { Console.CursorVisible = false; Station.writerClearedRow(39, 34, "The Passwords Do not Match"); Station.writerClearedRow(39, 35, "press anykey to try again"); Console.ReadKey(true); Start(); } } else { Console.CursorVisible = false; Station.writerClearedRow(39, 24, "The Password is Incorrect"); Station.writerClearedRow(39, 25, "press anykey to try again"); Console.ReadKey(true); Start(); } }
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(); } }