Beispiel #1
0
        void InitCanvas(IReflectorCanvas i)
        {
            StaticInit();
            //keyboard = new Keyboard();
            ICanvas          = i;
            flags            = new canvas_flags();
            pages            = new List <page>();
            ContextMenuStrip = null;

            InitializeComponent();
            SetStyle(ControlStyles.UserPaint, true);
            SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            SetStyle(ControlStyles.DoubleBuffer, true);
            SetStyle(ControlStyles.SupportsTransparentBackColor, true);
            SetStyle(ControlStyles.Opaque, false);              // no background
            SetStyle(ControlStyles.UserPaint, true);            // generate paint
            SetStyle(ControlStyles.AllPaintingInWmPaint, true); // skip paintbackground

            this.MouseMove += new MouseEventHandler(Canvas_MouseMove);
            //this.BackgroundImage = current_page.background_image;
            this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;

            this.ControlAdded += new ControlEventHandler(Canvas_ControlAdded);

            buttons = new buttons_class();              // mouse buttons
        }
Beispiel #2
0
 public Canvas(IReflectorCanvas i)
 {
     InitCanvas(i);
 }