Example #1
0
 private void _miMode_Click(object sender, System.EventArgs e)
 {
     if (sender == _miModePartialImage) //_miModePartialImage
     {
         _paintWhileLoadOption = PaintWhileLoadOption.PartialImage;
     }
     else //_miModeBuffer
     {
         _paintWhileLoadOption = PaintWhileLoadOption.Buffer;
     }
     UpdateMyControls();
 }
Example #2
0
        /// <summary>
        /// Initialize the Application.
        /// </summary>
        private void MainForm_Load(object sender, System.EventArgs e)
        {
            Messager.Caption = "LEADTOOLS for .NET C# Paint While Load Demo";
            Text             = Messager.Caption;
            KeyPreview       = true;

            // initialize the _viewer object
            _viewer           = new ImageViewer();
            _viewer.Dock      = DockStyle.Fill;
            _viewer.BackColor = Color.DarkGray;
            Controls.Add(_viewer);
            _viewer.BringToFront();

            // initialize the codecs object.
            _codecs = new RasterCodecs();
            _codecs.Options.Load.Passes = -2; // load all passes

            // initialize other variables
            _paintWhileLoadOption = PaintWhileLoadOption.Buffer;
            _isLoading            = false;
            _cancelLoad           = false;

            UpdateMyControls();
        }