Ejemplo n.º 1
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            this.ActionBar.Hide();
            na      = this;
            _player = MediaPlayer.Create(this, Resource.Raw.feuille);
            // Create your application here
            SetContentView(Resource.Layout.Note);
            time          = new Timer(2000);
            time.Elapsed += new ElapsedEventHandler(ouvre_menu);
            time.Enabled  = true;
            Button button = FindViewById <Button>(Resource.Id.button1);

            /*button.Click += delegate
             * {
             *  var intent = new Intent(this, typeof(Main1));
             *  StartActivity(intent);
             *  _player.Stop();
             * };*/
        }
        async void OnListViewItemSelected(object sender, SelectedItemChangedEventArgs e)
        {
            Activity act;

            if (e.SelectedItem != null)
            {
                act = e.SelectedItem as Activity;
                var nactivity = new NoteActivity()
                {
                    AgendaID   = a.ID,
                    ActivityID = act.ID
                };
                await App.Database.SaveNoteActivityAsync(nactivity);

                act.NoteActivities = new List <NoteActivity> {
                    nactivity
                };

                await Navigation.PopAsync();
            }
        }