Пример #1
0
        /// <summary>
        /// The save async method
        /// Saves/updates the note and closes the edit note page
        /// </summary>
        /// <returns>A task to save/update the note and close the edit note page</returns>
        private async Task SaveAsync()
        {
            if (Title.Contains(":"))
            {
                await DisplayPopupHelpers
                .ShowOKDialogAsync("Invalid Title",
                                   "Title cannot include special character ':'");

                return;
            }

            string noteData = Title + ':' + Text;
            string color    = Color.ToHex();

            IOHelpers.SaveNoteData(CurrentNote.Filename, noteData, color);

            await NavigationHelpers.PopCurrentPageAsync();
        }