Ejemplo n.º 1
0
        private async void OnSaveButtonClicked(object sender, EventArgs e)
        {
            var CurentText = TextEditNote.Text;

            if (CurentText == "")
            {
                await Navigation.PopModalAsync();
            }
            else
            {
                var sql_lite = new HelperSqlLite();
                sql_lite.create_new_notes(CurentText);
                await Navigation.PopAsync();
            }
        }
Ejemplo n.º 2
0
        public void UpgradeUI()
        {
            var sql_lite   = new HelperSqlLite();
            var list_notes = sql_lite.create_list_of_notes();

            this.DictNotes = sql_lite.get_notes_ui_list();
            var notes = new List <ListViewNotesSell>();

            foreach (var note in list_notes)
            {
                if (note.text.Length > 20)
                {
                    string text = note.text.Substring(0, 20).Replace('\n', ' ') + "...";
                    notes.Add(new ListViewNotesSell(text, note.StartDate_raw));
                }
                else
                {
                    string text = note.text.Replace('\n', ' ');
                    notes.Add(new ListViewNotesSell(text, note.StartDate_raw));
                }
            }
            ListViewNotes.ItemsSource = notes;
        }