public override void ViewWillAppear(bool animated)
        {
            base.ViewWillAppear(animated);

            _tableViewController = Vm.People.GetController(CreatePersonCell, BindCellDelegate);
            _tableViewController.TableView = PeopleTableView;
        }
Example #2
0
        public override void DidReceiveMemoryWarning()
        {
            base.DidReceiveMemoryWarning();

            _sessionListController.SelectionChanged -= SelectSession;
            _sessionListController = null;
        }
        /// <summary>
        /// Does the initial data load of the table
        /// </summary>
        public void LoadTable()
        {
            AssociateTableView = new UITableView(new CoreGraphics.CGRect(0, 0, TableContainerView.Bounds.Width, TableContainerView.Bounds.Height));

            AssociateTableView.RegisterClassForCellReuse(typeof(MainCustomCell), nameof(MainCustomCell));

            AssociateTableView.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight;
            AssociateTableView.CellLayoutMarginsFollowReadableWidth = false;



            //generate our repository instance to access our list of users.

            //MainTableViewTableSource tableSource = new MainTableViewTableSource(list);

            AssociateTableView.TranslatesAutoresizingMaskIntoConstraints = false;


            var parentMargins = View.LayoutMarginsGuide;

            //AssociateTableView.Source = tableSource;
            TableContainerView.AddSubview(AssociateTableView);


            _currentTableViewController = _vm.UserCollection.GetController(CreatePersonCell, BindCellDelegate);

            _currentTableViewController.TableView = AssociateTableView;

            _currentTableViewController.GetViewForHeaderDelegate   = MainCustomCell.GetViewForHeader;
            _currentTableViewController.GetHeightForHeaderDelegate = MainCustomCell.GetHeightForHeader;

            _vm.LoadUserCollection();
        }
Example #4
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            View.BackgroundColor = UIColor.White;

            CountdownsTableView = new UITableView();
            CountdownsTableView.RegisterClassForCellReuse(typeof(CustomCell), nameof(CustomCell));

            AddTimerButton = new UIButton(UIButtonType.System);
            AddTimerButton.SetTitle("Add Countdown", UIControlState.Normal);

            View.AddSubview(CountdownsTableView);
            View.AddSubview(AddTimerButton);
            CountdownsTableView.TranslatesAutoresizingMaskIntoConstraints = false;
            AddTimerButton.TranslatesAutoresizingMaskIntoConstraints      = false;

            var parentMargins = View.LayoutMarginsGuide;

            CountdownsTableView.AutoPinEdgesToSuperviewEdgesExcludingEdge(ALEdge.Bottom);
            CountdownsTableView.AutoPinEdge(ALEdge.Bottom, ALEdge.Top, AddTimerButton, 16);

            AddTimerButton.AutoPinEdgesToSuperviewMarginsExcludingEdge(ALEdge.Top);

            // Setup bindings
            _tableViewController           = Vm.Countdowns.GetController(CreatePersonCell, BindCellDelegate);
            _tableViewController.TableView = CountdownsTableView;

            AddTimerButton.SetCommand("TouchUpInside", Vm.AddCountdownCommand);
        }
Example #5
0
        public override void DidReceiveMemoryWarning()
        {
            base.DidReceiveMemoryWarning();
            TabBar.ItemSelected -= NavigateOnTabBar;

            _scheduleListController = null;
        }
Example #6
0
        public override void ViewDidLoad()
        {
            CurrentNavigationItem = NavigationItem;
            base.ViewDidLoad();

            TabBar.ItemSelected   += NavigateOnTabBar;
            SearchBar.TextChanged += UpdateSearchValue;

            _categoryListController                   = Vm.Categories.GetController(CreateDefaultTableCell, BindCategoryCell);
            _categoryListController.TableView         = CategoryTable;
            _categoryListController.SelectionChanged += SelectCategory;

            _foundCoursesListController                   = Vm.FoundCourses.GetController(CreateDefaultTableCell, BindCourseCell);
            _foundCoursesListController.TableView         = SearchResultsTable;
            _foundCoursesListController.SelectionChanged += SelectCourse;

            var gestureRecognizer = new UITapGestureRecognizer
            {
                CancelsTouchesInView = false
            };

            gestureRecognizer.AddTarget(() => View.EndEditing(true));
            gestureRecognizer.ShouldReceiveTouch += (rec, t) => !(t.View is UIControl);
            View.AddGestureRecognizer(gestureRecognizer);
        }
        public override void ViewWillAppear(bool animated)
        {
            base.ViewWillAppear(animated);

            _tableViewController           = Vm.People.GetController(CreatePersonCell, BindCellDelegate);
            _tableViewController.TableView = PeopleTableView;
        }
