Exemplo n.º 1
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            power = new Power (2);

            // 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 {
                RunTests ();
                var number = power.Compute (count++);
                button.Text = string.Format("{0} is the power", number);
            };
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            var power = new Power (8);
            Console.WriteLine (power.Compute (8));

            Console.WriteLine (TestWeb.TestType ().FullName);

            var test = new TestWeb ();
            var task = test.TestAsync ("http://www.xamarin.com/");
            var res = task.Result;
            Console.WriteLine (res);

            var windows = new TestSystemWindows ();
            var notify = windows.Test () as INotifyCollectionChanged;
            notify.CollectionChanged += delegate
            {
                Console.WriteLine ("COLLECTION CHANGED!");
            };
            Console.WriteLine (notify);
        }