12345678910111213141516171819202122232425262728293031 |
- using System;
- using System.Collections.Generic;
- using InABox.Mobile;
- using Xamarin.Forms;
- namespace comal.timesheets
- {
- public delegate void TextChangedEvent(object sender, String text);
- public partial class NotesPage
- {
- public TextChangedEvent TextChanged;
- public NotesPage(String title, String text)
- {
- InitializeComponent();
- var saveButton = new ToolbarItem() { Text = "Save", Command = new DropDownMenuCommand(UpdateText), Order = ToolbarItemOrder.Primary, IsEnabled = true };
- ToolbarItems.Add(saveButton);
- Title = title;
- Notes.Text = text;
- }
- private void UpdateText()
- {
- TextChanged?.Invoke(this, Notes.Text);
- Navigation.PopAsync();
- }
- }
- }
|