예제 #1
0
        public void AddNewFeature()
        {
            //Arrange
            Feature1 f1 = new Feature1();

            f1.FeatureName = "NewTest2";
            f1.IsEnabled   = false;
            //Act
            _IFeatureManager.AddFeature(f1);
            //Assesrt
            Assert.AreEqual(true, true);
        }
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            var inAppFeature1 = new Feature1();

            #if DEBUG
            // By default the feature will use the real store gateway, for testing this can be overridden
            inAppFeature1.StoreGateway = new SimulatedAlwaysPurchasedStoreGateway();
            #endif

            Feature1PurchaseStatus.Text = inAppFeature1.IsPurchased.ToString();

            var inAppFeature2 = new Feature2();
            #if DEBUG
            inAppFeature2.StoreGateway = new SimulatedNeverPurchasedStoreGateway();
            #endif

            Feature2PurchaseStatus.Text = inAppFeature2.IsPurchased.ToString();
        }
예제 #3
0
        // mọi thứ xử lý sẽ nằm trong này
        public MainViewModel()
        {
            LoadedWindowCommand = new RelayCommand <object>((p) => { return(true); }, (p) => {
                isLoaded = true;
                LoginWindow loginWindow = new LoginWindow();
                loginWindow.ShowDialog();
            }
                                                            );
            command_1 = new RelayCommand <object>((p) => { return(true); }, (p) => { Feature1 wd = new Feature1(); wd.ShowDialog(); });
            //command_2 = new RelayCommand<object>((p) => { return true; }, (p) => { Feature2 wd = new Feature2(); wd.ShowDialog(); });
            command_3 = new RelayCommand <object>((p) => { return(true); }, (p) => { Feature3 wd = new Feature3(); wd.ShowDialog(); });
            command_4 = new RelayCommand <object>((p) => { return(true); }, (p) => { Feature4 wd = new Feature4(); wd.ShowDialog(); });
            command_5 = new RelayCommand <object>((p) => { return(true); }, (p) => { Feature5 wd = new Feature5(); wd.ShowDialog(); });

            //if (!isLoaded)
            //{
            //    isLoaded = true;
            //    LoginWindow loginWindow = new LoginWindow();
            //    loginWindow.ShowDialog();
            //}
        }