Example #8
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            _categoryListController                   = Vm.Category.Subcategories.GetController(CreateDefaultTableCell, BindCategoryCell);
            _categoryListController.TableView         = SubcategoryTable;
            _categoryListController.SelectionChanged += SelectCategory;
        }
Example #9
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            // Perform any additional setup after loading the view, typically from a nib.

            _tableViewController           = Vm.People.GetController(CreatePersonCell, BindPersonCell);
            _tableViewController.TableView = PeopleTableView;
        }
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            _courseListController                   = Vm.Category.Courses.GetController(CreateDefaultTableCell, BindCourseCell);
            _courseListController.TableView         = CoursesTable;
            _courseListController.SelectionChanged += SelectCourse;
        }
        public override void DidReceiveMemoryWarning()
        {
            base.DidReceiveMemoryWarning();

            _courseListController.SelectionChanged -= SelectCourse;
            _courseListController.Dispose();
            _courseListController = null;

            ReleaseDesignerOutlets();
        }
Example #12
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            Vm.UpdateSessionsCommand.Execute(null);

            _sessionListController = Vm.Course.Sessions.GetController(BaseViewController.CreateDefaultTableCell,
                                                                      BindSessionTableCell);
            _sessionListController.TableView         = SessionsTable;
            _sessionListController.SelectionChanged += SelectSession;
        }
Example #13
0
        public override void ViewDidUnload()
        {
            if (_tableViewController != null)
            {
                _tableViewController.SelectionChanged -= OnSelectionChanged;
            }
            _tableViewController = null;

            base.ViewDidUnload();
        }
Example #14
0
        public override async void ViewDidLoad()
        {
            base.ViewDidLoad();

            await Vm.StartAsync();

            _tableViewController                   = Vm.Records.GetController(CreateCell, BindCell);
            _tableViewController.TableView         = TableView;
            _tableViewController.SelectionChanged += OnSelectionChanged;
        }
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            // Setup bindings

            _tableViewController           = Vm.Countdowns.GetController(CreatePersonCell, BindCellDelegate);
            _tableViewController.TableView = CountdownsTableView;
            //CountdownsTableView.Source = new GenericTableViewSource<CountdownViewItem>(Vm.Countdowns, CreatePersonCell, BindCellDelegate);

            AddTimerButton.SetCommand("TouchUpInside", Vm.AddCountdownCommand);
        }
        public override void ViewDidLoad()
        {
            Vm.PropertyChanged += (s, e) => {};
            ScanButton.Clicked += (s, e) => {};

            ScanButton.SetCommand(
                "Clicked",
                Vm.StartScanCommand);

            _tableViewController = Vm.Devices.GetController(CreateDeviceCell, BindDeviceCell);
            _tableViewController.TableView = DevicesTableView;
            _tableViewController.SelectionChanged += (s, e) => Vm.SelectDeviceCommand.Execute(_tableViewController.SelectedItem);

            base.ViewDidLoad();
        }
Example #17
0
        public override void ViewDidLoad()
        {
            CurrentNavigationItem = NavigationItem;
            base.ViewDidLoad();

            TabBar.ItemSelected += NavigateOnTabBar;
            Title = Application.Locator.CourseViewModel.Course.Title;
            IdentityChanged();

            _scheduleListController = Vm.Session.SessionSchedules.GetController(GetScheduleCellType,
                                                                                GetScheduleCellContent);
            _scheduleListController.TableView = SessionScheduleTable;

            TabBar.SelectedItem = ScheduleTabBarItem;
        }
        public override void ViewDidLoad()
        {
            Vm = (FlowerViewModel)Nav.GetAndRemoveParameter(this);

            _tableController = Vm.Model.Comments.GetController(
                CreateCommentCell,
                BindCommentCell);

            _tableController.TableView = CommentsTableView;

            AddCommentButton = new UIBarButtonItem(UIBarButtonSystemItem.Add, null);
            NavigationItem.SetRightBarButtonItem(AddCommentButton, false);
            AddCommentButton.SetCommand(Vm.AddCommentCommand);

            base.ViewDidLoad();
        }
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            //_lastLoadedBinding = this.SetBinding(
            //   () => Vm.LastLoadedFormatted,
            //   () => LastLoadedText.Text);

            RefreshButton.TouchDown += (s, e) => Vm.RefreshCommand.Execute(null);

            _tableViewController = Vm.People.GetController(CreateCell, BindCell);
            _tableViewController.TableView = PeopleTableView;

            _tableViewController.SelectionChanged +=
                (s, e) => Vm.SelectedPersonCommand.Execute(_tableViewController.SelectedItem);
        }
