public EmergencyCall(Vector2 callLocation, string callMessage, DispatchNotificationType serviceType, string callTime) { this.callLocation = callLocation; this.callMessage = callMessage; this.serviceType = serviceType; this.callTime = callTime; // Store the call in the call log CallHelper.StoreCall(this); }
public static string ConvertNotificationTypeToString(DispatchNotificationType type) { switch (type) { case DispatchNotificationType.POLICE: return("~b~Police"); case DispatchNotificationType.AMBULANCE: return("~r~E~w~M~r~S"); case DispatchNotificationType.FIRE: return("~r~Fire"); } return("Error"); }
public CallMenu() { /////////////////////////////////////////////////////////////// ////////////////////// [ First Screen ] ////////////////////// /////////////////////////////////////////////////////////////// // Align the menu to the left side of the screen MenuController.MenuAlignment = MenuController.MenuAlignmentOption.Left; MenuController.MenuToggleKey = Control.VehicleBikeWings; // Create the first screen of the menu then add it to the menu controller Menu mainCallMenu = new Menu("Emergency Services", "What emergency service do you require?"); MenuController.AddMenu(mainCallMenu); // Create the options for the first screen // Police mainCallMenu.AddMenuItem(new MenuItem("Police", "Request police assistance") { Enabled = true }); // Ambulance mainCallMenu.AddMenuItem(new MenuItem("Ambulance", "Request EMS assistance") { Enabled = true }); // Fire mainCallMenu.AddMenuItem(new MenuItem("Fire", "Request fire service assistance") { Enabled = true }); // Events EventHandlers["EDS:OpenCallMenu"] += new Action(mainCallMenu.OpenMenu); mainCallMenu.OnItemSelect += (_menu, _item, _index) => { switch (_index) { case 0: DisplayOnscreenKeyboard(0, "What is your emergency?", "", "", "", "", "", 128); selectedService = DispatchNotificationType.POLICE; Tick += GetUserDispatchMessage; break; case 1: DisplayOnscreenKeyboard(0, "What is your emergency?", "", "", "", "", "", 128); selectedService = DispatchNotificationType.AMBULANCE; Tick += GetUserDispatchMessage; break; case 2: DisplayOnscreenKeyboard(0, "What is your emergency?", "", "", "", "", "", 128); selectedService = DispatchNotificationType.FIRE; Tick += GetUserDispatchMessage; break; } }; }