Exemplo n.º 1
0
        /// <summary>
        /// 重置图像.
        /// </summary>
        private void btnReset_Click(object sender, EventArgs e)
        {
            imgManipulator.Dispose();

            // 从本地文件加载位图.
            Bitmap img = new Bitmap("OneCodeIcon.png");

            // 初始化 imgManipulator.
            imgManipulator = new ImageManipulator(img);

            // 重绘 pnlImage.
            imgManipulator.DrawControl(this.pnlImage, adjustment, pen);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Reset the bmpEx.
        /// </summary>
        private void btnReset_Click(object sender, EventArgs e)
        {
            // Dispose the bmpEx.
            imgManipulator.Dispose();

            // Load a bitmap from a local file.
            Bitmap img = new Bitmap("OneCodeIcon.png");

            // Initialize the bmpEx.
            imgManipulator = new ImageManipulator(img);

            // Redraw the pnlImage.
            imgManipulator.DrawControl(this.pnlImage, adjustment, pen);
        }