示例#1
0
        // Disposer
        internal override void Dispose()
        {
            // Not already disposed?
            if (!isdisposed)
            {
                // Clean up
                if (thingcage != null)
                {
                    thingcage.Dispose();
                }
                if (thingarrow != null)
                {
                    thingarrow.Dispose();                       // villsa 9/15/11
                }
                if (selectionimage != null)
                {
                    selectionimage.Dispose();
                }
                if (highlightimage != null)
                {
                    highlightimage.Dispose();
                }
                thingcage      = null;
                thingarrow     = null; // villsa 9/15/11
                selectionimage = null;
                highlightimage = null;

                // Done
                base.Dispose();
            }
        }
        void ReleaseDesignerOutlets()
        {
            if (AddVehicleButton != null)
            {
                AddVehicleButton.Dispose();
                AddVehicleButton = null;
            }

            if (CancelButton != null)
            {
                CancelButton.Dispose();
                CancelButton = null;
            }

            if (ColorImage != null)
            {
                ColorImage.Dispose();
                ColorImage = null;
            }

            if (ColorTextField != null)
            {
                ColorTextField.Dispose();
                ColorTextField = null;
            }

            if (MakeAndModelImage != null)
            {
                MakeAndModelImage.Dispose();
                MakeAndModelImage = null;
            }

            if (MakeAndModeltextField != null)
            {
                MakeAndModeltextField.Dispose();
                MakeAndModeltextField = null;
            }

            if (PlateNumberImage != null)
            {
                PlateNumberImage.Dispose();
                PlateNumberImage = null;
            }

            if (PlateNumberTextField != null)
            {
                PlateNumberTextField.Dispose();
                PlateNumberTextField = null;
            }

            if (StateImage != null)
            {
                StateImage.Dispose();
                StateImage = null;
            }

            if (StateTextField != null)
            {
                StateTextField.Dispose();
                StateTextField = null;
            }

            if (YearImage != null)
            {
                YearImage.Dispose();
                YearImage = null;
            }

            if (YearTextField != null)
            {
                YearTextField.Dispose();
                YearTextField = null;
            }
        }