コード例 #1
0
        public static DocumentPaneViewModel GetViewModel(ScreenViewModel model, SimpleContentCommand command)
        {
            DocumentPaneViewModel dpvm = null;

            model.UiDispatcher.Invoke(() =>
            {
                dpvm = GetViewModelInvoked(model, command);
            });
            return(dpvm);
        }
コード例 #2
0
        private DocumentPaneViewModel GetInstance(ScreenViewModel model, SimpleContentCommand command)
        {
            var panel = SimplePageUriProvider.GetViewModel(model, command);

            if (panel != null)
            {
                panel.CanClose   = true;
                panel.IsActive   = true;
                panel.IsSelected = true;
            }

            return(panel);
        }
コード例 #3
0
        private static DocumentPaneViewModel GetViewModelInvoked(ScreenViewModel model, SimpleContentCommand command)
        {
            switch (command.Command)
            {
            case "exchange rates":
                return(new ExchangeRateViewModel()
                {
                    Key = command.Command, Title = command.Title
                });

            case "portfolio":
                return(new PortfolioPaneViewModel()
                {
                    Key = command.Command, Title = command.Title
                });

            case "watchlist":
                return(new WatchlistViewModel(model)
                {
                    Key = command.Command, Title = command.Title
                });

            case "buy sell":
                return(new BuySellViewModel(model)
                {
                    Key = command.Command, Title = command.Title
                });

            case "wallet":
                return(new WalletViewModel()
                {
                    Key = command.Command, Title = command.Title
                });

            case "services":
                return(new ServicesPaneViewModel()
                {
                    Key = command.Command, Title = command.Title
                });

            case "send":
                return(null);

            case "exchanges":
                return(new ExchangesViewModel(model)
                {
                    Key = command.Command, Title = command.Title
                });

            case "coins":
                return(new CoinsViewModel(model)
                {
                    Key = command.Command, Title = command.Title
                });

            case "markets discovery":
                return(new MarketsDiscoveryViewModel(model)
                {
                    Key = command.Command, Title = command.Title
                });

            case "receive":
                return(new ReceiveViewModel()
                {
                    Key = command.Command, Title = command.Title
                });

            case "data explorer":
                return(new DataExplorerViewModel()
                {
                    Key = command.Command, Title = command.Title
                });

            default:
                return(null);
            }
        }