Example #20
0
        public override void DidReceiveMemoryWarning()
        {
            base.DidReceiveMemoryWarning();

            TabBar.ItemSelected   -= NavigateOnTabBar;
            SearchBar.TextChanged -= UpdateSearchValue;
            _categoryListController.SelectionChanged     -= SelectCategory;
            _foundCoursesListController.SelectionChanged -= SelectCourse;

            _categoryListController.Dispose();
            _categoryListController = null;
            _foundCoursesListController.Dispose();
            _foundCoursesListController = null;

            ReleaseDesignerOutlets();
        }
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            //_lastLoadedBinding = this.SetBinding(
            //   () => Vm.LastLoadedFormatted,
            //   () => LastLoadedText.Text);


            RefreshButton.TouchDown += (s, e) => Vm.RefreshCommand.Execute(null);

            _tableViewController           = Vm.People.GetController(CreateCell, BindCell);
            _tableViewController.TableView = PeopleTableView;

            _tableViewController.SelectionChanged +=
                (s, e) => Vm.SelectedPersonCommand.Execute(_tableViewController.SelectedItem);
        }
        public async override void ViewDidLoad()
        {
            base.ViewDidLoad();

            await ViewModel.InitVm();

            _controller = ViewModel.CoffeeShops.GetController(CreateCell, UpdateCell);

            _controller.TableView = coffeeTableView;

            _controller.SelectionChanged += (object sender, EventArgs e) =>
            {
                if (NavigationService != null)
                {
                    NavigationService.NavigateTo(DetailController.NavigationKey, _controller.SelectedItem);
                }
            };
        }
        public override void ViewDidLoad()
        {
            _lastLoadedBinding = this.SetBinding(
                () => Vm.LastLoadedFormatted,
                () => LastLoadedText.Text);

            RefreshButton.SetCommand(
                "Clicked",
                Vm.RefreshCommand);

            _tableViewController = Vm.Flowers.GetController(
                CreateFlowerCell,
                BindFlowerCell);

            _tableViewController.TableView = FlowersTableView;

            _tableViewController.SelectionChanged +=
                (s, e) => Vm.ShowDetailsCommand.Execute(_tableViewController.SelectedItem);

            base.ViewDidLoad();
        }
        public override void ViewDidLoad()
        {
            if (NavigationParameter == null)
            {
                throw new InvalidOperationException("No parameter found after navigation");
            }

            Vm = (FlowerViewModel)NavigationParameter;

            _tableController = Vm.Model.Comments.GetController(
                CreateCommentCell,
                BindCommentCell);

            _tableController.TableView = CommentsTableView;

            AddCommentButton = new UIBarButtonItem(UIBarButtonSystemItem.Add, null);
            NavigationItem.SetRightBarButtonItem(AddCommentButton, false);
            AddCommentButton.SetCommand("Clicked", Vm.AddCommentCommand);

            base.ViewDidLoad();
        }
Example #25
0
        public override void ViewDidLoad()
        {
            _lastLoadedBinding = this.SetBinding(
                () => Vm.LastLoadedFormatted,
                () => LastLoadedText.Text);

            RefreshButton.SetCommand(
                "Clicked",
                Vm.RefreshCommand);

            _tableViewController = Vm.Flowers.GetController(
                CreateFlowerCell,
                BindFlowerCell);

            _tableViewController.TableView = FlowersTableView;

            _tableViewController.SelectionChanged +=
                (s, e) => Vm.ShowDetailsCommand.Execute(_tableViewController.SelectedItem);

            base.ViewDidLoad();
        }
        public override void ViewDidLoad()
        {
            if (NavigationParameter == null)
            {
                throw new InvalidOperationException("No parameter found after navigation");
            }

            Vm = (FlowerViewModel)NavigationParameter;

            _tableController = Vm.Model.Comments.GetController(
                CreateCommentCell,
                BindCommentCell);

            _tableController.TableView = CommentsTableView;

            AddCommentButton = new UIBarButtonItem(UIBarButtonSystemItem.Add, null);
            NavigationItem.SetRightBarButtonItem(AddCommentButton, false);
            AddCommentButton.SetCommand("Clicked", Vm.AddCommentCommand);

            base.ViewDidLoad();
        }