Esempio n. 1
0
        /// <summary>
        /// Deletes the current sketch and restores this panel to its original state.
        /// Useful for restarting this panel in order to start over and create a new
        /// sketch.
        /// </summary>
        public virtual void InitPanel()
        {
            // Set double buffering of Panel
            this.SetStyle(ControlStyles.UserPaint |
                          ControlStyles.AllPaintingInWmPaint |
                          ControlStyles.OptimizedDoubleBuffer, true);

            // Set up InkPicture
            inkPic = new mInkPicture();
            this.Controls.Clear();
            this.Controls.Add(this.inkPic);
            setDefaultInkPicProps();

            // Init InkSketch
            inkSketch = new InkPictureSketch(inkPic);

            // Hook into ink events
            attachToInkPicure();

            // Zero the focus parameter
            lastFocus = 0L;

            // The sketch has not been recognized
            this.recognized = false;
        }