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(); };
        }
예제 #3
0
        partial void nextQuoteClicked(NSObject sender)
        {
            var quote = chuckNorrisQuotes.GetNextQuote();

            labelChuckSays.StringValue = quote;
        }
예제 #4
0
 private void UpdateWithNextQuote()
 {
     CurrentQuote.Text = _chuckNorrisQuotes.GetNextQuote();
 }
예제 #5
0
        public void TestFirst()
        {
            var nextQuote = _chuckNorrisQuotes.GetNextQuote();

            Assert.AreEqual("Chuck Norris doesn't dial the wrong number. You answered the wrong phone.", nextQuote);
        }