public void ShowMainMenu() { Console.WriteLine( @"What do you want to do? (enter the digit of the desired option) 1. Enter a vehicle into the garage 2. Display the license plate of vehicles in the garage 3. Update vehicle status in garage 4. Inflate air in vehicle wheels to max 5. Pump fuel in vehicle 6. Charge battery in vehicle 7. Display details of a vehicle in the garage"); eOptions userChoise = getMainMenuChoice(); switch (userChoise) { case eOptions.EnterVehicle: showEnterVehicleMenu(); break; case eOptions.DisplayLicensePlates: showDisplayLicensePlatesMenu(); break; case eOptions.UpdateVehicleStatus: showUpdateVehicleStatusMenu(); break; case eOptions.InflateAir: showInflateAirMenu(); break; case eOptions.PumpFuel: showPumpFuelMenu(); break; case eOptions.ChargeBattery: showChargeBatteryMenu(); break; case eOptions.DisplayVehicleDetails: showDisplayVehicleDetailsMenu(); break; } Console.WriteLine("{0}Press Enter to continue", Environment.NewLine); Console.ReadLine(); Console.Clear(); }
//#endregion #region public void ThisOption(...); /// <summary> /// Uses an eOptions to retrieve a configuration used to build the ConnectionString. /// </summary> /// <param name="buildwith_in">build options</param> /// <param name="value_in">value</param> /// <returns>ConnectionString</returns> public static string ThisOption(eOptions buildwith_in, object value_in) { switch (buildwith_in) { // case eOptions.Registry: // return Registry((string)value_in); // case eOptions.File: // return File((string)value_in); case eOptions.AppSettings: return AppSettings((string)value_in); default: throw new Exception( string.Format( "{0}.{1}.ThisOption(): - I don't know what to use", typeof(Buildwith).Namespace, typeof(Buildwith).Name ) ); } }
public bool IsOptionActive(eOptions _option) { return(Utilities.Instance.BitTest(m_nFlags, (int)_option)); }
public void ToggleOption(eOptions _option) { Utilities.Instance.BitToggle(ref m_nFlags, (int)_option); }
public void DeactivateOption(eOptions _option) { Utilities.Instance.BitOff(ref m_nFlags, (int)_option); }
public bool IsOptionActive(eOptions _option) { return Utilities.Instance.BitTest(m_nFlags, (int)_option); }