private UIBarButtonItem[] GetToolBar() { int buttonWidth = 80; // Edit category _editCategoryButton = new UIBarButtonItem(); _editCategoryButton.Image = UIImage.FromFile("Assets/Images/Toolbar/toolbar_edit.png"); _editCategoryButton.Title = "Edit category"; _editCategoryButton.Width = buttonWidth; _editCategoryButton.Clicked += delegate { AddEditCategoryController controller = new AddEditCategoryController(_category); NavigationController.PushViewController(controller, true); }; // Manage questions _editQuestionsButton = new UIBarButtonItem(); _editQuestionsButton.Image = UIImage.FromFile("Assets/Images/Toolbar/toolbar_questions.png"); _editQuestionsButton.Title = "Manage questions"; _editCategoryButton.Width = buttonWidth; _editQuestionsButton.Clicked += delegate { QuestionsController controller = new QuestionsController(_category); NavigationController.PushViewController(controller, true); }; // Calendar _calendarButton = new UIBarButtonItem(); _calendarButton.Image = UIImage.FromFile("Assets/Images/Toolbar/toolbar_calendar.png"); _calendarButton.Title = "Calendar"; _calendarButton.Width = buttonWidth; _calendarButton.Clicked += delegate { CalendarController controller = new CalendarController(_category); NavigationController.PushViewController(controller, true); }; return(new UIBarButtonItem[] { _editCategoryButton, _editQuestionsButton, _calendarButton }); }
public QuestionsTableSource(QuestionsData data, QuestionsController questionsController) { _data = data; _questionsController = questionsController; }
private UIBarButtonItem[] GetToolBar() { int buttonWidth = 80; // Edit category _editCategoryButton = new UIBarButtonItem(); _editCategoryButton.Image = UIImage.FromFile("Assets/Images/Toolbar/toolbar_edit.png"); _editCategoryButton.Title = "Edit category"; _editCategoryButton.Width = buttonWidth; _editCategoryButton.Clicked += delegate { AddEditCategoryController controller = new AddEditCategoryController(_category); NavigationController.PushViewController(controller, true); }; // Manage questions _editQuestionsButton = new UIBarButtonItem(); _editQuestionsButton.Image = UIImage.FromFile("Assets/Images/Toolbar/toolbar_questions.png"); _editQuestionsButton.Title = "Manage questions"; _editCategoryButton.Width = buttonWidth; _editQuestionsButton.Clicked += delegate { QuestionsController controller = new QuestionsController(_category); NavigationController.PushViewController(controller, true); }; // Calendar _calendarButton = new UIBarButtonItem(); _calendarButton.Image = UIImage.FromFile("Assets/Images/Toolbar/toolbar_calendar.png"); _calendarButton.Title = "Calendar"; _calendarButton.Width = buttonWidth; _calendarButton.Clicked += delegate { CalendarController controller = new CalendarController(_category); NavigationController.PushViewController(controller, true); }; return new UIBarButtonItem[] { _editCategoryButton, _editQuestionsButton, _calendarButton }; }