VAGSuite.FormFindCancel.Dispose C# (CSharp) Метод

Dispose() защищенный Метод

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool
Результат void
        protected override void Dispose( bool disposing )
        {
            if( disposing )
            {
                if(components != null)
                {
                    components.Dispose();
                }
            }
            base.Dispose( disposing );
        }

Usage Example

Пример #1
0
        void FindNext()
        {
            if (_findBuffer.Length == 0)
            {
                Find();
                return;
            }

            // show cancel dialog
            _formFindCancel = new FormFindCancel();
            _formFindCancel.SetHexBox(hexBox1);
            _formFindCancel.Closed += new EventHandler(FormFindCancel_Closed);
            _formFindCancel.Show();

            // block activation of main form
            //Activated += new EventHandler(FocusToFormFindCancel);

            // start find process
            FindOptions fo = new FindOptions();

            fo.Hex  = _findBuffer;
            fo.Type = FindType.Hex;

            //long res = hexBox1.Find(_findBuffer, hexBox1.SelectionStart + hexBox1.SelectionLength);
            long res = hexBox1.Find(fo);

            _formFindCancel.Dispose();

            // unblock activation of main form
            //Activated -= new EventHandler(FocusToFormFindCancel);

            if (res == -1) // -1 = no match
            {
                MessageBox.Show("Find reached end of file", "EDC15P Suite",
                                MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else if (res == -2) // -2 = find was aborted
            {
                return;
            }
            else // something was found
            {
                if (!hexBox1.Focused)
                {
                    hexBox1.Focus();
                }
            }

            ManageAbility();
        }
All Usage Examples Of VAGSuite.FormFindCancel::Dispose