Esempio n. 1
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.Main);
            _messageDb       = new MessageDb(_databasePath);
            _textViewMessage = FindViewById <TextView> (Resource.Id.editTextMessage);
            var button = FindViewById <Button> (Resource.Id.buttonSave);

            button.Click += delegate {
                Save();
            };

            button        = FindViewById <Button> (Resource.Id.buttonSend);
            button.Click += delegate {
                var intent = new Intent(Android.Content.Intent.ActionSend);
                intent.SetType("text/plain");
                intent.PutExtra(Intent.ExtraEmail, new String[] { });
                intent.PutExtra(Intent.ExtraSubject, "Zetetic Message Database");
                intent.PutExtra(Intent.ExtraText, "Please find a database attached");

                string url = MessageDbProvider.CONTENT_URI.ToString() + "message.db";
                intent.PutExtra(Intent.ExtraStream, Android.Net.Uri.Parse(url));
                StartActivity(intent);
            };
        }
Esempio n. 2
0
		protected override void OnCreate (Bundle bundle)
		{
			base.OnCreate (bundle);
			SetContentView (Resource.Layout.Main);
			_messageDb = new MessageDb(_databasePath);
			_textViewMessage = FindViewById<TextView> (Resource.Id.editTextMessage);
			var button = FindViewById<Button> (Resource.Id.buttonSave);
			button.Click += delegate {
				Save ();
			};

			button = FindViewById<Button> (Resource.Id.buttonSend);
			button.Click += delegate {
				var intent = new Intent(Android.Content.Intent.ActionSend);
				intent.SetType("text/plain");
				intent.PutExtra(Intent.ExtraEmail, new String[] { });
				intent.PutExtra(Intent.ExtraSubject, "Zetetic Message Database");
				intent.PutExtra(Intent.ExtraText, "Please find a database attached");

				string url = MessageDbProvider.CONTENT_URI.ToString() + "message.db";
				intent.PutExtra(Intent.ExtraStream, Android.Net.Uri.Parse(url));
				StartActivity(intent);
			};

		}
Esempio n. 3
0
		public override void ViewDidLoad ()
		{
			base.ViewDidLoad ();
			_messageDb = new MessageDb(_databasePath);
		}
 public override void ViewDidLoad()
 {
     base.ViewDidLoad();
     _messageDb = new MessageDb(_databasePath);
 }