public override void InitializeLayout()
        {
            base.InitializeLayout();
            this.Position = this.GetLaunchPosition();
            this.Window.DisableResizing();
            Function.LogDebug("Populating ALPR list");
            AlprDetectedVehicles.Clear();
            PopulateAnprList();
            list_collected_tags.AllowMultiSelect = false;
            list_manual_results.AllowMultiSelect = false;
            list_collected_tags.RowSelected     += onListItemSelected;
            list_manual_results.RowSelected     += onListItemSelected;
            text_manual_name.SubmitPressed      += onSearchSubmit;
            Function.LogDebug("Checking currently pulled over");
            var currentPullover = ComputerVehicleController.CurrentlyPulledOver;

            if (currentPullover != null && AlprDetectedVehicles.Find(x => x.Vehicle == currentPullover.Vehicle) == null)
            {
                AlprDetectedVehicles.Add(currentPullover);
            }
            foreach (var vehicle in AlprDetectedVehicles)
            {
                list_collected_tags.AddVehicle(vehicle);
                ComputerReportsController.generateRandomHistory(vehicle);
            }
        }
예제 #2
0
 public void PopulateStoppedPedsList()
 {
     try
     {
         ComputerPedController controller = ComputerPedController.Instance;
         var peds = controller.PedsCurrentlyStoppedByPlayer;
         list_collected_ids.Clear();
         foreach (var entity in peds.Select(x => controller.LookupPersona(x)))
         {
             if (entity != null)
             {
                 list_collected_ids.AddPed(entity);
                 ComputerReportsController.generateRandomHistory(entity);
             }
         }
     }
     catch (Exception e)
     {
         Function.Log(e.ToString());
     }
 }