コード例 #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();
        }
コード例 #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));
		}
コード例 #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));
            }
        }
コード例 #4
0
 public CountDownTimerTask(JetBoyThread thread)
 {
     this.thread = thread;
 }
コード例 #5
0
		public CountDownTimerTask (JetBoyThread thread)
		{
			this.thread = thread;
		}
コード例 #6
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 ();
        }