private async Task SaveTag()
        {
            if (string.IsNullOrWhiteSpace(Tag.Name))
            {
                await pageService.DisplayAlert("Error", "Tag Name Cannot be Blank", "OK");

                return;
            }

            if (Tag.TagId == 0)   // New Tag
            {
                await tagStore.AddTag(Tag);

                TagAdded?.Invoke(this, Tag);
            }
            else     // Exisiting Tag
            {
                await tagStore.UpdateTag(Tag);

                TagUpdated?.Invoke(this, Tag);
            }

            await pageService.PopAsync();
        }
示例#2
0
 private void NewTag_Changed(object sender, EventArgs e)
 {
     TagUpdated?.Invoke(null);
 }