Beispiel #1
0
        public KpImageViewer()
        {
            // DrawEngine & DrawObject initiralization
            drawEngine = new KP_DrawEngine();
            drawing    = new KP_DrawObject(this);

            grabCursor = System.Windows.Forms.Cursors.PanNE;

            dragCursor = System.Windows.Forms.Cursors.SizeAll;

            InitializeComponent();

            InitControl();

            //Preview();
        }
Beispiel #2
0
        public KpImageViewer()
        {
            imgList.Clear();
            // DrawEngine & DrawObject initiralization
            drawEngine = new KP_DrawEngine();
            drawing    = new KP_DrawObject(this);

            // Stream to initialize the cursors.
            Stream imgStream = null;

            try
            {
                Assembly a = Assembly.GetExecutingAssembly();

                imgStream = a.GetManifestResourceStream("KaiwaProjects.Resources.Grab.cur");
                if (imgStream != null)
                {
                    grabCursor = new Cursor(imgStream);
                    imgStream  = null;
                }

                imgStream = a.GetManifestResourceStream("KaiwaProjects.Resources.Drag.cur");
                if (imgStream != null)
                {
                    dragCursor = new Cursor(imgStream);
                    imgStream  = null;
                }
            }
            catch
            {
                // Cursors could not be found
            }

            InitializeComponent();

            InitControl();

            Preview();

            this.pbFull.SetParent(this);
        }