public override void ViewDidLoad() { base.ViewDidLoad(); // Perform any additional setup after loading the view, typically from a nib. QuoteBox.Text = _chuckNorrisQuotes.GetNextQuote(); NextQuote.TouchUpInside += (object sender, EventArgs e) => { QuoteBox.Text = _chuckNorrisQuotes.GetNextQuote(); }; }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); SetContentView(Resource.Layout.Quotes); var nextButton = FindViewById <Button>(Resource.Id.NextQuote); var quoteText = FindViewById <TextView>(Resource.Id.QuoteText); nextButton.Click += delegate { quoteText.Text = _chuckNorrisQuotes.GetNextQuote(); }; }
partial void nextQuoteClicked(NSObject sender) { var quote = chuckNorrisQuotes.GetNextQuote(); labelChuckSays.StringValue = quote; }
private void UpdateWithNextQuote() { CurrentQuote.Text = _chuckNorrisQuotes.GetNextQuote(); }
public void TestFirst() { var nextQuote = _chuckNorrisQuotes.GetNextQuote(); Assert.AreEqual("Chuck Norris doesn't dial the wrong number. You answered the wrong phone.", nextQuote); }