Ejemplo n.º 1
0
        private static async void TriggerItemFetch()
        {
            Logger.Log("Hotkey pressed.");

            // Trigger copy action.
            SendKeys.SendWait("^{c}");
            Thread.Sleep(100);
            // Retrieve clipboard.
            var itemText = ClipboardHelper.GetText();
            // Parse item.
            var item = ItemParser.ParseItem(itemText);

            if (item != null)
            {
                currentItem = item;
                OverlayController.Open();

                var queryResult = await TradeClient.GetListings(item);

                if (queryResult != null)
                {
                    OverlayController.SetQueryResult(queryResult);
                    return;
                }
            }

            OverlayController.Hide();
        }
Ejemplo n.º 2
0
        private static async Task <bool> TriggerItemFetch()
        {
            Legacy.Logger.Log("Hotkey for pricing item triggered.");

            var item = await TriggerCopyAction();

            if (item != null)
            {
                OverlayController.Open();

                var queryResult = await Legacy.TradeClient.GetListings(item);

                if (queryResult != null)
                {
                    var poeNinjaItem = Legacy.PoeNinjaCache.GetItem(item);
                    if (poeNinjaItem != null)
                    {
                        queryResult.PoeNinjaItem         = poeNinjaItem;
                        queryResult.LastRefreshTimestamp = Legacy.PoeNinjaCache.LastRefreshTimestamp;
                    }
                    OverlayController.SetQueryResult(queryResult);
                    return(true);
                }

                OverlayController.Hide();
                return(true);
            }

            return(false);
        }
Ejemplo n.º 3
0
        private static async void TriggerItemFetch()
        {
            Logger.Log("Hotkey for pricing item triggered.");

            Item item = await TriggerCopyAction();

            if (item != null)
            {
                OverlayController.Open();

                var queryResult = await TradeClient.GetListings(item);

                if (queryResult != null)
                {
                    OverlayController.SetQueryResult(queryResult);
                    return;
                }
            }

            OverlayController.Hide();
        }