public override void ViewDidLoad() { base.ViewDidLoad(); var issuesFilterModel = _filterController.Filter.Clone(); //Load the root var root = new RootElement(Title) { new Section("Filter") { (_assignedTo = new InputElement("Assigned To", "Anybody", issuesFilterModel.AssignedTo) { TextAlignment = UITextAlignment.Right, AutocorrectionType = UITextAutocorrectionType.No, AutocapitalizationType = UITextAutocapitalizationType.None }), (_reportedBy = new InputElement("Reported By", "Anybody", issuesFilterModel.ReportedBy) { TextAlignment = UITextAlignment.Right, AutocorrectionType = UITextAutocorrectionType.No, AutocapitalizationType = UITextAutocapitalizationType.None }), (_kindChoice = CreateMultipleChoiceElement("Kind", issuesFilterModel.Kind)), (_statusChoice = CreateMultipleChoiceElement("Status", issuesFilterModel.Status)), (_priorityChoice = CreateMultipleChoiceElement("Priority", issuesFilterModel.Priority)), }, new Section("Order By") { (_orderby = CreateEnumElement("Field", (int)issuesFilterModel.OrderBy, typeof(IssuesFilterModel.Order))), }, new Section() { new StyledStringElement("Save as Default", () =>{ _filterController.ApplyFilter(CreateFilterModel(), true); CloseViewController(); }, Images.Size) { Accessory = UITableViewCellAccessory.None }, } }; Root = root; }
protected MultipleChoiceElement <T> CreateMultipleChoiceElement <T>(string title, T o) { var element = new MultipleChoiceElement <T>(title, o); element.Tapped += () => { var en = new MultipleChoiceViewController(element.Caption, o); en.ViewDisappearing += (sender, e) => { element.Value = CreateCaptionForMultipleChoice(o); }; NavigationController.PushViewController(en, true); }; return(element); }
protected MultipleChoiceElement <T> CreateMultipleChoiceElement <T>(string title, T o) { var element = new MultipleChoiceElement <T>(title, o); element.Clicked.Subscribe(_ => { var en = new MultipleChoiceViewController(element.Caption, o); en.Disappearing.Subscribe(__ => { element.Value = CreateCaptionForMultipleChoice(o); }); NavigationController.PushViewController(en, true); }); return(element); }
public override void ViewDidLoad() { base.ViewDidLoad(); //Load the root var root = new List<Section> { new Section() { (_filterName = new EntryElement("Filter Name", "Filter Name", _currentFilter.FilterName) { TextAlignment = UITextAlignment.Right, AutocorrectionType = UITextAutocorrectionType.No, AutocapitalizationType = UITextAutocapitalizationType.None }) }, new Section("Filter") { (_assignedTo = new EntryElement("Assigned To", "Anybody", _currentFilter.AssignedTo) { TextAlignment = UITextAlignment.Right, AutocorrectionType = UITextAutocorrectionType.No, AutocapitalizationType = UITextAutocapitalizationType.None }), (_reportedBy = new EntryElement("Reported By", "Anybody", _currentFilter.ReportedBy) { TextAlignment = UITextAlignment.Right, AutocorrectionType = UITextAutocorrectionType.No, AutocapitalizationType = UITextAutocapitalizationType.None }), (_kindChoice = CreateMultipleChoiceElement("Kind", _currentFilter.Kind)), (_statusChoice = CreateMultipleChoiceElement("Status", _currentFilter.Status)), (_priorityChoice = CreateMultipleChoiceElement("Priority", _currentFilter.Priority)), }, new Section("Order By") { (_orderby = CreateEnumElement<IssuesFilterModel.Order>("Field", _currentFilter.OrderBy)), } }; Root.Reset(root); }
public override void ViewDidLoad() { base.ViewDidLoad(); //Load the root var root = new RootElement(Title) { new Section() { (_filterName = new InputElement("Filter Name", "Filter Name", _currentFilter.FilterName) { TextAlignment = UITextAlignment.Right, AutocorrectionType = UITextAutocorrectionType.No, AutocapitalizationType = UITextAutocapitalizationType.None }) }, new Section("Filter") { (_assignedTo = new InputElement("Assigned To", "Anybody", _currentFilter.AssignedTo) { TextAlignment = UITextAlignment.Right, AutocorrectionType = UITextAutocorrectionType.No, AutocapitalizationType = UITextAutocapitalizationType.None }), (_reportedBy = new InputElement("Reported By", "Anybody", _currentFilter.ReportedBy) { TextAlignment = UITextAlignment.Right, AutocorrectionType = UITextAutocorrectionType.No, AutocapitalizationType = UITextAutocapitalizationType.None }), (_kindChoice = CreateMultipleChoiceElement("Kind", _currentFilter.Kind)), (_statusChoice = CreateMultipleChoiceElement("Status", _currentFilter.Status)), (_priorityChoice = CreateMultipleChoiceElement("Priority", _currentFilter.Priority)), }, new Section("Order By") { (_orderby = CreateEnumElement <IssuesFilterModel.Order>("Field", _currentFilter.OrderBy)), } }; Root = root; }
public override void ViewDidLoad() { base.ViewDidLoad(); //Load the root var root = new RootElement(Title) { new Section("Filter") { (_assignedTo = new InputElement("Assigned To", "Anybody", _parent._filterModel.AssignedTo) { TextAlignment = UITextAlignment.Right, AutocorrectionType = UITextAutocorrectionType.No, AutocapitalizationType = UITextAutocapitalizationType.None }), (_reportedBy = new InputElement("Reported By", "Anybody", _parent._filterModel.ReportedBy) { TextAlignment = UITextAlignment.Right, AutocorrectionType = UITextAutocorrectionType.No, AutocapitalizationType = UITextAutocapitalizationType.None }), (_kindChoice = CreateMultipleChoiceElement("Kind", _parent._filterModel.Kind.Clone())), (_statusChoice = CreateMultipleChoiceElement("Status", _parent._filterModel.Status.Clone())), (_priorityChoice = CreateMultipleChoiceElement("Priority", _parent._filterModel.Priority.Clone())), }, new Section("Order By") { (_orderby = CreateEnumElement("Field", (int)_parent._filterModel.OrderBy, typeof(FilterModel.Order))), }, new Section() { new StyledElement("Save as Default", () => { var model = CreateFilterModel(); Application.Account.IssueFilterObject = model; this.DismissViewController(true, null); this.ApplyFilter(); }, Images.Size) { Accessory = UITableViewCellAccessory.None }, } }; Root = root; }