protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); // Set our view from the "main" layout resource SetContentView(Resource.Layout.Main); // Get our button from the layout resource, // and attach an event to it Button button = FindViewById <Button> (Resource.Id.myButton); button.Click += delegate { var test = new StandardInvitationService(); var testinvite = new Invitation() { EventName = "Farm Party" }; var friendlist = new List <Friend>(); friendlist.Add(new AndroidFriend() { PhoneNumber = "5407356190" }); Task.Factory.StartNew(() => test.SendInvitations(testinvite, friendlist, 9999999, 1, "Hello Johnny", 1)); }; }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); var manager = Manager.SharedInstance; var dbName = "temp"; var database = manager.GetDatabase(dbName); manager.GetDatabase("friendmanager"); Console.WriteLine("Database created"); // Set our view from the "main" layout resource SetContentView(Resource.Layout.Main); CreateEvent.Click += delegate { Intent intent = new Intent(this, typeof(CreateEventActivity)); StartActivity(intent); }; SendDebugMessage.Click += delegate { var test = new StandardInvitationService(); var testinvite = new Invitation() { EventName = "Farm Party" }; var friendlist = new List <Friend>(); //friendlist.Add(new AndroidFriend() { PhoneNumber = "5713349977" }); friendlist.Add(new AndroidFriend() { PhoneNumber = "5712949591" }); friendlist.Add(new AndroidFriend() { PhoneNumber = "5712949590" }); //friendlist.Add(new AndroidFriend(){PhoneNumber = "5712949590"}); Android.Widget.Toast.MakeText(this, "Sent text", ToastLength.Short).Show(); Task.Factory.StartNew(() => test.SendInvitations(testinvite, friendlist, 30000, 1, "Text back something vauge.", 1)); }; }