Пример #1
0
 private void titleLabel_MouseHover(object sender, EventArgs e)
 {
     if (titleLabel.Text.Length >= 82)
     {
         ControlsService.ShowToolTip(titleLabel, DataService.FullTitle);
     }
 }
Пример #2
0
 public MainWindow()
 {
     InitializeComponent();
     if (ControlsService.CheckForInternetConnection() == false)
     {
         MessageBox.Show("Internet connection is necessary to run this application!", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
         this.Close();
     }
     ControlsService.MaterialSkinInitialization(this);
     ControlsService.ChangeHeaderColors(downloadHistoryDGV);
 }
        private async Task OnTick()
        {
            try
            {
                var player         = PlayerPed.Ped;
                var pid            = PlayerPed.PedId;
                var playerLocation = PlayerPed.PlayerCoords;
                var firstPed       = GameWorld.FindFirstPed();
                var nextPed        = GameWorld.FindNextPed(firstPed.Handle);
                do
                {
                    // get ped coords
                    var pedPos          = nextPed.Entity.PedCoords;
                    var distanceFromPed = VectorService.DistanceBetweenVectors(pedPos, PlayerPed.PlayerCoords);
                    if (distanceFromPed < 3)
                    {
                        if (!PlayerPed.IsAnyVehicle)
                        {
                            if (nextPed.Entity.DoesEntityExist)
                            {
                                if (!nextPed.Entity.IsPedDeadOrDying)
                                {
                                    if (nextPed.Entity.PedType != 28 && !nextPed.Entity.IsPlayer)
                                    {
                                        pedPosition = nextPed.Entity.PedCoords;
                                        if (nextPed.Entity.IsNotPlayerPed &&
                                            nextPed.Entity.EntityId != oldPed && ControlsService.EWasPressed())
                                        {
                                            // set old ped entityId
                                            oldPed = nextPed.Entity.EntityId;
                                            nextPed.Entity.SetEntityAsMission();
                                            nextPed.Entity.ClearTasks();
                                            nextPed.Entity.Freeze();
                                            nextPed.Entity.StandStill();
                                            TriggerEvent(Strings.SellingDrugsEventName, nextPed.Entity);
                                        }
                                    }
                                }
                            }
                        }
                    }

                    nextPed = GameWorld.FindNextPed(firstPed.Handle);
                } while (nextPed.Result);
                API.EndFindPed(firstPed.Handle);
            }
            catch (Exception e)
            {
                Debug.WriteLine($"Error Selling service : {e.Message}");
            }
            await Delay(100);
        }
Пример #4
0
        private async Task OnTick()
        {
            try
            {
                await Delay(10);

                Debug.WriteLine($" E pressed : {ControlsService.EWasPressed()}");
                //var firstPed = GameWorld.FindFirstPed();
                //Debug.WriteLine($"Find first Ped : {firstPed.Handle} , {firstPed.Entity}");
                //var findNextPed = GameWorld.FindNextPed(firstPed.Handle);
                //Debug.WriteLine($"Find next ped : {findNextPed.Result} , {findNextPed.Entity}");
                //Debug.WriteLine($"ALL PEDS COUNT : {World.GetAllPeds().Length}");
                //API.EndFindPed(firstPed.Handle);
                await Delay(2000);
            }
            catch (Exception e)
            {
                Debug.WriteLine($"ERROR : {e.Message}");
            }
        }
Пример #5
0
 public ControlsController(ControlsService controlsService)
 {
     _controlsService = controlsService;
 }
Пример #6
0
 private void getVideoButton_MouseHover(object sender, EventArgs e)
 {
     ControlsService.ShowToolTip(getVideoButton, "Gets video specified by URL.");
 }
Пример #7
0
 private void savePathButton_MouseHover(object sender, EventArgs e)
 {
     ControlsService.ShowToolTip(savePathButton, savePathTxtBox.Text);
 }
Пример #8
0
 private void downloadQueueMaterialListView_ItemMouseHover(object sender, ListViewItemMouseHoverEventArgs e)
 {
     ControlsService.ShowToolTip(downloadQueueMaterialListView, ".");
 }