Ejemplo n.º 1
0
 void BindCommands(MainViewModel viewModel)
 {
     biGetStarted.BindCommand(() => viewModel.GetStarted(), viewModel);
     biGetSupport.BindCommand(() => viewModel.GetSupport(), viewModel);
     biBuyNow.BindCommand(() => viewModel.BuyNow(), viewModel);
     biAbout.BindCommand(() => viewModel.About(), viewModel);
 }
Ejemplo n.º 2
0
        private void BindCommands()
        {
            bbiLogin.BindCommand(() => _viewModel.Login(), _viewModel);
            bbiLogout.BindCommand(() => _viewModel.Logout(), _viewModel);
            bbiAbout.BindCommand(() => _viewModel.About(), _viewModel);
            bbUserConnected.BindCommand(() => _viewModel.UserInfo(), _viewModel);

            //  textEdit1.DataBindings.Add(new Binding("Text", _viewModel, "Texto"));
        }
Ejemplo n.º 3
0
 public void About()
 {
     using (var vm = new MainViewModel(Enumerable.Empty <string>(), new SynchronizationContext()))
         using (vm.Subscribe <VersionViewModel>(e =>
         {
             var prev = e.CheckUpdate;
             e.CheckUpdate = false;
             Assert.That(e.CheckUpdate, Is.False);
             Assert.That(e.Version, Does.StartWith("Version 3.1.0 ("));
             e.CheckUpdate = prev;
             e.Apply();
         })) vm.About();
 }