Exemplo n.º 1
0
        public NotaInlineView(Context context, NotaUtente nota, ViewerScreen docView) : base(context)
        {
            _docView = docView;
            _nota    = nota;

            View.Inflate(this.Context, Resource.Layout.NotaInlineView, this);

            NoteManager noteMan = new NoteManager(docView.Pubblicazione);

            noteMan.LoadNota(nota);

            _txtNota = FindViewById <EditText>(Resource.Id.txtNota);
            //txtNota.SetBackgroundColor(Color.Red);
            _txtNota.SetText(nota.Testo, TextView.BufferType.Normal);

            SetTextStyle();

            _docView.ReaderView.OnSingleTap += OnParentTap;

            _txtNota.TextChanged += delegate
            {
                nota.Testo = _txtNota.Text;
                noteMan.EditNota(nota);
            };
        }
Exemplo n.º 2
0
        private void SendNotes()
        {
            string body = "";

            foreach (NotaUtente n in _noteManager.GetNote())
            {
                NotaUtente nota = n;

                body += nota.Titolo + "\n";
                body += nota.Testo + "\n";
                body += "-------------------------------------------------------------------------\n";
            }

            if (body == string.Empty)
            {
                return;
            }

            //apro l'app mail
            var email = new Intent(Intent.ActionSend);

            email.SetType("text/html");

            email.PutExtra(Android.Content.Intent.ExtraSubject, string.Format(GetString(Resource.String.pub_sendNotesFrom), Activity.ApplicationInfo.LoadLabel(Activity.PackageManager)));            //string.Format("Sending notes from {0}".t(), ));
            email.PutExtra(Android.Content.Intent.ExtraText, body);

            Activity.StartActivity(email);
        }
Exemplo n.º 3
0
        public ViewerNoteEdit(NotaUtente nota, Pubblicazione pub)
        {
            _pubblicazione = pub;
            _nota          = nota;

            _noteManager = new NoteManager(_pubblicazione);
            _noteManager.LoadNota(_nota);
        }