Ejemplo n.º 1
0
 public AssetSelectorViewModel()
 {
     ListAssets         = new ObservableCollection <Asset>();
     AllAssetsViewModel = new AllAssetsViewModel();
     _debouncer         = new Debouncer();
     //M.RegisterAsync<AssetFoundMessage>(this, AssetFound);
     M.RegisterAsync <AssetAllResponseMessage>(this, RetreiveAllAssets);
     M.SendAsync(new AssetAllRequestMessage(RequesterTokenVm));
 }
Ejemplo n.º 2
0
 public AddressBarModel(ScreenViewModel screenViewModel) : base()
 {
     _screenViewModel   = screenViewModel;
     AllAssetsViewModel = new AllAssetsViewModel()
     {
         SetAsDefault = true
     };
     AssetSelectorViewModel = new AssetSelectorViewModel();
     AddressBoxModel        = new AddressBoxModel(screenViewModel, this);
 }
Ejemplo n.º 3
0
        public ExchangeRateViewModel()
        {
            AllAssetsViewModel = new AllAssetsViewModel();

            if (IsInDesignMode)
            {
                return;
            }

            _assetLeft  = Assets.I.GetRaw("BTC");
            _assetRight = UserContext.Current.QuoteAsset;

            _debouncer = new DebouncerDispatched(UiDispatcher);

            /*foreach (var i in UserContext.Current.UserSettings.FavouritePairs)
             *  _requests.Add(_coord.AddRequest(this, i));
             *
             * foreach (var i in UserContext.Current.UserSettings.HistoricExchangeRates)
             *  _requests.Add(_coord.AddRequest(this, i));*/

            M.RegisterAsync <LatestPriceResultMessage>(this, NewRate);

            GoCommand = new RelayCommand(AddRequestDebounced);
        }