コード例 #1
0
        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();
            };
        }
コード例 #2
0
        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);
        }