示例#1
0
        public static void ShowWindow(CoinViewModel currentCoin, string tabType)
        {
            ContainerWindow.ShowWindow(new ContainerWindowViewModel {
                Title         = "币种",
                IconName      = "Icon_Coin",
                CloseVisible  = System.Windows.Visibility.Visible,
                FooterVisible = System.Windows.Visibility.Collapsed,
                Width         = DevMode.IsDebugMode ? AppStatic.MainWindowWidth : 960,
                Height        = 520
            },
                                       ucFactory: (window) => new CoinPage(),
                                       beforeShow: uc => {
                if (currentCoin != null)
                {
                    CoinPageViewModel vm = (CoinPageViewModel)uc.DataContext;
                    switch (tabType)
                    {
                    case NTKeyword.PoolParameterName:
                        vm.IsPoolTabSelected = true;
                        break;

                    case NTKeyword.WalletParameterName:
                        vm.IsWalletTabSelected = true;
                        break;

                    default:
                        break;
                    }
                    vm.CurrentCoin = currentCoin;
                }
            });
        }
示例#2
0
 public CoinPage()
 {
     if (WpfUtil.IsInDesignMode)
     {
         return;
     }
     this.Vm          = new CoinPageViewModel();
     this.DataContext = this.Vm;
     InitializeComponent();
     AppRoot.CoinVms.PropertyChanged += Current_PropertyChanged;
     this.Unloaded += CoinPage_Unloaded;
 }
示例#3
0
 public static void ShowWindow(CoinViewModel currentCoin)
 {
     ContainerWindow.ShowWindow(new ContainerWindowViewModel {
         IconName      = "Icon_Coin",
         CloseVisible  = System.Windows.Visibility.Visible,
         FooterVisible = System.Windows.Visibility.Collapsed,
         Width         = DevMode.IsDebugMode ? 960 : 860,
         Height        = 520
     },
                                ucFactory: (window) => new CoinPage(),
                                beforeShow: uc => {
         if (currentCoin != null)
         {
             CoinPageViewModel vm = (CoinPageViewModel)uc.DataContext;
             vm.CurrentCoin       = currentCoin;
         }
     });
 }