Beispiel #1
0
        private void BtnExcluir_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            var         notas     = StaticKeys.Notas.Where(x => x.Content == NotaContent.Text);
            List <Nota> notasList = notas.ToList();

            foreach (Nota nota in notasList)
            {
                new NotaController().removeNota(nota);
            }

            Mural.renderNotas();
        }
        private void BtnNovaNota_Click(object sender, RoutedEventArgs e)
        {
            String text = new TextRange(txtNota.Document.ContentStart, txtNota.Document.ContentEnd).Text;

            if (text.Trim() == "")
            {
                return;
            }


            new NotaController().addNota(new Nota()
            {
                Content = text,
                IdFunc  = StaticKeys.id_func
            });

            txtNota.Document.Blocks.Clear();
            Mural.renderNotas();
        }