Esempio n. 1
0
        public async Task TestPost()
        {
            // Check default values
            var viewModel = new PostViewModel();

            await viewModel.DidLoad();

            Assert.True(viewModel.IsTwitterEnabled);
            Assert.True(viewModel.IsFacebookEnabled);
            Assert.AreEqual("0", viewModel.CharacterCount);
        }
Esempio n. 2
0
		private void OnRequestPostPage (PostViewModel viewModel)
		{
			var storyboard = UIStoryboard.FromName ("Post", null);
			var controller = storyboard.InstantiateInitialViewController () as UINavigationController;
			var child = controller.TopViewController as PostController;

			child.ViewModel = viewModel;

			PresentViewController (controller, true, null);
		}
Esempio n. 3
0
 public PostFragment(PostViewModel viewModel)
 {
     _viewModel = viewModel;
     _viewModel.PropertyChanged += OnPropertyChnaged;
     RightActionBarButton = () => NavigationService.GoBack(Shared.Common.AnimationFlag.Down);
 }