Ejemplo n.º 1
0
        public void RestoreNonSerializable(DrawingCanvas parent)
        {
            invalidationList  = new List <short>(10);
            copyIndexes       = new List <short>(2);
            isDirty           = false;
            parent.MouseDown += new MouseEventHandler(parent_MouseDown);
            parent.MouseUp   += new MouseEventHandler(parent_MouseUp);
            parent.MouseMove += new MouseEventHandler(parent_MouseMove);
            shapeClipRect     = new ShapeClipRectangle();

            refControl  = parent;
            intCurIndex = -1;

            for (short i = 0; i < shapes.Count; i++)
            {
                this.shapes[i].RestoreNonSerializable();
            }
            try
            {
                if (strBackBmpPath != "" &&
                    strBackBmpPath != null)
                {
                    backBmp = new Bitmap(strBackBmpPath);
                    refControl.Invalidate();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Background Image Load Error");
            }
        }
Ejemplo n.º 2
0
        public void RestoreNonSerializable(DrawingCanvas parent)
        {
            invalidationList = new List<short>(10);
            copyIndexes = new List<short>(2);
            isDirty = false;
            parent.MouseDown += new MouseEventHandler(parent_MouseDown);
            parent.MouseUp += new MouseEventHandler(parent_MouseUp);
            parent.MouseMove += new MouseEventHandler(parent_MouseMove);
            shapeClipRect = new ShapeClipRectangle();

            refControl = parent;
            intCurIndex = -1;

            for (short i = 0; i < shapes.Count; i++)
            {
                this.shapes[i].RestoreNonSerializable();
            }
            try
            {
                if (strBackBmpPath != "" &&
                    strBackBmpPath != null)
                {
                    backBmp = new Bitmap(strBackBmpPath);
                    refControl.Invalidate();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Background Image Load Error");
            }
        }