コード例 #1
0
        public DocumentPaneViewModel GetInstance(ScreenViewModel model, CommandBase command)
        {
            var c    = command as AssetGoCommand;
            var pair = new AssetPair(c.Asset, UserContext.Current.QuoteAsset);

            return(new PriceChartPaneViewModel(pair));
        }
コード例 #2
0
 public PortfolioViewModel(ScreenViewModel screenViewModel)
 {
     _context   = UserContext.Current;
     Dispatcher = Application.Current.Dispatcher;
     random     = new Random();
     new Task(PopulateGrid).Start();
 }
コード例 #3
0
ファイル: AddressBoxModel.cs プロジェクト: treverson/prime
        public AddressBoxModel(ScreenViewModel screenViewModel, AddressBarModel addressBarModel)
        {
            _addressBarModel = addressBarModel;
            _screenViewModel = screenViewModel;
            OnEnterCommand   = new RelayCommand <string>(IssueCommandStart);

            DefaultMessenger.I.Default.RegisterAsync <CommandAcceptedMessage>(this, _screenViewModel.Id, CommandAcceptedMessage);
        }
コード例 #4
0
 public AddressBarModel(ScreenViewModel screenViewModel) : base()
 {
     _screenViewModel   = screenViewModel;
     AllAssetsViewModel = new AllAssetsViewModel()
     {
         SetAsDefault = true
     };
     AssetSelectorViewModel = new AssetSelectorViewModel();
     AddressBoxModel        = new AddressBoxModel(screenViewModel, this);
 }
コード例 #5
0
 public MarketsDiscoveryViewModel(ScreenViewModel screenViewModel)
 {
     _context           = UserContext.Current;
     Dispatcher         = Application.Current.Dispatcher;
     ListMarketControls = new BindingList <MarketControlViewModel>();
     ListSortBy         = new BindingList <string>()
     {
         "Volume", "Popularity"
     };
     AddRequest(0, 2);
 }
コード例 #6
0
        public SideBarViewModel(ScreenViewModel screenVm) : this()
        {
            _screenVm = screenVm;
            _nav      = screenVm.NavigationProvider;

            _sideBarWidth          = 40;
            MenuClickedCommand     = new RelayCommand(ToggleMenu);
            BookmarkClickedCommand = new RelayCommand(delegate()
            {
                IsBookmarksOpen = !IsBookmarksOpen;
                ClickMenuItem <BookmarksSideBarViewModel>();
            });

            PortfolioClickedCommand        = new RelayCommand(() => { _nav.IssueCommand("portfolio"); });
            SettingsClickedCommand         = new RelayCommand(() => { _nav.IssueCommand("services"); });
            BuySellClickedCommand          = new RelayCommand(() => { _nav.IssueCommand("buy sell"); });
            WatchlistClickedCommand        = new RelayCommand(() => { _nav.IssueCommand("watchlist"); });
            ExchangesClickedCommand        = new RelayCommand(() => { _nav.IssueCommand("exchanges"); });
            CoinsClickedCommand            = new RelayCommand(() => { _nav.IssueCommand("coins"); });
            MarketsDiscoveryClickedCommand = new RelayCommand(() => { _nav.IssueCommand("markets discovery"); });
            ExchangeRatesClickedCommand    = new RelayCommand(() => { _nav.IssueCommand("exchange rates"); });
            ReceiveClickedCommand          = new RelayCommand(() => { _nav.IssueCommand("receive"); });
            DataExplorerClickedCommand     = new RelayCommand(() => { _nav.IssueCommand("data explorer"); });
        }