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 { try { var request = new Amazon.SimpleDB.Model.CreateDomainRequest (); request.DomainName = "HIGH_SCORE_DOMAIN"; _simpleDBClient.CreateDomain (request); } catch (Exception e) { Console.WriteLine ("CreateDomain: " + e.Message); } }; }
public override void ViewDidLoad () { base.ViewDidLoad (); try { var request = new Amazon.SimpleDB.Model.CreateDomainRequest (); request.DomainName = "HIGH_SCORE_DOMAIN"; _simpleDBClient.CreateDomain (request); } catch (Exception e) { Console.WriteLine ("CreateDomain: " + e.Message); } }