Example #1
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            // Remove the title bar
            RequestWindowFeature(WindowFeatures.NoTitle);

            SetContentView(Resource.Layout.main);

            // Look up the happy shiny buttons
            start_button        = FindViewById <Button> (Resource.Id.Button01);
            start_button.Click += new EventHandler(StartButton_Click);

            retry_button        = FindViewById <Button> (Resource.Id.Button02);
            retry_button.Click += new EventHandler(RetryButton_Click);

            // Get handles for instruction text and game timer text
            text_view  = FindViewById <TextView> (Resource.Id.text);
            timer_view = FindViewById <TextView> (Resource.Id.timer);

            // Get handles to the JetView from XML and the JET thread.
            JetBoyView jetboy_view = FindViewById <JetBoyView> (Resource.Id.JetBoyView);

            jetboy_view.Initialize(timer_view, retry_button, text_view);
            jetboy_thread = jetboy_view.GetThread();
        }
Example #2
0
		public void Initialize (TextView timerView, Button retryButton, TextView textView)
		{
			timer_view = timerView;
			retry_button = retryButton;
			text_view = textView;

			// register our interest in hearing about changes to our surface
			ISurfaceHolder holder = Holder;
			holder.AddCallback (this);
			
			// create thread only; it's started in SurfaceCreated()
			// except if used in the layout editor.
			if (IsInEditMode == false)
				thread = new JetBoyThread (holder, Context, scores, new MessageHandler (timer_view, retry_button, text_view, scores));
		}
Example #3
0
        public void Initialize(TextView timerView, Button retryButton, TextView textView)
        {
            timer_view   = timerView;
            retry_button = retryButton;
            text_view    = textView;

            // register our interest in hearing about changes to our surface
            ISurfaceHolder holder = Holder;

            holder.AddCallback(this);

            // create thread only; it's started in SurfaceCreated()
            // except if used in the layout editor.
            if (IsInEditMode == false)
            {
                thread = new JetBoyThread(holder, Context, scores, new MessageHandler(timer_view, retry_button, text_view, scores));
            }
        }
 public CountDownTimerTask(JetBoyThread thread)
 {
     this.thread = thread;
 }
		public CountDownTimerTask (JetBoyThread thread)
		{
			this.thread = thread;
		}
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate (bundle);

            // Remove the title bar
            RequestWindowFeature (WindowFeatures.NoTitle);

            SetContentView (Resource.Layout.main);

            // Look up the happy shiny buttons
            start_button = FindViewById<Button> (Resource.Id.Button01);
            start_button.Click += new EventHandler (StartButton_Click);

            retry_button = FindViewById<Button> (Resource.Id.Button02);
            retry_button.Click += new EventHandler (RetryButton_Click);

            // Get handles for instruction text and game timer text
            text_view = FindViewById<TextView> (Resource.Id.text);
            timer_view = FindViewById<TextView> (Resource.Id.timer);

            // Get handles to the JetView from XML and the JET thread.
            JetBoyView jetboy_view = FindViewById<JetBoyView> (Resource.Id.JetBoyView);

            jetboy_view.Initialize (timer_view, retry_button, text_view);
            jetboy_thread = jetboy_view.GetThread ();
        }