Beispiel #1
0
 protected override void OnPaintLayer(Skimpt3.classes.PaintLayerEventArgs e)
 {
     //this.clientSize (in the base class on initializing) calls the onPaintLayer internally. Which means it
     //calls the OnPaintLayer method in the derived class. Which in turn
     //calls the base OnPaintLayer which invokes the event.
     PaintUI(e.Graphics);
     base.OnPaintLayer(e);
 }
Beispiel #2
0
        /// <summary>
        /// Raises the <see cref="PaintLayer"/> event.
        /// </summary>
        /// <param name="e">A <see cref="PaintLayerEventArgs"/> object containing the
        /// event data.</param>
        protected virtual void OnPaintLayer(PaintLayerEventArgs e)
        {
            EventHandler <PaintLayerEventArgs> handler = PaintLayer;

            if (!DesignMode && (handler != null))
            {
                PaintLayer(this, e);
            }
        }
Beispiel #3
0
        protected void PaintLayeredWindow(Bitmap bitmap)
        {
            if (bitmap.PixelFormat != PixelFormat.Format32bppArgb)
            {
                throw new ArgumentException("The bitmap must be 32bpp with an alpha-channel.", "bitmap");
            }

            using (PaintLayerEventArgs args = new PaintLayerEventArgs(bitmap)) {
                OnPaintLayer(args);
                PaintNative(bitmap, LayerOpacityAsByte);
            }
            Console.WriteLine("PaintLayerdWindow base");
        }
Beispiel #4
0
        protected void PaintLayeredWindow(Bitmap bitmap)
        {
            if (bitmap.PixelFormat != PixelFormat.Format32bppArgb)
                throw new ArgumentException("The bitmap must be 32bpp with an alpha-channel.", "bitmap");

            using (PaintLayerEventArgs args = new PaintLayerEventArgs(bitmap)) {
                OnPaintLayer(args);
                PaintNative(bitmap, LayerOpacityAsByte);
            }
            Console.WriteLine("PaintLayerdWindow base");
        }
Beispiel #5
0
 /// <summary>
 /// Raises the <see cref="PaintLayer"/> event.
 /// </summary>
 /// <param name="e">A <see cref="PaintLayerEventArgs"/> object containing the 
 /// event data.</param>
 protected virtual void OnPaintLayer(PaintLayerEventArgs e)
 {
     EventHandler<PaintLayerEventArgs> handler = PaintLayer;
     if (!DesignMode && (handler != null))
         PaintLayer(this, e);
 }