void SegmentValueChanged(object sender, EventArgs e) { var application = Mvx.Resolve <IApplicationService>(); // If there is searching going on. Finish it. FinishSearch(); if (_viewSegment.SelectedSegment == 0) { ViewModel.Issues.ApplyFilter(IssuesFilterModel.CreateOpenFilter(), true); } else if (_viewSegment.SelectedSegment == 1) { ViewModel.Issues.ApplyFilter(IssuesFilterModel.CreateClosedFilter(), true); } else if (_viewSegment.SelectedSegment == 2) { ViewModel.Issues.ApplyFilter(IssuesFilterModel.CreateMineFilter(application.Account.Username), true); } else if (_viewSegment.SelectedSegment == 3) { var filter = new IssuesFilterViewController(ViewModel.Username, ViewModel.Repository, ViewModel.Issues); var nav = new UINavigationController(filter); PresentViewController(nav, true, null); } }
private void CreateNewFilter() { var ctrl = new IssuesFilterViewController(new CodeBucket.Core.Filters.IssuesFilterModel()); ctrl.CreatedFilterModel = ViewModel.NewFilterCommand.Execute; NavigationController.PushViewController(ctrl, true); }
private void EditFilter(IssuesFiltersViewModel.FilterModel filterModel) { var ctrl = new IssuesFilterViewController(filterModel.IssueModel); ctrl.CreatedFilterModel = x => { filterModel.IssueModel = x; ViewModel.EditFilterCommand.Execute(filterModel); }; NavigationController.PushViewController(ctrl, true); }
private void EditFilter(IssuesFiltersViewModel.FilterModel filterModel) { var ctrl = new IssuesFilterViewController(filterModel.IssueModel); ctrl.CreatedFilterModel = x => { filterModel.IssueModel = x; ViewModel.EditFilterCommand.Execute(filterModel); }; NavigationController.PushViewController(ctrl, true); }
void SegmentValueChanged(object sender, EventArgs e) { if (_viewSegment.SelectedSegment == 0) { ViewModel.Issues.ApplyFilter(IssuesFilterModel.CreateOpenFilter(), true); } else if (_viewSegment.SelectedSegment == 1) { ViewModel.Issues.ApplyFilter(IssuesFilterModel.CreateClosedFilter(), true); } else if (_viewSegment.SelectedSegment == 2) { ViewModel.Issues.ApplyFilter(IssuesFilterModel.CreateMineFilter(Application.Account.Username), true); } else if (_viewSegment.SelectedSegment == 3) { var filter = new IssuesFilterViewController(ViewModel.User, ViewModel.Slug, ViewModel.Issues); var nav = new UINavigationController(filter); PresentViewController(nav, true, null); } }
private void CreateNewFilter() { var ctrl = new IssuesFilterViewController(new CodeBucket.Core.Filters.IssuesFilterModel()); ctrl.CreatedFilterModel = ViewModel.NewFilterCommand.Execute; NavigationController.PushViewController(ctrl, true); }