Beispiel #1
0
        public async void SaveNoteMethod()
        {
            if (string.IsNullOrEmpty(TitleTxt))
            {
                await Application.Current.MainPage.DisplayAlert(
                    "Error",
                    "you must enter a Title",
                    "Accept");

                return;
            }
            if (string.IsNullOrEmpty(ContentTxt))
            {
                await Application.Current.MainPage.DisplayAlert(
                    "Error",
                    "you must enter a Content",
                    "Accept");

                return;
            }
            if (!string.IsNullOrEmpty(ContentTxt) && !string.IsNullOrEmpty(TitleTxt))
            {
                var note = new Note
                {
                    Title    = TitleTxt.ToLower(),
                    Content  = ContentTxt,
                    CreateAt = DateTime.UtcNow
                };
                await App.NoteDatabase.SaveNoteAsync(note);
            }
        }
Beispiel #2
0
 private async void Hide()
 {
     _ = TitleTxt.FadeTo(1);
     _ = MenuItemsView.FadeTo(0);
     await MainMenuView.RotateTo(-90, 300, Easing.BounceOut);
 }
 private void Save_Click(object sender, EventArgs e)
 {
     table.Rows.Add(TitleTxt.Text, MessageTxt.Text);
     TitleTxt.Clear();
     MessageTxt.Clear();
 }
 private void New_Click(object sender, EventArgs e)
 {
     TitleTxt.Clear();
     MessageTxt.Clear();
 }
Beispiel #5
0
 async void ShowMenu()
 {
     _ = TitleTxt.FadeTo(0);
     _ = MenuItemsView.FadeTo(1);
     await MainMenuView.RotateTo(0, 300, Easing.BounceOut);
 }