示例#1
0
        private static async void TriggerItemFetch()
        {
            Logger.Log("Hotkey pressed.");

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

            if (item != null)
            {
                OverlayController.SetPosition(Cursor.Position.X, Cursor.Position.Y);
                OverlayController.Show();

                var queryResult = await TradeClient.GetListings(item);

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

            OverlayController.Hide();
        }
示例#2
0
        public static async void GetBaseListing()
        {
            if (currentItem.GetType() == typeof(EquippableItem))
            {
                var item = (EquippableItem)currentItem;

                item.Rarity = StringConstants.RarityAnyNonUnique;


                var queryResult = await TradeClient.GetListings(item);

                if (queryResult != null)
                {
                    OverlayController.SetQueryResult(queryResult);
                    return;
                }
            }
        }
示例#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();
        }