public static Persona GetPersonaForPed(Ped ped)
 {
     if (PersonaType == PersonaTypes.BPS)
     {
         return BritishPolicingFunctions.GetBritishPersona(ped);
     }
     else
     {
         return LSPD_First_Response.Mod.API.Functions.GetPersonaForPed(ped);
     }
 }
 public static VehiclePersona GetPersonaForVehicle(Vehicle vehicle)
 {
     if (PersonaType == PersonaTypes.BPS)
     {
         return BritishPolicingFunctions.CreateVehiclePersona(vehicle);
     }
     else
     {
         var vehiclePersona = new VehiclePersona();
         if (Function.IsTrafficPolicerRunning())
         {
             vehiclePersona.HasInsurance = TrafficPolicerFunction.GetVehicleInsuranceStatus(vehicle) == EVehicleStatus.Valid ? true : false;
             vehiclePersona.IsRegistered = TrafficPolicerFunction.GetVehicleRegistrationStatus(vehicle) == EVehicleStatus.Valid ? true : false;
         }
         else
         {
             vehiclePersona.HasInsurance = false;
             vehiclePersona.IsRegistered = false;
         }
         return vehiclePersona;
     }
 }
        private void BindData()
        {
            if (DetailedEntity.Entity.Ped == null || !DetailedEntity.Entity.Ped.IsValid())
            {
                return;
            }
            if (!BindNeeded)
            {
                return;
            }
            BindNeeded = false;
            if (DetailedEntity.Entity.IsLicenseValid)
            {
                labeled_license_status.Component.Text = "Valid";
            }
            else
            {
                labeled_license_status.Component.Warn(DetailedEntity.Entity.LicenseStateString);
            }


            if (DetailedEntity.Entity.IsAgent)
            {
                labeled_owner_alert.Component.Warn("Individual is a federal agent");
                labeled_owner_alert.Show();
            }
            else if (DetailedEntity.Entity.IsCop)
            {
                labeled_owner_alert.Component.Warn("Individual is a police officer");
                labeled_owner_alert.Show();
            }
            else
            {
                labeled_owner_alert.Hide();
            }

            if (!String.IsNullOrWhiteSpace(DetailedEntity.Entity.VehicleAlert))
            {
                labeled_alpr.Component.SetText(DetailedEntity.Entity.VehicleAlert);
                labeled_alpr.Show();
            }
            else
            {
                labeled_alpr.Hide();
            }

            cb_action.AddItem("Select One", "Placeholder", QuickActions.PLACEHOLDER);
            cb_action.AddItem("Blip (30 sec)", "Blip", QuickActions.BLIP_VEHICLE);
            cb_action.AddItem("Create Traffic Citation", "TrafficCitation", QuickActions.CREATE_TRAFFIC_CITATION);
            cb_action.AddItem("Create Arrest Report", "ArrestReport", QuickActions.CREATE_ARREST_REPORT_FOR_DRIVER);

            labeled_age.Component.Text          = DetailedEntity.Entity.AgeString;
            labeled_first_name.Component.Text   = DetailedEntity.Entity.FirstName;
            labeled_last_name.Component.Text    = DetailedEntity.Entity.LastName;
            labeled_home_address.Component.Text = Owner.GetHomeAddress();
            labeled_dob.Component.Text          = DetailedEntity.Entity.DOBString;
            if (DetailedEntity.Entity.IsWanted)
            {
                labeled_wanted_status.Component.Warn("Wanted");
            }
            else
            {
                labeled_wanted_status.Component.SetText("None");
            }
            labeled_times_stopped.Component.Text = DetailedEntity.Entity.TimesStopped.ToString();

            labeled_vehicle_model.Component.Text   = Vehicle.Model.Name;
            labeled_vehicle_license.Component.Text = Vehicle.LicensePlate;
            if (ComputerPlusEntity.PersonaType == PersonaTypes.BPS)
            {
                if (BritishPolicingFunctions.IsVehicleRegistered(DetailedEntity.Entity.RawVehiclePersona))
                {
                    labeled_vehicle_registration_status.Component.SetText("No");
                }
                else
                {
                    labeled_vehicle_registration_status.Component.Warn("Yes");
                }
                Function.LogDebug("set labeled_vehicle_registration_status");

                if (BritishPolicingFunctions.IsVehicleInsured(DetailedEntity.Entity.RawVehiclePersona))
                {
                    labeled_vehicle_insurance_status.Component.SetText("Yes");
                }
                else
                {
                    labeled_vehicle_insurance_status.Component.Warn("No");
                }
                Function.LogDebug("set labeled_vehicle_insurance_status");

                if (BritishPolicingFunctions.DoesVehicleHaveMOT(DetailedEntity.Entity.RawVehiclePersona))
                {
                    labeled_vehicle_extra_1.Component.SetText("Yes");
                }
                else
                {
                    labeled_vehicle_extra_1.Component.Warn("No");
                }
                Function.LogDebug("set labeled_vehicle_extra_1");

                if (BritishPolicingFunctions.DoesVehicleHaveSORN(DetailedEntity.Entity.RawVehiclePersona))
                {
                    labeled_vehicle_extra_2.Component.SetText("Yes");
                }
                else
                {
                    labeled_vehicle_extra_2.Component.Warn("No");
                }
                Function.LogDebug("set labeled_vehicle_extra_2");

                if (BritishPolicingFunctions.IsPedInsuredToDriveVehicle(DetailedEntity.Entity.RawPedPersona, DetailedEntity.Entity.RawVehiclePersona))
                {
                    labeled_ped_extra_1.Component.SetText("Yes");
                }
                else
                {
                    labeled_ped_extra_1.Component.Warn("No");
                }

                Function.LogDebug("set labeled_ped_extra_1");
            }
            else if (Function.IsTrafficPolicerRunning())
            {
                var insuranceStatus = TrafficPolicerFunction.GetVehicleInsuranceStatus(Vehicle);
                if (insuranceStatus == EVehicleStatus.Valid)
                {
                    labeled_vehicle_insurance_status.Component.SetText("Valid");
                }
                else if (insuranceStatus == EVehicleStatus.Expired)
                {
                    labeled_vehicle_insurance_status.Component.Warn("Expired");
                }
                else
                {
                    labeled_vehicle_insurance_status.Component.Warn("None");
                }

                var registrationStatus = TrafficPolicerFunction.GetVehicleRegistrationStatus(Vehicle);
                if (registrationStatus == EVehicleStatus.Valid)
                {
                    labeled_vehicle_registration_status.Component.SetText("Valid");
                }
                else if (registrationStatus == EVehicleStatus.Expired)
                {
                    labeled_vehicle_registration_status.Component.Warn("Expired");
                }
                else
                {
                    labeled_vehicle_registration_status.Component.Warn("None");
                }
            }
            else
            {
                labeled_vehicle_insurance_status.Hide();
                labeled_vehicle_registration_status.Hide();
            }
        }