Наследование: EasterBase
Пример #1
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate (bundle);

            // Set our view from the "main" layout resource
            SetContentView (Resource.Layout.Main);

            textViewLastCommand = FindViewById<TextView> (Resource.Id.textViewLastCommand);

            var EasyEgg = new CustomEgg ("Easy").WatchForSequence (
                Command.SwipeUp (), Command.SwipeDown (), Command.Tap ());

            easter = new EggsToGo.Easter (new KonamiCode (), new MortalKombatCode (), EasyEgg);
            easter.CommandDetected += (command) => RunOnUiThread(() => textViewLastCommand.Text = command.Value);
            easter.EggDetected += (egg) => Toast.MakeText(this, "You've entered the " + egg.Name + " Code!", ToastLength.Long).Show();
        }
Пример #2
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Main);

            textViewLastCommand = FindViewById <TextView> (Resource.Id.textViewLastCommand);

            var EasyEgg = new CustomEgg("Easy").WatchForSequence(
                Command.SwipeUp(), Command.SwipeDown(), Command.Tap());

            easter = new EggsToGo.Easter(new KonamiCode(), new MortalKombatCode(), EasyEgg);
            easter.CommandDetected += (command) => RunOnUiThread(() => textViewLastCommand.Text = command.Value);
            easter.EggDetected     += (egg) => Toast.MakeText(this, "You've entered the " + egg.Name + " Code!", ToastLength.Long).Show();
        }