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

            // Create and attach the view that is responsible for painting.
            mView = new PaintView(this);
            SetContentView(mView);
            mView.RequestFocus();

            // Restore the fading option if we are being thawed from a
            // previously saved state.  Note that we are not currently remembering
            // the contents of the bitmap.
            if (bundle != null)
            {
                mFading           = bundle.GetBoolean("fading", true);
                mView.mColorIndex = bundle.GetInt("color", 0);
            }
            else
            {
                mFading           = true;
                mView.mColorIndex = 0;
            }

            mHandler = new MyHandler(this);
        }
Beispiel #2
0
 void IView.RemovePaintHandler(PaintBuffer.DrawingAspect aspect, PaintView PaintHandler)
 {
 }
Beispiel #3
0
 //void IView.SetPaintHandler(CADability.PaintBuffer.DrawingAspect aspect, CADability.RepaintView PaintHandler)
 //{
 //    if (paintBuffer != null)
 //    {
 //        switch (aspect)
 //        {
 //            case PaintBuffer.DrawingAspect.Background: throw new NotImplementedException();
 //            case PaintBuffer.DrawingAspect.Drawing: RepaintDrawingEvent += PaintHandler; break;
 //            case PaintBuffer.DrawingAspect.Select: RepaintSelectEvent += PaintHandler; break;
 //            case PaintBuffer.DrawingAspect.Active: RepaintActiveEvent += PaintHandler; break;
 //        }
 //    }
 //}
 //void IView.RemovePaintHandler(CADability.PaintBuffer.DrawingAspect aspect, CADability.RepaintView PaintHandler)
 //{
 //    if (paintBuffer != null)
 //    {
 //        switch (aspect)
 //        {
 //            case PaintBuffer.DrawingAspect.Background: throw new NotImplementedException();
 //            case PaintBuffer.DrawingAspect.Drawing: RepaintDrawingEvent -= PaintHandler; break;
 //            case PaintBuffer.DrawingAspect.Select: RepaintSelectEvent -= PaintHandler; break;
 //            case PaintBuffer.DrawingAspect.Active: RepaintActiveEvent -= PaintHandler; break;
 //        }
 //    }
 //}
 void IView.SetPaintHandler(PaintBuffer.DrawingAspect aspect, PaintView PaintHandler)
 {
     // nicht sicher, ob das gebraucht wird ...
 }
		protected override void OnCreate (Bundle bundle)
		{
			base.OnCreate (bundle);

			// Create and attach the view that is responsible for painting.
			mView = new PaintView (this);
			SetContentView (mView);
			mView.RequestFocus ();

			// Restore the fading option if we are being thawed from a
			// previously saved state.  Note that we are not currently remembering
			// the contents of the bitmap.
			if (bundle != null) {
				mFading = bundle.GetBoolean ("fading", true);
				mView.mColorIndex = bundle.GetInt ("color", 0);
			} else {
				mFading = true;
				mView.mColorIndex = 0;
			}

			mHandler = new MyHandler (this);
		}