/// <summary> /// /// </summary> /// <param name="market"></param> /// <param name="spot_url"></param> /// <param name="futures_url"></param> /// <param name="args">Add additional attributes for each exchange</param> /// <returns></returns> public (string endPoint, Dictionary <string, object> args) CheckFuturesUrl(IMarketItem market, string spot_url, string futures_url, Dictionary <string, object> args) { var _result = (endPoint : spot_url, args); var _omarket = market as OMarketItem; if (_omarket.future == true) { _result.endPoint = futures_url; if (_result.args.ContainsKey("contract_type") == false) { _result.args.Add("contract_type", "this_week"); //계약유형: this_week:금주, next_week:차주, month:당월, quarter:분기 } } return(_result); }
public MarketItemVM(IMarketItem item) { Item = item; Item.PropertyChanged += (s, e) => { if (e.PropertyName == "OnPriceLoaded") { RaisePropertyChanged(nameof(Price)); RaisePropertyChanged("OnItemLoaded"); } if (e.PropertyName == "OnIconLoaded") { RaisePropertyChanged(nameof(Icon)); } }; DoubleClick = new DelegateCommand(() => { RequestsUtil.OpenInBrowser(Item); }); Update = new DelegateCommand(() => { RaisePropertyChanged(nameof(Icon)); RaisePropertyChanged(nameof(Name)); RaisePropertyChanged(nameof(NameColor)); RaisePropertyChanged(nameof(Price)); }); Update.Execute(); }
public static void OpenInBrowser(IMarketItem item) { Process.Start($"https://steamcommunity.com/market/listings/232090/{item.Name}"); }