예제 #1
0
        public TradeViewModel(ExileEngine exileEngine)
        {
            DisplayName = "PoE Spy";

            _exileEngine = exileEngine;

            Fetch = new BindableCollection <POEFetchResult>();
        }
예제 #2
0
        public SniperViewModel(IEventAggregator eventAggregator, ISnackbarMessageQueue snackbarMessageQueue,
                               ExileEngine exileEngine) : base(ETab.Sniper, eventAggregator, snackbarMessageQueue)
        {
            _messageQueue = new Queue <string>();
            _exileEngine  = exileEngine;

            TradeItems = new BindableCollection <POEFetchResult>();
            WebSockets = new ConcurrentObservableCollection <AppWebSocket>();
        }
예제 #3
0
        public MoneywayViewModel(IEventAggregator eventAggregator, ISnackbarMessageQueue snackbarMessageQueue,
                                 ExileEngine exileEngine) : base(ETab.Moneyway, eventAggregator, snackbarMessageQueue)
        {
            _exileEngine = exileEngine;
            Items        = new BindableCollection <MoneywayItem>();

            OnlineStatus = new List <EPOEOnlineStatus>
            {
                EPOEOnlineStatus.Any,
                EPOEOnlineStatus.Online
            };
        }
예제 #4
0
        public ShellViewModel(ISnackbarMessageQueue snackQueue, IEventAggregator eventAggregator,
                              IEnumerable <BaseTabViewModel> tabs, ExileEngine exileEngine)
        {
            DisplayName = $"PoE Spy v.{GetType().Assembly.GetName().Version}";
            RateLimits  = new BindableCollection <RateLimitTimer>();

            Items.AddRange(tabs.OrderBy(o => o.Tab));
            ActiveItem = Items.First(f => ((BaseTabViewModel)f).Tab == ETab.Moneyway);

            SnackbarMessageQueue = snackQueue;
            _eventAggregator     = eventAggregator;
            _eventAggregator.Subscribe(this);

            _exileEngine = exileEngine;
            _exileEngine.OnMessageEvent   += ExileEngineOnMessage;
            _exileEngine.OnRateLimitEvent += ExileEngineOnNewRateLimit;
        }